bwapi 1.0.1 → 1.0.2

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: dd2cf79cd157dd2ca6e76738c1424f1a47088df4
4
- data.tar.gz: 1fac68af86ca4f7d8d210e2ca04614e53311b87d
3
+ metadata.gz: 3936b94ac927e859883ba94f57b5bf9ce4e3ab07
4
+ data.tar.gz: aac7ec6084fc89f77b0c1146342e5163884f74bf
5
5
  SHA512:
6
- metadata.gz: 11abad275db972f85bddf6d43dc398c255291ce65c70cc157755fe4fa1a5ffd711e053863cef5b0cbe1d8ca6e0a6d668c15587fa7a6b02f4b100588e93797860
7
- data.tar.gz: a65bffa36df961516ac87aaf03566bab6439334df3bca2778ca263e255b7d14a0b56d34f7f2ce80570a64ec645a0c0bfca7e377511bdd03953b13f1e9a4af3d8
6
+ metadata.gz: 692fc31e5e59426305db9b9593d373feb9c69f170b03ce872d9313dad9d7704a4b678ad17f5a31b300e644139b091a1468513e7227a30acc2d60c73de790c1dd
7
+ data.tar.gz: 59d707d2fb356c5d9c5a9be6e555ec6e9627e5138f431cacf288475bfa3910b96ba7c5c40e1dcac8033f431456d5480c189323b876592dda9d2e4d741625383b
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Gem Version](https://badge.fury.io/rb/bwapi.png)](http://badge.fury.io/rb/bwapi)
1
2
  [![Build Status](https://travis-ci.org/jonathanchrisp/bwapi.png?branch=master)](https://travis-ci.org/jonathanchrisp/bwapi)
2
3
  [![Dependency Status](https://gemnasium.com/jonathanchrisp/bwapi.png)](https://gemnasium.com/jonathanchrisp/bwapi)
3
4
  [![Code Climate](https://codeclimate.com/github/jonathanchrisp/bwapi.png)](https://codeclimate.com/github/jonathanchrisp/bwapi)
data/lib/bwapi/client.rb CHANGED
@@ -6,6 +6,7 @@ require 'bwapi/client/admin'
6
6
  require 'bwapi/client/brandwatch'
7
7
  require 'bwapi/client/client'
8
8
  require 'bwapi/client/error_codes'
9
+ require 'bwapi/client/filters'
9
10
  require 'bwapi/client/logout'
10
11
  require 'bwapi/client/me'
11
12
  require 'bwapi/client/oauth'
@@ -41,6 +42,7 @@ module BWAPI
41
42
  include BWAPI::Client::Brandwatch
42
43
  include BWAPI::Client::Client
43
44
  include BWAPI::Client::ErrorCodes
45
+ include BWAPI::Client::Filters
44
46
  include BWAPI::Client::Logout
45
47
  include BWAPI::Client::Me
46
48
  include BWAPI::Client::OAuth
@@ -21,7 +21,7 @@ module BWAPI
21
21
  ].freeze
22
22
 
23
23
  DEFAULT_ADAPTER = Faraday.default_adapter
24
- DEFAULT_API_ENDPOINT = 'https://newapi.brandwatch.com/'
24
+ DEFAULT_API_ENDPOINT = ENV['BWAPI_API_ENDPOINT'] || 'https://newapi.brandwatch.com/'
25
25
  DEFAULT_CLIENT_ID = 'brandwatch-api-client'
26
26
  DEFAULT_USER_AGENT = "BWAPI Ruby Gem #{BWAPI::VERSION}".freeze
27
27
  DEFAULT_NETRC_FILE = File.join(ENV['HOME'], '.netrc')
@@ -38,6 +38,11 @@ module BWAPI
38
38
  yield self
39
39
  end
40
40
 
41
+ # Convert option_keys to hash and return
42
+ def options
43
+ OPTION_KEYS.inject({}){|o,k|o.merge!(k => send(k))}
44
+ end
45
+
41
46
  # Reset the configuration options
42
47
  def reset
43
48
  self.adapter = DEFAULT_ADAPTER
@@ -54,10 +59,5 @@ module BWAPI
54
59
  self.netrc = false
55
60
  self.netrc_file = DEFAULT_NETRC_FILE
56
61
  end
57
-
58
- # Convert option_keys to hash and return
59
- def options
60
- OPTION_KEYS.inject({}){|o,k|o.merge!(k => send(k))}
61
- end
62
62
  end
63
63
  end
data/lib/bwapi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BWAPI
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -92,7 +92,7 @@ describe BWAPI::Client do
92
92
 
93
93
  describe 'api_endpoint' do
94
94
  it 'should have a default api_endpoint value' do
95
- expect(BWAPI::Client.new.api_endpoint).to eql("http://newapi.brandwatch.com/")
95
+ expect(BWAPI::Client.new.api_endpoint).to eql("https://newapi.brandwatch.com/")
96
96
  end
97
97
 
98
98
  it 'should allow a user to set a api_endpoint value' do
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chrisp