finnegans 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/finnegans.rb +8 -0
- data/lib/finnegans/client.rb +1 -1
- data/lib/finnegans/version.rb +1 -1
- 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: 1b833b18b0637d5f2ed846e08dae877a54eebbaf
|
4
|
+
data.tar.gz: d51bc2d2cb4badfe5e3677ac1eabfafd1c802c29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80c88544286bcf7605fbf0ed847ddd8b22284b08b2fe180948d1b045aa95fafda41d5896911b0009ad222fe60946376386f07e5fde37381d1fc8df3fa9edd1e8
|
7
|
+
data.tar.gz: b1aed35c2bcdc287ec902921989479b451e201def6723e874ab5c74b5791e16dec5429497a76ef2165f8613f742174e1a06eea53deaf334ddb1c3d11aaaa63d0
|
data/Gemfile.lock
CHANGED
data/lib/finnegans.rb
CHANGED
@@ -9,6 +9,7 @@ require "finnegans/client"
|
|
9
9
|
|
10
10
|
module Finnegans
|
11
11
|
@@resources_namespace = ''
|
12
|
+
@@api_catalog_path = ''
|
12
13
|
|
13
14
|
DEFAULT_USER_AGENT = "Finnegans API Client v#{Finnegans::VERSION}".freeze
|
14
15
|
private_constant :DEFAULT_USER_AGENT
|
@@ -31,6 +32,9 @@ module Finnegans
|
|
31
32
|
class AuthenticationError < RequestError; end
|
32
33
|
|
33
34
|
class << self
|
35
|
+
def api_catalog_path
|
36
|
+
@@api_catalog_path
|
37
|
+
end
|
34
38
|
def resources_namespace
|
35
39
|
@@resources_namespace
|
36
40
|
end
|
@@ -39,6 +43,10 @@ module Finnegans
|
|
39
43
|
yield self
|
40
44
|
end
|
41
45
|
|
46
|
+
def api_catalog_path=(value)
|
47
|
+
value = value.to_s
|
48
|
+
@@api_catalog_path = (value.empty? ? nil : value)
|
49
|
+
end
|
42
50
|
def resources_namespace=(value)
|
43
51
|
value = value.to_s
|
44
52
|
@@resources_namespace = (value.empty? ? nil : value)
|
data/lib/finnegans/client.rb
CHANGED
@@ -8,7 +8,7 @@ module Finnegans
|
|
8
8
|
|
9
9
|
attr_reader :client_id, :base_url, :api_catalog_path, :namespace
|
10
10
|
|
11
|
-
def initialize(client_id:, client_secret:, base_url:, access_token: nil, api_catalog_path:
|
11
|
+
def initialize(client_id:, client_secret:, base_url:, access_token: nil, api_catalog_path: Finnegans.api_catalog_path, namespace: Finnegans.resources_namespace)
|
12
12
|
@client_id = client_id.to_s
|
13
13
|
@client_secret = client_secret.to_s
|
14
14
|
@base_url = base_url.to_s.gsub(/\/+$/, '')
|
data/lib/finnegans/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finnegans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agustin Cavilliotti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|