roqua-core-api 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -0
- data/core_api.gemspec +6 -5
- data/lib/roqua/core_api/sessions/auth_session.rb +1 -1
- data/lib/roqua/core_api/sessions/basic_auth_session.rb +1 -1
- data/lib/roqua/core_api/version.rb +1 -1
- data/spec/lib/roqua/core_api/sessions/auth_session_spec.rb +4 -4
- data/spec/lib/roqua/core_api/sessions/basic_auth_session_spec.rb +12 -12
- data/spec/lib/roqua/core_api/sessions/oauth_session_spec.rb +4 -4
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71324b1ca72553ac40ddcf189844d29165eb3ac6
|
4
|
+
data.tar.gz: 168757a7425bafbb275d4e9ff8f76ba8a15ac575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 551a34059fa64fa400f80da95efc44eaae46b517847f47407d1680145c189606947d7274590e208c3cdd62a281bc9291f3e63037addd54356a9d01f607654d6e
|
7
|
+
data.tar.gz: 62a53f9504b6ee2a45e07714760a50ecb536e0bd88ade84edffc95c15bd93616b494f9fd8115480d87eb1c016eb0b844280a9a282509fdafca331873cc4588ae
|
data/ChangeLog.md
CHANGED
data/core_api.gemspec
CHANGED
@@ -18,11 +18,12 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
20
|
gem.add_dependency 'httparty', '~> 0.12.0'
|
21
|
-
gem.add_dependency 'active_interaction', '~>
|
21
|
+
gem.add_dependency 'active_interaction', '~> 1.0.4'
|
22
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.1.2'
|
22
23
|
|
23
|
-
gem.add_development_dependency 'bundler',
|
24
|
-
gem.add_development_dependency 'rake',
|
25
|
-
gem.add_development_dependency 'yard',
|
26
|
-
gem.add_development_dependency 'rspec',
|
24
|
+
gem.add_development_dependency 'bundler', '~> 1.0'
|
25
|
+
gem.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
gem.add_development_dependency 'yard', '~> 0.8'
|
27
|
+
gem.add_development_dependency 'rspec', '~> 3.0.0.beta1'
|
27
28
|
gem.add_development_dependency 'fabrication', '~> 2.9.6'
|
28
29
|
end
|
@@ -5,7 +5,7 @@ module Roqua
|
|
5
5
|
attr_reader :username
|
6
6
|
attr_reader :password
|
7
7
|
|
8
|
-
def initialize(username: ENV['
|
8
|
+
def initialize(username: ENV['CORE_KEY'], password: ENV['CORE_SECRET'], **additional_arguments)
|
9
9
|
@username = username
|
10
10
|
@password = password
|
11
11
|
super additional_arguments
|
@@ -10,11 +10,11 @@ describe AuthSession do
|
|
10
10
|
expect(session.core_host).to eq('some_core_host')
|
11
11
|
end
|
12
12
|
|
13
|
-
it 'defaults the core_host to the
|
14
|
-
orginal_env_core_host = ENV['
|
15
|
-
ENV['
|
13
|
+
it 'defaults the core_host to the CORE_HOST env variable' do
|
14
|
+
orginal_env_core_host = ENV['CORE_HOST']
|
15
|
+
ENV['CORE_HOST'] = 'some_env_core_host'
|
16
16
|
session = AuthSession.new
|
17
|
-
ENV['
|
17
|
+
ENV['CORE_HOST'] = orginal_env_core_host
|
18
18
|
expect(session.core_host).to eq('some_env_core_host')
|
19
19
|
end
|
20
20
|
end
|
@@ -7,11 +7,11 @@ describe BasicAuthSession do
|
|
7
7
|
expect(session.username).to eq('some_username')
|
8
8
|
end
|
9
9
|
|
10
|
-
it 'defaults the username to the
|
11
|
-
orginal_env_core_key = ENV['
|
12
|
-
ENV['
|
10
|
+
it 'defaults the username to the CORE_KEY env variable' do
|
11
|
+
orginal_env_core_key = ENV['CORE_KEY']
|
12
|
+
ENV['CORE_KEY'] = 'some_env_core_key'
|
13
13
|
session = Roqua::CoreApi.basic_auth_session
|
14
|
-
ENV['
|
14
|
+
ENV['CORE_KEY'] = orginal_env_core_key
|
15
15
|
expect(session.username).to eq('some_env_core_key')
|
16
16
|
end
|
17
17
|
|
@@ -20,11 +20,11 @@ describe BasicAuthSession do
|
|
20
20
|
expect(session.password).to eq('some_password')
|
21
21
|
end
|
22
22
|
|
23
|
-
it 'defaults the password to the
|
24
|
-
orginal_env_core_secret = ENV['
|
25
|
-
ENV['
|
23
|
+
it 'defaults the password to the CORE_SECRET env variable' do
|
24
|
+
orginal_env_core_secret = ENV['CORE_SECRET']
|
25
|
+
ENV['CORE_SECRET'] = 'some_env_core_secret'
|
26
26
|
session = Roqua::CoreApi.basic_auth_session
|
27
|
-
ENV['
|
27
|
+
ENV['CORE_SECRET'] = orginal_env_core_secret
|
28
28
|
expect(session.password).to eq('some_env_core_secret')
|
29
29
|
end
|
30
30
|
|
@@ -33,11 +33,11 @@ describe BasicAuthSession do
|
|
33
33
|
expect(session.core_host).to eq('some_core_host')
|
34
34
|
end
|
35
35
|
|
36
|
-
it 'defaults the AuthSession core_host
|
37
|
-
orginal_env_core_host = ENV['
|
38
|
-
ENV['
|
36
|
+
it 'defaults the AuthSession core_host CORE_HOST env variable default value' do
|
37
|
+
orginal_env_core_host = ENV['CORE_HOST']
|
38
|
+
ENV['CORE_HOST'] = 'some_env_core_host'
|
39
39
|
session = Roqua::CoreApi.basic_auth_session
|
40
|
-
ENV['
|
40
|
+
ENV['CORE_HOST'] = orginal_env_core_host
|
41
41
|
expect(session.core_host).to eq('some_env_core_host')
|
42
42
|
end
|
43
43
|
end
|
@@ -15,11 +15,11 @@ describe OAuthSession do
|
|
15
15
|
expect(session.core_host).to eq('some_core_host')
|
16
16
|
end
|
17
17
|
|
18
|
-
it 'defaults the AuthSession core_host
|
19
|
-
orginal_env_core_host = ENV['
|
20
|
-
ENV['
|
18
|
+
it 'defaults the AuthSession core_host CORE_HOST env variable default value' do
|
19
|
+
orginal_env_core_host = ENV['CORE_HOST']
|
20
|
+
ENV['CORE_HOST'] = 'some_env_core_host'
|
21
21
|
session = Roqua::CoreApi.oauth_session access_token: 'some_access_token'
|
22
|
-
ENV['
|
22
|
+
ENV['CORE_HOST'] = orginal_env_core_host
|
23
23
|
expect(session.core_host).to eq('some_env_core_host')
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-core-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.4
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: omniauth-oauth2
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.1.2
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.1.2
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|