rightmove_wrangler 0.1.13 → 0.1.14

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.
@@ -87,7 +87,7 @@ module RightmoveWrangler
87
87
  end
88
88
  threads.each do |t|
89
89
  t.join
90
- $stdout.puts t[:output]
90
+ t[:output].each { |s| $stdout.puts s }
91
91
  end
92
92
  rescue Exception => ex
93
93
  $stderr.puts ex.inspect
@@ -185,10 +185,11 @@ module RightmoveWrangler
185
185
  end
186
186
 
187
187
  def post!(payload)
188
- Thread.current[:output] = "Posting the following data: #{payload.inspect}"
188
+ Thread.current[:output] ||= []
189
+ Thread.current[:output] << "Posting the following data: #{payload.inspect}"
189
190
 
190
191
  if @options[:url].nil?
191
- Thread.current[:output] = "Missing a URL to post the data to"
192
+ Thread.current[:output] << "Missing a URL to post the data to"
192
193
  end
193
194
 
194
195
  uri = Addressable::URI.parse(@options[:url])
@@ -203,10 +204,10 @@ module RightmoveWrangler
203
204
  response = conn.post uri.path, params
204
205
 
205
206
  if response.status == 200
206
- Thread.current[:output] = "Server returned a successful response"
207
+ Thread.current[:output] << "Server returned a successful response"
207
208
  return true
208
209
  else
209
- Thread.current[:output] = "Non 200 response returned from API: #{response.inspect}"
210
+ Thread.current[:output] << "Non 200 response returned from API: #{response.inspect}"
210
211
  return false
211
212
  end
212
213
  end
@@ -1,3 +1,3 @@
1
1
  module RightmoveWrangler
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rightmove_wrangler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: