cacho 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/lib/cacho.rb +4 -2
  4. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 971a2618311a53c598754c6ac93be13c3c035bc1
4
- data.tar.gz: c908a98a87751c1b69018042a126f871d0780023
3
+ metadata.gz: 3741a49cac4a93a6dfa3dc9991d85596812edc13
4
+ data.tar.gz: 0ea36ac0ed861cafe4aef83c326dd03e3a125853
5
5
  SHA512:
6
- metadata.gz: a2ffb8c7b0677f102b7174f5406027e612167490b85df8fc326ce6bf29729b8f29a7075b25f702b22765f5a885bd895cf47d8cf5c3dc1cb236e6fa3fa31fedf6
7
- data.tar.gz: 3295d8ffff7648eba520a4fcdbcfd70fd041e9c76648c871b798c7b8558556b41b43b2019837975b9d1ada9bc3a99a3ce30a4a5e96d27ee908bdd28187cca1b2
6
+ metadata.gz: 0daaeeb292e934926a605ec7d72f3c603f1b53d595865cfd0322f2609a4496a043e5aadc402be34041655ebc99cc1216788dfbea25515d922eeac0ce0b8d61e6
7
+ data.tar.gz: 9d973152992c2c71bccab7603e83abd4a30b5017d0a646ed2ee8318cc8d34069949f761c19a0186e643b3a158858bd29c8db776d1eddd96557a5b5ee74c7f50d
@@ -1,3 +1,10 @@
1
+ 0.1.3 - 2015-06-25
2
+ ==================
3
+
4
+ * Set the default `User-Agent` to something browser-like.
5
+
6
+ * `POST` data is optional.
7
+
1
8
  0.1.2 - 2014-11-02
2
9
  ==================
3
10
 
@@ -7,7 +7,7 @@ require "csv"
7
7
  require "fileutils"
8
8
 
9
9
  class Cacho
10
- VERSION = "0.1.2"
10
+ VERSION = "0.1.3"
11
11
 
12
12
  attr_accessor :hasher
13
13
 
@@ -60,6 +60,8 @@ class Cacho::Client
60
60
 
61
61
  @callbacks[:before_request].(request) if @callbacks[:before_request]
62
62
 
63
+ request["User-Agent"] = "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0"
64
+
63
65
  if options.include?(:headers)
64
66
  options[:headers].each do |key, value|
65
67
  request[key] = value
@@ -69,7 +71,7 @@ class Cacho::Client
69
71
  request["Accept-Encoding"] = "gzip"
70
72
 
71
73
  if verb == :post
72
- post_data = options.fetch(:data)
74
+ post_data = options.fetch(:data, {})
73
75
 
74
76
  case options[:content_type]
75
77
  when :json
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damian Janowski
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-03 00:00:00.000000000 Z
12
+ date: 2015-06-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-http-persistent
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  description: A careless caching client optimized for scraping.
@@ -33,7 +33,7 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - ".gitignore"
36
+ - .gitignore
37
37
  - CHANGELOG.md
38
38
  - README.md
39
39
  - Rakefile
@@ -50,17 +50,17 @@ require_paths:
50
50
  - lib
51
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.2.2
63
+ rubygems_version: 2.4.6
64
64
  signing_key:
65
65
  specification_version: 4
66
66
  summary: A careless caching client optimized for scraping.