bwapi 6.5.0.pre.256 → 7.0.0.pre.271

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +8 -8
  2. data/.editorconfig +11 -0
  3. data/.rubocop.yml +17 -0
  4. data/.travis.yml +7 -3
  5. data/bin/bwapi +2 -1
  6. data/bwapi.gemspec +13 -10
  7. data/lib/bwapi.rb +6 -6
  8. data/lib/bwapi/authentication.rb +9 -17
  9. data/lib/bwapi/client.rb +5 -4
  10. data/lib/bwapi/client/admin.rb +6 -6
  11. data/lib/bwapi/client/admin/become.rb +4 -4
  12. data/lib/bwapi/client/admin/search.rb +9 -12
  13. data/lib/bwapi/client/admin/sub_clients.rb +8 -13
  14. data/lib/bwapi/client/admin/users.rb +7 -7
  15. data/lib/bwapi/client/admin/users/sharing.rb +5 -7
  16. data/lib/bwapi/client/brandwatch.rb +4 -4
  17. data/lib/bwapi/client/brandwatch/become.rb +4 -4
  18. data/lib/bwapi/client/brandwatch/client_modules.rb +5 -6
  19. data/lib/bwapi/client/client.rb +5 -6
  20. data/lib/bwapi/client/command_center.rb +3 -3
  21. data/lib/bwapi/client/command_center/client.rb +4 -4
  22. data/lib/bwapi/client/command_center/displays.rb +9 -9
  23. data/lib/bwapi/client/command_center/displays/events.rb +8 -8
  24. data/lib/bwapi/client/command_center/displays/messages.rb +7 -8
  25. data/lib/bwapi/client/command_center/displays/scenes.rb +9 -9
  26. data/lib/bwapi/client/command_center/displays/screens.rb +9 -9
  27. data/lib/bwapi/client/command_center/displays/users.rb +7 -8
  28. data/lib/bwapi/client/command_center/displays/users/access.rb +4 -5
  29. data/lib/bwapi/client/command_center/scene_types.rb +6 -6
  30. data/lib/bwapi/client/command_center/themes.rb +4 -4
  31. data/lib/bwapi/client/command_center/users.rb +6 -6
  32. data/lib/bwapi/client/command_center/users/access.rb +5 -5
  33. data/lib/bwapi/client/error_codes.rb +4 -4
  34. data/lib/bwapi/client/filters.rb +4 -4
  35. data/lib/bwapi/client/languages.rb +3 -3
  36. data/lib/bwapi/client/location.rb +5 -5
  37. data/lib/bwapi/client/logout.rb +12 -14
  38. data/lib/bwapi/client/me.rb +3 -3
  39. data/lib/bwapi/client/metrics.rb +3 -3
  40. data/lib/bwapi/client/oauth.rb +8 -8
  41. data/lib/bwapi/client/ping.rb +8 -8
  42. data/lib/bwapi/client/projects.rb +10 -10
  43. data/lib/bwapi/client/projects/bulkactions.rb +4 -4
  44. data/lib/bwapi/client/projects/bulkactions/author.rb +4 -3
  45. data/lib/bwapi/client/projects/bulkactions/mentions.rb +4 -3
  46. data/lib/bwapi/client/projects/categories.rb +6 -20
  47. data/lib/bwapi/client/projects/data.rb +4 -5
  48. data/lib/bwapi/client/projects/data/mentions.rb +7 -7
  49. data/lib/bwapi/client/projects/data/volume.rb +11 -11
  50. data/lib/bwapi/client/projects/data_download.rb +6 -7
  51. data/lib/bwapi/client/projects/demographics.rb +3 -4
  52. data/lib/bwapi/client/projects/facebook_queries.rb +8 -9
  53. data/lib/bwapi/client/projects/group.rb +2 -2
  54. data/lib/bwapi/client/projects/group/author_group.rb +8 -7
  55. data/lib/bwapi/client/projects/group/location_group.rb +7 -7
  56. data/lib/bwapi/client/projects/group/site_group.rb +7 -7
  57. data/lib/bwapi/client/projects/queries.rb +9 -10
  58. data/lib/bwapi/client/projects/queries/backfill.rb +6 -8
  59. data/lib/bwapi/client/projects/queries/date_range.rb +9 -9
  60. data/lib/bwapi/client/projects/queries/mentions.rb +5 -8
  61. data/lib/bwapi/client/projects/query_groups.rb +7 -9
  62. data/lib/bwapi/client/projects/rules.rb +7 -9
  63. data/lib/bwapi/client/projects/rules/backfill.rb +4 -4
  64. data/lib/bwapi/client/projects/rules/copy.rb +4 -4
  65. data/lib/bwapi/client/projects/sharing.rb +8 -9
  66. data/lib/bwapi/client/projects/signals.rb +5 -5
  67. data/lib/bwapi/client/projects/stream_dashboards.rb +10 -10
  68. data/lib/bwapi/client/projects/stream_dashboards/streams.rb +6 -7
  69. data/lib/bwapi/client/projects/summary.rb +5 -6
  70. data/lib/bwapi/client/projects/tags.rb +8 -9
  71. data/lib/bwapi/client/projects/twitter_queries.rb +7 -8
  72. data/lib/bwapi/client/projects/users.rb +4 -4
  73. data/lib/bwapi/client/projects/workflow.rb +4 -4
  74. data/lib/bwapi/client/query_validation.rb +7 -7
  75. data/lib/bwapi/client/sso.rb +4 -4
  76. data/lib/bwapi/client/test_search.rb +9 -8
  77. data/lib/bwapi/client/user.rb +6 -6
  78. data/lib/bwapi/client/user/notifications.rb +8 -8
  79. data/lib/bwapi/configuration.rb +6 -6
  80. data/lib/bwapi/connection.rb +10 -19
  81. data/lib/bwapi/error.rb +43 -36
  82. data/lib/bwapi/request.rb +24 -27
  83. data/lib/bwapi/version.rb +5 -2
  84. data/lib/faraday/response/brandwatch_error.rb +21 -22
  85. data/spec/bwapi/authentication_spec.rb +7 -7
  86. data/spec/bwapi/client_spec.rb +17 -17
  87. data/spec/bwapi_spec.rb +3 -3
  88. data/spec/fixtures/.netrc +1 -1
  89. data/spec/helper.rb +4 -2
  90. metadata +61 -4
  91. data/lib/faraday/utils/utils.rb +0 -26
@@ -1,7 +1,8 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'helper'
2
4
 
3
5
  describe BWAPI do
4
-
5
6
  describe 'when called' do
6
7
  it 'should be an instance of Module' do
7
8
  BWAPI.should be_an_instance_of Module
@@ -19,5 +20,4 @@ describe BWAPI do
19
20
  expect(BWAPI.respond_to?(:new, true)).to eq(true)
20
21
  end
21
22
  end
22
-
23
- end
23
+ end
@@ -1,3 +1,3 @@
1
1
  machine newapi.brandwatch.com
2
2
  login testuser@brandwatch.com
3
- password password
3
+ password password
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'simplecov'
2
4
  require 'coveralls'
3
5
 
@@ -15,5 +17,5 @@ RSpec.configure do |config|
15
17
  end
16
18
 
17
19
  def fixture_path
18
- File.expand_path("../fixtures", __FILE__)
19
- end
20
+ File.expand_path('../fixtures', __FILE__)
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bwapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0.pre.256
4
+ version: 7.0.0.pre.271
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chrisp
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.14.1
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 2.14.1
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,29 @@ dependencies:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: 2.14.1
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 2.14.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: rubocop
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: 0.21.0
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: 0.21.0
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: 0.21.0
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: 0.21.0
27
53
  - !ruby/object:Gem::Dependency
28
54
  name: colored
29
55
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +70,20 @@ dependencies:
44
70
  requirements:
45
71
  - - ~>
46
72
  - !ruby/object:Gem::Version
47
- version: 0.8.7
73
+ version: 0.9.0
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: 0.9.0
48
77
  type: :runtime
49
78
  prerelease: false
50
79
  version_requirements: !ruby/object:Gem::Requirement
51
80
  requirements:
52
81
  - - ~>
53
82
  - !ruby/object:Gem::Version
54
- version: 0.8.7
83
+ version: 0.9.0
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: 0.9.0
55
87
  - !ruby/object:Gem::Dependency
56
88
  name: faraday_middleware
57
89
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +91,9 @@ dependencies:
59
91
  - - ~>
60
92
  - !ruby/object:Gem::Version
61
93
  version: 0.9.0
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.9.0
62
97
  type: :runtime
63
98
  prerelease: false
64
99
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,6 +101,9 @@ dependencies:
66
101
  - - ~>
67
102
  - !ruby/object:Gem::Version
68
103
  version: 0.9.0
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: 0.9.0
69
107
  - !ruby/object:Gem::Dependency
70
108
  name: hashie
71
109
  requirement: !ruby/object:Gem::Requirement
@@ -73,6 +111,9 @@ dependencies:
73
111
  - - ~>
74
112
  - !ruby/object:Gem::Version
75
113
  version: 2.0.5
114
+ - - ! '>='
115
+ - !ruby/object:Gem::Version
116
+ version: 2.0.5
76
117
  type: :runtime
77
118
  prerelease: false
78
119
  version_requirements: !ruby/object:Gem::Requirement
@@ -80,6 +121,9 @@ dependencies:
80
121
  - - ~>
81
122
  - !ruby/object:Gem::Version
82
123
  version: 2.0.5
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: 2.0.5
83
127
  - !ruby/object:Gem::Dependency
84
128
  name: multi_json
85
129
  requirement: !ruby/object:Gem::Requirement
@@ -87,6 +131,9 @@ dependencies:
87
131
  - - ~>
88
132
  - !ruby/object:Gem::Version
89
133
  version: 1.9.0
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: 1.9.0
90
137
  type: :runtime
91
138
  prerelease: false
92
139
  version_requirements: !ruby/object:Gem::Requirement
@@ -94,6 +141,9 @@ dependencies:
94
141
  - - ~>
95
142
  - !ruby/object:Gem::Version
96
143
  version: 1.9.0
144
+ - - ! '>='
145
+ - !ruby/object:Gem::Version
146
+ version: 1.9.0
97
147
  - !ruby/object:Gem::Dependency
98
148
  name: netrc
99
149
  requirement: !ruby/object:Gem::Requirement
@@ -101,6 +151,9 @@ dependencies:
101
151
  - - ~>
102
152
  - !ruby/object:Gem::Version
103
153
  version: 0.7.7
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: 0.7.7
104
157
  type: :runtime
105
158
  prerelease: false
106
159
  version_requirements: !ruby/object:Gem::Requirement
@@ -108,6 +161,9 @@ dependencies:
108
161
  - - ~>
109
162
  - !ruby/object:Gem::Version
110
163
  version: 0.7.7
164
+ - - ! '>='
165
+ - !ruby/object:Gem::Version
166
+ version: 0.7.7
111
167
  description: A Ruby wrapper for the Brandwatch API
112
168
  email: jonathan@brandwatch.com
113
169
  executables:
@@ -115,7 +171,9 @@ executables:
115
171
  extensions: []
116
172
  extra_rdoc_files: []
117
173
  files:
174
+ - .editorconfig
118
175
  - .gitignore
176
+ - .rubocop.yml
119
177
  - .travis.yml
120
178
  - Gemfile
121
179
  - LICENCE.md
@@ -200,7 +258,6 @@ files:
200
258
  - lib/bwapi/request.rb
201
259
  - lib/bwapi/version.rb
202
260
  - lib/faraday/response/brandwatch_error.rb
203
- - lib/faraday/utils/utils.rb
204
261
  - spec/bwapi/authentication_spec.rb
205
262
  - spec/bwapi/client_spec.rb
206
263
  - spec/bwapi_spec.rb
@@ -1,26 +0,0 @@
1
- require 'faraday'
2
-
3
- # TODO: Remove this patch once latest faraday rc has been released
4
- # https://github.com/lostisland/faraday/issues/182#issuecomment-19518167
5
- module Faraday
6
- # Overriding Faraday::Utils module build_nested_query method
7
- module Utils
8
- def build_nested_query(value, prefix = nil)
9
- case value
10
- when Array
11
- value.map { |v| build_nested_query(v, "#{prefix}") }.join("&")
12
- #value.map { |v| build_nested_query(v, "#{prefix}%5B%5D") }.join("&")
13
- when Hash
14
- value.map { |k, v|
15
- build_nested_query(v, prefix ? "#{prefix}#{escape(k)}" : escape(k))
16
- #build_nested_query(v, prefix ? "#{prefix}%5B#{escape(k)}%5D" : escape(k))
17
- }.join("&")
18
- when NilClass
19
- prefix
20
- else
21
- raise ArgumentError, "value must be a Hash" if prefix.nil?
22
- "#{prefix}=#{escape(value)}"
23
- end
24
- end
25
- end
26
- end