gnip_api 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b25c3e08f948ffde4473dea9cb876011af244bb
4
- data.tar.gz: 1b49f019c34399f31e45609f9d9c1c756c6a8636
3
+ metadata.gz: 3587d0f204a4f0fb76ac8caf03d5553b75e70c46
4
+ data.tar.gz: fbf2a2624f6f42c9528716c8464482c3eddd88ea
5
5
  SHA512:
6
- metadata.gz: 0b5cfec63defe617d30f78b0d94c7fe73f614e757d54aa0218f4c70e427348d6186772ececb46a9399433029848bfd7197633c3b38d7f986795dc7f05f450054
7
- data.tar.gz: 048fa9bc89ca1ffe1cdd5b43cecf1fa8014669588d434776d686be78878fe0a736c637a0a3f9b35d9359872a67463e1f0b9bda396760bdca85e2ce90a8a260a6
6
+ metadata.gz: 4646757255c9fadfc5a4d3826c3b8b96c5a91a2c486f808cf111dbf47dd6fa2d2abe5953c64412488c6637e8b550bbc9f09099ec8f46bdc44af4ba8d75de18f1
7
+ data.tar.gz: c73642ac1fa937500568c518ee187701c3f724444852b8108d243c5041434efea6571ef57286a1e49b1cb07d82709758934203b9457a6bf176aa85b7ecce3bfa
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gnip_api (1.0.5)
4
+ gnip_api (1.0.6)
5
5
  addressable
6
6
  httparty
7
7
  yajl-ruby
@@ -59,7 +59,10 @@ module GnipApi
59
59
 
60
60
  private
61
61
  def create_request
62
- GnipApi::Request.new_get(endpoint, {'Accept-Encoding' => 'gzip'})
62
+ headers = {}
63
+ headers['Accept-Encoding'] = 'gzip' if GnipApi.config.enable_gzip
64
+ headers['Accept-Encoding'] ||= 'json'
65
+ GnipApi::Request.new_get(endpoint, headers)
63
66
  end
64
67
 
65
68
  def set_config
@@ -3,7 +3,7 @@ module GnipApi
3
3
  OUTPUT_FORMATS = [:activity, :json, :parsed_json]
4
4
 
5
5
  attr_accessor :user, :password, :adapter_class, :account, :logger, :source, :label, :request_timeout, :debug,
6
- :stream_output_format
6
+ :stream_output_format, :enable_gzip
7
7
 
8
8
  def initialize
9
9
  @adapter_class = GnipApi::Adapters::HTTPartyAdapter
@@ -11,6 +11,7 @@ module GnipApi
11
11
  @request_timeout = 60
12
12
  @debug = false
13
13
  @stream_output_format = :activity
14
+ @enable_gzip = true
14
15
  end
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module GnipApi
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gnip_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rayko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-28 00:00:00.000000000 Z
11
+ date: 2017-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler