buckybox-api 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77584365064648069e602d5a48058cc76004331a
4
- data.tar.gz: db6a72c21819585d80f448414fa07117cf7b1ba1
3
+ metadata.gz: be2416e89e89151a464ab7bbaf7509605433f035
4
+ data.tar.gz: 6f7ccfd37f42a4bab76ab0c3394b79da84fd1ecd
5
5
  SHA512:
6
- metadata.gz: 6be498c6ff13a0d1b09c8d2864a0fffc1dcb8583f84a0930e39d11d2755a30caa83f023b8af839badd6662f6440ab93511d0f22d603ac754c0948c3bdbb4931e
7
- data.tar.gz: d8a348cd712a291b39c7dddb75cb0a962fe9fdfa39fffb1e2b0597f7107d85010d789b3765fcb5d87a072e626773b9f0dc402d0a5de894cfa2edae5ee5bf116e
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.5.0"
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 "https://api.buckybox.com/v1"
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.5.0
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-04-24 00:00:00.000000000 Z
11
+ date: 2015-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty