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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +9 -0
  5. data/LICENSE.md +1 -1
  6. data/README.md +3 -2
  7. data/Rakefile +3 -8
  8. data/hotchoc.gemspec +5 -4
  9. data/lib/hotchoc/client/api.rb +21 -0
  10. data/lib/hotchoc/client/configuration.rb +37 -0
  11. data/lib/hotchoc/client/errors.rb +12 -0
  12. data/lib/hotchoc/client/fetcher.rb +44 -0
  13. data/lib/hotchoc/client/version.rb +5 -0
  14. data/lib/hotchoc/client.rb +4 -4
  15. data/lib/hotchoc/presenters/album.rb +0 -4
  16. data/lib/hotchoc/presenters/base.rb +0 -4
  17. data/lib/hotchoc/presenters/blocks/base.rb +0 -4
  18. data/lib/hotchoc/presenters/blocks/image.rb +0 -4
  19. data/lib/hotchoc/presenters/blocks/text.rb +0 -4
  20. data/lib/hotchoc/presenters/file.rb +1 -5
  21. data/lib/hotchoc/presenters/page.rb +0 -4
  22. data/lib/hotchoc/presenters/post.rb +0 -4
  23. data/lib/hotchoc/presenters/thumbnail.rb +0 -4
  24. data/lib/hotchoc/presenters/topic.rb +0 -4
  25. data/lib/hotchoc.rb +6 -6
  26. data/spec/hotchoc/{api_spec.rb → client/api_spec.rb} +7 -12
  27. data/spec/hotchoc/client/configuration_spec.rb +15 -0
  28. data/spec/hotchoc/{main_spec.rb → client/main_spec.rb} +1 -2
  29. data/spec/hotchoc/client_spec.rb +1 -2
  30. data/spec/hotchoc/presenters/album_spec.rb +0 -2
  31. data/spec/hotchoc/presenters/blocks/image_spec.rb +0 -2
  32. data/spec/hotchoc/presenters/blocks/text_spec.rb +0 -2
  33. data/spec/hotchoc/presenters/file_spec.rb +0 -2
  34. data/spec/hotchoc/presenters/page_spec.rb +0 -2
  35. data/spec/hotchoc/presenters/post_spec.rb +0 -2
  36. data/spec/hotchoc/presenters/thumbnail_spec.rb +0 -2
  37. data/spec/hotchoc/presenters/topic_spec.rb +0 -2
  38. data/spec/support/stubs.rb +0 -2
  39. metadata +31 -30
  40. data/.rubocop.yml +0 -558
  41. data/lib/hotchoc/api.rb +0 -21
  42. data/lib/hotchoc/configuration.rb +0 -36
  43. data/lib/hotchoc/errors.rb +0 -12
  44. data/lib/hotchoc/fetcher.rb +0 -35
  45. data/lib/hotchoc/version.rb +0 -3
  46. 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
@@ -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.2.1
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-05-05 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: typhoeus
14
+ name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.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.7.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: pry
56
+ name: lint
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.10.1
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.10.1
68
+ version: '0.3'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.4'
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: '10.4'
82
+ version: 0.10.1
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.2'
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: '3.2'
96
+ version: '10.4'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rubocop
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.24.1
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: 0.24.1
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
- - ".rubocop.yml"
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/configuration.rb
145
- - lib/hotchoc/errors.rb
146
- - lib/hotchoc/fetcher.rb
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
- - lib/hotchoc/version.rb
158
- - spec/hotchoc/api_spec.rb
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