sequelize-rails 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.standard.yml +4 -0
- data/Appraisals +14 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +213 -0
- data/LICENSE.txt +21 -0
- data/README.md +53 -0
- data/Rakefile +14 -0
- data/bin/console +18 -0
- data/bin/setup +10 -0
- data/bin/test +4 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_6.gemfile +12 -0
- data/gemfiles/rails_7.gemfile +12 -0
- data/lib/sequel/extensions/sequel_instrumentation.rb +13 -0
- data/lib/sequel/plugins/pretty_print.rb +24 -0
- data/lib/sequelize-rails.rb +1 -0
- data/lib/sequelize_rails/db_console.rb +10 -0
- data/lib/sequelize_rails/generators/application_record/application_record_generator.rb +24 -0
- data/lib/sequelize_rails/generators/application_record/templates/application_record.rb.tt +11 -0
- data/lib/sequelize_rails/generators/migration/migration_generator.rb +21 -0
- data/lib/sequelize_rails/generators/migration/templates/migration.rb.erb +9 -0
- data/lib/sequelize_rails/generators/model/model_generator.rb +9 -0
- data/lib/sequelize_rails/railtie.rb +62 -0
- data/lib/sequelize_rails/railties/controller_runtime.rb +46 -0
- data/lib/sequelize_rails/railties/log_subscriber.rb +153 -0
- data/lib/sequelize_rails/translation_support.rb +13 -0
- data/lib/sequelize_rails/version.rb +5 -0
- data/lib/sequelize_rails.rb +29 -0
- data/lib/tasks.rake +201 -0
- data/sequelize-rails.gemspec +47 -0
- data/sig/sequelize_rails.rbs +4 -0
- metadata +206 -0
@@ -0,0 +1,153 @@
|
|
1
|
+
module SequelizeRails
|
2
|
+
module Railties
|
3
|
+
class LogSubscriber < ActiveSupport::LogSubscriber
|
4
|
+
IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"]
|
5
|
+
|
6
|
+
class_attribute :backtrace_cleaner, default: ActiveSupport::BacktraceCleaner.new
|
7
|
+
|
8
|
+
def self.runtime=(value)
|
9
|
+
Thread.current["sequel_sql_runtime"] = value
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.runtime
|
13
|
+
Thread.current["sequel_sql_runtime"] ||= 0
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.count=(value)
|
17
|
+
Thread.current["sequel_sql_count"] = value
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.count
|
21
|
+
Thread.current["sequel_sql_count"] ||= 0
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.reset_runtime
|
25
|
+
previous = runtime
|
26
|
+
self.runtime = 0
|
27
|
+
previous
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.reset_count
|
31
|
+
previous = count
|
32
|
+
self.count = 0
|
33
|
+
previous
|
34
|
+
end
|
35
|
+
|
36
|
+
def sql(event)
|
37
|
+
self.class.runtime += event.duration
|
38
|
+
self.class.count += 1
|
39
|
+
return unless logger.debug?
|
40
|
+
|
41
|
+
payload = event.payload
|
42
|
+
|
43
|
+
return if IGNORE_PAYLOAD_NAMES.include?(payload[:name])
|
44
|
+
|
45
|
+
name = format("%s (%.1fms)", payload[:name], event.duration)
|
46
|
+
sql = payload[:sql].squeeze(" ")
|
47
|
+
binds = nil
|
48
|
+
|
49
|
+
if payload[:binds]&.any?
|
50
|
+
casted_params = type_casted_binds(payload[:type_casted_binds])
|
51
|
+
|
52
|
+
binds = []
|
53
|
+
payload[:binds].each_with_index do |attr, i|
|
54
|
+
attribute_name = if attr.respond_to?(:name)
|
55
|
+
attr.name
|
56
|
+
elsif attr.respond_to?(:[]) && attr[i].respond_to?(:name)
|
57
|
+
attr[i].name
|
58
|
+
end
|
59
|
+
|
60
|
+
filtered_params = filter(attribute_name, casted_params[i])
|
61
|
+
|
62
|
+
binds << render_bind(attr, filtered_params)
|
63
|
+
end
|
64
|
+
binds = binds.inspect
|
65
|
+
binds.prepend(" ")
|
66
|
+
end
|
67
|
+
|
68
|
+
name = colorize_payload_name(name, payload[:name])
|
69
|
+
sql = color(sql, sql_color(sql), true) if colorize_logging
|
70
|
+
|
71
|
+
debug " #{name} #{sql}#{binds}"
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
75
|
+
|
76
|
+
def type_casted_binds(casted_binds)
|
77
|
+
casted_binds.respond_to?(:call) ? casted_binds.call : casted_binds
|
78
|
+
end
|
79
|
+
|
80
|
+
def render_bind(attr, value)
|
81
|
+
case attr
|
82
|
+
when ActiveModel::Attribute
|
83
|
+
if attr.type.binary? && attr.value
|
84
|
+
value = "<#{attr.value_for_database.to_s.bytesize} bytes of binary data>"
|
85
|
+
end
|
86
|
+
when Array
|
87
|
+
attr = attr.first
|
88
|
+
else
|
89
|
+
attr = nil
|
90
|
+
end
|
91
|
+
|
92
|
+
[attr&.name, value]
|
93
|
+
end
|
94
|
+
|
95
|
+
def colorize_payload_name(name, payload_name)
|
96
|
+
if payload_name.blank? || payload_name == "SQL" # SQL vs Model Load/Exists
|
97
|
+
color(name, WHITE, true)
|
98
|
+
else
|
99
|
+
color(name, CYAN, true)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def sql_color(sql)
|
104
|
+
case sql
|
105
|
+
when /\A\s*rollback/mi
|
106
|
+
RED
|
107
|
+
when /select .*for update/mi, /\A\s*lock/mi
|
108
|
+
CYAN
|
109
|
+
when /\A\s*select/i
|
110
|
+
CYAN
|
111
|
+
when /\A\s*insert/i
|
112
|
+
GREEN
|
113
|
+
when /\A\s*update/i
|
114
|
+
YELLOW
|
115
|
+
when /\A\s*delete/i
|
116
|
+
RED
|
117
|
+
when /transaction\s*\Z/i, /\A\s*begin/i, /\A\s*commit/i
|
118
|
+
BLUE
|
119
|
+
else
|
120
|
+
MAGENTA
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def logger
|
125
|
+
::Rails.application.config.sequel.logger
|
126
|
+
end
|
127
|
+
|
128
|
+
def debug(progname = nil, &block)
|
129
|
+
return unless super
|
130
|
+
|
131
|
+
if Rails.application.config.sequel.verbose_query_logs
|
132
|
+
log_query_source
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def log_query_source
|
137
|
+
source = extract_query_source_location(caller)
|
138
|
+
|
139
|
+
if source
|
140
|
+
logger.debug(" ↳ #{source}")
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
def extract_query_source_location(locations)
|
145
|
+
backtrace_cleaner.clean(locations.lazy).first
|
146
|
+
end
|
147
|
+
|
148
|
+
def filter(name, value)
|
149
|
+
ActiveRecord::Base.inspection_filter.filter_param(name, value)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module SequelizeRails
|
2
|
+
module TranslationSupport
|
3
|
+
def i18n_scope
|
4
|
+
:sequel
|
5
|
+
end
|
6
|
+
|
7
|
+
def lookup_ancestors
|
8
|
+
# ActiveModel uses the name of ancestors. Exclude unnamed classes, like
|
9
|
+
# those returned by Sequel::Model(...).
|
10
|
+
super.reject { |x| x.name.nil? }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "sequelize_rails/version"
|
4
|
+
require "sequelize_rails/railtie"
|
5
|
+
require "sequelize_rails/translation_support"
|
6
|
+
|
7
|
+
# Plugins
|
8
|
+
require "sequel/plugins/pretty_print"
|
9
|
+
|
10
|
+
# Generators
|
11
|
+
require "rails/generators"
|
12
|
+
require "sequelize_rails/generators/migration/migration_generator"
|
13
|
+
require "sequelize_rails/generators/model/model_generator"
|
14
|
+
require "sequelize_rails/generators/application_record/application_record_generator"
|
15
|
+
|
16
|
+
module SequelizeRails
|
17
|
+
mattr_accessor :configurations
|
18
|
+
|
19
|
+
# Opens a database connection based on the given configuration name
|
20
|
+
def self.connect_to config_name, opts = {}
|
21
|
+
config = SequelizeRails.configurations.resolve(config_name).configuration_hash.dup
|
22
|
+
config[:adapter] = "sqlite" if config[:adapter] == "sqlite3"
|
23
|
+
config[:max_connections] ||= config.delete(:pool) if config[:pool]
|
24
|
+
config[:pool_timeout] ||= config.delete(:timeout) / 1000 if config[:timeout]
|
25
|
+
Dir.chdir Rails.root do
|
26
|
+
Sequel.connect config, opts
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/tasks.rake
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# These tasks were copied from activerecord/lib/active_record/railties/databases.rake
|
4
|
+
# Lines that have been changed will be commented out with the replacement below
|
5
|
+
|
6
|
+
require "active_record"
|
7
|
+
require "active_support/configuration_file"
|
8
|
+
require "active_support/deprecation"
|
9
|
+
|
10
|
+
databases = ActiveRecord::Tasks::DatabaseTasks.setup_initial_database_yaml
|
11
|
+
|
12
|
+
ns = :db
|
13
|
+
db_namespace = namespace ns do
|
14
|
+
# Changed: this task was commented out
|
15
|
+
# desc "Set the environment value for the database"
|
16
|
+
# task "environment:set" => :load_config do
|
17
|
+
# raise ActiveRecord::EnvironmentStorageError unless ActiveRecord::InternalMetadata.enabled?
|
18
|
+
# ActiveRecord::InternalMetadata.create_table
|
19
|
+
# ActiveRecord::InternalMetadata[:environment] = ActiveRecord::Base.connection.migration_context.current_environment
|
20
|
+
# end
|
21
|
+
|
22
|
+
# Changed: this task now only checks the loaded environment
|
23
|
+
task check_protected_environments: :load_config do
|
24
|
+
# Disconnect any potentially-existing Sequel database connections
|
25
|
+
Sequel::DATABASES.each(&:disconnect)
|
26
|
+
raise "Error: the #{Rails.env} environment is a protected environment." unless Rails.env.test? || Rails.env.development?
|
27
|
+
end
|
28
|
+
|
29
|
+
task load_config: :environment do
|
30
|
+
if ActiveRecord::Base.configurations.empty?
|
31
|
+
# Changed: the active_record railtie may not be loaded, so we need to load the database configuration directly
|
32
|
+
# ActiveRecord::Base.configurations = ActiveRecord::Tasks::DatabaseTasks.database_configuration
|
33
|
+
ActiveRecord::Base.configurations = Rails.application.config.database_configuration
|
34
|
+
# This line was also added
|
35
|
+
ActiveRecord::Base.establish_connection
|
36
|
+
end
|
37
|
+
|
38
|
+
ActiveRecord::Migrator.migrations_paths = ActiveRecord::Tasks::DatabaseTasks.migrations_paths
|
39
|
+
end
|
40
|
+
|
41
|
+
namespace :create do
|
42
|
+
task all: :load_config do
|
43
|
+
ActiveRecord::Tasks::DatabaseTasks.create_all
|
44
|
+
end
|
45
|
+
|
46
|
+
ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
|
47
|
+
desc "Create #{name} database for current environment"
|
48
|
+
task name => :load_config do
|
49
|
+
db_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: name)
|
50
|
+
ActiveRecord::Tasks::DatabaseTasks.create(db_config)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to creating the development and test databases, except when DATABASE_URL is present."
|
56
|
+
task create: [:load_config] do
|
57
|
+
ActiveRecord::Tasks::DatabaseTasks.create_current
|
58
|
+
end
|
59
|
+
|
60
|
+
namespace :drop do
|
61
|
+
task all: [:load_config, :check_protected_environments] do
|
62
|
+
ActiveRecord::Tasks::DatabaseTasks.drop_all
|
63
|
+
end
|
64
|
+
|
65
|
+
ActiveRecord::Tasks::DatabaseTasks.for_each(databases) do |name|
|
66
|
+
desc "Drop #{name} database for current environment"
|
67
|
+
task name => [:load_config, :check_protected_environments] do
|
68
|
+
db_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: name)
|
69
|
+
ActiveRecord::Tasks::DatabaseTasks.drop(db_config)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
desc "Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config). Without RAILS_ENV or when RAILS_ENV is development, it defaults to dropping the development and test databases, except when DATABASE_URL is present."
|
75
|
+
task drop: [:load_config, :check_protected_environments] do
|
76
|
+
db_namespace[:"drop:_unsafe"].invoke
|
77
|
+
end
|
78
|
+
|
79
|
+
task "drop:_unsafe": [:load_config] do
|
80
|
+
ActiveRecord::Tasks::DatabaseTasks.drop_current
|
81
|
+
end
|
82
|
+
|
83
|
+
namespace :purge do
|
84
|
+
task all: [:load_config, :check_protected_environments] do
|
85
|
+
ActiveRecord::Tasks::DatabaseTasks.purge_all
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# desc "Truncates tables of each database for current environment"
|
90
|
+
task truncate_all: [:load_config, :check_protected_environments] do
|
91
|
+
ActiveRecord::Tasks::DatabaseTasks.truncate_all
|
92
|
+
end
|
93
|
+
|
94
|
+
# desc "Empty the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:purge:all to purge all databases in the config). Without RAILS_ENV it defaults to purging the development and test databases, except when DATABASE_URL is present."
|
95
|
+
task purge: [:load_config, :check_protected_environments] do
|
96
|
+
ActiveRecord::Tasks::DatabaseTasks.purge_current
|
97
|
+
end
|
98
|
+
|
99
|
+
############################################################################
|
100
|
+
# end of tasks from activerecord/lib/active_record/railties/databases.rake #
|
101
|
+
############################################################################
|
102
|
+
|
103
|
+
# Initializes a database migrator
|
104
|
+
def migrator opts = {}
|
105
|
+
if ENV["VERSION"] && ENV["VERSION"].to_i > 0
|
106
|
+
opts[:version] = ENV["VERSION"].to_i
|
107
|
+
end
|
108
|
+
::Sequel::TimestampMigrator.new(Sequel::DATABASES.first, ActiveRecord::Migrator.migrations_paths.first, opts)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Opens a connection to the primary database and loads the migrator
|
112
|
+
task connection: [:environment] do
|
113
|
+
require "sequel/core"
|
114
|
+
Sequel.extension :migration
|
115
|
+
SequelizeRails.connect_to :primary
|
116
|
+
end
|
117
|
+
|
118
|
+
# desc "Backs up the database from DATABASE_URL or config/database.yml for the current RAILS_ENV"
|
119
|
+
# task dump: [] do
|
120
|
+
# end
|
121
|
+
|
122
|
+
desc "Migrate the database"
|
123
|
+
task migrate: [:connection] do
|
124
|
+
migrator.run
|
125
|
+
end
|
126
|
+
|
127
|
+
namespace :migrate do
|
128
|
+
# desc "Runs the \"down\" method for the last applied migration"
|
129
|
+
task down: [:connection] do
|
130
|
+
target = (migrator.applied_migrations[-2] || "0_").split("_", 2).first.to_i
|
131
|
+
migrator(target: target).run
|
132
|
+
end
|
133
|
+
|
134
|
+
# desc "Runs the \"up\" method for the next pending migration"
|
135
|
+
task up: [:connection] do
|
136
|
+
pending = migrator.migration_tuples.first
|
137
|
+
if pending
|
138
|
+
target = pending[1].split("_", 2).first.to_i
|
139
|
+
migrator(target: target).run
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
desc "Rolls back the last migration and re-runs it"
|
144
|
+
task redo: [:down, :up]
|
145
|
+
|
146
|
+
desc "Displays the status of the database migrations"
|
147
|
+
task status: [:connection] do
|
148
|
+
pending = migrator.migration_tuples.count
|
149
|
+
if pending == 1
|
150
|
+
puts "1 pending migration"
|
151
|
+
else
|
152
|
+
puts "#{pending} pending migrations"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
desc "Runs #{ns}:setup if the database does not exist or #{ns}:migrate if it does"
|
158
|
+
task prepare: [] do
|
159
|
+
Rake::Task[:"#{ns}:connection"].invoke
|
160
|
+
Rake::Task[:"#{ns}:migrate"].invoke
|
161
|
+
rescue Sequel::DatabaseConnectionError
|
162
|
+
Rake::Task[:"#{ns}:setup"].invoke
|
163
|
+
end
|
164
|
+
|
165
|
+
desc "Runs #{ns}:drop, #{ns}:setup"
|
166
|
+
task reset: [:"#{ns}:drop", :"#{ns}:setup"]
|
167
|
+
|
168
|
+
# desc "Restores the backup for database from DATABASE_URL or config/database.yml for the current RAILS_ENV"
|
169
|
+
# task restore: [:connection] do
|
170
|
+
# end
|
171
|
+
|
172
|
+
desc "Rolls back the last migration"
|
173
|
+
task rollback: [:"migrate:down"]
|
174
|
+
|
175
|
+
# namespace :schema do
|
176
|
+
# namespace :cache do
|
177
|
+
# desc "Clears the database schema and indicies caches"
|
178
|
+
# task clear: [] do
|
179
|
+
# end
|
180
|
+
|
181
|
+
# desc "Creates the database schema and indicies caches"
|
182
|
+
# task dump: [] do
|
183
|
+
# end
|
184
|
+
# end
|
185
|
+
|
186
|
+
# desc "Creates a backup of just the database's schema"
|
187
|
+
# task dump: [] do
|
188
|
+
# end
|
189
|
+
|
190
|
+
# desc "Restores the database's schema from backup"
|
191
|
+
# task load: [] do
|
192
|
+
# end
|
193
|
+
# end
|
194
|
+
|
195
|
+
# desc "Loads the seed data from db/seeds.rb"
|
196
|
+
# task seed: [] do
|
197
|
+
# end
|
198
|
+
|
199
|
+
desc "Runs the #{ns}:create, #{ns}:migrate, #{ns}:seed tasks"
|
200
|
+
task setup: [:"#{ns}:create", :"#{ns}:migrate", :"#{ns}:seed"]
|
201
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/sequelize_rails/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "sequelize-rails"
|
7
|
+
spec.version = ::SequelizeRails::VERSION
|
8
|
+
spec.authors = ["Kenaniah Cerny"]
|
9
|
+
spec.email = ["kenaniah@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A gem for using Sequel with Rails natively."
|
12
|
+
spec.description = "This gem provides the railtie that allows Sequel to hook into Rails as an alternative or supplement to ActiveRecord."
|
13
|
+
spec.homepage = "https://github.com/kenaniah/sequelize-rails"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
|
+
|
17
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
21
|
+
spec.metadata["changelog_uri"] = spec.homepage + "/blob/main/CHANGELOG.md"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_dependency "activerecord", ">= 6.0.0"
|
35
|
+
spec.add_dependency "rails", ">= 6.0.0"
|
36
|
+
spec.add_dependency "sequel", ">= 5.0.0"
|
37
|
+
|
38
|
+
spec.add_development_dependency "appraisal"
|
39
|
+
spec.add_development_dependency "minitest-reporters"
|
40
|
+
spec.add_development_dependency "pg"
|
41
|
+
spec.add_development_dependency "pry"
|
42
|
+
spec.add_development_dependency "rake"
|
43
|
+
spec.add_development_dependency "sqlite3"
|
44
|
+
|
45
|
+
# For more information and examples about making a new gem, check out our
|
46
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
47
|
+
end
|
metadata
ADDED
@@ -0,0 +1,206 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sequelize-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kenaniah Cerny
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-06-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 6.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 6.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 6.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 6.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sequel
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 5.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 5.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: appraisal
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-reporters
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pg
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sqlite3
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: This gem provides the railtie that allows Sequel to hook into Rails as
|
140
|
+
an alternative or supplement to ActiveRecord.
|
141
|
+
email:
|
142
|
+
- kenaniah@gmail.com
|
143
|
+
executables: []
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".standard.yml"
|
148
|
+
- Appraisals
|
149
|
+
- CHANGELOG.md
|
150
|
+
- Gemfile
|
151
|
+
- Gemfile.lock
|
152
|
+
- LICENSE.txt
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- bin/console
|
156
|
+
- bin/setup
|
157
|
+
- bin/test
|
158
|
+
- gemfiles/.bundle/config
|
159
|
+
- gemfiles/rails_6.gemfile
|
160
|
+
- gemfiles/rails_7.gemfile
|
161
|
+
- lib/sequel/extensions/sequel_instrumentation.rb
|
162
|
+
- lib/sequel/plugins/pretty_print.rb
|
163
|
+
- lib/sequelize-rails.rb
|
164
|
+
- lib/sequelize_rails.rb
|
165
|
+
- lib/sequelize_rails/db_console.rb
|
166
|
+
- lib/sequelize_rails/generators/application_record/application_record_generator.rb
|
167
|
+
- lib/sequelize_rails/generators/application_record/templates/application_record.rb.tt
|
168
|
+
- lib/sequelize_rails/generators/migration/migration_generator.rb
|
169
|
+
- lib/sequelize_rails/generators/migration/templates/migration.rb.erb
|
170
|
+
- lib/sequelize_rails/generators/model/model_generator.rb
|
171
|
+
- lib/sequelize_rails/railtie.rb
|
172
|
+
- lib/sequelize_rails/railties/controller_runtime.rb
|
173
|
+
- lib/sequelize_rails/railties/log_subscriber.rb
|
174
|
+
- lib/sequelize_rails/translation_support.rb
|
175
|
+
- lib/sequelize_rails/version.rb
|
176
|
+
- lib/tasks.rake
|
177
|
+
- sequelize-rails.gemspec
|
178
|
+
- sig/sequelize_rails.rbs
|
179
|
+
homepage: https://github.com/kenaniah/sequelize-rails
|
180
|
+
licenses:
|
181
|
+
- MIT
|
182
|
+
metadata:
|
183
|
+
allowed_push_host: https://rubygems.org/
|
184
|
+
homepage_uri: https://github.com/kenaniah/sequelize-rails
|
185
|
+
source_code_uri: https://github.com/kenaniah/sequelize-rails
|
186
|
+
changelog_uri: https://github.com/kenaniah/sequelize-rails/blob/main/CHANGELOG.md
|
187
|
+
post_install_message:
|
188
|
+
rdoc_options: []
|
189
|
+
require_paths:
|
190
|
+
- lib
|
191
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: 2.6.0
|
196
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
requirements: []
|
202
|
+
rubygems_version: 3.2.33
|
203
|
+
signing_key:
|
204
|
+
specification_version: 4
|
205
|
+
summary: A gem for using Sequel with Rails natively.
|
206
|
+
test_files: []
|