sequel-rails 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc0e3d05487281cba1193b28d1319abdaf4a1f7a
4
- data.tar.gz: 7b159c411db6beeb9c1ff09bb2a39c2814d639fa
3
+ metadata.gz: e7e8c4d115890eb4b68cf24fa551a13a0d9dc1f0
4
+ data.tar.gz: eebe30d28b9279cdab91af9718dbc7a655b3d3de
5
5
  SHA512:
6
- metadata.gz: c8227bf0453d4b356035de10d00be3db7df7feaac230801a6a9d513cce4bf0b420f61aceeaf17efbde804dfa68dcda6c2c10693b0b87a4762dc458065e38aaff
7
- data.tar.gz: 60bf62c8284abcdcf623dbcc392332db99b106ffdc7a21c981f547d344d3d9337b1feb35e99ac8efca483146247e89f3115cd66540c95a15cf656d2359da2719
6
+ metadata.gz: cc726e214a6c3c511ca9475a87125650c755f436053ee9b4496ddc4b13d145c2f44f23184faf2963bb7abe3363596e93a62c26bf2bc679e95d148ff2c2c1fd0c
7
+ data.tar.gz: 809c17b658f92fab40398b87d079b109dbd51ab0b499f279876b59740c03d3baa9cd7970716f25946e18e586b65d0d18e89b15cbc8f941aa665cd729c0656f2e
data/.travis.yml CHANGED
@@ -14,6 +14,7 @@ gemfile:
14
14
  - ci/rails-3.2.gemfile
15
15
  - ci/rails-4.0.gemfile
16
16
  - ci/rails-4.1.gemfile
17
+ - ci/rails-4.2.gemfile
17
18
  matrix:
18
19
  exclude:
19
20
  - rvm: ree
@@ -52,6 +53,24 @@ matrix:
52
53
  - rvm: jruby-18mode
53
54
  gemfile: ci/rails-4.1.gemfile
54
55
  env: SEQUEL='~> 4.0'
56
+ - rvm: ree
57
+ gemfile: ci/rails-4.2.gemfile
58
+ env: SEQUEL='~> 3.0'
59
+ - rvm: ree
60
+ gemfile: ci/rails-4.2.gemfile
61
+ env: SEQUEL='~> 4.0'
62
+ - rvm: 1.8.7
63
+ gemfile: ci/rails-4.2.gemfile
64
+ env: SEQUEL='~> 3.0'
65
+ - rvm: 1.8.7
66
+ gemfile: ci/rails-4.2.gemfile
67
+ env: SEQUEL='~> 4.0'
68
+ - rvm: jruby-18mode
69
+ gemfile: ci/rails-4.2.gemfile
70
+ env: SEQUEL='~> 3.0'
71
+ - rvm: jruby-18mode
72
+ gemfile: ci/rails-4.2.gemfile
73
+ env: SEQUEL='~> 4.0'
55
74
  notifications:
56
75
  email:
57
76
  - jonathan.tron@metrilio.com
data/Gemfile CHANGED
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'actionpack'
6
- gem 'fakefs', :require => 'fakefs/safe'
6
+ gem 'fakefs', '0.5.3', :require => 'fakefs/safe'
7
7
  gem 'pry'
8
8
 
9
9
  # MRI/Rubinius Adapter Dependencies
data/History.md CHANGED
@@ -1,7 +1,14 @@
1
+ 0.9.6 (2014-11-30)
2
+ ==================
3
+
4
+ * Run CI with Rails 4.2.0.rc1
5
+ * Update RSpec to 3.1
6
+ * Do not attempt to destroy session record if it's not persisted (Andrey Chernih) [#72](https://github.com/TalentBox/sequel-rails/pull/72)
7
+
1
8
  0.9.5 (2014-08-14)
2
9
  ==================
3
10
 
4
- * Use `DATABASE_URL` environment variable even if there's no config (Rafał Rzepecki) [71](https://github.com/TalentBox/sequel-rails/pull/71)
11
+ * Use `DATABASE_URL` environment variable even if there's no config (Rafał Rzepecki) [#71](https://github.com/TalentBox/sequel-rails/pull/71)
5
12
  * Fix spelling error in README (a3gis) [#70](https://github.com/TalentBox/sequel-rails/pull/70)
6
13
 
7
14
  0.9.4 (2014-07-24)
data/README.md CHANGED
@@ -347,6 +347,7 @@ Improvements has been made by those awesome contributors:
347
347
  * Tamir Duberstein (tamird)
348
348
  * shelling (shelling)
349
349
  * a3gis (a3gis)
350
+ * Andrey Chernih (andreychernih)
350
351
 
351
352
  Credits
352
353
  =======
data/ci/rails-3.2.gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'sequel', "#{ENV['SEQUEL']}"
8
8
 
9
- gem 'fakefs', :require => 'fakefs/safe'
9
+ gem 'fakefs', '0.5.3', :require => 'fakefs/safe'
10
10
 
11
11
  # activesupport has an undeclared dependency on tzinfo prior to 4.0.0
12
12
  gem 'tzinfo'
data/ci/rails-4.0.gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'sequel', "#{ENV['SEQUEL']}"
8
8
 
9
- gem 'fakefs', :require => 'fakefs/safe'
9
+ gem 'fakefs', '0.5.3', :require => 'fakefs/safe'
10
10
 
11
11
  # MRI/Rubinius Adapter Dependencies
12
12
  platform :ruby do
data/ci/rails-4.1.gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec :path => '../'
6
6
 
7
7
  gem 'sequel', "#{ENV['SEQUEL']}"
8
8
 
9
- gem 'fakefs', :require => 'fakefs/safe'
9
+ gem 'fakefs', '0.5.3', :require => 'fakefs/safe'
10
10
 
11
11
  # MRI/Rubinius Adapter Dependencies
12
12
  platform :ruby do
@@ -0,0 +1,25 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.2.0.rc1'
4
+ gem 'activemodel', '~> 4.2.0.rc1' # Remove once 4.2.0 final is release
5
+
6
+ gemspec :path => '../'
7
+
8
+ gem 'sequel', "#{ENV['SEQUEL']}"
9
+
10
+ gem 'fakefs', '0.5.3', :require => 'fakefs/safe'
11
+
12
+ # MRI/Rubinius Adapter Dependencies
13
+ platform :ruby do
14
+ gem 'pg'
15
+ gem 'mysql'
16
+ gem 'mysql2'
17
+ gem 'sqlite3'
18
+ end
19
+
20
+ # JRuby Adapter Dependencies
21
+ platform :jruby do
22
+ gem 'jdbc-sqlite3'
23
+ gem 'jdbc-mysql'
24
+ gem 'jdbc-postgres'
25
+ end
@@ -37,7 +37,8 @@ module ActionDispatch
37
37
  def destroy_session(env, sid, options)
38
38
  sid = current_session_id(env)
39
39
  if sid
40
- get_session_model(env, sid).destroy
40
+ session = get_session_model(env, sid)
41
+ session.destroy unless session.new?
41
42
  env[SESSION_RECORD_KEY] = nil
42
43
  end
43
44
 
@@ -1,3 +1,3 @@
1
1
  module SequelRails
2
- VERSION = '0.9.5'
2
+ VERSION = '0.9.6'
3
3
  end
data/sequel-rails.gemspec CHANGED
@@ -28,7 +28,8 @@ Gem::Specification.new do |s|
28
28
  s.add_development_dependency 'combustion'
29
29
  s.add_development_dependency 'generator_spec'
30
30
  s.add_development_dependency 'rake', '>= 0.8.7'
31
- s.add_development_dependency 'rspec', '~> 2.14'
32
- s.add_development_dependency 'rspec-rails', '~> 2.14'
31
+ s.add_development_dependency 'rspec', '~> 3.1'
32
+ s.add_development_dependency 'rspec-rails', '~> 3.1'
33
33
  s.add_development_dependency 'rubocop', '~> 0.20.1' unless RUBY_VERSION < '1.9.2'
34
+ s.add_development_dependency 'ammeter', '1.1.2'
34
35
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe SessionsController do
3
+ describe SessionsController, :type => :request do
4
4
  let(:session_class) { ::ActionDispatch::Session::SequelStore.session_class }
5
5
 
6
6
  def login
@@ -24,45 +24,45 @@ describe SequelRails::Configuration do
24
24
  context 'in test environment' do
25
25
  let(:environment) { 'test' }
26
26
  it 'defaults to false' do
27
- expect(subject.schema_dump).to be_false
27
+ expect(subject.schema_dump).to be false
28
28
  end
29
29
  it 'can be assigned' do
30
30
  subject.schema_dump = true
31
- expect(subject.schema_dump).to be_true
31
+ expect(subject.schema_dump).to be true
32
32
  end
33
33
  it 'can be set from merging another hash' do
34
34
  subject.merge!(:schema_dump => true)
35
- expect(subject.schema_dump).to be_true
35
+ expect(subject.schema_dump).to be true
36
36
  end
37
37
  end
38
38
 
39
39
  context 'in production environment' do
40
40
  let(:environment) { 'production' }
41
41
  it 'defaults to false' do
42
- expect(subject.schema_dump).to be_false
42
+ expect(subject.schema_dump).to be false
43
43
  end
44
44
  it 'can be assigned' do
45
45
  subject.schema_dump = true
46
- expect(subject.schema_dump).to be_true
46
+ expect(subject.schema_dump).to be true
47
47
  end
48
48
  it 'can be set from merging another hash' do
49
49
  subject.merge!(:schema_dump => true)
50
- expect(subject.schema_dump).to be_true
50
+ expect(subject.schema_dump).to be true
51
51
  end
52
52
  end
53
53
 
54
54
  context 'in other environments' do
55
55
  let(:environment) { 'development' }
56
56
  it 'defaults to true' do
57
- expect(subject.schema_dump).to be_true
57
+ expect(subject.schema_dump).to be true
58
58
  end
59
59
  it 'can be assigned' do
60
60
  subject.schema_dump = false
61
- expect(subject.schema_dump).to be_false
61
+ expect(subject.schema_dump).to be false
62
62
  end
63
63
  it 'can be set from merging another hash' do
64
64
  subject.merge!(:schema_dump => false)
65
- expect(subject.schema_dump).to be_false
65
+ expect(subject.schema_dump).to be false
66
66
  end
67
67
  end
68
68
  end
@@ -71,15 +71,15 @@ describe SequelRails::Configuration do
71
71
  subject { described_class.new }
72
72
 
73
73
  it 'defaults to true' do
74
- expect(subject.load_database_tasks).to be_true
74
+ expect(subject.load_database_tasks).to be true
75
75
  end
76
76
  it 'can be assigned' do
77
77
  subject.load_database_tasks = false
78
- expect(subject.load_database_tasks).to be_false
78
+ expect(subject.load_database_tasks).to be false
79
79
  end
80
80
  it 'can be set from merging another hash' do
81
81
  subject.merge!(:load_database_tasks => false)
82
- expect(subject.load_database_tasks).to be_false
82
+ expect(subject.load_database_tasks).to be false
83
83
  end
84
84
  end
85
85
 
@@ -38,7 +38,7 @@ describe SequelRails::Migrations do
38
38
 
39
39
  it 'returns false if db/migrate directory exists, but is empty' do
40
40
  FileUtils.mkdir_p path
41
- expect(described_class.pending_migrations?).to be_false
41
+ expect(described_class.pending_migrations?).to be false
42
42
  end
43
43
 
44
44
  context 'when db/migrate directory exists and contains migrations' do
@@ -7,8 +7,8 @@ describe SequelRails::Railtie do
7
7
  expect(
8
8
  ActiveSupport::LogSubscriber.log_subscribers.select do |subscriber|
9
9
  subscriber.is_a?(SequelRails::Railties::LogSubscriber)
10
- end
11
- ).to have(1).item
10
+ end.size
11
+ ).to eq 1
12
12
  end
13
13
 
14
14
  context 'configures generator to use Sequel' do
@@ -17,12 +17,12 @@ describe SequelRails::Railtie do
17
17
  end
18
18
 
19
19
  it 'for migrations' do
20
- expect(app.config.generators.options[:sequel][:migration]).to be_true
20
+ expect(app.config.generators.options[:sequel][:migration]).to be true
21
21
  end
22
22
  end
23
23
 
24
24
  it 'configures rails to use fancy pants logging' do
25
- expect(app.config.rails_fancy_pants_logging).to be_true
25
+ expect(app.config.rails_fancy_pants_logging).to be true
26
26
  end
27
27
 
28
28
  context "configures action dispatch's rescue responses" do
@@ -19,7 +19,7 @@ describe 'Database rake tasks', :no_transaction => true do
19
19
  it "dumps the schema in 'db/schema.rb'" do
20
20
  Dir.chdir app_root do
21
21
  `rake db:schema:dump`
22
- expect(File.exist?(schema)).to be_true
22
+ expect(File.exist?(schema)).to be true
23
23
  end
24
24
  end
25
25
 
@@ -46,7 +46,7 @@ EOS
46
46
  it "dumps the schema in 'db/structure.sql'" do
47
47
  Dir.chdir app_root do
48
48
  `rake db:structure:dump`
49
- expect(File.exist?(schema)).to be_true
49
+ expect(File.exist?(schema)).to be true
50
50
  end
51
51
  end
52
52
 
@@ -23,6 +23,6 @@ describe SequelRails::Railties::LogSubscriber do
23
23
  @logger.level = :info
24
24
  User.all
25
25
  wait
26
- expect(@logger.logged(:debug)).to have(:no).line
26
+ expect(@logger.logged(:debug).size).to eq 0
27
27
  end
28
28
  end
@@ -39,7 +39,7 @@ describe SequelRails::Storage do
39
39
  expect(SequelRails::Storage::Postgres).to receive(:new).with(env).and_return(adapter)
40
40
  end
41
41
  expect(adapter).to receive(:create).twice
42
- capture(:stdout) do
42
+ Ammeter::OutputCapturer.capture_stdout do
43
43
  described_class.create_all
44
44
  end
45
45
  end
@@ -52,7 +52,7 @@ describe SequelRails::Storage do
52
52
  end
53
53
  expect(adapter).to receive(:close_connections).twice
54
54
  expect(adapter).to receive(:drop).twice
55
- capture(:stdout) do
55
+ Ammeter::OutputCapturer.capture_stdout do
56
56
  described_class.drop_all
57
57
  end
58
58
  end
@@ -81,7 +81,7 @@ describe SequelRails::Storage do
81
81
  expect(SequelRails::Storage::Postgres).to receive(:new).with(env).and_return(adapter)
82
82
  end
83
83
  expect(adapter).to receive(:close_connections).exactly(3).times
84
- capture(:stdout) do
84
+ Ammeter::OutputCapturer.capture_stdout do
85
85
  described_class.close_all_connections
86
86
  end
87
87
  end
data/spec/spec_helper.rb CHANGED
@@ -7,7 +7,7 @@ Bundler.require :default, :development, :test
7
7
  Combustion.initialize! :sequel_rails
8
8
 
9
9
  require 'rspec/rails'
10
- require 'rspec/autorun'
10
+ require 'ammeter/init'
11
11
 
12
12
  # Load support files
13
13
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -19,7 +19,6 @@ rspec_exclusions[:mysql] = !%w(mysql mysql2).include?(ENV['TEST_ADAPTER'])
19
19
  rspec_exclusions[:sqlite] = ENV['TEST_ADAPTER'] != 'sqlite3'
20
20
 
21
21
  RSpec.configure do |config|
22
- config.treat_symbols_as_metadata_keys_with_true_values = true
23
22
  config.filter_run_excluding rspec_exclusions
24
23
  config.around :each do |example|
25
24
  if example.metadata[:no_transaction]
@@ -41,7 +40,7 @@ end
41
40
  # Ensure db exists and clean state
42
41
  begin
43
42
  require 'sequel_rails/storage'
44
- silence(:stdout) do
43
+ Ammeter::OutputCapturer.capture_stdout do
45
44
  SequelRails::Storage.adapter_for(:test).drop
46
45
  SequelRails::Storage.adapter_for(:test).create
47
46
  end
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.5
4
+ version: 0.9.6
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-08-14 00:00:00.000000000 Z
12
+ date: 2014-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -121,28 +121,28 @@ dependencies:
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '2.14'
124
+ version: '3.1'
125
125
  type: :development
126
126
  prerelease: false
127
127
  version_requirements: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '2.14'
131
+ version: '3.1'
132
132
  - !ruby/object:Gem::Dependency
133
133
  name: rspec-rails
134
134
  requirement: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '2.14'
138
+ version: '3.1'
139
139
  type: :development
140
140
  prerelease: false
141
141
  version_requirements: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '2.14'
145
+ version: '3.1'
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: rubocop
148
148
  requirement: !ruby/object:Gem::Requirement
@@ -157,6 +157,20 @@ dependencies:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: 0.20.1
160
+ - !ruby/object:Gem::Dependency
161
+ name: ammeter
162
+ requirement: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.1.2
167
+ type: :development
168
+ prerelease: false
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 1.1.2
160
174
  description: Integrate Sequel with Rails (3.x and 4.x)
161
175
  email:
162
176
  - brasten@gmail.com
@@ -179,6 +193,7 @@ files:
179
193
  - ci/rails-3.2.gemfile
180
194
  - ci/rails-4.0.gemfile
181
195
  - ci/rails-4.1.gemfile
196
+ - ci/rails-4.2.gemfile
182
197
  - config.ru
183
198
  - lib/action_dispatch/middleware/session/sequel_store.rb
184
199
  - lib/generators/sequel.rb