datasift 3.9.0 → 3.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c0c0625f0c7c9d9d315713d6e98a7c17dfad13f
4
- data.tar.gz: 534f5fb0561ca4122e4858eae06c39700117589e
3
+ metadata.gz: 8aea8d0fc9dfd9704d01fa94ad2e2ea950dd9c4c
4
+ data.tar.gz: 99a95937f2d21b83598c920d48803210b6e83621
5
5
  SHA512:
6
- metadata.gz: 6d81e0d6c7f68f8d06d773e0e332e9277905eca5b0a8ef2498478a4b254631f4691ebf35081bfe4763ed09bf4e1571463e0adcd6447c2636ba9ebed4cabf6243
7
- data.tar.gz: 1de95d5d6237c28dcf3042483f739cae2040efa98ba3e0900f1d32f2f2c9e7d9b77cb10423cb7451ee3ba1d20eef8fc663b2036d9d3e00eff4d4a11a3fc6fe42
6
+ metadata.gz: dd93f2f93ecb5759643834eac7b3acd7e1c5a4353e08566eb1079dcbaedb7043048059a7b9eccb8e13ce3ee5c03fbf9cba4f4269d9bdd388f9c672b646f78473
7
+ data.tar.gz: e0cad5eb3ed1f7b4406880cab34be84055765e41c34eef7c4064b682e2bc18eceb22efb851a29e6debabe92b7389d5d9bd4b316f9c68ec0ae1125d9f728e2079
@@ -1,11 +1,9 @@
1
1
  CHANGELOG
2
2
  ================================
3
- ## v.4.0 (Under development)
4
- ### Planned Features
5
- * Better thought out API design in a more traditional Gem style
6
- * More of an SDK style library; for example, you should perform actions (start/stop/analyze) on a PYLON recording object
7
- * Designed to make the most of DataSift's latest API version and features
8
- * Designed for Ruby 2.3+. Use features like keyword parameters across the board
3
+ ## v.3.10.0 (2018-01-15)
4
+ ### Changed
5
+ * Uses API v1.6 by default
6
+ * Change to `account.usage()` required by API; start/end times must be included
9
7
 
10
8
  ## v.3.9.0 (2017-08-16)
11
9
  ### Added
data/README.md CHANGED
@@ -85,9 +85,11 @@ This version of the client library has been tested, and is known to work against
85
85
  ### Language Versions
86
86
  * Ruby 1.9.3 (May work, but no longer officially supported)
87
87
  * Ruby 2.0 (May work, but no longer officially supported)
88
- * Ruby 2.1
88
+ * Ruby 2.1 (May work, but no longer officially supported)
89
89
  * Ruby 2.2
90
90
  * Ruby 2.3
91
+ * Ruby 2.4
92
+ * Ruby 2.5
91
93
 
92
94
  ### Operating Systems
93
95
  * Linux
@@ -103,6 +105,15 @@ Contributions are always welcome and appreciated
103
105
  2. Create a feature branch (we use [Gitflow](https://datasift.github.io/gitflow/IntroducingGitFlow.html) for branching)
104
106
  3. Commit your changes with tests. Please try not to break backwards-compatibility :)
105
107
 
108
+ Testing
109
+ -------
110
+ When contributing new code, it should be accompanied with appropriate tests.
111
+ When adding new tests, or testing a new API version, you should follow these steps:
112
+ 1. Add your credentials and appropriate API version to the `examples/auth.rb` file (these credentials will not be stored anywhere. Please remember to remove them before committing code!)
113
+ 2. Run `bundle install; rake build; rake install` to ensure we are using the latest versions of your changes
114
+ 3. Run `rake test` to run the full test suite, or you can run `ruby test/datasift/<test_file>` to run just a specific test.
115
+ 4. When you have successfully tested your changes, and stored the API response from any new API calls using VCR (see the `test/fixtures/cassettes` directory), run `rake test` again to run the full test suite. If that passes, you should be good to commit and push your changes.
116
+
106
117
  License
107
118
  -------
108
119
  This code is released under the BSD license. Please see the [LICENSE](LICENSE) file for details.
@@ -10,11 +10,9 @@ module DataSift
10
10
  # @param end_time [Integer] (Optional) Unix timestamp of the end of the period
11
11
  # you are querying
12
12
  # @return [Object] API reponse object
13
- def usage(period = '', start_time = nil, end_time = nil)
14
- params = {}
13
+ def usage(start_time, end_time, period = '')
14
+ params = { start: start_time, end: end_time }
15
15
  params.merge!(period: period) unless period.empty?
16
- params.merge!(start: start_time) unless start_time.nil?
17
- params.merge!(end: end_time) unless end_time.nil?
18
16
 
19
17
  DataSift.request(:GET, 'account/usage', @config, params)
20
18
  end
@@ -14,7 +14,7 @@ module DataSift
14
14
  config[:api_host] = 'api.datasift.com' unless config.has_key?(:api_host)
15
15
  config[:stream_host] = 'websocket.datasift.com' unless config.has_key?(:stream_host)
16
16
  config[:ingestion_host] = 'in.datasift.com' unless config.has_key?(:ingestion_host)
17
- config[:api_version] = 'v1.5' unless config.has_key?(:api_version)
17
+ config[:api_version] = 'v1.6' unless config.has_key?(:api_version)
18
18
  config[:enable_ssl] = true unless config.has_key?(:enable_ssl)
19
19
 
20
20
  ssl_default = TLSv1_2
@@ -1,3 +1,3 @@
1
1
  module DataSift
2
- VERSION = '3.9.0'.freeze
2
+ VERSION = '3.10.0'.freeze
3
3
  end
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.9.0
4
+ version: 3.10.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: 2017-08-16 00:00:00.000000000 Z
13
+ date: 2018-01-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: 1.3.5
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.6.11
128
+ rubygems_version: 2.6.13
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: DataSift is a simple wrapper for the DataSift API.