buckybox-api 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/buckybox-api.gemspec +1 -1
- data/lib/buckybox/api.rb +7 -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: be2416e89e89151a464ab7bbaf7509605433f035
|
4
|
+
data.tar.gz: 6f7ccfd37f42a4bab76ab0c3394b79da84fd1ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ac3579f8a70e862dc7c98e3155ba04fd3f000a36ae27e60c0e8620dd9d7a19d9ae49a0cc3f52dddf2ee37a0ae66ab51d925c4474b6cf2b0a7d62ffc8a6f5af6
|
7
|
+
data.tar.gz: 11f15c0840fa6ac347e5545f161eb94d6a7a9f366ccc0046b1ae894b085f9dade320f2ed48b4d897c215dc93790a0b6fe8ba7f41d78f3e7c66f19ddd97637699
|
data/buckybox-api.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "buckybox-api"
|
7
|
-
spec.version = "1.
|
7
|
+
spec.version = "1.6.0"
|
8
8
|
spec.authors = ["Cédric Félizard"]
|
9
9
|
spec.email = ["cedric@felizard.fr"]
|
10
10
|
spec.summary = %q{RubyGem wrapper for the Bucky Box API}
|
data/lib/buckybox/api.rb
CHANGED
@@ -8,6 +8,12 @@ module BuckyBox
|
|
8
8
|
ResponseError = Class.new(Exception) # generic error
|
9
9
|
NotFoundError = Class.new(Exception)
|
10
10
|
|
11
|
+
ENDPOINTS = {
|
12
|
+
production: "https://api.buckybox.com/v1",
|
13
|
+
staging: "https://api-staging.buckybox.com/v1",
|
14
|
+
development: "http://api.buckybox.local:3000/v1",
|
15
|
+
}.freeze
|
16
|
+
|
11
17
|
class CachedResponse
|
12
18
|
attr_reader :response, :cached_at
|
13
19
|
|
@@ -26,7 +32,7 @@ module BuckyBox
|
|
26
32
|
|
27
33
|
include HTTParty
|
28
34
|
format :json
|
29
|
-
base_uri
|
35
|
+
base_uri ENDPOINTS.fetch(ENV.fetch("RAILS_ENV", "development").to_sym)
|
30
36
|
|
31
37
|
def initialize(headers)
|
32
38
|
self.class.headers(headers)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buckybox-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cédric Félizard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|