credly 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/lib/credly.rb +1 -1
- data/lib/credly/client.rb +1 -1
- data/lib/credly/version.rb +1 -1
- data/spec/unit/api_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdd88fadf204620537ca1c14e017394e64a163df
|
4
|
+
data.tar.gz: 13b5da9183273834934c11d2e803bc57059731a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83e16a0b45d397ad7d854bbf6547033c58b6559b2eec0853bafaa2c6eb9fb67d0521d7b9ae00540a65aca9ca327a047634ec28c48cfe3f77736b32115682de8
|
7
|
+
data.tar.gz: 483981409862b309ebf173685887be6de2283b9340c9936e9e2a203a7953e3886524d034c836eb617908c0284482d9308e5ab72888bf415bfd5f30aa7865fc99
|
data/Rakefile
CHANGED
data/lib/credly.rb
CHANGED
@@ -57,7 +57,7 @@ module Credly
|
|
57
57
|
if defined? @@options
|
58
58
|
@@options
|
59
59
|
else
|
60
|
-
@@options = { :base_endpoint => 'https://
|
60
|
+
@@options = { :base_endpoint => 'https://apistaging.credly.com',
|
61
61
|
:base_domain => 'https://staging.credly.com',
|
62
62
|
:access_token => nil,
|
63
63
|
:version => 'v0.2',
|
data/lib/credly/client.rb
CHANGED
data/lib/credly/version.rb
CHANGED
data/spec/unit/api_spec.rb
CHANGED
@@ -12,6 +12,9 @@ describe 'API' do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
describe "configuration" do
|
15
|
+
before(:each) { @default_credly_configuration = Credly.configuration }
|
16
|
+
before(:after) { Credly.configuration = @default_credly_configuration }
|
17
|
+
|
15
18
|
it "badge domain" do
|
16
19
|
Credly::Client.any_instance.should_receive(:authenticate)
|
17
20
|
expect(Credly::Client.new(:username => 'whatever', :password => 'password').options[:base_domain]).to eq('https://staging.credly.com')
|
@@ -21,6 +24,17 @@ describe 'API' do
|
|
21
24
|
Credly::Client.any_instance.should_receive(:authenticate)
|
22
25
|
expect(Credly::Client.new(:username => 'whatever', :password => 'password', :base_domain => 'mymy').options[:base_domain]).to eq('mymy')
|
23
26
|
end
|
27
|
+
|
28
|
+
it "badge domain can be defined" do
|
29
|
+
Credly.configuration do |config|
|
30
|
+
config.base_domain = 'mymy'
|
31
|
+
end
|
32
|
+
|
33
|
+
Credly::Client.any_instance.should_receive(:authenticate)
|
34
|
+
expect(Credly::Client.new(:username => 'whatever', :password => 'password').options[:base_domain]).to eq('mymy')
|
35
|
+
|
36
|
+
tmp = Credly.configuration.base_domain
|
37
|
+
end
|
24
38
|
end
|
25
39
|
|
26
40
|
describe 'Badges' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: credly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Rodríguez-Baltanás Díaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|