kontagent 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/kontagent.gemspec +2 -2
- data/lib/kontagent.rb +2 -2
- data/spec/kontagent_spec.rb +12 -0
- metadata +4 -4
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('kontagent', '0.0.
|
5
|
+
Echoe.new('kontagent', '0.0.6') do |p|
|
6
6
|
p.description = "A gem that provides basic integration with Kontagent's REST API"
|
7
7
|
p.url = "http://github.com/gamesthatgive/kontagent"
|
8
8
|
p.author = "Kristofer Goss"
|
data/kontagent.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{kontagent}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Kristofer Goss"]
|
9
|
-
s.date = %q{2010-09-
|
9
|
+
s.date = %q{2010-09-09}
|
10
10
|
s.description = %q{A gem that provides basic integration with Kontagent's REST API}
|
11
11
|
s.email = %q{goss@gamesthatgive.net}
|
12
12
|
s.extra_rdoc_files = ["lib/kontagent.rb"]
|
data/lib/kontagent.rb
CHANGED
@@ -89,7 +89,7 @@ module Kontagent
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def self.track_post_response(options = {})
|
92
|
-
assert_options(options, :
|
92
|
+
assert_options(options, :tag, :channel, :existing_install?)
|
93
93
|
assert_channel(options[:channel])
|
94
94
|
options[:existing_install?] = options[:existing_install?] && 1 || 0
|
95
95
|
call_method("psr", options)
|
@@ -102,7 +102,7 @@ module Kontagent
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def self.track_invite_response(options = {})
|
105
|
-
assert_options(options, :
|
105
|
+
assert_options(options, :tag, :existing_install?)
|
106
106
|
options[:existing_install?] = options[:existing_install?] && 1 || 0
|
107
107
|
call_method("inr", options)
|
108
108
|
end
|
data/spec/kontagent_spec.rb
CHANGED
@@ -154,6 +154,13 @@ describe Kontagent do
|
|
154
154
|
:existing_install? => false)
|
155
155
|
end
|
156
156
|
|
157
|
+
it "should record without a responding user id" do
|
158
|
+
RestClient.should_receive(:get).with("#{Kontagent.base_url}/psr/?i=0&tu=stream&u=12345")
|
159
|
+
Kontagent.track_post_response(:channel => :stream,
|
160
|
+
:tag => 12345,
|
161
|
+
:existing_install? => false)
|
162
|
+
end
|
163
|
+
|
157
164
|
it "should record with subtypes" do
|
158
165
|
RestClient.should_receive(:get).with("#{Kontagent.base_url}/psr/?i=0&r=2&st1=subtype1&st2=subtype2&st3=subtype3&tu=stream&u=12345")
|
159
166
|
Kontagent.track_post_response(:channel => :stream,
|
@@ -300,6 +307,11 @@ describe Kontagent do
|
|
300
307
|
@tag = Kontagent.create_tracking_tag
|
301
308
|
end
|
302
309
|
|
310
|
+
it "should record without responder_uid" do
|
311
|
+
RestClient.should_receive(:get).with("#{Kontagent.base_url}/inr/?i=1&u=#{@tag}")
|
312
|
+
Kontagent.track_invite_response(:existing_install? => true, :tag => @tag)
|
313
|
+
end
|
314
|
+
|
303
315
|
it "should record the response" do
|
304
316
|
RestClient.should_receive(:get).with("#{Kontagent.base_url}/inr/?i=1&r=12345&u=#{@tag}")
|
305
317
|
Kontagent.track_invite_response(:responder_uid => 12345, :existing_install? => true, :tag => @tag)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kontagent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kristofer Goss
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-09 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|