oneaccess 0.3.0 → 0.4.0

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: 7cb2be652851f8dabc88a0bc8bcef6bae27aa143
4
- data.tar.gz: d7bc86b14c570ab4cda8cf1f0bcd0efe45b56a3a
3
+ metadata.gz: 98c49abcbd54c5f94a0cae5a674d32fcf2b01fe5
4
+ data.tar.gz: a3c7d2c25eb637b21b7cf29016f1cafd8b3a631e
5
5
  SHA512:
6
- metadata.gz: 05d117dba4adb54a89f39b492026b2af6dcce7546f8d2af263e9795a4716f098e63f98d004edef4fad315a4806b9d5b0212d04c514022e94d77fb8cb678ac6a8
7
- data.tar.gz: 81055f03e9fa3cce90ba8371ef41f4a9355b2d559b915e6591a10a7a24b77d96df64df7f1bc6cddee9752947749b9c12dd2de350b26059fc34519420096bbbe7
6
+ metadata.gz: c66c7f5f83dd83ac954b25df379d02c21b6cc6728365f5d74af08b56cb5bac04660b357f84731fe7fa21c529e8a6c8dda4d3f745e11eb95c66dc9230c9f9cebe
7
+ data.tar.gz: 008d4f2c2f77d91158727aab68100abcd66c753692a2d8e103ca5bf13b11b5bd878371dbf2f7274261ba3bc3f22e2dd261400a5c406cadbe6be5e3d33c8644ac
@@ -1,17 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
  module ONEAccess
3
3
  class Configuration
4
- DEFAULT_BASE_V1_1_URL = "http://ws.oneaccess.io/v1.1"
5
- DEFAULT_BASE_V3_0_URL = "http://ws.oneaccess.io/v3.0"
4
+ DEFAULT_BASE_URL = "http://ws.oneaccess.io"
5
+ DEFAULT_BASE_V1_1_PATH = "/v1.1"
6
+ DEFAULT_BASE_V3_0_PATH = "/v3.0"
6
7
 
7
8
  class << self
8
- attr_accessor :base_v1_1_url
9
- attr_accessor :base_v3_0_url
9
+ attr_accessor :base_url
10
10
  attr_accessor :api_key
11
11
  attr_accessor :master_api_key
12
+
13
+ def base_v1_1_url
14
+ "#{base_url}#{DEFAULT_BASE_V1_1_PATH}"
15
+ end
16
+
17
+ def base_v3_0_url
18
+ "#{base_url}#{DEFAULT_BASE_V3_0_PATH}"
19
+ end
20
+
21
+ def reset!
22
+ self.base_url = DEFAULT_BASE_URL
23
+ self.api_key = nil
24
+ self.master_api_key = nil
25
+ end
12
26
  end
13
27
 
14
- self.base_v1_1_url = DEFAULT_BASE_V1_1_URL
15
- self.base_v3_0_url = DEFAULT_BASE_V3_0_URL
28
+ reset!
16
29
  end
17
30
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "oneaccess"
4
- s.version = "0.3.0"
5
- s.date = "2018-02-05"
4
+ s.version = "0.4.0"
5
+ s.date = "2018-02-06"
6
6
  s.summary = "ONEAccess API wrapper"
7
7
  s.description = "Easily communicate with ONEAccess API"
8
8
  s.homepage = "https://github.com/AlphaExchange/rixml"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneaccess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Correia Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-05 00:00:00.000000000 Z
11
+ date: 2018-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler