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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76d29d05f90acadf8007f423e26062448b2f16a6
4
- data.tar.gz: 0ddbcb600205938340a7574c818e156c42180361
3
+ metadata.gz: 1b033b04ad1928330678145538c98879190704a7
4
+ data.tar.gz: b3bb8c9e1741a5073487a98d9a5344e3894c1ba5
5
5
  SHA512:
6
- metadata.gz: 8788ac107386c5265278500ca52e2828adfcf33698fd0129ba44e9cd7cecce376f469682f1fe92278e1fcf47d18e6279caf7afaac496d2c69d367711829f439a
7
- data.tar.gz: 1ebac31b407d7f66f906da84bcdda84911dfccecde01117e4cdf307a73a4cfc80f576e0ae8b7999e51455f1b32b4a4886b0979e98e4af14dc7a70c75738011cd
6
+ metadata.gz: ad693d4c4b61ca0c4b12e7fdab9bf3b3935df0e82b1d89f46296bca7592bd917248579522b4e0d04d2d2e10a86ec471fccdbf22b08f0504472628dfd8c3b97de
7
+ data.tar.gz: 4ffded246d2d14258ef78e6242123a069e1efb207beb08040f761b2e36e1ce80e0a188492b5163dad5339e3c76a19948f3b153ee10da1783cba4e21fa96dcfc8
data/lib/omniauth-chef.rb CHANGED
@@ -13,7 +13,6 @@
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
  require 'omniauth-chef/version'
19
18
 
@@ -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.1'
19
+ VERSION = '0.1.2'
21
20
  end
22
21
  end
@@ -13,7 +13,6 @@
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
  require 'chef'
19
18
  require 'omniauth'
@@ -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 = Dir.glob 'lib/**/*.rb'
25
+ spec.require_paths = %w(lib)
26
26
 
27
- spec.add_development_dependency 'bundler', '~> 1.5'
28
- spec.add_development_dependency 'rack-test', '~> 0'
29
- spec.add_development_dependency 'rake', '~> 10'
30
- spec.add_development_dependency 'rspec', '~> 2'
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
@@ -13,7 +13,6 @@
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
  $:.unshift File.expand_path '..', __FILE__
19
18
 
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.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-03-26 00:00:00.000000000 Z
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/omniauth/strategies/chef.rb
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
  - - ">="