datasift 3.6.2 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +12 -1
- data/.rubocop_todo.yml +318 -121
- data/.travis.yml +1 -0
- data/CHANGELOG.md +17 -10
- data/LICENSE +1 -3
- data/README.md +9 -13
- data/VERSION +1 -1
- data/examples/account_identity_limit_eg.rb +5 -3
- data/lib/account_identity_limit.rb +18 -13
- data/lib/live_stream.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4fb49dafd82b2670d5d7d7e6b165f06d3dd9a7
|
4
|
+
data.tar.gz: f4575e31b0542ffe614e6021aa760c13ca08328c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9f023a5938ce6c8d1b6a858a9aab453561f7f097eef24b41021f93350b22df584af6c457cbcc034e34b868a7a61051b37eabcc885bd3376c7a44199451eec1
|
7
|
+
data.tar.gz: 93e354f5f7fbd9fb6f43d10d00b47f01356225b91fd2c29725244c194bdeb8f35254b0381f5f27234ad31ee3323b5728f9da6f310b5c188edb014ea634b322ec
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,300 +1,497 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
#
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2016-07-20 18:43:01 +0100 using RuboCop version 0.41.2.
|
3
4
|
# The point is for the user to remove these configuration records
|
4
5
|
# one by one as the offenses are removed from the code base.
|
5
6
|
# Note that changes in the inspected code, or installation of new
|
6
7
|
# versions of RuboCop, may require this file to be generated again.
|
7
8
|
|
8
|
-
# Offense count:
|
9
|
-
Lint/
|
10
|
-
|
9
|
+
# Offense count: 8
|
10
|
+
Lint/IneffectiveAccessModifier:
|
11
|
+
Exclude:
|
12
|
+
- 'lib/datasift.rb'
|
11
13
|
|
12
14
|
# Offense count: 1
|
13
15
|
Lint/RescueException:
|
14
|
-
|
16
|
+
Exclude:
|
17
|
+
- 'lib/datasift.rb'
|
15
18
|
|
16
|
-
# Offense count:
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
# Offense count: 1
|
20
|
+
Lint/ShadowedException:
|
21
|
+
Exclude:
|
22
|
+
- 'lib/datasift.rb'
|
20
23
|
|
21
24
|
# Offense count: 5
|
22
25
|
# Cop supports --auto-correct.
|
26
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
23
27
|
Lint/UnusedBlockArgument:
|
24
|
-
|
28
|
+
Exclude:
|
29
|
+
- 'examples/live_stream_eg.rb'
|
30
|
+
- 'lib/datasift.rb'
|
25
31
|
|
26
|
-
# Offense count:
|
32
|
+
# Offense count: 1
|
33
|
+
Lint/UselessAccessModifier:
|
34
|
+
Exclude:
|
35
|
+
- 'lib/datasift.rb'
|
36
|
+
|
37
|
+
# Offense count: 4
|
27
38
|
Lint/UselessAssignment:
|
28
|
-
|
39
|
+
Exclude:
|
40
|
+
- 'examples/tmp.rb'
|
41
|
+
- 'lib/datasift.rb'
|
42
|
+
- 'test/datasift/odp/batch_upload_test.rb'
|
29
43
|
|
30
|
-
# Offense count:
|
44
|
+
# Offense count: 34
|
31
45
|
Metrics/AbcSize:
|
32
|
-
Max:
|
46
|
+
Max: 183
|
33
47
|
|
34
|
-
# Offense count:
|
48
|
+
# Offense count: 5
|
35
49
|
# Configuration parameters: CountComments.
|
36
50
|
Metrics/ClassLength:
|
37
|
-
Max:
|
51
|
+
Max: 167
|
38
52
|
|
39
|
-
# Offense count:
|
53
|
+
# Offense count: 19
|
40
54
|
Metrics/CyclomaticComplexity:
|
41
55
|
Max: 15
|
42
56
|
|
43
|
-
# Offense count:
|
44
|
-
# Configuration parameters: AllowURI, URISchemes.
|
45
|
-
LineLength:
|
46
|
-
Max: 100
|
47
|
-
|
48
|
-
# Offense count: 33
|
57
|
+
# Offense count: 40
|
49
58
|
# Configuration parameters: CountComments.
|
50
59
|
Metrics/MethodLength:
|
51
|
-
Max:
|
60
|
+
Max: 161
|
52
61
|
|
53
62
|
# Offense count: 1
|
54
63
|
# Configuration parameters: CountComments.
|
55
64
|
Metrics/ModuleLength:
|
56
|
-
Max:
|
65
|
+
Max: 250
|
57
66
|
|
58
|
-
# Offense count:
|
67
|
+
# Offense count: 10
|
59
68
|
# Configuration parameters: CountKeywordArgs.
|
60
69
|
Metrics/ParameterLists:
|
61
70
|
Max: 8
|
62
71
|
|
63
|
-
# Offense count:
|
72
|
+
# Offense count: 10
|
64
73
|
Metrics/PerceivedComplexity:
|
65
74
|
Max: 16
|
66
75
|
|
67
|
-
# Offense count:
|
68
|
-
# Cop supports --auto-correct.
|
69
|
-
|
70
|
-
|
76
|
+
# Offense count: 63
|
77
|
+
# Cop supports --auto-correct.
|
78
|
+
# Configuration parameters: MaxKeyValuePairs.
|
79
|
+
Performance/RedundantMerge:
|
80
|
+
Exclude:
|
81
|
+
- 'examples/auth.rb'
|
82
|
+
- 'examples/pylon/pylon_api_v1.2_eg.rb'
|
83
|
+
- 'examples/pylon/pylon_api_v1.3_eg.rb'
|
84
|
+
- 'lib/account.rb'
|
85
|
+
- 'lib/account_identity.rb'
|
86
|
+
- 'lib/account_identity_limit.rb'
|
87
|
+
- 'lib/account_identity_token.rb'
|
88
|
+
- 'lib/cli.rb'
|
89
|
+
- 'lib/datasift.rb'
|
90
|
+
- 'lib/historics_preview.rb'
|
91
|
+
- 'lib/managed_source.rb'
|
92
|
+
- 'lib/push.rb'
|
93
|
+
- 'lib/pylon.rb'
|
71
94
|
|
72
95
|
# Offense count: 1
|
73
96
|
# Cop supports --auto-correct.
|
74
97
|
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
|
98
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
75
99
|
Style/AlignHash:
|
76
|
-
|
100
|
+
Exclude:
|
101
|
+
- 'lib/datasift.rb'
|
77
102
|
|
78
|
-
# Offense count:
|
103
|
+
# Offense count: 7
|
79
104
|
# Cop supports --auto-correct.
|
80
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
105
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
106
|
+
# SupportedStyles: with_first_parameter, with_fixed_indentation
|
81
107
|
Style/AlignParameters:
|
82
|
-
|
108
|
+
Exclude:
|
109
|
+
- 'lib/datasift.rb'
|
110
|
+
- 'test/datasift/core_api_test.rb'
|
83
111
|
|
84
112
|
# Offense count: 3
|
85
113
|
# Cop supports --auto-correct.
|
86
114
|
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
115
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
116
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
117
|
+
# FunctionalMethods: let, let!, subject, watch
|
118
|
+
# IgnoredMethods: lambda, proc, it
|
87
119
|
Style/BlockDelimiters:
|
88
|
-
|
120
|
+
Exclude:
|
121
|
+
- 'lib/api/api_resource.rb'
|
122
|
+
- 'lib/datasift.rb'
|
89
123
|
|
90
|
-
# Offense count:
|
124
|
+
# Offense count: 18
|
91
125
|
# Cop supports --auto-correct.
|
92
126
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
127
|
+
# SupportedStyles: braces, no_braces, context_dependent
|
93
128
|
Style/BracesAroundHashParameters:
|
94
|
-
|
129
|
+
Exclude:
|
130
|
+
- 'lib/datasift.rb'
|
131
|
+
- 'lib/live_stream.rb'
|
132
|
+
- 'lib/managed_source.rb'
|
133
|
+
- 'lib/push.rb'
|
95
134
|
|
96
|
-
# Offense count:
|
135
|
+
# Offense count: 22
|
97
136
|
# Cop supports --auto-correct.
|
98
|
-
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
|
137
|
+
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
|
138
|
+
# SupportedStyles: case, end
|
99
139
|
Style/CaseIndentation:
|
100
|
-
|
140
|
+
Exclude:
|
141
|
+
- 'examples/account_eg.rb'
|
142
|
+
- 'examples/account_identity_eg.rb'
|
143
|
+
- 'examples/account_identity_limit_eg.rb'
|
144
|
+
- 'examples/account_identity_token_eg.rb'
|
145
|
+
- 'examples/core_api_eg.rb'
|
146
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
147
|
+
- 'examples/live_stream_eg.rb'
|
101
148
|
|
102
149
|
# Offense count: 1
|
103
150
|
# Cop supports --auto-correct.
|
104
151
|
Style/ColonMethodCall:
|
105
|
-
|
152
|
+
Exclude:
|
153
|
+
- 'examples/live_stream_eg.rb'
|
106
154
|
|
107
|
-
# Offense count:
|
155
|
+
# Offense count: 9
|
108
156
|
# Cop supports --auto-correct.
|
109
157
|
Style/CommentIndentation:
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
158
|
+
Exclude:
|
159
|
+
- 'examples/account_eg.rb'
|
160
|
+
- 'examples/account_identity_eg.rb'
|
161
|
+
- 'examples/account_identity_limit_eg.rb'
|
162
|
+
- 'examples/account_identity_token_eg.rb'
|
163
|
+
- 'examples/core_api_eg.rb'
|
164
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
165
|
+
- 'examples/live_stream_eg.rb'
|
166
|
+
- 'examples/pull.rb'
|
116
167
|
|
117
|
-
# Offense count:
|
168
|
+
# Offense count: 19
|
118
169
|
Style/Documentation:
|
119
170
|
Enabled: false
|
120
171
|
|
121
|
-
# Offense count:
|
172
|
+
# Offense count: 7
|
122
173
|
# Cop supports --auto-correct.
|
123
174
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
175
|
+
# SupportedStyles: empty, nil, both
|
124
176
|
Style/EmptyElse:
|
125
|
-
|
177
|
+
Exclude:
|
178
|
+
- 'examples/account_eg.rb'
|
179
|
+
- 'examples/account_identity_eg.rb'
|
180
|
+
- 'examples/account_identity_limit_eg.rb'
|
181
|
+
- 'examples/account_identity_token_eg.rb'
|
182
|
+
- 'examples/core_api_eg.rb'
|
183
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
184
|
+
- 'examples/live_stream_eg.rb'
|
185
|
+
|
186
|
+
# Offense count: 1
|
187
|
+
# Cop supports --auto-correct.
|
188
|
+
Style/EmptyLines:
|
189
|
+
Exclude:
|
190
|
+
- 'examples/tmp.rb'
|
126
191
|
|
127
192
|
# Offense count: 2
|
128
193
|
# Cop supports --auto-correct.
|
129
194
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
195
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
130
196
|
Style/EmptyLinesAroundBlockBody:
|
131
|
-
|
197
|
+
Exclude:
|
198
|
+
- 'test/datasift/core_api_test.rb'
|
199
|
+
- 'test/datasift/push_api_test.rb'
|
132
200
|
|
133
201
|
# Offense count: 2
|
134
202
|
# Cop supports --auto-correct.
|
135
203
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
204
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
136
205
|
Style/EmptyLinesAroundClassBody:
|
137
|
-
|
206
|
+
Exclude:
|
207
|
+
- 'examples/live_stream_eg.rb'
|
208
|
+
- 'lib/live_stream.rb'
|
138
209
|
|
139
|
-
# Offense count:
|
140
|
-
#
|
141
|
-
|
142
|
-
|
210
|
+
# Offense count: 2
|
211
|
+
# Cop supports --auto-correct.
|
212
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
213
|
+
Style/ExtraSpacing:
|
214
|
+
Exclude:
|
215
|
+
- 'examples/live_stream_eg.rb'
|
216
|
+
- 'lib/datasift.rb'
|
143
217
|
|
144
|
-
# Offense count:
|
218
|
+
# Offense count: 131
|
145
219
|
# Cop supports --auto-correct.
|
146
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
220
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
221
|
+
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
|
147
222
|
Style/HashSyntax:
|
148
|
-
|
223
|
+
Exclude:
|
224
|
+
- 'Rakefile'
|
225
|
+
- 'lib/cli.rb'
|
226
|
+
- 'lib/datasift.rb'
|
227
|
+
- 'lib/historics.rb'
|
228
|
+
- 'lib/historics_preview.rb'
|
229
|
+
- 'lib/live_stream.rb'
|
230
|
+
- 'lib/managed_source.rb'
|
231
|
+
- 'lib/push.rb'
|
149
232
|
|
150
|
-
# Offense count:
|
233
|
+
# Offense count: 3
|
151
234
|
# Cop supports --auto-correct.
|
152
235
|
# Configuration parameters: MaxLineLength.
|
153
236
|
Style/IfUnlessModifier:
|
154
|
-
|
237
|
+
Exclude:
|
238
|
+
- 'lib/cli.rb'
|
239
|
+
- 'lib/datasift.rb'
|
240
|
+
- 'lib/live_stream.rb'
|
155
241
|
|
156
242
|
# Offense count: 2
|
157
243
|
# Cop supports --auto-correct.
|
158
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
244
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
245
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
159
246
|
Style/IndentHash:
|
160
|
-
|
247
|
+
Exclude:
|
248
|
+
- 'examples/auth.rb'
|
249
|
+
- 'lib/live_stream.rb'
|
161
250
|
|
162
251
|
# Offense count: 3
|
163
252
|
# Cop supports --auto-correct.
|
253
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
254
|
+
# SupportedStyles: line_count_dependent, lambda, literal
|
164
255
|
Style/Lambda:
|
165
|
-
|
256
|
+
Exclude:
|
257
|
+
- 'examples/live_stream_eg.rb'
|
258
|
+
- 'examples/pull.rb'
|
259
|
+
- 'lib/live_stream.rb'
|
166
260
|
|
167
|
-
# Offense count:
|
261
|
+
# Offense count: 6
|
168
262
|
# Cop supports --auto-correct.
|
169
263
|
Style/LeadingCommentSpace:
|
170
|
-
|
264
|
+
Exclude:
|
265
|
+
- 'examples/core_api_eg.rb'
|
266
|
+
- 'examples/live_stream_eg.rb'
|
267
|
+
- 'examples/pull.rb'
|
268
|
+
- 'examples/tmp.rb'
|
171
269
|
|
172
270
|
# Offense count: 1
|
173
271
|
# Cop supports --auto-correct.
|
174
272
|
Style/LineEndConcatenation:
|
175
|
-
|
273
|
+
Exclude:
|
274
|
+
- 'lib/datasift.rb'
|
176
275
|
|
177
276
|
# Offense count: 2
|
178
277
|
# Cop supports --auto-correct.
|
179
278
|
Style/MethodCallParentheses:
|
180
|
-
|
279
|
+
Exclude:
|
280
|
+
- 'examples/pull.rb'
|
281
|
+
- 'examples/push_eg.rb'
|
181
282
|
|
182
283
|
# Offense count: 1
|
183
284
|
# Cop supports --auto-correct.
|
184
285
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
286
|
+
# SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
|
185
287
|
Style/MethodDefParentheses:
|
186
|
-
|
288
|
+
Exclude:
|
289
|
+
- 'lib/live_stream.rb'
|
187
290
|
|
188
291
|
# Offense count: 2
|
189
292
|
Style/MultilineTernaryOperator:
|
190
|
-
|
293
|
+
Exclude:
|
294
|
+
- 'lib/cli.rb'
|
191
295
|
|
192
|
-
# Offense count:
|
296
|
+
# Offense count: 1
|
297
|
+
# Cop supports --auto-correct.
|
298
|
+
Style/MutableConstant:
|
299
|
+
Exclude:
|
300
|
+
- 'lib/datasift.rb'
|
301
|
+
|
302
|
+
# Offense count: 5
|
193
303
|
# Cop supports --auto-correct.
|
194
304
|
Style/NegatedIf:
|
195
|
-
|
305
|
+
Exclude:
|
306
|
+
- 'lib/datasift.rb'
|
307
|
+
- 'lib/managed_source.rb'
|
308
|
+
|
309
|
+
# Offense count: 1
|
310
|
+
# Cop supports --auto-correct.
|
311
|
+
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
312
|
+
# SupportedStyles: skip_modifier_ifs, always
|
313
|
+
Style/Next:
|
314
|
+
Exclude:
|
315
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
196
316
|
|
197
317
|
# Offense count: 2
|
198
318
|
# Cop supports --auto-correct.
|
199
319
|
Style/NilComparison:
|
200
|
-
|
320
|
+
Exclude:
|
321
|
+
- 'lib/api/api_resource.rb'
|
322
|
+
- 'lib/live_stream.rb'
|
201
323
|
|
202
|
-
# Offense count:
|
324
|
+
# Offense count: 11
|
203
325
|
# Cop supports --auto-correct.
|
204
326
|
Style/NumericLiterals:
|
205
|
-
MinDigits:
|
206
|
-
|
207
|
-
# Offense count: 2
|
208
|
-
# Cop supports --auto-correct.
|
209
|
-
# Configuration parameters: PreferredDelimiters.
|
210
|
-
Style/PercentLiteralDelimiters:
|
211
|
-
Enabled: false
|
327
|
+
MinDigits: 16
|
212
328
|
|
213
329
|
# Offense count: 1
|
214
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist.
|
330
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
331
|
+
# NamePrefix: is_, has_, have_
|
332
|
+
# NamePrefixBlacklist: is_, has_, have_
|
333
|
+
# NameWhitelist: is_a?
|
215
334
|
Style/PredicateName:
|
216
|
-
|
335
|
+
Exclude:
|
336
|
+
- 'spec/**/*'
|
337
|
+
- 'lib/datasift.rb'
|
338
|
+
|
339
|
+
# Offense count: 6
|
340
|
+
# Cop supports --auto-correct.
|
341
|
+
Style/PreferredHashMethods:
|
342
|
+
Exclude:
|
343
|
+
- 'lib/api/api_resource.rb'
|
344
|
+
- 'lib/live_stream.rb'
|
217
345
|
|
218
346
|
# Offense count: 14
|
347
|
+
# Cop supports --auto-correct.
|
219
348
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
349
|
+
# SupportedStyles: compact, exploded
|
220
350
|
Style/RaiseArgs:
|
221
|
-
|
351
|
+
Exclude:
|
352
|
+
- 'lib/api/api_resource.rb'
|
353
|
+
- 'lib/datasift.rb'
|
354
|
+
- 'lib/live_stream.rb'
|
222
355
|
|
223
|
-
# Offense count:
|
356
|
+
# Offense count: 13
|
224
357
|
# Cop supports --auto-correct.
|
225
358
|
Style/RedundantBegin:
|
226
|
-
|
359
|
+
Exclude:
|
360
|
+
- 'examples/account_eg.rb'
|
361
|
+
- 'examples/account_identity_eg.rb'
|
362
|
+
- 'examples/account_identity_limit_eg.rb'
|
363
|
+
- 'examples/account_identity_token_eg.rb'
|
364
|
+
- 'examples/core_api_eg.rb'
|
365
|
+
- 'examples/historics_eg.rb'
|
366
|
+
- 'examples/historics_preview_eg.rb'
|
367
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
368
|
+
- 'examples/live_stream_eg.rb'
|
369
|
+
- 'examples/pull.rb'
|
370
|
+
- 'examples/push_eg.rb'
|
371
|
+
- 'examples/pylon/pylon_api_v1.2_eg.rb'
|
372
|
+
- 'examples/pylon/pylon_api_v1.3_eg.rb'
|
227
373
|
|
228
|
-
# Offense count:
|
374
|
+
# Offense count: 4
|
375
|
+
# Cop supports --auto-correct.
|
376
|
+
Style/RescueEnsureAlignment:
|
377
|
+
Exclude:
|
378
|
+
- 'examples/managed_source_ig_eg.rb'
|
379
|
+
- 'examples/pylon/pylon_api_v1.2_eg.rb'
|
380
|
+
- 'examples/pylon/pylon_api_v1.3_eg.rb'
|
381
|
+
- 'examples/tmp.rb'
|
382
|
+
|
383
|
+
# Offense count: 44
|
229
384
|
# Cop supports --auto-correct.
|
230
385
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
386
|
+
# SupportedStyles: only_raise, only_fail, semantic
|
231
387
|
Style/SignalException:
|
232
|
-
|
388
|
+
Exclude:
|
389
|
+
- 'examples/pull.rb'
|
390
|
+
- 'lib/account_identity.rb'
|
391
|
+
- 'lib/account_identity_limit.rb'
|
392
|
+
- 'lib/account_identity_token.rb'
|
393
|
+
- 'lib/datasift.rb'
|
394
|
+
- 'lib/managed_source.rb'
|
395
|
+
- 'lib/odp.rb'
|
396
|
+
- 'lib/pylon.rb'
|
233
397
|
|
234
|
-
# Offense count:
|
398
|
+
# Offense count: 3
|
235
399
|
# Cop supports --auto-correct.
|
236
400
|
Style/SpaceAfterComma:
|
237
|
-
|
401
|
+
Exclude:
|
402
|
+
- 'examples/live_stream_eg.rb'
|
403
|
+
- 'examples/pylon/pylon_api_v1.3_eg.rb'
|
404
|
+
- 'lib/cli.rb'
|
238
405
|
|
239
406
|
# Offense count: 1
|
240
407
|
# Cop supports --auto-correct.
|
241
408
|
Style/SpaceAfterMethodName:
|
242
|
-
|
409
|
+
Exclude:
|
410
|
+
- 'lib/live_stream.rb'
|
243
411
|
|
244
412
|
# Offense count: 1
|
245
413
|
# Cop supports --auto-correct.
|
246
414
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
415
|
+
# SupportedStyles: space, no_space
|
247
416
|
Style/SpaceAroundEqualsInParameterDefault:
|
248
|
-
|
417
|
+
Exclude:
|
418
|
+
- 'lib/datasift.rb'
|
249
419
|
|
250
|
-
# Offense count:
|
420
|
+
# Offense count: 10
|
251
421
|
# Cop supports --auto-correct.
|
252
|
-
# Configuration parameters:
|
422
|
+
# Configuration parameters: AllowForAlignment.
|
253
423
|
Style/SpaceAroundOperators:
|
254
|
-
|
424
|
+
Exclude:
|
425
|
+
- 'examples/live_stream_eg.rb'
|
426
|
+
- 'lib/datasift.rb'
|
255
427
|
|
256
428
|
# Offense count: 1
|
257
429
|
# Cop supports --auto-correct.
|
258
430
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
431
|
+
# SupportedStyles: space, no_space
|
259
432
|
Style/SpaceBeforeBlockBraces:
|
260
|
-
|
433
|
+
Exclude:
|
434
|
+
- 'examples/pull.rb'
|
261
435
|
|
262
|
-
# Offense count:
|
436
|
+
# Offense count: 14
|
263
437
|
# Cop supports --auto-correct.
|
264
438
|
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
439
|
+
# SupportedStyles: space, no_space, compact
|
265
440
|
Style/SpaceInsideHashLiteralBraces:
|
266
|
-
|
441
|
+
Exclude:
|
442
|
+
- 'examples/pull.rb'
|
443
|
+
- 'lib/managed_source.rb'
|
444
|
+
- 'lib/push.rb'
|
445
|
+
- 'lib/pylon.rb'
|
267
446
|
|
268
447
|
# Offense count: 3
|
269
448
|
# Cop supports --auto-correct.
|
270
449
|
Style/SpaceInsideParens:
|
271
|
-
|
450
|
+
Exclude:
|
451
|
+
- 'lib/datasift.rb'
|
272
452
|
|
273
|
-
# Offense count:
|
453
|
+
# Offense count: 28
|
274
454
|
# Cop supports --auto-correct.
|
275
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
455
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
456
|
+
# SupportedStyles: single_quotes, double_quotes
|
276
457
|
Style/StringLiterals:
|
277
|
-
|
458
|
+
Exclude:
|
459
|
+
- 'Gemfile'
|
460
|
+
- 'examples/account_eg.rb'
|
461
|
+
- 'examples/account_identity_eg.rb'
|
462
|
+
- 'examples/account_identity_limit_eg.rb'
|
463
|
+
- 'examples/account_identity_token_eg.rb'
|
464
|
+
- 'examples/ingestion/twitter_gnip_batch_eg.rb'
|
465
|
+
- 'examples/pylon/pylon_api_v1.2_eg.rb'
|
466
|
+
- 'examples/pylon/pylon_api_v1.3_eg.rb'
|
467
|
+
- 'examples/tmp.rb'
|
468
|
+
- 'lib/api/api_resource.rb'
|
469
|
+
- 'lib/datasift.rb'
|
470
|
+
- 'test/datasift/core_api_test.rb'
|
471
|
+
- 'test/datasift/odp/batch_upload_test.rb'
|
278
472
|
|
279
|
-
# Offense count:
|
280
|
-
# Cop supports --auto-correct.
|
281
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
282
|
-
Style/TrailingBlankLines:
|
283
|
-
Enabled: false
|
284
|
-
|
285
|
-
# Offense count: 1
|
473
|
+
# Offense count: 3
|
286
474
|
# Cop supports --auto-correct.
|
287
475
|
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
Style/UnneededPercentQ:
|
294
|
-
Enabled: false
|
476
|
+
# SupportedStyles: comma, consistent_comma, no_comma
|
477
|
+
Style/TrailingCommaInLiteral:
|
478
|
+
Exclude:
|
479
|
+
- 'examples/auth.rb'
|
480
|
+
- 'examples/tmp.rb'
|
295
481
|
|
296
482
|
# Offense count: 3
|
297
483
|
# Cop supports --auto-correct.
|
298
|
-
# Configuration parameters: WordRegex.
|
484
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, MinSize, WordRegex.
|
485
|
+
# SupportedStyles: percent, brackets
|
299
486
|
Style/WordArray:
|
300
|
-
|
487
|
+
Exclude:
|
488
|
+
- 'lib/cli.rb'
|
489
|
+
|
490
|
+
# Offense count: 6
|
491
|
+
# Cop supports --auto-correct.
|
492
|
+
Style/ZeroLengthPredicate:
|
493
|
+
Exclude:
|
494
|
+
- 'lib/api/api_resource.rb'
|
495
|
+
- 'lib/cli.rb'
|
496
|
+
- 'lib/datasift.rb'
|
497
|
+
- 'lib/managed_source.rb'
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ CHANGELOG
|
|
7
7
|
* Designed to make the most of DataSift's latest API version and features
|
8
8
|
* Designed for Ruby 2.3+. Use features like keyword parameters across the board
|
9
9
|
|
10
|
+
## v.3.7.0 (2016-08-04)
|
11
|
+
### Added
|
12
|
+
* Support for an `analyze_queries` parameter for Account Identity Limits
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
* Minor fixes for Rubocop
|
16
|
+
|
10
17
|
## v.3.6.2 (2016-06-03)
|
11
18
|
### Fixed
|
12
19
|
* Corrected params used in the `managed_source_auth.remove()` method. Thanks [@zenovich](https://github.com/zenovich)
|
@@ -17,14 +24,14 @@ CHANGELOG
|
|
17
24
|
|
18
25
|
## v.3.6.0 (2016-03-08)
|
19
26
|
### Added
|
20
|
-
* Support for the [/pylon/update](dev.datasift.com/
|
21
|
-
* Support for [API v1.3](http://dev.datasift.com/docs/api/api-changelog)
|
27
|
+
* Support for the [/pylon/update](http://dev.datasift.com/docs/platform/api/rest-api/endpoints/pylonupdate) API endpoint
|
28
|
+
* Support for [API v1.3](http://dev.datasift.com/docs/platform/api/api-changelog)
|
22
29
|
|
23
30
|
## v.3.5.0 (2015-11-13)
|
24
31
|
### Added
|
25
|
-
* Support for the
|
32
|
+
* Support for the `/account/usage` API endpoint
|
26
33
|
* Added explicit support for 412, 415, 503 and 504 HTTP error responses
|
27
|
-
* Support for the [/pylon/sample](http://dev.datasift.com/
|
34
|
+
* Support for the [/pylon/sample](http://dev.datasift.com/docs/platform/api/rest-api/endpoints/pylonsample) API endpoint. Full details about the feature can be found in our [platform release notes](http://community.datasift.com/t/pylon-1-6-release-notes/1859)
|
28
35
|
|
29
36
|
### Changed
|
30
37
|
* Only set ```Content-Type``` HTTP header for POST/PUT requests; it's not necessary unless we are passing a request entity
|
@@ -55,8 +62,8 @@ CHANGELOG
|
|
55
62
|
|
56
63
|
## v.3.2.0 (2015-05-13)
|
57
64
|
### Added
|
58
|
-
* Support for [PYLON API](http://dev.datasift.com/
|
59
|
-
* Support for [Account Identities API](http://dev.datasift.com/
|
65
|
+
* Support for [PYLON API](http://dev.datasift.com/docs/platform/api/rest-api/endpoints)
|
66
|
+
* Support for [Account Identities API](http://dev.datasift.com/docs/platform/api/rest-api/endpoints)
|
60
67
|
* Adds opts for Managed Sources create/update endpoints to allow passing of 'validate' param
|
61
68
|
* Support for HTTP 409 Conflict error
|
62
69
|
* Support for HTTP 410 Gone error
|
@@ -130,9 +137,9 @@ v.3.0.0 (2014-07-04)
|
|
130
137
|
--------------------
|
131
138
|
|
132
139
|
Final fixes for v.3.0.0!
|
133
|
-
This release does break backwards compatibility with version 2.x and earlier. A [migration guide](
|
134
|
-
* Adds support for the [Pull Push Destination](http://dev.datasift.com/docs/push/connectors/pull)
|
135
|
-
* Adds support for DataSift [Historics Preview](http://dev.datasift.com/docs/historics/preview)
|
140
|
+
This release does break backwards compatibility with version 2.x and earlier. A [migration guide](MIGRATING_TO_V.3.0.0.md) is available.
|
141
|
+
* Adds support for the [Pull Push Destination](http://dev.datasift.com/docs/products/stream/features/delivery/push/push-connectors/pull)
|
142
|
+
* Adds support for DataSift [Historics Preview](http://dev.datasift.com/docs/products/stream/features/historics/preview)
|
136
143
|
* Adds support for the new Dynamic Lists feature
|
137
144
|
* Adds support for multi-streaming via WebSockets
|
138
145
|
* Added a CLI to the library
|
@@ -231,7 +238,7 @@ v.1.2.0 (2012-02-28)
|
|
231
238
|
|
232
239
|
Twitter Compliance
|
233
240
|
|
234
|
-
* The consumer now has an onDeleted method to which you can assign a block that will be called to handle DELETE requests from Twitter. See delete.rb in the examples folder for a sample implementation. (@see http://dev.datasift.com/docs/twitter-
|
241
|
+
* The consumer now has an onDeleted method to which you can assign a block that will be called to handle DELETE requests from Twitter. See delete.rb in the examples folder for a sample implementation. (@see http://dev.datasift.com/docs/products/stream/features/sources/public-sources/twitter/twitter-delete-messages)
|
235
242
|
|
236
243
|
NB: if you are storing tweets you must implement this method in your code
|
237
244
|
and take appropriate action to maintain compliance with the Twitter license.
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2011-
|
1
|
+
Copyright (c) 2011-2016 MediaSift Ltd
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -17,5 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
18
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
THE SOFTWARE.
|
20
|
-
|
21
|
-
|
data/README.md
CHANGED
@@ -11,11 +11,11 @@ The official Ruby library for accessing the DataSift API.
|
|
11
11
|
|
12
12
|
Getting Started
|
13
13
|
---------------
|
14
|
-
**Read our [
|
14
|
+
**Read our [Stream](http://dev.datasift.com/docs/products/stream/quick-start/getting-started-ruby) and [PYLON](http://dev.datasift.com/docs/products/pylon-fbtd/get-started/getting-started-ruby) Getting Started guides for an introduction to the DataSift platform.** The guides will take you through creating a [DataSift](https://datasift.com) account, and activating data sources which you will need to do before using the DataSift API.
|
15
15
|
|
16
|
-
Many of the examples and API endpoints used in this library require you have enabled certain data sources before you can receive any data (you should do this at [datasift.com/source](https://datasift.com/source)). Certain API features, such as [Historics](
|
16
|
+
Many of the examples and API endpoints used in this library require you have enabled certain data sources before you can receive any data (you should do this at [https://datasift.com/source](https://datasift.com/source)). Certain API features, such as [Historics](https://datasift.com/platform/historics/) and [Managed Sources](https://datasift.com/platform/datasources/) will require you have signed up to a monthly subscription before you can access them.
|
17
17
|
|
18
|
-
If you are interested in using these features, or would like more information about DataSift, please [get in touch](
|
18
|
+
If you are interested in using these features, or would like more information about DataSift, please [get in touch](https://datasift.com/contact-us/)!
|
19
19
|
|
20
20
|
|
21
21
|
Install Instructions
|
@@ -83,10 +83,11 @@ Supported Operating Environment
|
|
83
83
|
This version of the client library has been tested, and is known to work against the following language versions and Operating Systems:
|
84
84
|
|
85
85
|
### Language Versions
|
86
|
-
* Ruby 1.9.3 (
|
87
|
-
* Ruby 2.0
|
86
|
+
* Ruby 1.9.3 (May work, but no longer officially supported)
|
87
|
+
* Ruby 2.0 (May work, but no longer officially supported)
|
88
88
|
* Ruby 2.1
|
89
89
|
* Ruby 2.2
|
90
|
+
* Ruby 2.3
|
90
91
|
|
91
92
|
### Operating Systems
|
92
93
|
* Linux
|
@@ -99,14 +100,9 @@ Contributing
|
|
99
100
|
Contributions are always welcome and appreciated
|
100
101
|
|
101
102
|
1. Fork on GitHub
|
102
|
-
2. Create a feature branch (we use [Gitflow](
|
103
|
-
3. Commit your changes with tests
|
104
|
-
* New feature? Send a pull request against the develop branch.
|
105
|
-
* Bug fix? Send a pull request against the master branch.
|
106
|
-
* Please don't break backwards-compatibility :)
|
103
|
+
2. Create a feature branch (we use [Gitflow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) for branching)
|
104
|
+
3. Commit your changes with tests. Please try not to break backwards-compatibility :)
|
107
105
|
|
108
106
|
License
|
109
107
|
-------
|
110
|
-
|
111
|
-
|
112
|
-
This code is released under the BSD license. Please see the [LICENSE](https://github.com/datasift/datasift-ruby/blob/master/LICENSE) file for more details.
|
108
|
+
This code is released under the BSD license. Please see the [LICENSE](LICENSE) file for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.7.0
|
@@ -19,7 +19,8 @@ class AccountIdentityLimitEg < DataSiftExample
|
|
19
19
|
puts @datasift.account_identity_limit.create(
|
20
20
|
identity_id,
|
21
21
|
'facebook',
|
22
|
-
100_000
|
22
|
+
100_000,
|
23
|
+
50
|
23
24
|
)[:data].to_json
|
24
25
|
|
25
26
|
puts "\nList all existing Limits for this Service"
|
@@ -33,11 +34,12 @@ class AccountIdentityLimitEg < DataSiftExample
|
|
33
34
|
'facebook'
|
34
35
|
)[:data].to_json
|
35
36
|
|
36
|
-
puts "\nUpdate a Limit for a given Identity"
|
37
|
+
puts "\nUpdate just the daily interaction limit for a Limit for a given Identity"
|
37
38
|
puts @datasift.account_identity_limit.update(
|
38
39
|
identity_id,
|
39
40
|
'facebook',
|
40
|
-
250_000
|
41
|
+
250_000,
|
42
|
+
nil
|
41
43
|
)[:data].to_json
|
42
44
|
|
43
45
|
puts "\nRemove the Limit from a given Identity and Service"
|
@@ -8,16 +8,17 @@ module DataSift
|
|
8
8
|
# a limit
|
9
9
|
# @param service [String] The service this limit will apply to. For example;
|
10
10
|
# 'facebook'
|
11
|
-
# @param total_allowance [Integer] The limit for this Identity
|
11
|
+
# @param total_allowance [Integer] (Optional) The daily interaction limit for this Identity
|
12
|
+
# @param analyze_queries [Integer] (Optional) The hourly analysis query limit for this Identity
|
12
13
|
# @return [Object] API reponse object
|
13
|
-
def create(identity_id = '', service = '', total_allowance = nil)
|
14
|
+
def create(identity_id = '', service = '', total_allowance = nil, analyze_queries = nil)
|
14
15
|
fail BadParametersError, 'identity_id is required' if identity_id.empty?
|
15
16
|
fail BadParametersError, 'service is required' if service.empty?
|
16
|
-
fail BadParametersError, '
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
fail BadParametersError, 'Must set total_allowance or analyze_queries' if
|
18
|
+
total_allowance.nil? && analyze_queries.nil?
|
19
|
+
params = { service: service }
|
20
|
+
params[:total_allowance] = total_allowance unless total_allowance.nil?
|
21
|
+
params[:analyze_queries] = analyze_queries unless analyze_queries.nil?
|
21
22
|
|
22
23
|
DataSift.request(:POST, "account/identity/#{identity_id}/limit", @config, params)
|
23
24
|
end
|
@@ -46,8 +47,8 @@ module DataSift
|
|
46
47
|
fail BadParametersError, 'service is required' if service.empty?
|
47
48
|
|
48
49
|
params = {}
|
49
|
-
params
|
50
|
-
params
|
50
|
+
params[:per_page] = per_page unless per_page.empty?
|
51
|
+
params[:page] = page unless page.empty?
|
51
52
|
|
52
53
|
DataSift.request(:GET, "account/identity/limit/#{service}", @config, params)
|
53
54
|
end
|
@@ -58,13 +59,17 @@ module DataSift
|
|
58
59
|
# a limit
|
59
60
|
# @param service [String] The service this limit will apply to. For example;
|
60
61
|
# 'facebook'
|
61
|
-
# @param total_allowance [Integer] The
|
62
|
+
# @param total_allowance [Integer] (Optional) The daily interaction limit for this Identity
|
63
|
+
# @param analyze_queries [Integer] (Optional) The hourly analysis query limit for this Identity
|
62
64
|
# @return [Object] API reponse object
|
63
|
-
def update(identity_id = '', service = '', total_allowance = nil)
|
65
|
+
def update(identity_id = '', service = '', total_allowance = nil, analyze_queries = nil)
|
64
66
|
fail BadParametersError, 'identity_id is required' if identity_id.empty?
|
65
67
|
fail BadParametersError, 'service is required' if service.empty?
|
66
|
-
fail BadParametersError, '
|
67
|
-
|
68
|
+
fail BadParametersError, 'Must set total_allowance or analyze_queries' if
|
69
|
+
total_allowance.nil? && analyze_queries.nil?
|
70
|
+
params = {}
|
71
|
+
params[:total_allowance] = total_allowance unless total_allowance.nil?
|
72
|
+
params[:analyze_queries] = analyze_queries unless analyze_queries.nil?
|
68
73
|
|
69
74
|
DataSift.request(:PUT, "account/identity/#{identity_id}/limit/#{service}", @config, params)
|
70
75
|
end
|
data/lib/live_stream.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datasift
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DataSift
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-08-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
@@ -208,4 +208,3 @@ signing_key:
|
|
208
208
|
specification_version: 4
|
209
209
|
summary: DataSift is a simple wrapper for the DataSift API.
|
210
210
|
test_files: []
|
211
|
-
has_rdoc:
|