action_interceptor 1.1.1 → 1.1.2

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
- SHA1:
3
- metadata.gz: 7d5e5cddbd8555f8052384fd6c1a24dbb2d5f983
4
- data.tar.gz: ced72ebad0518896b03f40c9b25f761a214242ea
2
+ SHA256:
3
+ metadata.gz: 9b9a4a120280d718fded0e231e7b005857afd53be2246049a8fe10769cbf83eb
4
+ data.tar.gz: 848a57c6e1e849c2049bdf34ee8b53b3fea2a65dc36ec188bd348c7bfe7734a2
5
5
  SHA512:
6
- metadata.gz: f7d5e955d2633440c58967462106e42e1f0ea2f6acd0d767a59c259f37991e960beb4bf5debbe373d9d92de3586ed7f859af946ae24e57c47dd25ad6311ded6f
7
- data.tar.gz: 8d264999fee024dd2449b5fc01c4c7b21bc5a9e7d676c18056a7c06f422ccc7e7c625fbc59c8ba192a033c60bef66c824858ce6dcb5de7114c38d2ea8ec32d46
6
+ metadata.gz: '0406084478cad890133287e35f66df22e59b4ebd6d28ed20590344199766fb64e02aafac21c04c675330039a11ccd2828ce71a051e2017859be85c277c4cf9bb'
7
+ data.tar.gz: fdd35052b3e79184c2151ed9be89654d3aa5506bee0e4b8f55e3f82e01ec39a9845969a515446912ee8b16907cae916d91bb0df8da47678b8ec04dfff61052d5
data/README.md CHANGED
@@ -37,7 +37,7 @@ to your application's root url.
37
37
 
38
38
  ## Usage
39
39
 
40
- Before your before_filter or controller redirects the user to the
40
+ Before your before_action or controller redirects the user to the
41
41
  login/registration/terms of use page, call `store_url`
42
42
  to store the current url.
43
43
 
@@ -1,3 +1,3 @@
1
1
  module ActionInterceptor
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
@@ -7,6 +7,9 @@ require "action_interceptor"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
10
+ # Initialize configuration defaults for originally generated Rails version.
11
+ config.load_defaults 5.2
12
+
10
13
  # Settings in config/environments/* take precedence over those specified here.
11
14
  # Application configuration should go into files in config/initializers
12
15
  # -- all .rb files in that directory are automatically loaded.
@@ -2,18 +2,18 @@ require 'spec_helper'
2
2
 
3
3
  module ActionInterceptor
4
4
  module ActionController
5
- describe Base do
5
+ RSpec.describe Base, type: :lib do
6
6
 
7
- let!(:request) {
8
- r = ::ActionController::TestRequest.new(host: 'http://test.me')
9
- r.env['HTTP_REFERER'] = 'http://refer.er'
10
- r
11
- }
12
- let!(:controller) {
13
- c = ::ActionController::Base.new
14
- c.request = request
15
- c
16
- }
7
+ let!(:request) do
8
+ ::ActionController::TestRequest.new(
9
+ { 'REQUEST_METHOD' => 'GET', 'HTTP_REFERER' => 'http://refer.er' },
10
+ {},
11
+ ::ActionController::Base
12
+ ).tap { |request| request.host = 'test.me' }
13
+ end
14
+ let!(:controller) do
15
+ ::ActionController::Base.new.tap { |controller| controller.request = request }
16
+ end
17
17
 
18
18
  it 'modifies ActionController::Base' do
19
19
  expect(controller.respond_to?(:current_page?, true)).to eq true
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  module ActionInterceptor
4
- describe Configuration do
4
+ RSpec.describe Configuration, type: :lib do
5
5
 
6
6
  let!(:config) { described_class.new }
7
7
 
@@ -2,16 +2,16 @@ require 'spec_helper'
2
2
 
3
3
  module ActionInterceptor
4
4
  module Strategies
5
- describe Session do
5
+ RSpec.describe Session, type: :lib do
6
6
 
7
- let!(:request) {
8
- ::ActionController::TestRequest.new(:host => 'http://test.me')
9
- }
10
- let!(:controller) {
11
- c = ::ActionController::Base.new
12
- c.request = request
13
- c
14
- }
7
+ let!(:request) do
8
+ ::ActionController::TestRequest.new({}, {}, ::ActionController::Base).tap do |request|
9
+ request.host = 'test.me'
10
+ end
11
+ end
12
+ let!(:controller) do
13
+ ::ActionController::Base.new.tap { |controller| controller.request = request }
14
+ end
15
15
  let!(:strategy) { Session.new(controller) }
16
16
  let!(:key) { :key }
17
17
  let!(:string) { 'string' }
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'dummy/lib/strategies/dummy'
3
3
 
4
4
  module ActionInterceptor
5
- describe Strategies do
5
+ RSpec.describe Strategies, type: :lib do
6
6
 
7
7
  let!(:controller) { ::ActionController::Base.new }
8
8
 
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe ActionInterceptor do
3
+ RSpec.describe ActionInterceptor, type: :lib do
4
4
  it 'must be configurable' do
5
5
  expect(described_class.config.default_url).to eq('/dummy')
6
6
  expect(described_class.config.default_key).to eq(:dummy_key)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_interceptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-29 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.1'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '3.1'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: sqlite3
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +103,6 @@ files:
109
103
  - spec/dummy/config/routes.rb
110
104
  - spec/dummy/db/test.sqlite3
111
105
  - spec/dummy/lib/strategies/dummy.rb
112
- - spec/dummy/log/development.log
113
106
  - spec/dummy/log/test.log
114
107
  - spec/dummy/public/404.html
115
108
  - spec/dummy/public/422.html
@@ -140,52 +133,50 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
133
  - !ruby/object:Gem::Version
141
134
  version: '0'
142
135
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.4.5.1
136
+ rubygems_version: 3.0.1
145
137
  signing_key:
146
138
  specification_version: 4
147
139
  summary: Handles storage of return url's across multiple requests
148
140
  test_files:
141
+ - spec/spec_helper.rb
149
142
  - spec/dummy/app/assets/javascripts/application.js
150
143
  - spec/dummy/app/assets/stylesheets/application.css
151
- - spec/dummy/app/controllers/application_controller.rb
152
- - spec/dummy/app/controllers/home_controller.rb
153
144
  - spec/dummy/app/controllers/registrations_controller.rb
145
+ - spec/dummy/app/controllers/home_controller.rb
146
+ - spec/dummy/app/controllers/application_controller.rb
154
147
  - spec/dummy/app/helpers/application_helper.rb
155
- - spec/dummy/bin/bundle
148
+ - spec/dummy/db/test.sqlite3
149
+ - spec/dummy/log/test.log
150
+ - spec/dummy/README.md
151
+ - spec/dummy/public/favicon.ico
152
+ - spec/dummy/public/422.html
153
+ - spec/dummy/public/404.html
154
+ - spec/dummy/public/500.html
155
+ - spec/dummy/config.ru
156
+ - spec/dummy/lib/strategies/dummy.rb
156
157
  - spec/dummy/bin/rails
157
158
  - spec/dummy/bin/rake
159
+ - spec/dummy/bin/bundle
158
160
  - spec/dummy/config/application.rb
159
- - spec/dummy/config/boot.rb
160
- - spec/dummy/config/database.yml
161
- - spec/dummy/config/environment.rb
162
- - spec/dummy/config/environments/development.rb
163
- - spec/dummy/config/environments/production.rb
164
- - spec/dummy/config/environments/test.rb
165
- - spec/dummy/config/initializers/action_interceptor.rb
166
- - spec/dummy/config/initializers/backtrace_silencers.rb
167
161
  - spec/dummy/config/initializers/filter_parameter_logging.rb
168
- - spec/dummy/config/initializers/inflections.rb
169
- - spec/dummy/config/initializers/mime_types.rb
170
162
  - spec/dummy/config/initializers/secret_token.rb
171
- - spec/dummy/config/initializers/session_store.rb
163
+ - spec/dummy/config/initializers/inflections.rb
164
+ - spec/dummy/config/initializers/action_interceptor.rb
165
+ - spec/dummy/config/initializers/backtrace_silencers.rb
172
166
  - spec/dummy/config/initializers/wrap_parameters.rb
167
+ - spec/dummy/config/initializers/session_store.rb
168
+ - spec/dummy/config/initializers/mime_types.rb
173
169
  - spec/dummy/config/locales/en.yml
174
170
  - spec/dummy/config/routes.rb
175
- - spec/dummy/config.ru
176
- - spec/dummy/db/test.sqlite3
177
- - spec/dummy/lib/strategies/dummy.rb
178
- - spec/dummy/log/development.log
179
- - spec/dummy/log/test.log
180
- - spec/dummy/public/404.html
181
- - spec/dummy/public/422.html
182
- - spec/dummy/public/500.html
183
- - spec/dummy/public/favicon.ico
171
+ - spec/dummy/config/database.yml
172
+ - spec/dummy/config/environment.rb
173
+ - spec/dummy/config/boot.rb
174
+ - spec/dummy/config/environments/production.rb
175
+ - spec/dummy/config/environments/test.rb
176
+ - spec/dummy/config/environments/development.rb
184
177
  - spec/dummy/Rakefile
185
- - spec/dummy/README.md
186
- - spec/lib/action_interceptor/action_controller/base_spec.rb
187
178
  - spec/lib/action_interceptor/configuration_spec.rb
188
- - spec/lib/action_interceptor/strategies/session_spec.rb
189
179
  - spec/lib/action_interceptor/strategies_spec.rb
180
+ - spec/lib/action_interceptor/action_controller/base_spec.rb
181
+ - spec/lib/action_interceptor/strategies/session_spec.rb
190
182
  - spec/lib/action_interceptor_spec.rb
191
- - spec/spec_helper.rb
File without changes