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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/hotchoc/client.rb +2 -2
- data/lib/hotchoc/client/configuration.rb +1 -1
- data/lib/hotchoc/client/version.rb +1 -1
- data/spec/support/stubs.rb +5 -5
- 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: 5bad3e2a56e60f2ff8913435fc8208b20dcbe35b
|
|
4
|
+
data.tar.gz: 7d0013af8a60287b94aa22fa7bd73088d7c3c593
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|
data/lib/hotchoc/client.rb
CHANGED
|
@@ -32,13 +32,13 @@ module Hotchoc
|
|
|
32
32
|
private
|
|
33
33
|
|
|
34
34
|
def get(path, opts = {})
|
|
35
|
-
url = "#{protocol}://#{
|
|
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
|
data/spec/support/stubs.rb
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
RSpec.configure do |config|
|
|
2
2
|
config.before(:each) do
|
|
3
|
-
stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/
|
|
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)\/
|
|
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)\/
|
|
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)\/
|
|
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://
|
|
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.
|
|
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-
|
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|