consul 1.0.1 → 1.0.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 +4 -4
- data/.travis.yml +5 -0
- data/Gemfile.3-2.lock +3 -3
- data/Gemfile.4-2.lock +3 -3
- data/Gemfile.5-2.lock +3 -3
- data/Gemfile.6-0 +17 -0
- data/Gemfile.6-0.lock +188 -0
- data/README.md +17 -7
- data/consul.gemspec +1 -1
- data/lib/consul/power.rb +1 -1
- data/lib/consul/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 354c035304ffa8887ff031f0cc898aaab38da8b2
|
4
|
+
data.tar.gz: c9ec6a1775deb257c429277a66c254a7c2796ca8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07596f0e3957b6e3bca2881c9eedf940514ec25b45a2390a9583ff85a2807824bd389d25e8893ed2b53855ffc27bb27ea7faf776293fecbc9bc0b47abb792b5d'
|
7
|
+
data.tar.gz: 48f3fcab23fa832628c8b6a34f55446cd97e6b4852c093bdd6fdd700eb52248ed91911877a80ec02118596c4c7243dfa4d6d8e3a7e29be96f930ca2c44759c4f
|
data/.travis.yml
CHANGED
@@ -13,6 +13,7 @@ gemfile:
|
|
13
13
|
- Gemfile.3-2
|
14
14
|
- Gemfile.4-2
|
15
15
|
- Gemfile.5-2
|
16
|
+
- Gemfile.6-0
|
16
17
|
|
17
18
|
matrix:
|
18
19
|
exclude:
|
@@ -22,6 +23,10 @@ matrix:
|
|
22
23
|
rvm: 2.5.3
|
23
24
|
- gemfile: Gemfile.4-2
|
24
25
|
rvm: 2.5.3
|
26
|
+
- gemfile: Gemfile.6-0
|
27
|
+
rvm: 2.3.8
|
28
|
+
- gemfile: Gemfile.6-0
|
29
|
+
rvm: 2.4.5
|
25
30
|
|
26
31
|
install:
|
27
32
|
# Replace default Travis CI bundler script with a version that doesn't
|
data/Gemfile.3-2.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
consul (1.0.
|
4
|
+
consul (1.0.1)
|
5
5
|
edge_rider (>= 0.3.0)
|
6
|
-
memoized
|
6
|
+
memoized (>= 1.0.2)
|
7
7
|
rails (>= 3.2)
|
8
8
|
|
9
9
|
GEM
|
@@ -57,7 +57,7 @@ GEM
|
|
57
57
|
mail (2.5.5)
|
58
58
|
mime-types (~> 1.16)
|
59
59
|
treetop (~> 1.4.8)
|
60
|
-
memoized (1.0.
|
60
|
+
memoized (1.0.2)
|
61
61
|
metaclass (0.0.1)
|
62
62
|
mime-types (1.25.1)
|
63
63
|
mocha (0.13.3)
|
data/Gemfile.4-2.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
consul (1.0.
|
4
|
+
consul (1.0.1)
|
5
5
|
edge_rider (>= 0.3.0)
|
6
|
-
memoized
|
6
|
+
memoized (>= 1.0.2)
|
7
7
|
rails (>= 3.2)
|
8
8
|
|
9
9
|
GEM
|
@@ -64,7 +64,7 @@ GEM
|
|
64
64
|
nokogiri (>= 1.5.9)
|
65
65
|
mail (2.7.1)
|
66
66
|
mini_mime (>= 0.1.1)
|
67
|
-
memoized (1.0.
|
67
|
+
memoized (1.0.2)
|
68
68
|
mini_mime (1.0.1)
|
69
69
|
mini_portile2 (2.4.0)
|
70
70
|
minitest (5.11.3)
|
data/Gemfile.5-2.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
consul (1.0.
|
4
|
+
consul (1.0.1)
|
5
5
|
edge_rider (>= 0.3.0)
|
6
|
-
memoized
|
6
|
+
memoized (>= 1.0.2)
|
7
7
|
rails (>= 3.2)
|
8
8
|
|
9
9
|
GEM
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
mini_mime (>= 0.1.1)
|
74
74
|
marcel (0.3.3)
|
75
75
|
mimemagic (~> 0.3.2)
|
76
|
-
memoized (1.0.
|
76
|
+
memoized (1.0.2)
|
77
77
|
method_source (0.9.2)
|
78
78
|
mimemagic (0.3.3)
|
79
79
|
mini_mime (1.0.1)
|
data/Gemfile.6-0
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'rails', '~> 6.0.0beta'
|
5
|
+
gem 'assignable_values'
|
6
|
+
|
7
|
+
# Development dependencies
|
8
|
+
gem 'rspec'
|
9
|
+
gem 'rspec-rails'
|
10
|
+
gem 'rspec_candy'
|
11
|
+
gem 'shoulda-matchers'
|
12
|
+
gem 'sqlite3'
|
13
|
+
gem 'database_cleaner'
|
14
|
+
gem 'gemika'
|
15
|
+
|
16
|
+
# Gem under test
|
17
|
+
gem 'consul', :path => '.'
|
data/Gemfile.6-0.lock
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
consul (1.0.1)
|
5
|
+
edge_rider (>= 0.3.0)
|
6
|
+
memoized (>= 1.0.2)
|
7
|
+
rails (>= 3.2)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actioncable (6.0.0.beta3)
|
13
|
+
actionpack (= 6.0.0.beta3)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
actionmailbox (6.0.0.beta3)
|
17
|
+
actionpack (= 6.0.0.beta3)
|
18
|
+
activejob (= 6.0.0.beta3)
|
19
|
+
activerecord (= 6.0.0.beta3)
|
20
|
+
activestorage (= 6.0.0.beta3)
|
21
|
+
activesupport (= 6.0.0.beta3)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
actionmailer (6.0.0.beta3)
|
24
|
+
actionpack (= 6.0.0.beta3)
|
25
|
+
actionview (= 6.0.0.beta3)
|
26
|
+
activejob (= 6.0.0.beta3)
|
27
|
+
mail (~> 2.5, >= 2.5.4)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
actionpack (6.0.0.beta3)
|
30
|
+
actionview (= 6.0.0.beta3)
|
31
|
+
activesupport (= 6.0.0.beta3)
|
32
|
+
rack (~> 2.0)
|
33
|
+
rack-test (>= 0.6.3)
|
34
|
+
rails-dom-testing (~> 2.0)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
36
|
+
actiontext (6.0.0.beta3)
|
37
|
+
actionpack (= 6.0.0.beta3)
|
38
|
+
activerecord (= 6.0.0.beta3)
|
39
|
+
activestorage (= 6.0.0.beta3)
|
40
|
+
activesupport (= 6.0.0.beta3)
|
41
|
+
nokogiri (>= 1.8.5)
|
42
|
+
actionview (6.0.0.beta3)
|
43
|
+
activesupport (= 6.0.0.beta3)
|
44
|
+
builder (~> 3.1)
|
45
|
+
erubi (~> 1.4)
|
46
|
+
rails-dom-testing (~> 2.0)
|
47
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
48
|
+
activejob (6.0.0.beta3)
|
49
|
+
activesupport (= 6.0.0.beta3)
|
50
|
+
globalid (>= 0.3.6)
|
51
|
+
activemodel (6.0.0.beta3)
|
52
|
+
activesupport (= 6.0.0.beta3)
|
53
|
+
activerecord (6.0.0.beta3)
|
54
|
+
activemodel (= 6.0.0.beta3)
|
55
|
+
activesupport (= 6.0.0.beta3)
|
56
|
+
activestorage (6.0.0.beta3)
|
57
|
+
actionpack (= 6.0.0.beta3)
|
58
|
+
activerecord (= 6.0.0.beta3)
|
59
|
+
marcel (~> 0.3.1)
|
60
|
+
activesupport (6.0.0.beta3)
|
61
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
62
|
+
i18n (>= 0.7, < 2)
|
63
|
+
minitest (~> 5.1)
|
64
|
+
tzinfo (~> 1.1)
|
65
|
+
zeitwerk (~> 1.3, >= 1.3.1)
|
66
|
+
assignable_values (0.12.1)
|
67
|
+
activerecord (>= 2.3)
|
68
|
+
builder (3.2.3)
|
69
|
+
concurrent-ruby (1.1.5)
|
70
|
+
crass (1.0.4)
|
71
|
+
database_cleaner (1.7.0)
|
72
|
+
diff-lcs (1.3)
|
73
|
+
edge_rider (0.3.3)
|
74
|
+
activerecord
|
75
|
+
erubi (1.8.0)
|
76
|
+
gemika (0.3.4)
|
77
|
+
globalid (0.4.2)
|
78
|
+
activesupport (>= 4.2.0)
|
79
|
+
i18n (1.6.0)
|
80
|
+
concurrent-ruby (~> 1.0)
|
81
|
+
loofah (2.2.3)
|
82
|
+
crass (~> 1.0.2)
|
83
|
+
nokogiri (>= 1.5.9)
|
84
|
+
mail (2.7.1)
|
85
|
+
mini_mime (>= 0.1.1)
|
86
|
+
marcel (0.3.3)
|
87
|
+
mimemagic (~> 0.3.2)
|
88
|
+
memoized (1.0.2)
|
89
|
+
method_source (0.9.2)
|
90
|
+
mimemagic (0.3.3)
|
91
|
+
mini_mime (1.0.1)
|
92
|
+
mini_portile2 (2.4.0)
|
93
|
+
minitest (5.11.3)
|
94
|
+
nio4r (2.3.1)
|
95
|
+
nokogiri (1.10.2)
|
96
|
+
mini_portile2 (~> 2.4.0)
|
97
|
+
rack (2.0.7)
|
98
|
+
rack-test (1.1.0)
|
99
|
+
rack (>= 1.0, < 3)
|
100
|
+
rails (6.0.0.beta3)
|
101
|
+
actioncable (= 6.0.0.beta3)
|
102
|
+
actionmailbox (= 6.0.0.beta3)
|
103
|
+
actionmailer (= 6.0.0.beta3)
|
104
|
+
actionpack (= 6.0.0.beta3)
|
105
|
+
actiontext (= 6.0.0.beta3)
|
106
|
+
actionview (= 6.0.0.beta3)
|
107
|
+
activejob (= 6.0.0.beta3)
|
108
|
+
activemodel (= 6.0.0.beta3)
|
109
|
+
activerecord (= 6.0.0.beta3)
|
110
|
+
activestorage (= 6.0.0.beta3)
|
111
|
+
activesupport (= 6.0.0.beta3)
|
112
|
+
bundler (>= 1.3.0)
|
113
|
+
railties (= 6.0.0.beta3)
|
114
|
+
sprockets-rails (>= 2.0.0)
|
115
|
+
rails-dom-testing (2.0.3)
|
116
|
+
activesupport (>= 4.2.0)
|
117
|
+
nokogiri (>= 1.6)
|
118
|
+
rails-html-sanitizer (1.0.4)
|
119
|
+
loofah (~> 2.2, >= 2.2.2)
|
120
|
+
railties (6.0.0.beta3)
|
121
|
+
actionpack (= 6.0.0.beta3)
|
122
|
+
activesupport (= 6.0.0.beta3)
|
123
|
+
method_source
|
124
|
+
rake (>= 0.8.7)
|
125
|
+
thor (>= 0.20.3, < 2.0)
|
126
|
+
rake (12.3.2)
|
127
|
+
rspec (3.6.0)
|
128
|
+
rspec-core (~> 3.6.0)
|
129
|
+
rspec-expectations (~> 3.6.0)
|
130
|
+
rspec-mocks (~> 3.6.0)
|
131
|
+
rspec-core (3.6.0)
|
132
|
+
rspec-support (~> 3.6.0)
|
133
|
+
rspec-expectations (3.6.0)
|
134
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
135
|
+
rspec-support (~> 3.6.0)
|
136
|
+
rspec-mocks (3.6.0)
|
137
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
138
|
+
rspec-support (~> 3.6.0)
|
139
|
+
rspec-rails (3.6.0)
|
140
|
+
actionpack (>= 3.0)
|
141
|
+
activesupport (>= 3.0)
|
142
|
+
railties (>= 3.0)
|
143
|
+
rspec-core (~> 3.6.0)
|
144
|
+
rspec-expectations (~> 3.6.0)
|
145
|
+
rspec-mocks (~> 3.6.0)
|
146
|
+
rspec-support (~> 3.6.0)
|
147
|
+
rspec-support (3.6.0)
|
148
|
+
rspec_candy (0.4.1)
|
149
|
+
rspec
|
150
|
+
sneaky-save
|
151
|
+
shoulda-matchers (3.1.1)
|
152
|
+
activesupport (>= 4.0.0)
|
153
|
+
sneaky-save (0.1.2)
|
154
|
+
activerecord (>= 3.2.0)
|
155
|
+
sprockets (3.7.2)
|
156
|
+
concurrent-ruby (~> 1.0)
|
157
|
+
rack (> 1, < 3)
|
158
|
+
sprockets-rails (3.2.1)
|
159
|
+
actionpack (>= 4.0)
|
160
|
+
activesupport (>= 4.0)
|
161
|
+
sprockets (>= 3.0.0)
|
162
|
+
sqlite3 (1.3.13)
|
163
|
+
thor (0.20.3)
|
164
|
+
thread_safe (0.3.6)
|
165
|
+
tzinfo (1.2.5)
|
166
|
+
thread_safe (~> 0.1)
|
167
|
+
websocket-driver (0.7.0)
|
168
|
+
websocket-extensions (>= 0.1.0)
|
169
|
+
websocket-extensions (0.1.3)
|
170
|
+
zeitwerk (1.4.3)
|
171
|
+
|
172
|
+
PLATFORMS
|
173
|
+
ruby
|
174
|
+
|
175
|
+
DEPENDENCIES
|
176
|
+
assignable_values
|
177
|
+
consul!
|
178
|
+
database_cleaner
|
179
|
+
gemika
|
180
|
+
rails (~> 6.0.0beta)
|
181
|
+
rspec
|
182
|
+
rspec-rails
|
183
|
+
rspec_candy
|
184
|
+
shoulda-matchers
|
185
|
+
sqlite3
|
186
|
+
|
187
|
+
BUNDLED WITH
|
188
|
+
1.17.3
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Consul is an authorization solution for Ruby on Rails where you describe *sets o
|
|
8
8
|
We have used Consul in combination with [assignable_values](https://github.com/makandra/assignable_values) to solve a variety of authorization requirements ranging from boring to bizarre.
|
9
9
|
Also see our crash course video: [Solving bizare authorization requirements with Rails](http://bizarre-authorization.talks.makandra.com/).
|
10
10
|
|
11
|
-
Consul is tested with Rails 3.2, 4.2,
|
11
|
+
Consul is tested with Rails 3.2, 4.2, 5.2, and 6.0 on Ruby 2.3, 2.4, and 2.5 (only if supported, for each Ruby/Rails combination). If you need support for Rails 3.2, please use [v0.13.2](https://github.com/makandra/consul/tree/v0.13.2).
|
12
12
|
|
13
13
|
|
14
14
|
Describing access to your application
|
@@ -763,6 +763,16 @@ This section Some hints for testing authorization with Consul.
|
|
763
763
|
|
764
764
|
### Test that a controller checks against a power
|
765
765
|
|
766
|
+
Include the Consul Matcher `spec/support/consul_matchers.rb`:
|
767
|
+
|
768
|
+
```
|
769
|
+
require 'consul/spec/matchers'
|
770
|
+
|
771
|
+
RSpec.configure do |c|
|
772
|
+
c.include Consul::Spec::Matchers
|
773
|
+
end
|
774
|
+
```
|
775
|
+
|
766
776
|
You can say this in any controller spec:
|
767
777
|
|
768
778
|
```rb
|
@@ -834,12 +844,12 @@ Now run `bundle install` to lock the gem into your project.
|
|
834
844
|
Development
|
835
845
|
-----------
|
836
846
|
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
rake
|
842
|
-
|
847
|
+
- There are tests in `spec`. We only accept PRs with tests.
|
848
|
+
- We currently develop using Ruby 2.3.8 (see `.ruby-version`) since that version works for all versions of ActiveRecord that we support. Travis CI will test additional Ruby versions (2.4.5 and 2.5.3).
|
849
|
+
- Put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as a template.
|
850
|
+
- There are gem bundles in the project root for each rails version that we support.
|
851
|
+
- You can bundle all test applications by saying `bundle exec rake matrix:install`
|
852
|
+
- You can run specs from the project root by saying `bundle exec rake matrix:spec`. This will run all gemfiles compatible with your current Ruby.
|
843
853
|
|
844
854
|
If you would like to contribute:
|
845
855
|
|
data/consul.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
24
|
s.require_paths = ["lib"]
|
25
25
|
|
26
|
-
s.add_dependency('memoized')
|
26
|
+
s.add_dependency('memoized', '>=1.0.2')
|
27
27
|
s.add_dependency('rails', '>=3.2')
|
28
28
|
s.add_dependency('edge_rider', '>= 0.3.0')
|
29
29
|
end
|
data/lib/consul/power.rb
CHANGED
@@ -173,7 +173,7 @@ module Consul
|
|
173
173
|
name = name.to_s
|
174
174
|
singularized = name.singularize
|
175
175
|
if singularized == name
|
176
|
-
raise Consul::PowerNotSingularizable, "Power name can not have
|
176
|
+
raise Consul::PowerNotSingularizable, "Power name can not have a singular form: #{name}"
|
177
177
|
else
|
178
178
|
singularized
|
179
179
|
end
|
data/lib/consul/version.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.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: 2019-
|
11
|
+
date: 2019-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: memoized
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,6 +69,8 @@ files:
|
|
69
69
|
- Gemfile.4-2.lock
|
70
70
|
- Gemfile.5-2
|
71
71
|
- Gemfile.5-2.lock
|
72
|
+
- Gemfile.6-0
|
73
|
+
- Gemfile.6-0.lock
|
72
74
|
- Gemfile.lock
|
73
75
|
- LICENSE
|
74
76
|
- README.md
|