sequel-rails 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -7
- data/.travis.yml +20 -6
- data/History.md +5 -0
- data/README.md +7 -2
- data/Rakefile +1 -1
- data/ci/rails-3.2.gemfile +1 -1
- data/ci/rails-4.0.gemfile +1 -1
- data/ci/rails-4.1.gemfile +24 -0
- data/lib/action_dispatch/middleware/session/sequel_store.rb +1 -1
- data/lib/generators/sequel.rb +2 -2
- data/lib/sequel_rails/configuration.rb +6 -2
- data/lib/sequel_rails/migrations.rb +1 -1
- data/lib/sequel_rails/railtie.rb +7 -7
- data/lib/sequel_rails/railties/controller_runtime.rb +1 -1
- data/lib/sequel_rails/railties/database.rake +8 -8
- data/lib/sequel_rails/railties/log_subscriber.rb +1 -1
- data/lib/sequel_rails/storage.rb +1 -1
- data/lib/sequel_rails/storage/jdbc.rb +1 -1
- data/lib/sequel_rails/storage/mysql.rb +1 -1
- data/lib/sequel_rails/version.rb +1 -1
- data/sequel-rails.gemspec +1 -1
- data/spec/internal/Rakefile +1 -1
- data/spec/lib/sequel_rails/configuration_spec.rb +40 -0
- data/spec/lib/sequel_rails/railties/database_rake_spec.rb +4 -4
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a1cd2895c74ba9e4a8a5ef09818780374a39a5a
|
4
|
+
data.tar.gz: d7411b415c0f316fba662ed2ef5480d100e3965d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56005f7d3bd105d08938c3f7f14a8b256a9015deac144b7c685481e4b2af7b90ad1d6b027eacedb5794c10745ea5778361e7b2fdbcbb05cac02b6c5dea2dbb9e
|
7
|
+
data.tar.gz: ad9e912ed38c60d59c73649d5b08ef1ad615ebe72e31cc31c8d176588b320db1c79bfacde4d232daa9b6ef426596e57c9016818b86cc8629c433fe6cdc7632a8
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
3
|
-
- Gemfile
|
4
|
-
- config.ru
|
5
|
-
- Rakefile
|
6
|
-
- '
|
7
|
-
- '
|
8
|
-
- '
|
2
|
+
Include:
|
3
|
+
- '**/Gemfile'
|
4
|
+
- '**/config.ru'
|
5
|
+
- '**/Rakefile'
|
6
|
+
- '**/*.rake'
|
7
|
+
- '**/*.gemfile'
|
8
|
+
- '**/*.gemspec'
|
9
|
+
Exclude:
|
10
|
+
- 'lib/sequel-rails.rb'
|
9
11
|
|
10
12
|
HashSyntax:
|
11
13
|
EnforcedStyle: hash_rockets
|
data/.travis.yml
CHANGED
@@ -1,23 +1,19 @@
|
|
1
1
|
language: ruby
|
2
|
-
before_install:
|
3
|
-
- gem update --system 2.1.11
|
4
|
-
- gem --version
|
5
|
-
- gem install bundler -v 1.5.1
|
6
2
|
rvm:
|
7
3
|
- ree
|
8
4
|
- 1.8.7
|
9
5
|
- 1.9.3
|
10
6
|
- 2.0.0
|
11
|
-
- 2.1
|
7
|
+
- 2.1
|
12
8
|
- jruby-18mode
|
13
9
|
- jruby-19mode
|
14
|
-
- jruby-20mode
|
15
10
|
env:
|
16
11
|
- SEQUEL='~> 3.0'
|
17
12
|
- SEQUEL='~> 4.0'
|
18
13
|
gemfile:
|
19
14
|
- ci/rails-3.2.gemfile
|
20
15
|
- ci/rails-4.0.gemfile
|
16
|
+
- ci/rails-4.1.gemfile
|
21
17
|
matrix:
|
22
18
|
exclude:
|
23
19
|
- rvm: ree
|
@@ -38,6 +34,24 @@ matrix:
|
|
38
34
|
- rvm: jruby-18mode
|
39
35
|
gemfile: ci/rails-4.0.gemfile
|
40
36
|
env: SEQUEL='~> 4.0'
|
37
|
+
- rvm: ree
|
38
|
+
gemfile: ci/rails-4.1.gemfile
|
39
|
+
env: SEQUEL='~> 3.0'
|
40
|
+
- rvm: ree
|
41
|
+
gemfile: ci/rails-4.1.gemfile
|
42
|
+
env: SEQUEL='~> 4.0'
|
43
|
+
- rvm: 1.8.7
|
44
|
+
gemfile: ci/rails-4.1.gemfile
|
45
|
+
env: SEQUEL='~> 3.0'
|
46
|
+
- rvm: 1.8.7
|
47
|
+
gemfile: ci/rails-4.1.gemfile
|
48
|
+
env: SEQUEL='~> 4.0'
|
49
|
+
- rvm: jruby-18mode
|
50
|
+
gemfile: ci/rails-4.1.gemfile
|
51
|
+
env: SEQUEL='~> 3.0'
|
52
|
+
- rvm: jruby-18mode
|
53
|
+
gemfile: ci/rails-4.1.gemfile
|
54
|
+
env: SEQUEL='~> 4.0'
|
41
55
|
notifications:
|
42
56
|
email:
|
43
57
|
- jonathan.tron@metrilio.com
|
data/History.md
CHANGED
data/README.md
CHANGED
@@ -103,7 +103,7 @@ Features provided by `sequel-rails`
|
|
103
103
|
Session:
|
104
104
|
|
105
105
|
```ruby
|
106
|
-
rails generate session_migration
|
106
|
+
rails generate sequel:session_migration
|
107
107
|
```
|
108
108
|
|
109
109
|
3. Rake tasks similar to `ActiveRecord`, see
|
@@ -178,6 +178,8 @@ Here's some examples:
|
|
178
178
|
template: template1 # Optional
|
179
179
|
tablespace: non_default_tablespace_name # Optional
|
180
180
|
max_connections: 20 # Optional, also accept 'pool' as key, if both are present 'max_connections' is used (default to nil, Sequel default is 4)
|
181
|
+
url: "postgres://myuser:mypass@host/somedatabase" # Optional, if present it's passed to `Sequel.connect` with other config as options
|
182
|
+
# If url is not set in config file, environment variable `DATABASE_URL` is used
|
181
183
|
```
|
182
184
|
|
183
185
|
2. For MySQL:
|
@@ -192,6 +194,8 @@ Here's some examples:
|
|
192
194
|
port: 5432 # Optional
|
193
195
|
charset: latin1 # Optional (defaults to 'utf8')
|
194
196
|
collation: latin1_general_ci # Optional (defaults to 'utf8_unicode_ci')
|
197
|
+
url: "mysql://myuser:mypass@host/somedatabase" # Optional, if present it's passed to `Sequel.connect` with other config as options
|
198
|
+
# If url is not set in config file, environment variable `DATABASE_URL` is used
|
195
199
|
```
|
196
200
|
|
197
201
|
2. For SQLite:
|
@@ -242,7 +246,7 @@ You can then generate a migration for the session table using the provided
|
|
242
246
|
generator:
|
243
247
|
|
244
248
|
```bash
|
245
|
-
rails generate session_migration
|
249
|
+
rails generate sequel:session_migration
|
246
250
|
rake db:migrate
|
247
251
|
```
|
248
252
|
|
@@ -337,6 +341,7 @@ Improvements has been made by those awesome contributors:
|
|
337
341
|
* Kevin Menard (nirvdrum)
|
338
342
|
* Chris Heisterkamp (cheister)
|
339
343
|
* Tamir Duberstein (tamird)
|
344
|
+
* shelling (shelling)
|
340
345
|
|
341
346
|
Credits
|
342
347
|
=======
|
data/Rakefile
CHANGED
data/ci/rails-3.2.gemfile
CHANGED
data/ci/rails-4.0.gemfile
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'railties', '~> 4.1.0'
|
4
|
+
|
5
|
+
gemspec :path => '../'
|
6
|
+
|
7
|
+
gem 'sequel', "#{ENV['SEQUEL']}"
|
8
|
+
|
9
|
+
gem 'fakefs', :require => 'fakefs/safe'
|
10
|
+
|
11
|
+
# MRI/Rubinius Adapter Dependencies
|
12
|
+
platform :ruby do
|
13
|
+
gem 'pg'
|
14
|
+
gem 'mysql'
|
15
|
+
gem 'mysql2'
|
16
|
+
gem 'sqlite3'
|
17
|
+
end
|
18
|
+
|
19
|
+
# JRuby Adapter Dependencies
|
20
|
+
platform :jruby do
|
21
|
+
gem 'jdbc-sqlite3'
|
22
|
+
gem 'jdbc-mysql'
|
23
|
+
gem 'jdbc-postgres'
|
24
|
+
end
|
@@ -28,7 +28,7 @@ module ActionDispatch
|
|
28
28
|
[sid, session.data]
|
29
29
|
end
|
30
30
|
|
31
|
-
def set_session(env, sid, session_data,
|
31
|
+
def set_session(env, sid, session_data, _options)
|
32
32
|
session = get_session_model(env, sid)
|
33
33
|
session.data = session_data
|
34
34
|
session.save(:raise_on_failure => false) && sid
|
data/lib/generators/sequel.rb
CHANGED
@@ -22,7 +22,7 @@ module Sequel
|
|
22
22
|
# Sequel does not care if migrations have the same name as long as
|
23
23
|
# they have different ids.
|
24
24
|
#
|
25
|
-
def migration_exists?(
|
25
|
+
def migration_exists?(_dirname, _file_name) #:nodoc:
|
26
26
|
false
|
27
27
|
end
|
28
28
|
|
@@ -30,7 +30,7 @@ module Sequel
|
|
30
30
|
#
|
31
31
|
def self.next_migration_number(dirname) #:nodoc:
|
32
32
|
next_migration_number = current_migration_number(dirname) + 1
|
33
|
-
[Time.now.utc.strftime('%Y%m%d%H%M%S'),
|
33
|
+
[Time.now.utc.strftime('%Y%m%d%H%M%S'), format('%.14d', next_migration_number)].max
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -91,6 +91,10 @@ module SequelRails
|
|
91
91
|
config['max_connections'] = max_connections if max_connections
|
92
92
|
config['search_path'] = search_path if search_path
|
93
93
|
|
94
|
+
# Allow to set the URL from environment directly
|
95
|
+
url = ENV['DATABASE_URL']
|
96
|
+
config['url'] ||= url if url
|
97
|
+
|
94
98
|
# some adapters only support an url
|
95
99
|
if config['adapter'] && config['adapter'] =~ /^(jdbc|do):/ && !config.key?('url')
|
96
100
|
params = {}
|
@@ -106,9 +110,9 @@ module SequelRails
|
|
106
110
|
port = config['port'] ? ":#{config['port']}" : ''
|
107
111
|
config['url'] ||=
|
108
112
|
if config['adapter'].include?('sqlite')
|
109
|
-
|
113
|
+
format('%s:%s', config['adapter'], config['database'])
|
110
114
|
else
|
111
|
-
|
115
|
+
format('%s://%s%s/%s?%s', config['adapter'], config['host'], port, config['database'], params_str)
|
112
116
|
end
|
113
117
|
end
|
114
118
|
|
data/lib/sequel_rails/railtie.rb
CHANGED
@@ -47,16 +47,16 @@ module SequelRails
|
|
47
47
|
setup_logger app, ::Rails.logger
|
48
48
|
end
|
49
49
|
|
50
|
-
initializer 'sequel.i18n_support' do |
|
51
|
-
setup_i18n_support
|
50
|
+
initializer 'sequel.i18n_support' do |_app|
|
51
|
+
setup_i18n_support
|
52
52
|
end
|
53
53
|
|
54
54
|
# Expose database runtime to controller for logging.
|
55
|
-
initializer 'sequel.log_runtime' do |
|
56
|
-
setup_controller_runtime
|
55
|
+
initializer 'sequel.log_runtime' do |_app|
|
56
|
+
setup_controller_runtime
|
57
57
|
end
|
58
58
|
|
59
|
-
initializer 'sequel.connect' do |
|
59
|
+
initializer 'sequel.connect' do |_app|
|
60
60
|
::SequelRails.setup ::Rails.env
|
61
61
|
end
|
62
62
|
|
@@ -69,11 +69,11 @@ module SequelRails
|
|
69
69
|
::SequelRails.configuration = app.config.sequel
|
70
70
|
end
|
71
71
|
|
72
|
-
def setup_i18n_support
|
72
|
+
def setup_i18n_support
|
73
73
|
::Sequel::Model.send :include, ::SequelRails::I18nSupport
|
74
74
|
end
|
75
75
|
|
76
|
-
def setup_controller_runtime
|
76
|
+
def setup_controller_runtime
|
77
77
|
require 'sequel_rails/railties/controller_runtime'
|
78
78
|
ActionController::Base.send :include, SequelRails::Railties::ControllerRuntime
|
79
79
|
end
|
@@ -34,7 +34,7 @@ module SequelRails
|
|
34
34
|
module ClassMethods
|
35
35
|
def log_process_action(payload)
|
36
36
|
messages, db_runtime = super, payload[:db_runtime]
|
37
|
-
messages <<
|
37
|
+
messages << format('Models: %.1fms', db_runtime.to_f) if db_runtime
|
38
38
|
messages
|
39
39
|
end
|
40
40
|
end
|
@@ -10,7 +10,7 @@ namespace :db do
|
|
10
10
|
# desc "Raises an error if there are pending migrations"
|
11
11
|
task :abort_if_pending_migrations => [:environment, 'db:migrate:load'] do
|
12
12
|
if SequelRails::Migrations.pending_migrations?
|
13
|
-
|
13
|
+
warn 'You have pending migrations:'
|
14
14
|
abort 'Run `rake db:migrate` to update your database then try again.'
|
15
15
|
end
|
16
16
|
end
|
@@ -30,7 +30,7 @@ namespace :db do
|
|
30
30
|
desc 'Load a schema.rb file into the database'
|
31
31
|
task :load => :environment do
|
32
32
|
file = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
|
33
|
-
if File.
|
33
|
+
if File.exist?(file)
|
34
34
|
require 'sequel/extensions/migration'
|
35
35
|
load(file)
|
36
36
|
::Sequel::Migration.descendants.each { |m| m.apply(db_for_current_env, :up) }
|
@@ -42,7 +42,7 @@ namespace :db do
|
|
42
42
|
|
43
43
|
namespace :structure do
|
44
44
|
desc 'Dump the database structure to db/structure.sql'
|
45
|
-
task :dump, [:env] => :environment do |
|
45
|
+
task :dump, [:env] => :environment do |_t, args|
|
46
46
|
args.with_defaults(:env => Rails.env)
|
47
47
|
|
48
48
|
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, 'db', 'structure.sql')
|
@@ -57,7 +57,7 @@ namespace :db do
|
|
57
57
|
Rake::Task['db:structure:dump'].reenable
|
58
58
|
end
|
59
59
|
|
60
|
-
task :load, [:env] => :environment do |
|
60
|
+
task :load, [:env] => :environment do |_t, args|
|
61
61
|
args.with_defaults(:env => Rails.env)
|
62
62
|
|
63
63
|
filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, 'db', 'structure.sql')
|
@@ -97,7 +97,7 @@ namespace :db do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
desc 'Create the database defined in config/database.yml for the current Rails.env'
|
100
|
-
task :create, [:env] => :environment do |
|
100
|
+
task :create, [:env] => :environment do |_t, args|
|
101
101
|
args.with_defaults(:env => Rails.env)
|
102
102
|
|
103
103
|
unless SequelRails::Storage.create_environment(args.env)
|
@@ -113,7 +113,7 @@ namespace :db do
|
|
113
113
|
end
|
114
114
|
|
115
115
|
desc 'Drop the database defined in config/database.yml for the current Rails.env'
|
116
|
-
task :drop, [:env] => :environment do |
|
116
|
+
task :drop, [:env] => :environment do |_t, args|
|
117
117
|
args.with_defaults(:env => Rails.env)
|
118
118
|
|
119
119
|
unless SequelRails::Storage.drop_environment(args.env)
|
@@ -126,7 +126,7 @@ namespace :db do
|
|
126
126
|
require 'sequel_rails/migrations'
|
127
127
|
end
|
128
128
|
|
129
|
-
desc
|
129
|
+
desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.'
|
130
130
|
task :redo => :load do
|
131
131
|
if ENV['VERSION']
|
132
132
|
Rake::Task['db:migrate:down'].invoke
|
@@ -176,7 +176,7 @@ namespace :db do
|
|
176
176
|
task :reset => %w(db:drop db:setup)
|
177
177
|
|
178
178
|
desc 'Forcibly close any open connections to the current env database (PostgreSQL specific)'
|
179
|
-
task :force_close_open_connections, [:env] => :environment do |
|
179
|
+
task :force_close_open_connections, [:env] => :environment do |_t, args|
|
180
180
|
args.with_defaults(:env => Rails.env)
|
181
181
|
SequelRails::Storage.close_connections_environment(args.env)
|
182
182
|
end
|
data/lib/sequel_rails/storage.rb
CHANGED
@@ -56,7 +56,7 @@ module SequelRails
|
|
56
56
|
def self.with_local_repositories
|
57
57
|
::SequelRails.configuration.environments.each_value do |config|
|
58
58
|
next if config['database'].blank? || config['adapter'].blank?
|
59
|
-
if config['host'].blank? || %w
|
59
|
+
if config['host'].blank? || %w( 127.0.0.1 localhost ).include?(config['host'])
|
60
60
|
yield config
|
61
61
|
else
|
62
62
|
warn "This task only modifies local databases. #{config['database']} is on a remote host."
|
@@ -42,7 +42,7 @@ module SequelRails
|
|
42
42
|
def _drop
|
43
43
|
if _is_sqlite?
|
44
44
|
return if in_memory?
|
45
|
-
FileUtils.rm db_name if File.
|
45
|
+
FileUtils.rm db_name if File.exist? db_name
|
46
46
|
elsif _is_mysql?
|
47
47
|
::Sequel.connect("#{_root_url}#{_params}") do |db|
|
48
48
|
db.execute("DROP DATABASE IF EXISTS `#{db_name}`")
|
@@ -22,7 +22,7 @@ module SequelRails
|
|
22
22
|
commands = ['mysql']
|
23
23
|
add_connection_settings commands
|
24
24
|
add_option commands, '--database', database
|
25
|
-
add_option commands, '--execute', %
|
25
|
+
add_option commands, '--execute', %(SET FOREIGN_KEY_CHECKS = 0; SOURCE #{filename}; SET FOREIGN_KEY_CHECKS = 1)
|
26
26
|
safe_exec commands
|
27
27
|
end
|
28
28
|
|
data/lib/sequel_rails/version.rb
CHANGED
data/sequel-rails.gemspec
CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_development_dependency 'rake', '>= 0.8.7'
|
31
31
|
s.add_development_dependency 'rspec', '~> 2.14'
|
32
32
|
s.add_development_dependency 'rspec-rails', '~> 2.14'
|
33
|
-
s.add_development_dependency 'rubocop' unless RUBY_VERSION < '1.9.2'
|
33
|
+
s.add_development_dependency 'rubocop', '~> 0.20.1' unless RUBY_VERSION < '1.9.2'
|
34
34
|
end
|
data/spec/internal/Rakefile
CHANGED
@@ -160,6 +160,42 @@ describe SequelRails::Configuration do
|
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
163
|
+
shared_examples 'with DATABASE_URL in ENV' do
|
164
|
+
let(:database_url) { 'adapter://user:pass@host/db' }
|
165
|
+
def with_database_url_env
|
166
|
+
previous, ENV['DATABASE_URL'] = ENV['DATABASE_URL'], database_url
|
167
|
+
yield
|
168
|
+
ENV['DATABASE_URL'] = previous
|
169
|
+
end
|
170
|
+
context 'without url set in config' do
|
171
|
+
around do |example|
|
172
|
+
with_database_url_env { example.call }
|
173
|
+
end
|
174
|
+
it 'uses DATABASE_URL' do
|
175
|
+
expect(::Sequel).to receive(:connect) do |url, _hash|
|
176
|
+
expect(url).to eq database_url
|
177
|
+
end
|
178
|
+
subject.connect environment
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
context 'with url set in config' do
|
183
|
+
let(:config_url) { 'another_adapter://user:pass@host/db' }
|
184
|
+
around do |example|
|
185
|
+
with_database_url_env do
|
186
|
+
environments[environment]['url'] = config_url
|
187
|
+
example.call
|
188
|
+
end
|
189
|
+
end
|
190
|
+
it 'uses url from config' do
|
191
|
+
expect(::Sequel).to receive(:connect) do |url, _hash|
|
192
|
+
expect(url).to eq config_url
|
193
|
+
end
|
194
|
+
subject.connect environment
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
163
199
|
context 'for a postgres connection' do
|
164
200
|
|
165
201
|
shared_examples 'search_path' do
|
@@ -189,6 +225,7 @@ describe SequelRails::Configuration do
|
|
189
225
|
|
190
226
|
include_examples 'max_connections'
|
191
227
|
include_examples 'search_path'
|
228
|
+
include_examples 'with DATABASE_URL in ENV'
|
192
229
|
|
193
230
|
let(:is_jruby) { false }
|
194
231
|
|
@@ -205,6 +242,7 @@ describe SequelRails::Configuration do
|
|
205
242
|
|
206
243
|
include_examples 'max_connections'
|
207
244
|
include_examples 'search_path'
|
245
|
+
include_examples 'with DATABASE_URL in ENV'
|
208
246
|
|
209
247
|
let(:is_jruby) { true }
|
210
248
|
|
@@ -240,6 +278,7 @@ describe SequelRails::Configuration do
|
|
240
278
|
context 'in C-Ruby' do
|
241
279
|
|
242
280
|
include_examples 'max_connections'
|
281
|
+
include_examples 'with DATABASE_URL in ENV'
|
243
282
|
|
244
283
|
let(:is_jruby) { false }
|
245
284
|
|
@@ -254,6 +293,7 @@ describe SequelRails::Configuration do
|
|
254
293
|
context 'in JRuby' do
|
255
294
|
|
256
295
|
include_examples 'max_connections'
|
296
|
+
include_examples 'with DATABASE_URL in ENV'
|
257
297
|
|
258
298
|
let(:is_jruby) { true }
|
259
299
|
|
@@ -7,10 +7,10 @@ describe 'Database rake tasks' do
|
|
7
7
|
|
8
8
|
around do |example|
|
9
9
|
begin
|
10
|
-
FileUtils.rm schema if File.
|
10
|
+
FileUtils.rm schema if File.exist? schema
|
11
11
|
example.run
|
12
12
|
ensure
|
13
|
-
FileUtils.rm schema if File.
|
13
|
+
FileUtils.rm schema if File.exist? schema
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -20,7 +20,7 @@ describe 'Database rake tasks' do
|
|
20
20
|
it "dumps the schema in 'db/schema.rb'" do
|
21
21
|
Dir.chdir app_root do
|
22
22
|
`rake db:schema:dump`
|
23
|
-
expect(File.
|
23
|
+
expect(File.exist?(schema)).to be_true
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -47,7 +47,7 @@ EOS
|
|
47
47
|
it "dumps the schema in 'db/structure.sql'" do
|
48
48
|
Dir.chdir app_root do
|
49
49
|
`rake db:structure:dump`
|
50
|
-
expect(File.
|
50
|
+
expect(File.exist?(schema)).to be_true
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brasten Sager (brasten)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -147,16 +147,16 @@ dependencies:
|
|
147
147
|
name: rubocop
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 0.20.1
|
153
153
|
type: :development
|
154
154
|
prerelease: false
|
155
155
|
version_requirements: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.20.1
|
160
160
|
description: Integrate Sequel with Rails (3.x and 4.x)
|
161
161
|
email:
|
162
162
|
- brasten@gmail.com
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- Rakefile
|
179
179
|
- ci/rails-3.2.gemfile
|
180
180
|
- ci/rails-4.0.gemfile
|
181
|
+
- ci/rails-4.1.gemfile
|
181
182
|
- config.ru
|
182
183
|
- lib/action_dispatch/middleware/session/sequel_store.rb
|
183
184
|
- lib/generators/sequel.rb
|
@@ -258,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
258
259
|
version: '0'
|
259
260
|
requirements: []
|
260
261
|
rubyforge_project:
|
261
|
-
rubygems_version: 2.2.
|
262
|
+
rubygems_version: 2.2.2
|
262
263
|
signing_key:
|
263
264
|
specification_version: 4
|
264
265
|
summary: Use Sequel with Rails (3.x and 4.x)
|