hotchoc 0.6.0 → 0.7.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: 861c7314101175aed1f8e95ebb240e12fe0fe406
4
- data.tar.gz: 389e3e46b305d1ed80e43cb99da820f7809c6536
3
+ metadata.gz: 5bad3e2a56e60f2ff8913435fc8208b20dcbe35b
4
+ data.tar.gz: 7d0013af8a60287b94aa22fa7bd73088d7c3c593
5
5
  SHA512:
6
- metadata.gz: ffee16f71aded938646f11c3765292d810c9adcfc88c67bd2541b9d866b40de38ec92e1d22f40de73e286a082cc525520e1dd870fb3b1308eb9883340231eae0
7
- data.tar.gz: 9d287d520b323f889fda92c50c19ccb0f260f9023b9f16756859b0e0dceb6704cb5de1b43199ef4a383df25efcf11664df163b67c137ce3a042190281d000f0d
6
+ metadata.gz: 9798a9e6b67152f43db31d7902b7a045997b24c30ccec12f8609f9247d84f86e2eb8515a63902c80c4140e87b2c7b6b433046b9cda509c5c146b38ff726629c0
7
+ data.tar.gz: dc60984ab212fcb1cab7e0798e773778064046c4d33b422692656d480c98905e32b3fd4ef93d72ea8acf720e77b7c2eba25d94090d884f0334d7172675058bf1
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Master
4
4
 
5
+ ## 0.7.0
6
+
7
+ [Full changelog](https://github.com/choc/hotchoc-ruby/compare/v0.6.0...v0.7.0)
8
+
9
+ Changes:
10
+
11
+ * API uses `api` subdomain
12
+ * Site is set via param
13
+
5
14
  ## 0.6.0
6
15
 
7
16
  [Full changelog](https://github.com/choc/hotchoc-ruby/compare/v0.5.0...v0.6.0)
@@ -32,13 +32,13 @@ module Hotchoc
32
32
  private
33
33
 
34
34
  def get(path, opts = {})
35
- url = "#{protocol}://#{site}.#{hostname}/api/#{path}"
35
+ url = "#{protocol}://#{hostname}/#{path}"
36
36
 
37
37
  Fetcher.get(url, merged_options(opts))
38
38
  end
39
39
 
40
40
  def merged_options(opts)
41
- { api_key: api_key }.merge(opts)
41
+ { api_key: api_key, site: site }.merge(opts)
42
42
  end
43
43
  end
44
44
  end
@@ -5,7 +5,7 @@ module Hotchoc
5
5
 
6
6
  DEFAULT_API_KEY = nil
7
7
  DEFAULT_SITE = nil
8
- DEFAULT_HOSTNAME = 'hotchoc.io'
8
+ DEFAULT_HOSTNAME = 'api.hotchoc.io'
9
9
  DEFAULT_PROTOCOL = 'https'
10
10
 
11
11
  #
@@ -1,5 +1,5 @@
1
1
  module Hotchoc
2
2
  class Client
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
@@ -1,18 +1,18 @@
1
1
  RSpec.configure do |config|
2
2
  config.before(:each) do
3
- stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/albums\/?(\?.*)?\z/)
3
+ stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/albums\/?(\?.*)?\z/)
4
4
  .to_return(status: 200, body: File.read(response_stub('albums')))
5
5
 
6
- stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/pages\/?(\?.*)?\z/)
6
+ stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/pages\/?(\?.*)?\z/)
7
7
  .to_return(status: 200, body: File.read(response_stub('pages')))
8
8
 
9
- stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/posts\/?(\?.*)?\z/)
9
+ stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/posts\/?(\?.*)?\z/)
10
10
  .to_return(status: 200, body: File.read(response_stub('posts')))
11
11
 
12
- stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/topics\/?(\?.*)?\z/)
12
+ stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/topics\/?(\?.*)?\z/)
13
13
  .to_return(status: 200, body: File.read(response_stub('topics')))
14
14
 
15
- stub_request(:get, "http://def.ghi/api/posts?api_key=abc")
15
+ stub_request(:get, "http://ghi/posts?api_key=abc&site=def")
16
16
  .to_return(status: 504)
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotchoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Siegel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-13 00:00:00.000000000 Z
11
+ date: 2016-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty