bookdepository 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bookdepository/config.rb +9 -4
- data/lib/bookdepository/version.rb +1 -1
- data/test/test_bookdepository.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79b1b474e2e831936e6ddc7c516fa5cd07ba2bc3
|
4
|
+
data.tar.gz: c0840fefe09140d017881af8e717cb18d39a2c44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e82fa56cb2d154803e1b8dd170dce2fc11a1033c77cc3046fc629d199280cc7b558691c890c01ddd32be87a49baafa99b51e0bbfc812a8ee17077f8c03ad05
|
7
|
+
data.tar.gz: faa69b3f92463ac1b95593489a91d62146985cc0f1bb66c9d6fddf505df19c7372f09d850451ed7e6b658093a2f41cbb469ff9bedacb31d12de93820b2389495
|
@@ -1,10 +1,15 @@
|
|
1
1
|
module Bookdepository
|
2
2
|
module Config
|
3
3
|
class << self
|
4
|
-
|
5
|
-
|
4
|
+
attr_writer :auth_key, :client_id
|
5
|
+
|
6
|
+
def auth_key
|
7
|
+
@auth_key || ENV['BOOKDEPOSITORY_AUTH_KEY']
|
8
|
+
end
|
6
9
|
|
7
|
-
|
8
|
-
|
10
|
+
def client_id
|
11
|
+
@client_id || ENV['BOOKDEPOSITORY_CLIENT_ID']
|
12
|
+
end
|
13
|
+
end
|
9
14
|
end
|
10
15
|
end
|
data/test/test_bookdepository.rb
CHANGED
@@ -3,6 +3,10 @@ require_relative 'helper'
|
|
3
3
|
class TestBookdepository < Minitest::Test
|
4
4
|
def setup
|
5
5
|
VCR.insert_cassette('bookdepository')
|
6
|
+
Bookdepository.configure do |c|
|
7
|
+
c.client_id = '123'
|
8
|
+
c.auth_key = '123'
|
9
|
+
end
|
6
10
|
@client = Bookdepository.new
|
7
11
|
@options = { 'countryCode' => 'GB' }
|
8
12
|
end
|