kippt 2.0.1 → 3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +15 -0
  2. data/.travis.yml +1 -4
  3. data/CHANGELOG.md +24 -0
  4. data/Gemfile +4 -0
  5. data/README.md +14 -4
  6. data/TODO.md +16 -0
  7. data/lib/kippt.rb +8 -3
  8. data/lib/kippt/client.rb +6 -6
  9. data/lib/kippt/clip.rb +17 -9
  10. data/lib/kippt/clip_collection.rb +2 -2
  11. data/lib/kippt/clip_likes.rb +29 -0
  12. data/lib/kippt/clips.rb +8 -37
  13. data/lib/kippt/collection.rb +1 -2
  14. data/lib/kippt/collection_resource.rb +39 -55
  15. data/lib/kippt/comment.rb +2 -4
  16. data/lib/kippt/comment_collection.rb +1 -2
  17. data/lib/kippt/comments.rb +5 -3
  18. data/lib/kippt/connection.rb +7 -3
  19. data/lib/kippt/favorite.rb +46 -0
  20. data/lib/kippt/favorites.rb +20 -0
  21. data/lib/kippt/followers.rb +6 -4
  22. data/lib/kippt/following.rb +6 -4
  23. data/lib/kippt/helpers.rb +17 -0
  24. data/lib/kippt/like.rb +4 -6
  25. data/lib/kippt/like_collection.rb +11 -0
  26. data/lib/kippt/likes.rb +2 -30
  27. data/lib/kippt/list.rb +8 -2
  28. data/lib/kippt/list_collection.rb +2 -2
  29. data/lib/kippt/lists.rb +2 -4
  30. data/lib/kippt/read_collection_resource.rb +43 -0
  31. data/lib/kippt/root_clips.rb +39 -0
  32. data/lib/kippt/saves.rb +4 -3
  33. data/lib/kippt/user.rb +10 -6
  34. data/lib/kippt/user_clips.rb +6 -26
  35. data/lib/kippt/user_collection.rb +0 -3
  36. data/lib/kippt/user_likes.rb +29 -0
  37. data/lib/kippt/user_lists.rb +0 -5
  38. data/lib/kippt/users.rb +3 -8
  39. data/lib/kippt/version.rb +1 -1
  40. data/spec/kippt/client_spec.rb +36 -2
  41. data/spec/kippt/clip_likes_spec.rb +14 -0
  42. data/spec/kippt/clip_spec.rb +89 -3
  43. data/spec/kippt/clips_spec.rb +27 -5
  44. data/spec/kippt/comment_spec.rb +1 -1
  45. data/spec/kippt/comments_spec.rb +30 -5
  46. data/spec/kippt/favorite_spec.rb +38 -0
  47. data/spec/kippt/favorites_spec.rb +18 -0
  48. data/spec/kippt/follow_relationship_spec.rb +30 -0
  49. data/spec/kippt/followers_spec.rb +6 -9
  50. data/spec/kippt/following_spec.rb +6 -9
  51. data/spec/kippt/like_spec.rb +38 -0
  52. data/spec/kippt/likes_spec.rb +21 -0
  53. data/spec/kippt/list_spec.rb +43 -10
  54. data/spec/kippt/lists_spec.rb +12 -0
  55. data/spec/kippt/saves_spec.rb +3 -3
  56. data/spec/kippt/user_clips_spec.rb +14 -2
  57. data/spec/kippt/user_likes_spec.rb +14 -0
  58. data/spec/kippt/user_lists_spec.rb +12 -0
  59. data/spec/kippt/user_spec.rb +11 -0
  60. data/spec/kippt/users_spec.rb +2 -1
  61. data/spec/shared_examples/collection.rb +117 -0
  62. data/spec/shared_examples/collection_resource.rb +13 -0
  63. data/spec/shared_examples/read_collection_resource.rb +77 -0
  64. data/spec/shared_examples/resource.rb +80 -0
  65. data/spec/spec_helper.rb +2 -298
  66. metadata +33 -26
  67. data/lib/core_ext/open_struct.rb +0 -5
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kippt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
5
- prerelease:
4
+ version: '3.0'
6
5
  platform: ruby
7
6
  authors:
8
7
  - Vesa Vänskä
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-06 00:00:00.000000000 Z
11
+ date: 2013-12-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: faraday
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: faraday_middleware
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: multi_json
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: webmock
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: simplecov
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -124,11 +111,11 @@ files:
124
111
  - Rakefile
125
112
  - TODO.md
126
113
  - kippt.gemspec
127
- - lib/core_ext/open_struct.rb
128
114
  - lib/kippt.rb
129
115
  - lib/kippt/client.rb
130
116
  - lib/kippt/clip.rb
131
117
  - lib/kippt/clip_collection.rb
118
+ - lib/kippt/clip_likes.rb
132
119
  - lib/kippt/clips.rb
133
120
  - lib/kippt/collection.rb
134
121
  - lib/kippt/collection_resource.rb
@@ -136,19 +123,26 @@ files:
136
123
  - lib/kippt/comment_collection.rb
137
124
  - lib/kippt/comments.rb
138
125
  - lib/kippt/connection.rb
126
+ - lib/kippt/favorite.rb
127
+ - lib/kippt/favorites.rb
139
128
  - lib/kippt/follow_relationship.rb
140
129
  - lib/kippt/followers.rb
141
130
  - lib/kippt/following.rb
131
+ - lib/kippt/helpers.rb
142
132
  - lib/kippt/like.rb
133
+ - lib/kippt/like_collection.rb
143
134
  - lib/kippt/likes.rb
144
135
  - lib/kippt/list.rb
145
136
  - lib/kippt/list_collection.rb
146
137
  - lib/kippt/lists.rb
138
+ - lib/kippt/read_collection_resource.rb
147
139
  - lib/kippt/resource.rb
140
+ - lib/kippt/root_clips.rb
148
141
  - lib/kippt/saves.rb
149
142
  - lib/kippt/user.rb
150
143
  - lib/kippt/user_clips.rb
151
144
  - lib/kippt/user_collection.rb
145
+ - lib/kippt/user_likes.rb
152
146
  - lib/kippt/user_lists.rb
153
147
  - lib/kippt/users.rb
154
148
  - lib/kippt/version.rb
@@ -166,52 +160,55 @@ files:
166
160
  - spec/fixtures/users_with_multiple_pages.json
167
161
  - spec/kippt/client_spec.rb
168
162
  - spec/kippt/clip_collection_spec.rb
163
+ - spec/kippt/clip_likes_spec.rb
169
164
  - spec/kippt/clip_spec.rb
170
165
  - spec/kippt/clips_spec.rb
171
166
  - spec/kippt/comment_spec.rb
172
167
  - spec/kippt/comments_spec.rb
168
+ - spec/kippt/favorite_spec.rb
169
+ - spec/kippt/favorites_spec.rb
173
170
  - spec/kippt/follow_relationship_spec.rb
174
171
  - spec/kippt/followers_spec.rb
175
172
  - spec/kippt/following_spec.rb
173
+ - spec/kippt/like_spec.rb
174
+ - spec/kippt/likes_spec.rb
176
175
  - spec/kippt/list_collection_spec.rb
177
176
  - spec/kippt/list_spec.rb
178
177
  - spec/kippt/lists_spec.rb
179
178
  - spec/kippt/saves_spec.rb
180
179
  - spec/kippt/user_clips_spec.rb
181
180
  - spec/kippt/user_collection_spec.rb
181
+ - spec/kippt/user_likes_spec.rb
182
182
  - spec/kippt/user_lists_spec.rb
183
183
  - spec/kippt/user_spec.rb
184
184
  - spec/kippt/users_spec.rb
185
+ - spec/shared_examples/collection.rb
186
+ - spec/shared_examples/collection_resource.rb
187
+ - spec/shared_examples/read_collection_resource.rb
188
+ - spec/shared_examples/resource.rb
185
189
  - spec/spec_helper.rb
186
190
  homepage: https://github.com/vesan/kippt
187
191
  licenses: []
192
+ metadata: {}
188
193
  post_install_message:
189
194
  rdoc_options: []
190
195
  require_paths:
191
196
  - lib
192
197
  required_ruby_version: !ruby/object:Gem::Requirement
193
- none: false
194
198
  requirements:
195
199
  - - ! '>='
196
200
  - !ruby/object:Gem::Version
197
201
  version: '0'
198
- segments:
199
- - 0
200
- hash: 1554217779717376625
201
202
  required_rubygems_version: !ruby/object:Gem::Requirement
202
- none: false
203
203
  requirements:
204
204
  - - ! '>='
205
205
  - !ruby/object:Gem::Version
206
206
  version: '0'
207
- segments:
208
- - 0
209
- hash: 1554217779717376625
210
207
  requirements: []
211
208
  rubyforge_project:
212
- rubygems_version: 1.8.24
209
+ rubygems_version: 2.1.6
213
210
  signing_key:
214
- specification_version: 3
211
+ specification_version: 4
215
212
  summary: Client library for using Kippt.com API
216
213
  test_files:
217
214
  - spec/fixtures/clip.json
@@ -228,20 +225,30 @@ test_files:
228
225
  - spec/fixtures/users_with_multiple_pages.json
229
226
  - spec/kippt/client_spec.rb
230
227
  - spec/kippt/clip_collection_spec.rb
228
+ - spec/kippt/clip_likes_spec.rb
231
229
  - spec/kippt/clip_spec.rb
232
230
  - spec/kippt/clips_spec.rb
233
231
  - spec/kippt/comment_spec.rb
234
232
  - spec/kippt/comments_spec.rb
233
+ - spec/kippt/favorite_spec.rb
234
+ - spec/kippt/favorites_spec.rb
235
235
  - spec/kippt/follow_relationship_spec.rb
236
236
  - spec/kippt/followers_spec.rb
237
237
  - spec/kippt/following_spec.rb
238
+ - spec/kippt/like_spec.rb
239
+ - spec/kippt/likes_spec.rb
238
240
  - spec/kippt/list_collection_spec.rb
239
241
  - spec/kippt/list_spec.rb
240
242
  - spec/kippt/lists_spec.rb
241
243
  - spec/kippt/saves_spec.rb
242
244
  - spec/kippt/user_clips_spec.rb
243
245
  - spec/kippt/user_collection_spec.rb
246
+ - spec/kippt/user_likes_spec.rb
244
247
  - spec/kippt/user_lists_spec.rb
245
248
  - spec/kippt/user_spec.rb
246
249
  - spec/kippt/users_spec.rb
250
+ - spec/shared_examples/collection.rb
251
+ - spec/shared_examples/collection_resource.rb
252
+ - spec/shared_examples/read_collection_resource.rb
253
+ - spec/shared_examples/resource.rb
247
254
  - spec/spec_helper.rb
@@ -1,5 +0,0 @@
1
- require "ostruct"
2
-
3
- if RUBY_VERSION <= "1.8.7"
4
- OpenStruct.__send__(:define_method, :id) { @table[:id] }
5
- end