casual_helper 0.0.5 → 0.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.
data/lib/casual_helper.rb CHANGED
@@ -108,7 +108,7 @@ module CasualHelper
108
108
 
109
109
  def update_user(user_id, body)
110
110
  return if are_invalid user_id, body
111
- put "#{@api_server.to_s}/v0/users/#{user_id}", body.to_json
111
+ put "#{@api_server.to_s}/v0/users/#{user_id}", body
112
112
  end
113
113
 
114
114
  def add_comment_tap(tap_id, comment_string)
@@ -127,7 +127,7 @@ module CasualHelper
127
127
  end
128
128
 
129
129
  def put(url, body)
130
- response_json = RestClient.put url, body, JSON_CONTENT
130
+ response_json = RestClient.put url, body.to_json, JSON_CONTENT
131
131
  response = JSON.parse(response_json)
132
132
  response['meta']['code'] >= 200 && response['meta']['code'] <= 300
133
133
  rescue => e
@@ -155,9 +155,9 @@ module CasualHelper
155
155
  # always returns nil
156
156
  def log_error(url, message)
157
157
  calling_method = caller[1][/`.*'/][1..-2]
158
- p "Error in #{self.class.name}.#{calling_method}"
159
- p " url: #{url}"
160
- p " message: #{message}"
158
+ p "Error in #{self.class.name}.#{calling_method}\n" <<
159
+ " url: #{url}\n" <<
160
+ " message: #{message}"
161
161
  nil
162
162
  end
163
163
 
@@ -1,3 +1,3 @@
1
1
  module CasualHelper
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - matthewspivey