instapusher 0.1.7 → 0.1.8

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: ccf47f331db0d63f10218933ba3de941f23a368a
4
- data.tar.gz: d6cdba7f1bb5aa5465bfa326ccdfdd44c6ac2ae8
3
+ metadata.gz: 86917f65bf8082648676b3cfab63bda29cf02f9a
4
+ data.tar.gz: d3caeb037564958fe3dfb85c7c497c5ba43851ae
5
5
  SHA512:
6
- metadata.gz: 5eefe9d5ed03814a03dc7fbd16ef105e86f48dd76ce770446868c95a408bb5a9755ce565548336f2ced57fe608c0ac467b626ce8de3c3432e83af8aa17c88094
7
- data.tar.gz: faa00d41d405c03b2236da8d6091b872726acf06856f9f66d2a84c81cf5fcdeea9afed00c016c2f51350df03294ed6969819a4e8f45035554d6c9d8fa4099c03
6
+ metadata.gz: 3749cd7596f66ee0afc6e160931c752caf34caf9832d04277131c61d9d41aab13ac5d13c95b2e791596cbf2ca518d0948f5dfa0f5e002d3773fb4222d5d65e4b
7
+ data.tar.gz: be068428eb629db62c79a33bb59221046f23117682b265cc9d581af6c2465aff090dd73d6082fb04eaa4c1d436f657715d8f211a61dd56c7a13ad6d9e824b53b
@@ -9,7 +9,7 @@ module Instapusher
9
9
  @debug = debug
10
10
  @options = options
11
11
 
12
- puts "options is #{options.inspect}"
12
+ log "options is #{options.inspect}"
13
13
  end
14
14
 
15
15
  def success?
@@ -17,9 +17,9 @@ module Instapusher
17
17
  end
18
18
 
19
19
  def pre_submission_feedback_to_user
20
- puts "url to hit: #{url_to_submit_job.inspect}"
21
- puts "options being passed to the url: #{options.inspect}"
22
- puts "connecting to #{url_to_submit_job} to send data"
20
+ log "url to hit: #{url_to_submit_job.inspect}"
21
+ log "options being passed to the url: #{options.inspect}"
22
+ log "connecting to #{url_to_submit_job} to send data"
23
23
  end
24
24
 
25
25
  def feedback_to_user
@@ -34,14 +34,14 @@ module Instapusher
34
34
  end
35
35
 
36
36
  def submit_the_job
37
- pre_submission_feedback_to_user if debug
37
+ pre_submission_feedback_to_user
38
38
 
39
39
  response = Net::HTTP.post_form URI.parse(url_to_submit_job), options
40
40
  raw_body = response.body
41
- puts "response raw body: #{raw_body}" if debug
41
+ log "response raw body: #{raw_body}"
42
42
 
43
43
  @response_body = ::JSON.parse(raw_body)
44
- puts "JSON parsed response raw body: #{response_body.inspect}" if debug
44
+ log "JSON parsed response raw body: #{response_body.inspect}"
45
45
  @job_status_url = response_body['status_url']
46
46
  end
47
47
 
@@ -63,5 +63,9 @@ module Instapusher
63
63
  !(ENV['INSTAPUSHER_HOST'] || options[:local])
64
64
  end
65
65
 
66
+ def log msg
67
+ puts msg if debug
68
+ end
69
+
66
70
  end
67
71
  end
@@ -1,3 +1,3 @@
1
1
  module Instapusher
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instapusher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neeraj Singh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-08 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashr