rpx_now 0.6.16 → 0.6.17

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.16
1
+ 0.6.17
data/lib/rpx_now.rb CHANGED
@@ -35,6 +35,13 @@ module RPXNow
35
35
  raise
36
36
  end
37
37
 
38
+ # Post an activity update to the user's activity stream.
39
+ # See more: https://rpxnow.com/docs#api_activity
40
+ def activity(identifier, activity_options, options={})
41
+ options = options.merge(:identifier => identifier, :activity => activity_options.to_json)
42
+ Api.call("activity", options)
43
+ end
44
+
38
45
  # maps an identifier to an primary-key (e.g. user.id)
39
46
  def map(identifier, primary_key, options={})
40
47
  Api.call("map", options.merge(:identifier => identifier, :primaryKey => primary_key))
@@ -150,4 +157,4 @@ module RPXNow
150
157
  class ServerError < RuntimeError; end #backwards compatibility / catch all
151
158
  class ApiError < ServerError; end
152
159
  class ServiceUnavailableError < ServerError; end
153
- end
160
+ end
data/rpx_now.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rpx_now}
8
- s.version = "0.6.16"
8
+ s.version = "0.6.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2010-03-01}
12
+ s.date = %q{2010-03-07}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.markdown"
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
  s.homepage = %q{http://github.com/grosser/rpx_now}
41
41
  s.rdoc_options = ["--charset=UTF-8"]
42
42
  s.require_paths = ["lib"]
43
- s.rubygems_version = %q{1.3.5}
43
+ s.rubygems_version = %q{1.3.6}
44
44
  s.summary = %q{Helper to simplify RPX Now user login/creation}
45
45
  s.test_files = [
46
46
  "spec/spec_helper.rb",
data/spec/rpx_now_spec.rb CHANGED
@@ -296,6 +296,18 @@ describe RPXNow do
296
296
  end
297
297
  end
298
298
 
299
+ describe :activity do
300
+ it "does a api call with the right arguments" do
301
+ RPXNow::Api.should_receive(:request).with("/api/v2/activity", :identifier=>"identifier", :activity=>'{"test":"something"}', :apiKey=>API_KEY).and_return fake_response
302
+ RPXNow.activity('identifier', :test => 'something')
303
+ end
304
+
305
+ it "can pass identifier/apiKey" do
306
+ RPXNow::Api.should_receive(:request).with("/api/v66666/activity", hash_including(:apiKey=>'MYKEY')).and_return fake_response
307
+ RPXNow.activity('identifier', {:test => 'something'}, :apiKey => 'MYKEY', :api_version => '66666')
308
+ end
309
+ end
310
+
299
311
  describe :parse_user_data do
300
312
  it "reads secondary names" do
301
313
  RPXNow.send(:parse_user_data,{'profile'=>{'preferredUsername'=>'1'}}, {})[:name].should == '1'
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpx_now
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.16
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 6
8
+ - 17
9
+ version: 0.6.17
5
10
  platform: ruby
6
11
  authors:
7
12
  - Michael Grosser
@@ -9,19 +14,21 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-01 00:00:00 +01:00
17
+ date: 2010-03-07 00:00:00 +01:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: json_pure
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
30
+ type: :runtime
31
+ version_requirements: *id001
25
32
  description:
26
33
  email: grosser.michael@gmail.com
27
34
  executables: []
@@ -65,18 +72,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
65
72
  requirements:
66
73
  - - ">="
67
74
  - !ruby/object:Gem::Version
75
+ segments:
76
+ - 0
68
77
  version: "0"
69
- version:
70
78
  required_rubygems_version: !ruby/object:Gem::Requirement
71
79
  requirements:
72
80
  - - ">="
73
81
  - !ruby/object:Gem::Version
82
+ segments:
83
+ - 0
74
84
  version: "0"
75
- version:
76
85
  requirements: []
77
86
 
78
87
  rubyforge_project:
79
- rubygems_version: 1.3.5
88
+ rubygems_version: 1.3.6
80
89
  signing_key:
81
90
  specification_version: 3
82
91
  summary: Helper to simplify RPX Now user login/creation