korboard 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,8 @@ class Korboard::Client
18
18
 
19
19
  # can do this for the rest too
20
20
  # parent_user_id => user_id_of_invitor can be passed in the options
21
- def record_signup identifier,session_id,options={ }
21
+ def record_signup identifier,session_id,options={ },parent_user_id=nil
22
+ options.merge! :signup => { :parent_user_id => parent_user_id} if parent_user_id
22
23
  options.merge! :user_profile => { :session_id => session_id , :user_id => identifier}
23
24
  record :signup,@iteration_number,identifier,options
24
25
  end
@@ -44,13 +45,15 @@ class Korboard::Client
44
45
  end
45
46
 
46
47
  def record metric ,iteration_number, identifier, options ={ }
47
- data = { :signup => { :identifier => identifier }, :iteration => { :number => iteration_number } }
48
+ data = { :signup => { :identifier => identifier}, :iteration => { :number => iteration_number } }
48
49
  data.merge!(options)
49
50
 
50
51
  path = "/v1.1/#{metric.to_s.pluralize}?token=#{@token}"
51
52
 
52
53
  #wrap in a timeout so we don't slow shit down
53
54
  Timeout::timeout(1){
55
+ puts path.inspect
56
+ puts data.to_json.inspect
54
57
  resp, data = @http.post(path, data.to_json, @headers)
55
58
  print_response(resp,data) unless resp.code.to_i == 201
56
59
  return resp.code.to_i == 201
@@ -1,3 +1,3 @@
1
1
  module Korboard
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: korboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000Z
12
+ date: 2012-04-19 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: This gem allows developers to access the Korboard API from their app
15
15
  using Ruby