ohmage 0.0.26 → 0.0.27
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 +4 -4
- data/lib/ohmage/client.rb +2 -1
- data/lib/ohmage/entity/campaign.rb +2 -1
- data/lib/ohmage/request.rb +1 -0
- data/lib/ohmage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64c328cf55b9df6ceb1223d0087da1a72166b12f
|
4
|
+
data.tar.gz: 890467c7b121ff0f7297e08a88be4191f56ee322
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3466a84d76e12b5cfb9a5da019ab7c9fad25135f4173aa10d3f58b81132cfb2ef29798ee89f03d6b155054b8024a8c8d103f7d5a7021c48a48ec0c9a8a079f12
|
7
|
+
data.tar.gz: 34f6c3b805a9f73efadf7f20ab1f1c155f398c1dc0cff681503af11cf79495a518968c30abbcc789634e5d060f3cfa257d07bb05046d4136b96d1cc426a11c2e
|
data/lib/ohmage/client.rb
CHANGED
@@ -4,7 +4,7 @@ require 'ohmage/request'
|
|
4
4
|
module Ohmage
|
5
5
|
class Client
|
6
6
|
include Ohmage::API
|
7
|
-
attr_accessor :port, :path, :client_string, :user, :password, :token, :server_config, :server_url
|
7
|
+
attr_accessor :port, :path, :client_string, :user, :password, :token, :server_config, :server_url, :server_debug
|
8
8
|
def initialize(options = {}) # rubocop:disable MethodLength
|
9
9
|
self.server_url = ENV['OHMAGE_SERVER_URL']
|
10
10
|
self.user = ENV['OHMAGE_USER']
|
@@ -12,6 +12,7 @@ module Ohmage
|
|
12
12
|
self.client_string = 'ruby-ohmage'
|
13
13
|
self.path = 'app/'
|
14
14
|
self.port = 443
|
15
|
+
self.server_debug = false
|
15
16
|
options.each do |k, v|
|
16
17
|
instance_variable_set("@#{k}", v)
|
17
18
|
end
|
data/lib/ohmage/request.rb
CHANGED
@@ -68,6 +68,7 @@ module Ohmage
|
|
68
68
|
# so we're going to catch the real ones first, assuming
|
69
69
|
# they are sent from the web server (like 502 or 404)
|
70
70
|
klass = Ohmage::Error::ERRORS[code]
|
71
|
+
puts "\e[36m#{body.inspect}\e[0" if @client.server_debug
|
71
72
|
if klass.nil?
|
72
73
|
# we're not necessarily sure that this really isn't an error
|
73
74
|
# so we have to inspect the response body to look for result:failure
|
data/lib/ohmage/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohmage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Nolen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|