simperium 0.0.2.2 → 0.0.2.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2.2
1
+ 0.0.2.3
data/lib/simperium.rb CHANGED
@@ -357,7 +357,7 @@ module Simperium
357
357
  end
358
358
  end
359
359
 
360
- class User
360
+ class SPUser
361
361
  def initialize(appname, auth_token, options={})
362
362
  defaults = {:host=>nil, :scheme=>'https', :clientid=>nil}
363
363
  unless options.empty?
@@ -376,11 +376,11 @@ module Simperium
376
376
  end
377
377
 
378
378
  def get
379
- return @bucket.get(@userid)
379
+ return @bucket.get('info')
380
380
  end
381
381
 
382
382
  def post(data)
383
- @bucket.post(@userid, data)
383
+ @bucket.post('info', data)
384
384
  end
385
385
  end
386
386
 
@@ -396,8 +396,8 @@ module Simperium
396
396
  def method_missing(method_sym, *arguments, &block)
397
397
  #the first argument is a Symbol, so you need to_s it you want to pattern match
398
398
  unless method_sym.to_s =~ /=$/
399
- if method_sym.to_s == 'user'
400
- @getitem[method_sym] ||= User.new(@appname, @token)
399
+ if method_sym.to_s == 'spuser'
400
+ @getitem[method_sym] ||= SPUser.new(@appname, @token)
401
401
  else
402
402
  @getitem[method_sym] ||= Bucket.new(@appname, @token, method_sym)
403
403
  end
@@ -64,9 +64,9 @@ In order to begin mirroring data from Simperium to MongoHQ, we need to install t
64
64
  Grab a copy of the listner file that handles mirroring between MongoHQ and Simperium:
65
65
 
66
66
  :::term
67
- $ curl -O https://raw.github.com/Simperium/simperium/master/ruby/lib/simperium/listener-export-mongohq.rb
67
+ $ curl -O https://raw.github.com/Simperium/simperium/master/ruby/lib/simperium/listener-export-mongohq
68
68
 
69
- Install the mongo gem:
69
+ Install the mongo gem and bson_ext dependency:
70
70
 
71
71
  :::term
72
72
  $ sudo gem update --system
@@ -149,5 +149,4 @@ All Simperium support and runtime issues should be logged with Heroku Support at
149
149
 
150
150
  Additional resources are available at:
151
151
 
152
- * [Site docs](http://simperium.com/docs/reference)
153
- * [Some screencast](https://simperium.com)
152
+ * [Site docs](http://simperium.com/docs/reference)
@@ -1,3 +1,3 @@
1
1
  module Simperium
2
- VERSION = '0.0.2.2'
2
+ VERSION = '0.0.2.3'
3
3
  end
@@ -66,7 +66,7 @@ class TestSimperiumRuby < Test::Unit::TestCase
66
66
  end
67
67
 
68
68
  def test_user_get
69
- user = Simperium::User.new(@@appname, get_auth_token)
69
+ user = Simperium::SPUser.new(@@appname, get_auth_token)
70
70
  user.post({'x'=> 1})
71
71
  assert_equal(user.get, {'x'=> 1})
72
72
  end
@@ -83,6 +83,6 @@ class TestSimperiumRuby < Test::Unit::TestCase
83
83
 
84
84
  def test_api_user
85
85
  api = Simperium::Api.new(@@appname, get_auth_token)
86
- assert_instance_of(Simperium::User, api.user, "api.user should be an instance of User")
86
+ assert_instance_of(Simperium::SPUser, api.spuser, "api.spuser should be an instance of SPUser")
87
87
  end
88
88
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simperium
3
3
  version: !ruby/object:Gem::Version
4
- hash: 67
4
+ hash: 65
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 2
10
- - 2
11
- version: 0.0.2.2
10
+ - 3
11
+ version: 0.0.2.3
12
12
  platform: ruby
13
13
  authors:
14
14
  - Ray Ventura
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-06-21 00:00:00 Z
19
+ date: 2012-06-23 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rest-client