omniauth-chef 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-chef.rb +0 -1
- data/lib/omniauth-chef/version.rb +1 -2
- data/lib/omniauth/strategies/chef.rb +0 -1
- data/omniauth-chef.gemspec +6 -5
- data/spec/omniauth/strategies/chef_spec.rb +64 -1
- data/spec/spec_helper.rb +0 -1
- metadata +17 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b033b04ad1928330678145538c98879190704a7
|
4
|
+
data.tar.gz: b3bb8c9e1741a5073487a98d9a5344e3894c1ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad693d4c4b61ca0c4b12e7fdab9bf3b3935df0e82b1d89f46296bca7592bd917248579522b4e0d04d2d2e10a86ec471fccdbf22b08f0504472628dfd8c3b97de
|
7
|
+
data.tar.gz: 4ffded246d2d14258ef78e6242123a069e1efb207beb08040f761b2e36e1ce80e0a188492b5163dad5339e3c76a19948f3b153ee10da1783cba4e21fa96dcfc8
|
data/lib/omniauth-chef.rb
CHANGED
@@ -13,10 +13,9 @@
|
|
13
13
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
|
-
#
|
17
16
|
|
18
17
|
module OmniAuth
|
19
18
|
module Chef
|
20
|
-
VERSION = '0.1.
|
19
|
+
VERSION = '0.1.2'
|
21
20
|
end
|
22
21
|
end
|
data/omniauth-chef.gemspec
CHANGED
@@ -22,12 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.test_files = Dir.glob 'spec/**/*.rb'
|
24
24
|
|
25
|
-
spec.require_paths =
|
25
|
+
spec.require_paths = %w(lib)
|
26
26
|
|
27
|
-
spec.add_development_dependency 'bundler',
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
28
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.2'
|
29
|
+
spec.add_development_dependency 'rack-test', '~> 0'
|
30
|
+
spec.add_development_dependency 'rake', '~> 10'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 2'
|
31
32
|
|
32
33
|
spec.add_runtime_dependency 'chef', '~> 11'
|
33
34
|
spec.add_runtime_dependency 'omniauth', '~> 1.2'
|
@@ -14,10 +14,73 @@
|
|
14
14
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
|
-
#
|
18
17
|
|
19
18
|
require 'spec_helper'
|
20
19
|
|
21
20
|
describe OmniAuth::Strategies::Chef do
|
21
|
+
subject do
|
22
|
+
OmniAuth::Strategies::Chef.new({})
|
23
|
+
end
|
24
|
+
|
25
|
+
context 'options' do
|
26
|
+
describe 'option :endpoint' do
|
27
|
+
context 'default: https://api.opscode.piab' do
|
28
|
+
it do
|
29
|
+
expect(subject.options.endpoint).to eq('https://api.opscode.piab')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'option :fields' do
|
35
|
+
context 'default: [:name, :password]' do
|
36
|
+
it { expect(subject.options.fields).to eq([:name, :password]) }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe 'option :headers' do
|
41
|
+
context 'default: { }' do
|
42
|
+
it { expect(subject.options.headers).to eq({ }) }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'option :organization' do
|
47
|
+
context 'default: nil' do
|
48
|
+
it { expect(subject.options.organization).to eq(nil) }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'option :resource' do
|
53
|
+
context 'default: authenticate_user' do
|
54
|
+
it { expect(subject.options.resource).to eq('authenticate_user') }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe 'option :source' do
|
59
|
+
context 'default: web' do
|
60
|
+
it { expect(subject.options.source).to eq('web') }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe 'option :superuser' do
|
65
|
+
context 'default: pivotal' do
|
66
|
+
it { expect(subject.options.superuser).to eq('pivotal') }
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'option :key_path' do
|
71
|
+
context 'default: ../../../../config/webui_priv.pem' do
|
72
|
+
it do
|
73
|
+
default_key_path = '../../../../config/webui_priv.pem'
|
74
|
+
|
75
|
+
expect(subject.options.key_path).to eq(default_key_path)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
22
79
|
|
80
|
+
describe 'option :uid' do
|
81
|
+
context ':name' do
|
82
|
+
it { expect(subject.options.uid).to eq(:name) }
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
23
86
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Casey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.5'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: guard-rspec
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '4.2'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '4.2'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rack-test
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,9 +131,7 @@ metadata: {}
|
|
117
131
|
post_install_message:
|
118
132
|
rdoc_options: []
|
119
133
|
require_paths:
|
120
|
-
- lib
|
121
|
-
- lib/omniauth-chef/version.rb
|
122
|
-
- lib/omniauth-chef.rb
|
134
|
+
- lib
|
123
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
136
|
requirements:
|
125
137
|
- - ">="
|