Permalink
Browse files

fix failed deprecations

  • Loading branch information...
1 parent 786040b commit 7f8598aa76baab9ff38b58dd76d58e1e3159eb03 @jerrod committed Oct 10, 2013
Showing with 106 additions and 77 deletions.
  1. +90 −73 Gemfile.lock
  2. +16 −4 lib/janrain/capture/user.rb
View
@@ -9,102 +9,117 @@ PATH
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.1)
- actionpack (= 3.1.1)
- mail (~> 2.3.0)
- actionpack (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
+ actionmailer (3.2.14)
+ actionpack (= 3.2.14)
+ mail (~> 2.5.4)
+ actionpack (3.2.14)
+ activemodel (= 3.2.14)
+ activesupport (= 3.2.14)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.2)
- rack-cache (~> 1.1)
- rack-mount (~> 0.8.2)
+ journey (~> 1.0.4)
+ rack (~> 1.4.5)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.2)
- activemodel (3.1.1)
- activesupport (= 3.1.1)
+ sprockets (~> 2.2.1)
+ activemodel (3.2.14)
+ activesupport (= 3.2.14)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
- arel (~> 2.2.1)
+ activerecord (3.2.14)
+ activemodel (= 3.2.14)
+ activesupport (= 3.2.14)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.1)
- activemodel (= 3.1.1)
- activesupport (= 3.1.1)
- activesupport (3.1.1)
+ activeresource (3.2.14)
+ activemodel (= 3.2.14)
+ activesupport (= 3.2.14)
+ activesupport (3.2.14)
+ i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
archive-tar-minitar (0.5.2)
- arel (2.2.1)
+ arel (3.0.2)
artifice (0.6)
rack-test
- bitfields (0.4.0)
- builder (3.0.0)
- columnize (0.3.4)
- database_cleaner (0.7.0)
+ bitfields (0.4.3)
+ builder (3.0.4)
+ coderay (1.0.9)
+ columnize (0.3.6)
+ database_cleaner (1.2.0)
diff-lcs (1.1.3)
erubis (2.7.0)
- ffi (1.0.10)
+ ffi (1.9.0)
+ formatador (0.2.4)
generator_spec (0.8.3)
rails (~> 3.0)
rspec-rails
- guard (0.8.8)
- thor (~> 0.14.6)
- guard-bundler (0.1.3)
- bundler (>= 1.0.0)
- guard (>= 0.2.2)
- guard-rspec (0.5.2)
- guard (>= 0.8.4)
- hike (1.2.1)
- httparty (0.8.1)
- multi_json
- multi_xml
- i18n (0.6.0)
- json (1.6.1)
+ guard (1.8.3)
+ formatador (>= 0.2.4)
+ listen (~> 1.3)
+ lumberjack (>= 1.0.2)
+ pry (>= 0.9.10)
+ thor (>= 0.14.6)
+ guard-bundler (1.0.0)
+ bundler (~> 1.0)
+ guard (~> 1.1)
+ guard-rspec (1.2.1)
+ guard (>= 1.1)
+ hike (1.2.3)
+ httparty (0.11.0)
+ multi_json (~> 1.0)
+ multi_xml (>= 0.5.2)
+ i18n (0.6.5)
+ journey (1.0.4)
+ json (1.8.0)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
- mail (2.3.0)
- i18n (>= 0.4.0)
+ listen (1.3.1)
+ rb-fsevent (>= 0.9.3)
+ rb-inotify (>= 0.9)
+ rb-kqueue (>= 0.2)
+ lumberjack (1.0.4)
+ mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.17.2)
- multi_json (1.0.3)
- multi_xml (0.4.1)
+ method_source (0.8.2)
+ mime-types (1.25)
+ multi_json (1.8.1)
+ multi_xml (0.5.5)
polyglot (0.3.3)
- rack (1.3.5)
- rack-cache (1.1)
+ pry (0.9.12.2)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.4)
+ rack (1.4.5)
+ rack-cache (1.2)
rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
- rack-ssl (1.3.2)
+ rack-ssl (1.3.3)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.1.1)
- actionmailer (= 3.1.1)
- actionpack (= 3.1.1)
- activerecord (= 3.1.1)
- activeresource (= 3.1.1)
- activesupport (= 3.1.1)
+ rails (3.2.14)
+ actionmailer (= 3.2.14)
+ actionpack (= 3.2.14)
+ activerecord (= 3.2.14)
+ activeresource (= 3.2.14)
+ activesupport (= 3.2.14)
bundler (~> 1.0)
- railties (= 3.1.1)
- railties (3.1.1)
- actionpack (= 3.1.1)
- activesupport (= 3.1.1)
+ railties (= 3.2.14)
+ railties (3.2.14)
+ actionpack (= 3.2.14)
+ activesupport (= 3.2.14)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.6)
- rake (0.9.2.2)
- rb-fchange (0.0.5)
+ thor (>= 0.14.6, < 2.0)
+ rake (10.1.0)
+ rb-fchange (0.0.6)
ffi
- rb-fsevent (0.4.3.1)
- rb-inotify (0.8.8)
+ rb-fsevent (0.9.3)
+ rb-inotify (0.9.2)
ffi (>= 0.5.0)
- rdoc (3.11)
+ rb-kqueue (0.2.0)
+ ffi (>= 0.5.0)
+ rdoc (3.12.2)
json (~> 1.4)
rspec (2.6.0)
rspec-core (~> 2.6.0)
@@ -129,19 +144,21 @@ GEM
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
- sprockets (2.0.3)
+ slop (3.4.6)
+ sprockets (2.2.2)
hike (~> 1.2)
+ multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.4)
+ sqlite3 (1.3.8)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.14.6)
- tilt (1.3.3)
- treetop (1.4.10)
+ tilt (1.4.1)
+ treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.30)
+ tzinfo (0.3.38)
PLATFORMS
ruby
@@ -4,10 +4,21 @@ module Janrain::Capture::User
included do
before_validation :default_permissions_and_flags_if_nil
before_save :update_capture_with_changes
+ attr_accessor :failed
+
+ def failed
+ @failed
+ end
+
+ def failed=(value)
+ @failed = value
+ end
end
module ClassMethods
include Janrain::Capture
+
+
def authenticate(code, options={})
# XXX: lets support password auth at some point
oauth = Client::Oauth.token(code, options)
@@ -126,10 +137,10 @@ def persist_to_capture(only_changes = false, persist = true)
end
else
if response['stat'] == 'ok'
- self[:failed] = false
+ self.failed = false
self[:capture_id] = self.capture_id
else
- self[:failed] = true
+ self.failed = true
end
end
# return capture id
@@ -141,7 +152,7 @@ def persist_to_capture(only_changes = false, persist = true)
if persisted? and persist
update_attribute(:failed, true)
else
- self[:failed] = true
+ self.failed = true
end
end
end
@@ -192,7 +203,8 @@ def oauth=(oauth)
self[:access_token] = oauth['access_token']
self[:expires_at] = Time.now + oauth['expires_in'].seconds
end
-
+
+
private
def update_capture_with_changes

0 comments on commit 7f8598a

Please sign in to comment.