This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sequel" | |
require "shrine" | |
require "shrine/storage/memory" | |
require "zip" | |
require "tempfile" | |
require "securerandom" | |
DB = Sequel.sqlite | |
DB.create_table :archives do | |
primary_key :id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "mongoid" | |
require "shrine" | |
require "shrine/storage/memory" | |
require "stringio" | |
Mongoid.configure do |config| | |
config.clients.default = { hosts: ['localhost:27017'], database: 'my_db' } | |
config.log_level = :debug | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "sequel" | |
require "benchmark" | |
system "createdb testing" | |
DB = Sequel.postgres("testing") | |
at_exit do | |
DB.disconnect | |
system "dropdb testing" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "roda" | |
gem "http", "~> 3.3" | |
gem "rest-client" | |
gem "httparty" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shrine | |
module Plugins | |
# The `concatenation` plugin allows you to assign to the attacher a | |
# cached file which is composed of multiple uploaded parts. The plugin | |
# will then call `#concat` on the storage, which is expected to | |
# concatenate the given parts into a single file. The assigned | |
# attachment will then be a complete cached file. | |
# | |
# plugin :concatenation | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem "shrine", github: "janko-m/shrine" | |
gem "rom-repository" | |
gem "rom-sql" | |
gem "sqlite3" | |
gem "dry-validation" | |
gem "roda" | |
gem "sucker_punch", "~> 2.0" |
Hey Sean,
I just encountered your "The Bike Shed" podcast, concretely number #56 where you were talking about the "ActiveRecord is Reinventing Sequel" post I wrote. I'm sorry that this post struck you as negative, and that it made you feel like I was attacking you. I admit that I did feel some negative energy while I was writing it, but I still felt like I needed to say it.
Firstly, you said in the podcast that you would like to read an article which shows parts where Sequel is better than ActiveRecord. However, I did link my previous "Ode to Sequel" post in the first paragraph of my post, and soon after added two more. So I think it's a bit unfair that I was pr