hotchoc 0.2.1 → 0.3.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/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +9 -0
- data/LICENSE.md +1 -1
- data/README.md +3 -2
- data/Rakefile +3 -8
- data/hotchoc.gemspec +5 -4
- data/lib/hotchoc/client/api.rb +21 -0
- data/lib/hotchoc/client/configuration.rb +37 -0
- data/lib/hotchoc/client/errors.rb +12 -0
- data/lib/hotchoc/client/fetcher.rb +44 -0
- data/lib/hotchoc/client/version.rb +5 -0
- data/lib/hotchoc/client.rb +4 -4
- data/lib/hotchoc/presenters/album.rb +0 -4
- data/lib/hotchoc/presenters/base.rb +0 -4
- data/lib/hotchoc/presenters/blocks/base.rb +0 -4
- data/lib/hotchoc/presenters/blocks/image.rb +0 -4
- data/lib/hotchoc/presenters/blocks/text.rb +0 -4
- data/lib/hotchoc/presenters/file.rb +1 -5
- data/lib/hotchoc/presenters/page.rb +0 -4
- data/lib/hotchoc/presenters/post.rb +0 -4
- data/lib/hotchoc/presenters/thumbnail.rb +0 -4
- data/lib/hotchoc/presenters/topic.rb +0 -4
- data/lib/hotchoc.rb +6 -6
- data/spec/hotchoc/{api_spec.rb → client/api_spec.rb} +7 -12
- data/spec/hotchoc/client/configuration_spec.rb +15 -0
- data/spec/hotchoc/{main_spec.rb → client/main_spec.rb} +1 -2
- data/spec/hotchoc/client_spec.rb +1 -2
- data/spec/hotchoc/presenters/album_spec.rb +0 -2
- data/spec/hotchoc/presenters/blocks/image_spec.rb +0 -2
- data/spec/hotchoc/presenters/blocks/text_spec.rb +0 -2
- data/spec/hotchoc/presenters/file_spec.rb +0 -2
- data/spec/hotchoc/presenters/page_spec.rb +0 -2
- data/spec/hotchoc/presenters/post_spec.rb +0 -2
- data/spec/hotchoc/presenters/thumbnail_spec.rb +0 -2
- data/spec/hotchoc/presenters/topic_spec.rb +0 -2
- data/spec/support/stubs.rb +0 -2
- metadata +31 -30
- data/.rubocop.yml +0 -558
- data/lib/hotchoc/api.rb +0 -21
- data/lib/hotchoc/configuration.rb +0 -36
- data/lib/hotchoc/errors.rb +0 -12
- data/lib/hotchoc/fetcher.rb +0 -35
- data/lib/hotchoc/version.rb +0 -3
- data/spec/hotchoc/configuration_spec.rb +0 -16
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'Hotchoc::Presenters::Thumbnail' do
|
4
|
-
|
5
4
|
let(:data) do
|
6
5
|
JSON.parse(File.read(response_stub('albums')))['albums'].first['blocks'].first
|
7
6
|
end
|
@@ -33,5 +32,4 @@ describe 'Hotchoc::Presenters::Thumbnail' do
|
|
33
32
|
it 'has a url' do
|
34
33
|
expect(thumbnail.url).to be
|
35
34
|
end
|
36
|
-
|
37
35
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'Hotchoc::Presenters::Topic' do
|
4
|
-
|
5
4
|
let(:data) do
|
6
5
|
JSON.parse(File.read(response_stub('posts')))['posts'].first
|
7
6
|
end
|
@@ -29,5 +28,4 @@ describe 'Hotchoc::Presenters::Topic' do
|
|
29
28
|
it 'has an updated_at' do
|
30
29
|
expect(topic.updated_at).to be_a(Time)
|
31
30
|
end
|
32
|
-
|
33
31
|
end
|
data/spec/support/stubs.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
RSpec.configure do |config|
|
2
2
|
config.before(:each) do
|
3
|
-
|
4
3
|
stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/albums\/?(\?.*)?\z/)
|
5
4
|
.to_return(status: 200, body: File.read(response_stub('albums')))
|
6
5
|
|
@@ -12,6 +11,5 @@ RSpec.configure do |config|
|
|
12
11
|
|
13
12
|
stub_request(:get, /.*\.hotchoc\.(io|dev|test)\/api\/topics\/?(\?.*)?\z/)
|
14
13
|
.to_return(status: 200, body: File.read(response_stub('topics')))
|
15
|
-
|
16
14
|
end
|
17
15
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotchoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.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: 2015-
|
11
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: httparty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.13'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: '0.13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: binding_of_caller
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,61 +53,61 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: lint
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: '0.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: '0.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: pry
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.10.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.10.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '10.4'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '10.4'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '3.2'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '3.2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: webmock
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,7 +131,8 @@ extra_rdoc_files: []
|
|
131
131
|
files:
|
132
132
|
- ".gitignore"
|
133
133
|
- ".rspec"
|
134
|
-
- ".
|
134
|
+
- ".ruby-gemset"
|
135
|
+
- ".ruby-version"
|
135
136
|
- CHANGELOG.md
|
136
137
|
- Gemfile
|
137
138
|
- LICENSE.md
|
@@ -139,11 +140,12 @@ files:
|
|
139
140
|
- Rakefile
|
140
141
|
- hotchoc.gemspec
|
141
142
|
- lib/hotchoc.rb
|
142
|
-
- lib/hotchoc/api.rb
|
143
143
|
- lib/hotchoc/client.rb
|
144
|
-
- lib/hotchoc/
|
145
|
-
- lib/hotchoc/
|
146
|
-
- lib/hotchoc/
|
144
|
+
- lib/hotchoc/client/api.rb
|
145
|
+
- lib/hotchoc/client/configuration.rb
|
146
|
+
- lib/hotchoc/client/errors.rb
|
147
|
+
- lib/hotchoc/client/fetcher.rb
|
148
|
+
- lib/hotchoc/client/version.rb
|
147
149
|
- lib/hotchoc/presenters/album.rb
|
148
150
|
- lib/hotchoc/presenters/base.rb
|
149
151
|
- lib/hotchoc/presenters/blocks/base.rb
|
@@ -154,11 +156,10 @@ files:
|
|
154
156
|
- lib/hotchoc/presenters/post.rb
|
155
157
|
- lib/hotchoc/presenters/thumbnail.rb
|
156
158
|
- lib/hotchoc/presenters/topic.rb
|
157
|
-
-
|
158
|
-
- spec/hotchoc/
|
159
|
+
- spec/hotchoc/client/api_spec.rb
|
160
|
+
- spec/hotchoc/client/configuration_spec.rb
|
161
|
+
- spec/hotchoc/client/main_spec.rb
|
159
162
|
- spec/hotchoc/client_spec.rb
|
160
|
-
- spec/hotchoc/configuration_spec.rb
|
161
|
-
- spec/hotchoc/main_spec.rb
|
162
163
|
- spec/hotchoc/presenters/album_spec.rb
|
163
164
|
- spec/hotchoc/presenters/blocks/image_spec.rb
|
164
165
|
- spec/hotchoc/presenters/blocks/text_spec.rb
|
@@ -195,15 +196,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
196
|
version: '0'
|
196
197
|
requirements: []
|
197
198
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.4.5
|
199
|
+
rubygems_version: 2.4.5.1
|
199
200
|
signing_key:
|
200
201
|
specification_version: 4
|
201
202
|
summary: Ruby wrapper for the Hotchoc API.
|
202
203
|
test_files:
|
203
|
-
- spec/hotchoc/api_spec.rb
|
204
|
+
- spec/hotchoc/client/api_spec.rb
|
205
|
+
- spec/hotchoc/client/configuration_spec.rb
|
206
|
+
- spec/hotchoc/client/main_spec.rb
|
204
207
|
- spec/hotchoc/client_spec.rb
|
205
|
-
- spec/hotchoc/configuration_spec.rb
|
206
|
-
- spec/hotchoc/main_spec.rb
|
207
208
|
- spec/hotchoc/presenters/album_spec.rb
|
208
209
|
- spec/hotchoc/presenters/blocks/image_spec.rb
|
209
210
|
- spec/hotchoc/presenters/blocks/text_spec.rb
|