consul 0.12.1 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of consul might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0400eaba4100fccd2fa6ce219fbef662b0539a68
4
- data.tar.gz: c37bcc13bc449b5fdbfd75e0cd10921450d93145
3
+ metadata.gz: eea2b4ef7c6586d9ee1ca962f4ab203bf526a00c
4
+ data.tar.gz: 71b0cb6aa67ddca3766f8fb0381eaef0b11a853a
5
5
  SHA512:
6
- metadata.gz: c311180fbd19ac398075e151e8b734edca9dabe4a53de83bdf80cbe16498764b3726b856a36d9ab6926e541b9b4f5ddefe52a8aa42173ad204e3e79d6fe5989a
7
- data.tar.gz: 5524169c519ddf6461b6c9925e718b0b560408d0514cad3cba6fd881f576963528b2b54d0e417adfa9446c25135b9c924da2ceff70e586145a9b579ca3be5571
6
+ metadata.gz: 288c097f5af07fdfc7d939821daf34639d0240ab435accd0f4e9a111a80564cdf007d11297bcd5c6bb135f94c63d7e0b34b6c2feec963c03797d617645f1c14d
7
+ data.tar.gz: b99d6c56b27fe3aa94dc90eb86dce2e2858b7680f111c4cffc58bfbc86f454c637dde4ee431109c5ace3d8301841bbb1098e116f63fdfab9d9a7d65e5997b276
@@ -4,6 +4,7 @@ rvm:
4
4
  - "1.9.3"
5
5
  - "2.1.0"
6
6
  - ree
7
+ before_install: gem install bundler # Fix bundler issues on 1.9.3
7
8
  before_script: rake travis_ci:prepare
8
9
  script: rake all:bundle all:spec
9
10
  notifications:
data/README.md CHANGED
@@ -408,7 +408,7 @@ class NotesController < ApplicationController
408
408
  end
409
409
  ```
410
410
 
411
- You can use `:except` and `:only` options like in before filters.
411
+ You can use `:except` and `:only` options like in before\_actions.
412
412
 
413
413
  You can also map different powers to different actions:
414
414
 
@@ -466,7 +466,7 @@ It is often convenient to map a power scope to a private controller method:
466
466
  ```rb
467
467
  class NotesController < ApplicationController
468
468
 
469
- power :notes, :as => note_scope
469
+ power :notes, :as => :note_scope
470
470
 
471
471
  def show
472
472
  @note = note_scope.find(params[:id])
@@ -5,7 +5,11 @@ module Consul
5
5
  base.send :include, InstanceMethods
6
6
  base.send :extend, ClassMethods
7
7
  if ensure_power_initializer_present?
8
- base.before_filter :ensure_power_initializer_present
8
+ if Rails.version.to_i < 4
9
+ base.before_filter :ensure_power_initializer_present
10
+ else
11
+ base.before_action :ensure_power_initializer_present
12
+ end
9
13
  end
10
14
  end
11
15
 
@@ -28,17 +32,29 @@ module Consul
28
32
  private
29
33
 
30
34
  def require_power_check(options = {})
31
- before_filter :unchecked_power, options
35
+ if Rails.version.to_i < 4
36
+ before_filter :unchecked_power, options
37
+ else
38
+ before_action :unchecked_power, options
39
+ end
32
40
  end
33
41
 
34
42
  # This is badly named, since it doesn't actually skip the :check_power filter
35
43
  def skip_power_check(options = {})
36
- skip_before_filter :unchecked_power, options
44
+ if Rails.version.to_i < 4
45
+ skip_before_filter :unchecked_power, options
46
+ else
47
+ skip_before_action :unchecked_power, options
48
+ end
37
49
  end
38
50
 
39
51
  def current_power(&initializer)
40
52
  self.current_power_initializer = initializer
41
- around_filter :with_current_power
53
+ if Rails.version.to_i < 4
54
+ around_filter :with_current_power
55
+ else
56
+ around_action :with_current_power
57
+ end
42
58
  helper_method :current_power
43
59
  end
44
60
 
@@ -55,7 +71,11 @@ module Consul
55
71
  # Store arguments for testing
56
72
  (@consul_power_args ||= []) << args
57
73
 
58
- before_filter :check_power, guard.filter_options
74
+ if Rails.version.to_i < 4
75
+ before_filter :check_power, guard.filter_options
76
+ else
77
+ before_action :check_power, guard.filter_options
78
+ end
59
79
 
60
80
  if guard.direct_access_method
61
81
  define_method guard.direct_access_method do
@@ -1,3 +1,3 @@
1
1
  module Consul
2
- VERSION = '0.12.1'
2
+ VERSION = '0.12.2'
3
3
  end
@@ -0,0 +1 @@
1
+ ../../shared/app_root/app
@@ -0,0 +1 @@
1
+ ../../shared/app_root/db
@@ -0,0 +1 @@
1
+ ../../shared/app_root/app
@@ -0,0 +1 @@
1
+ ../../shared/app_root/db
@@ -0,0 +1 @@
1
+ ../../shared/app_root/app
@@ -0,0 +1 @@
1
+ ../../shared/app_root/db
@@ -0,0 +1 @@
1
+ ../../shared/app_root/app
@@ -0,0 +1 @@
1
+ ../../shared/app_root/db
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-21 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: memoizer
@@ -77,6 +77,7 @@ files:
77
77
  - spec/rails-2.3/Gemfile
78
78
  - spec/rails-2.3/Gemfile.lock
79
79
  - spec/rails-2.3/Rakefile
80
+ - spec/rails-2.3/app_root/app
80
81
  - spec/rails-2.3/app_root/config/boot.rb
81
82
  - spec/rails-2.3/app_root/config/database.yml
82
83
  - spec/rails-2.3/app_root/config/environment.rb
@@ -88,6 +89,7 @@ files:
88
89
  - spec/rails-2.3/app_root/config/initializers/fix_missing_source_file.rb
89
90
  - spec/rails-2.3/app_root/config/preinitializer.rb
90
91
  - spec/rails-2.3/app_root/config/routes.rb
92
+ - spec/rails-2.3/app_root/db
91
93
  - spec/rails-2.3/app_root/log/.gitignore
92
94
  - spec/rails-2.3/rcov.opts
93
95
  - spec/rails-2.3/spec.opts
@@ -97,6 +99,7 @@ files:
97
99
  - spec/rails-3.0/Gemfile.lock
98
100
  - spec/rails-3.0/Rakefile
99
101
  - spec/rails-3.0/app_root/.gitignore
102
+ - spec/rails-3.0/app_root/app
100
103
  - spec/rails-3.0/app_root/config/application.rb
101
104
  - spec/rails-3.0/app_root/config/boot.rb
102
105
  - spec/rails-3.0/app_root/config/database.yml
@@ -108,6 +111,7 @@ files:
108
111
  - spec/rails-3.0/app_root/config/initializers/secret_token.rb
109
112
  - spec/rails-3.0/app_root/config/initializers/session_store.rb
110
113
  - spec/rails-3.0/app_root/config/routes.rb
114
+ - spec/rails-3.0/app_root/db
111
115
  - spec/rails-3.0/app_root/lib/tasks/.gitkeep
112
116
  - spec/rails-3.0/app_root/log/.gitkeep
113
117
  - spec/rails-3.0/app_root/script/rails
@@ -118,6 +122,7 @@ files:
118
122
  - spec/rails-3.2/Gemfile.lock
119
123
  - spec/rails-3.2/Rakefile
120
124
  - spec/rails-3.2/app_root/.gitignore
125
+ - spec/rails-3.2/app_root/app
121
126
  - spec/rails-3.2/app_root/config/application.rb
122
127
  - spec/rails-3.2/app_root/config/boot.rb
123
128
  - spec/rails-3.2/app_root/config/database.yml
@@ -129,6 +134,7 @@ files:
129
134
  - spec/rails-3.2/app_root/config/initializers/secret_token.rb
130
135
  - spec/rails-3.2/app_root/config/initializers/session_store.rb
131
136
  - spec/rails-3.2/app_root/config/routes.rb
137
+ - spec/rails-3.2/app_root/db
132
138
  - spec/rails-3.2/app_root/log/.gitignore
133
139
  - spec/rails-3.2/rcov.opts
134
140
  - spec/rails-3.2/spec/spec_helper.rb
@@ -137,6 +143,7 @@ files:
137
143
  - spec/rails-4.1/Gemfile.lock
138
144
  - spec/rails-4.1/Rakefile
139
145
  - spec/rails-4.1/app_root/.gitignore
146
+ - spec/rails-4.1/app_root/app
140
147
  - spec/rails-4.1/app_root/bin/bundle
141
148
  - spec/rails-4.1/app_root/bin/rails
142
149
  - spec/rails-4.1/app_root/bin/rake
@@ -158,6 +165,7 @@ files:
158
165
  - spec/rails-4.1/app_root/config/locales/en.yml
159
166
  - spec/rails-4.1/app_root/config/routes.rb
160
167
  - spec/rails-4.1/app_root/config/secrets.yml
168
+ - spec/rails-4.1/app_root/db
161
169
  - spec/rails-4.1/log/test.log
162
170
  - spec/rails-4.1/rcov.opts
163
171
  - spec/rails-4.1/spec/spec_helper.rb
@@ -210,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
218
  version: '0'
211
219
  requirements: []
212
220
  rubyforge_project:
213
- rubygems_version: 2.2.2
221
+ rubygems_version: 2.5.1
214
222
  signing_key:
215
223
  specification_version: 4
216
224
  summary: A scope-based authorization solution for Ruby on Rails.