checkdin 0.1.0 → 0.2.0
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/Gemfile +2 -16
- data/Gemfile.lock +20 -15
- data/Rakefile +3 -25
- data/lib/checkdin/client.rb +1 -1
- data/lib/checkdin/user_bridge.rb +85 -0
- data/lib/checkdin/version.rb +3 -0
- data/lib/checkdin.rb +13 -15
- data/spec/checkdin/client_spec.rb +5 -1
- data/spec/checkdin/user_bridge_spec.rb +135 -0
- metadata +118 -102
- data/VERSION +0 -1
- data/spec/checkdin_spec.rb +0 -6
data/Gemfile
CHANGED
@@ -1,18 +1,4 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
gem 'hashie', '~> 1.0'
|
6
|
-
|
7
|
-
|
8
|
-
# Add dependencies to develop your gem here.
|
9
|
-
# Include everything needed to run rake, tests, features, etc.
|
10
|
-
group :development do
|
11
|
-
gem "rspec", "~> 2.8.0"
|
12
|
-
gem "rdoc", "~> 3.12"
|
13
|
-
gem "bundler", "~> 1.0.0"
|
14
|
-
gem "jeweler", "~> 1.8.3"
|
15
|
-
gem "simplecov"
|
16
|
-
gem 'webmock'
|
17
|
-
gem 'vcr'
|
18
|
-
end
|
3
|
+
# Specify your gem's dependencies in checkdin.gemspec
|
4
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
checkdin (0.2.0)
|
5
|
+
activesupport (>= 2.0.3)
|
6
|
+
faraday (>= 0.6, < 0.8)
|
7
|
+
faraday_middleware (>= 0.8)
|
8
|
+
hashie (~> 1.0)
|
9
|
+
|
1
10
|
GEM
|
2
11
|
remote: http://rubygems.org/
|
3
12
|
specs:
|
4
|
-
|
13
|
+
activesupport (3.2.2)
|
14
|
+
i18n (~> 0.6)
|
15
|
+
multi_json (~> 1.0)
|
16
|
+
addressable (2.2.7)
|
5
17
|
crack (0.3.1)
|
6
18
|
diff-lcs (1.1.3)
|
7
19
|
faraday (0.7.6)
|
@@ -10,18 +22,12 @@ GEM
|
|
10
22
|
rack (~> 1.1)
|
11
23
|
faraday_middleware (0.8.4)
|
12
24
|
faraday (>= 0.7.4, < 0.9)
|
13
|
-
git (1.2.5)
|
14
25
|
hashie (1.2.0)
|
15
|
-
|
16
|
-
bundler (~> 1.0)
|
17
|
-
git (>= 1.2.5)
|
18
|
-
rake
|
19
|
-
rdoc
|
26
|
+
i18n (0.6.0)
|
20
27
|
json (1.6.5)
|
21
28
|
multi_json (1.0.4)
|
22
29
|
multipart-post (1.1.5)
|
23
30
|
rack (1.4.1)
|
24
|
-
rake (0.9.2.2)
|
25
31
|
rdoc (3.12)
|
26
32
|
json (~> 1.4)
|
27
33
|
rspec (2.8.0)
|
@@ -36,6 +42,7 @@ GEM
|
|
36
42
|
multi_json (~> 1.0.3)
|
37
43
|
simplecov-html (~> 0.5.3)
|
38
44
|
simplecov-html (0.5.3)
|
45
|
+
timecop (0.3.5)
|
39
46
|
vcr (1.11.3)
|
40
47
|
webmock (1.7.10)
|
41
48
|
addressable (~> 2.2, > 2.2.5)
|
@@ -46,12 +53,10 @@ PLATFORMS
|
|
46
53
|
|
47
54
|
DEPENDENCIES
|
48
55
|
bundler (~> 1.0.0)
|
49
|
-
|
50
|
-
faraday_middleware (>= 0.8)
|
51
|
-
hashie (~> 1.0)
|
52
|
-
jeweler (~> 1.8.3)
|
56
|
+
checkdin!
|
53
57
|
rdoc (~> 3.12)
|
54
58
|
rspec (~> 2.8.0)
|
55
|
-
simplecov
|
56
|
-
|
57
|
-
|
59
|
+
simplecov (~> 0.5.4)
|
60
|
+
timecop
|
61
|
+
vcr (~> 1.11.3)
|
62
|
+
webmock (~> 1.7.10)
|
data/Rakefile
CHANGED
@@ -1,29 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
4
|
-
require 'bundler'
|
5
|
-
begin
|
6
|
-
Bundler.setup(:default, :development)
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
11
|
-
end
|
12
|
-
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "checkdin"
|
18
|
-
gem.homepage = "http://github.com/mattmueller/checkdin"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{Ruby gem for interacting with the checkd.in API.}
|
21
|
-
gem.description = %Q{Ruby gem for interacting with the checkd.in API. See http://checkd.in or http://developer.checkd.in for more information.}
|
22
|
-
gem.email = "muellermr@gmail.com"
|
23
|
-
gem.authors = ["Matt Mueller"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
3
|
+
require "bundler/gem_tasks"
|
27
4
|
|
28
5
|
require 'rspec/core'
|
29
6
|
require 'rspec/core/rake_task'
|
@@ -40,7 +17,8 @@ task :default => :spec
|
|
40
17
|
|
41
18
|
require 'rdoc/task'
|
42
19
|
Rake::RDocTask.new do |rdoc|
|
43
|
-
|
20
|
+
require 'checkdin/version'
|
21
|
+
version = Checkdin::VERSION
|
44
22
|
|
45
23
|
rdoc.rdoc_dir = 'rdoc'
|
46
24
|
rdoc.title = "checkdin #{version}"
|
data/lib/checkdin/client.rb
CHANGED
@@ -0,0 +1,85 @@
|
|
1
|
+
module Checkdin
|
2
|
+
class UserBridge
|
3
|
+
CHECKDIN_DEFAULT_LANDING = 'https://app.checkd.in/user_landing?'
|
4
|
+
|
5
|
+
attr :client_identifier, :bridge_secret
|
6
|
+
attr :checkdin_landing_url
|
7
|
+
|
8
|
+
# Used to build the authenticated parameters for logging in an end-user on
|
9
|
+
# checkd.in via a redirect.
|
10
|
+
#
|
11
|
+
# options - a hash with a the following values defined:
|
12
|
+
# :client_identifier - REQUIRED, the same client identifier used when accessing the regular
|
13
|
+
# API methods.
|
14
|
+
# :bridge_secret - REQUIRED, previously agreed upon shared secret for the user bridge.
|
15
|
+
# This is NOT the shared secret used for accessing the backend API,
|
16
|
+
# please do not confuse the two.
|
17
|
+
# :checkdin_landing_url - OPTIONAL, the value will default to CHECKDIN_DEFAULT_LANDING
|
18
|
+
# if not given. Please set this value as directed by Checkd In.
|
19
|
+
#
|
20
|
+
# Examples
|
21
|
+
#
|
22
|
+
# bridge = Checkdin::UserBridge.new(:client_identifier => 'YOUR_ASSIGNED_CLIENT_IDENTIFIER',
|
23
|
+
# :bridge_secret => 'YOUR_ASSIGNED_BRIDGE_SECRET')
|
24
|
+
# redirect_to bridge.login_url(:email => 'bob@example.com',
|
25
|
+
# :user_identifier => '112-fixed-user-identifier')
|
26
|
+
#
|
27
|
+
def initialize options
|
28
|
+
@client_identifier = options.delete(:client_identifier) or raise ArgumentError.new("No :client_identifier given")
|
29
|
+
@bridge_secret = options.delete(:bridge_secret) or raise ArgumentError.new("No :bridge_secret given")
|
30
|
+
|
31
|
+
@checkdin_landing_url = options.delete(:checkdin_landing_url) || CHECKDIN_DEFAULT_LANDING
|
32
|
+
|
33
|
+
raise ArgumentError.new("Unknown arguments given: #{options.keys.inspect}") unless options.empty?
|
34
|
+
end
|
35
|
+
|
36
|
+
# Public: Build a full signed url for logging a specific user into checkd.in. Notice:
|
37
|
+
# you MUST NOT reuse the result of this method, as it expires automatically based on time.
|
38
|
+
#
|
39
|
+
# options - a hash with the following values defined:
|
40
|
+
# email - REQUIRED, email address of the user, MAY have different values for a given
|
41
|
+
# user over time.
|
42
|
+
# user_identifier - REQUIRED, your unique identifier for the user, MUST NOT change over time.
|
43
|
+
# authentication_action - OPTIONAL, the given action will be performed immediately,
|
44
|
+
# and the user redirected back to your site afterwards.
|
45
|
+
#
|
46
|
+
# Returns a URL you can use for redirecting a user. Notice this will expire, so it should
|
47
|
+
# be generated and used only when a user actually wants to log into checkd.in.
|
48
|
+
def login_url options
|
49
|
+
email = options.delete(:email) or raise ArgumentError.new("No :email passed for user")
|
50
|
+
user_identifier = options.delete(:user_identifier) or raise ArgumentError.new("No :user_identifier passed for user")
|
51
|
+
authentication_action = options.delete(:authentication_action)
|
52
|
+
|
53
|
+
authenticated_parameters = build_authenticated_parameters(email, user_identifier, authentication_action)
|
54
|
+
|
55
|
+
[checkdin_landing_url, authenticated_parameters.to_query].join
|
56
|
+
end
|
57
|
+
|
58
|
+
# Private: Build a signed hash of parameters for redirecting the user to checkd.in.
|
59
|
+
#
|
60
|
+
# Returns a hash including a secure message digest and the current timestamp
|
61
|
+
def build_authenticated_parameters email, user_identifier, authentication_action = nil
|
62
|
+
build_request(email, user_identifier, authentication_action).tap do |request|
|
63
|
+
request['digest'] = digest_request(request)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
def build_request email, user_identifier, authentication_action
|
69
|
+
{
|
70
|
+
'auth_timestamp' => Time.now.to_i,
|
71
|
+
'client_id' => client_identifier,
|
72
|
+
'client_uid' => user_identifier,
|
73
|
+
'email' => email,
|
74
|
+
}.tap do |request|
|
75
|
+
request['authentication_action'] = authentication_action if authentication_action
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def digest_request request
|
80
|
+
encoded_request = request.to_query
|
81
|
+
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA256.new, bridge_secret, encoded_request)
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
end
|
data/lib/checkdin.rb
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'faraday_middleware'
|
3
3
|
|
4
|
-
|
4
|
+
require 'openssl'
|
5
|
+
require 'active_support/core_ext/object/to_query'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
7
|
+
require 'checkdin/version'
|
8
|
+
require 'checkdin/leaderboard'
|
9
|
+
require 'checkdin/custom_activities'
|
10
|
+
require 'checkdin/users'
|
11
|
+
require 'checkdin/user_bridge'
|
12
|
+
require 'checkdin/activities'
|
13
|
+
require 'checkdin/won_rewards'
|
14
|
+
require 'checkdin/promotions'
|
15
|
+
require 'checkdin/campaigns'
|
16
|
+
require 'checkdin/client'
|
17
|
+
require 'checkdin/api_error'
|
@@ -0,0 +1,135 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'timecop'
|
3
|
+
|
4
|
+
describe Checkdin::UserBridge, 'constructor' do
|
5
|
+
let(:default_options) {{
|
6
|
+
:client_identifier => 'my-client',
|
7
|
+
:bridge_secret => 'never-tell-123'
|
8
|
+
}}
|
9
|
+
|
10
|
+
it "can be instantiated with identifier and bridge secret" do
|
11
|
+
instance = Checkdin::UserBridge.new(default_options)
|
12
|
+
instance.client_identifier.should == 'my-client'
|
13
|
+
instance.bridge_secret.should == 'never-tell-123'
|
14
|
+
end
|
15
|
+
|
16
|
+
it "has a usable default checkdin_landing_url" do
|
17
|
+
instance = Checkdin::UserBridge.new(default_options)
|
18
|
+
instance.checkdin_landing_url.should == 'https://app.checkd.in/user_landing?'
|
19
|
+
end
|
20
|
+
|
21
|
+
it "can optionally set the checkdin_landing_url directly" do
|
22
|
+
landing_url = stub('land here')
|
23
|
+
instance = Checkdin::UserBridge.new(default_options.merge(:checkdin_landing_url => landing_url))
|
24
|
+
instance.checkdin_landing_url.should == landing_url
|
25
|
+
end
|
26
|
+
|
27
|
+
it "raises an error on unknown arguments" do
|
28
|
+
expect do
|
29
|
+
Checkdin::UserBridge.new(default_options.merge(:misspelled_option => 'error me'))
|
30
|
+
end.to raise_error(ArgumentError, /misspelled_option/)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe Checkdin::UserBridge, '#login_url' do
|
35
|
+
let(:instance) { Checkdin::UserBridge.new(:client_identifier => client_identifier,
|
36
|
+
:bridge_secret => bridge_secret,
|
37
|
+
:checkdin_landing_url => checkdin_landing_url) }
|
38
|
+
subject { instance.login_url(:email => user_email,
|
39
|
+
:user_identifier => user_identifier,
|
40
|
+
:authentication_action => authentication_action) }
|
41
|
+
let(:client_identifier) { 'client-1704' }
|
42
|
+
let(:bridge_secret) { '123-shared-secret' }
|
43
|
+
let(:user_email) { 'bob@example.com' }
|
44
|
+
let(:user_identifier) { '17-batch1-bob' }
|
45
|
+
let(:authentication_action) { nil }
|
46
|
+
let(:checkdin_landing_url) { nil }
|
47
|
+
let(:timestamp) { 1325605589 }
|
48
|
+
|
49
|
+
context "no custom domain set" do
|
50
|
+
it "should output a url for app.checkd.in using https" do
|
51
|
+
subject.should =~ /^https:\/\/app\.checkd\.in/
|
52
|
+
end
|
53
|
+
|
54
|
+
it "should include the correct timestamp" do
|
55
|
+
Timecop.freeze(Time.at(timestamp)) do
|
56
|
+
subject.should include('auth_timestamp=1325605589')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
it "returns a fully usable result" do
|
61
|
+
Timecop.freeze(Time.at(timestamp)) do
|
62
|
+
subject.should == "https://app.checkd.in/user_landing?auth_timestamp=1325605589&client_id=client-1704&client_uid=17-batch1-bob&digest=2ca9aca03aa115495e7ce50c941e0efce6e8aeb11480cde04fd1b03110c174ff&email=bob%40example.com"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context "with an optional action set" do
|
67
|
+
let(:authentication_action) { 'authenticate_facebook' }
|
68
|
+
|
69
|
+
it "includes the authentication_action" do
|
70
|
+
Timecop.freeze(Time.at(timestamp)) do
|
71
|
+
subject.should == "https://app.checkd.in/user_landing?auth_timestamp=1325605589&authentication_action=authenticate_facebook&client_id=client-1704&client_uid=17-batch1-bob&digest=f27f0b46e8fb383f53e48d02da51be05f573d4aa80d727acfe08d2cc76db2861&email=bob%40example.com"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
context "custom subdomain" do
|
78
|
+
let(:checkdin_landing_url) { 'https://grace.checkd.in/user_landing?' }
|
79
|
+
it "uses it" do
|
80
|
+
Timecop.freeze(Time.at(timestamp)) do
|
81
|
+
subject.should == "https://grace.checkd.in/user_landing?auth_timestamp=1325605589&client_id=client-1704&client_uid=17-batch1-bob&digest=2ca9aca03aa115495e7ce50c941e0efce6e8aeb11480cde04fd1b03110c174ff&email=bob%40example.com"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
context "custom domain" do
|
87
|
+
let(:checkdin_landing_url) { 'http://checkin.example.com/my_landing?' }
|
88
|
+
it "uses it" do
|
89
|
+
Timecop.freeze(Time.at(timestamp)) do
|
90
|
+
subject.should == "http://checkin.example.com/my_landing?auth_timestamp=1325605589&client_id=client-1704&client_uid=17-batch1-bob&digest=2ca9aca03aa115495e7ce50c941e0efce6e8aeb11480cde04fd1b03110c174ff&email=bob%40example.com"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
describe Checkdin::UserBridge, '#build_authenticated_parameters' do
|
97
|
+
let(:instance) { Checkdin::UserBridge.new(:client_identifier => client_identifier, :bridge_secret => bridge_secret) }
|
98
|
+
subject { instance.build_authenticated_parameters(user_email, user_identifier) }
|
99
|
+
let(:client_identifier) { 'client-1704' }
|
100
|
+
let(:bridge_secret) { '123-shared-secret' }
|
101
|
+
let(:user_email) { 'bob@example.com' }
|
102
|
+
let(:user_identifier) { '17-batch1-bob' }
|
103
|
+
let(:timestamp) { 1325605589 }
|
104
|
+
|
105
|
+
it "should output a hash with timestamp and digest included" do
|
106
|
+
Timecop.freeze(Time.at(timestamp)) do
|
107
|
+
subject.should == {
|
108
|
+
'auth_timestamp' => timestamp,
|
109
|
+
'client_id' => client_identifier,
|
110
|
+
'client_uid' => user_identifier,
|
111
|
+
'email' => user_email,
|
112
|
+
'digest' => '2ca9aca03aa115495e7ce50c941e0efce6e8aeb11480cde04fd1b03110c174ff'
|
113
|
+
}
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
context "with an authenticated action" do
|
118
|
+
subject { instance.build_authenticated_parameters(user_email, user_identifier, authentication_action) }
|
119
|
+
let(:authentication_action) { 'authenticate_facebook' }
|
120
|
+
|
121
|
+
it "should output a hash with a different digest and the authenticated_action included" do
|
122
|
+
Timecop.freeze(Time.at(timestamp)) do
|
123
|
+
subject.should == {
|
124
|
+
'auth_timestamp' => timestamp,
|
125
|
+
'authentication_action' => authentication_action,
|
126
|
+
'client_id' => client_identifier,
|
127
|
+
'client_uid' => user_identifier,
|
128
|
+
'email' => user_email,
|
129
|
+
'digest' => 'f27f0b46e8fb383f53e48d02da51be05f573d4aa80d727acfe08d2cc76db2861'
|
130
|
+
}
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
end
|
metadata
CHANGED
@@ -1,138 +1,152 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkdin
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.2.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Matt Mueller
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-02-14 00:00:00 -06:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
15
17
|
name: faraday
|
16
|
-
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
20
|
none: false
|
18
|
-
requirements:
|
21
|
+
requirements:
|
22
|
+
- - ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0.6"
|
19
25
|
- - <
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
- - ! '>='
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: '0.6'
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: "0.8"
|
25
28
|
type: :runtime
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
+
version_requirements: *id001
|
30
|
+
- !ruby/object:Gem::Dependency
|
29
31
|
name: faraday_middleware
|
30
|
-
|
32
|
+
prerelease: false
|
33
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
34
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: "0.8"
|
36
39
|
type: :runtime
|
37
|
-
|
38
|
-
|
39
|
-
- !ruby/object:Gem::Dependency
|
40
|
+
version_requirements: *id002
|
41
|
+
- !ruby/object:Gem::Dependency
|
40
42
|
name: hashie
|
41
|
-
|
43
|
+
prerelease: false
|
44
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
45
|
none: false
|
43
|
-
requirements:
|
46
|
+
requirements:
|
44
47
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: "1.0"
|
47
50
|
type: :runtime
|
51
|
+
version_requirements: *id003
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: activesupport
|
48
54
|
prerelease: false
|
49
|
-
|
50
|
-
|
55
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.0.3
|
61
|
+
type: :runtime
|
62
|
+
version_requirements: *id004
|
63
|
+
- !ruby/object:Gem::Dependency
|
51
64
|
name: rspec
|
52
|
-
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
53
67
|
none: false
|
54
|
-
requirements:
|
68
|
+
requirements:
|
55
69
|
- - ~>
|
56
|
-
- !ruby/object:Gem::Version
|
70
|
+
- !ruby/object:Gem::Version
|
57
71
|
version: 2.8.0
|
58
72
|
type: :development
|
59
|
-
|
60
|
-
|
61
|
-
- !ruby/object:Gem::Dependency
|
73
|
+
version_requirements: *id005
|
74
|
+
- !ruby/object:Gem::Dependency
|
62
75
|
name: rdoc
|
63
|
-
|
76
|
+
prerelease: false
|
77
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
64
78
|
none: false
|
65
|
-
requirements:
|
79
|
+
requirements:
|
66
80
|
- - ~>
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version:
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: "3.12"
|
69
83
|
type: :development
|
70
|
-
|
71
|
-
|
72
|
-
- !ruby/object:Gem::Dependency
|
84
|
+
version_requirements: *id006
|
85
|
+
- !ruby/object:Gem::Dependency
|
73
86
|
name: bundler
|
74
|
-
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
75
89
|
none: false
|
76
|
-
requirements:
|
90
|
+
requirements:
|
77
91
|
- - ~>
|
78
|
-
- !ruby/object:Gem::Version
|
92
|
+
- !ruby/object:Gem::Version
|
79
93
|
version: 1.0.0
|
80
94
|
type: :development
|
95
|
+
version_requirements: *id007
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: simplecov
|
81
98
|
prerelease: false
|
82
|
-
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: jeweler
|
85
|
-
requirement: &70339789387820 !ruby/object:Gem::Requirement
|
99
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
86
100
|
none: false
|
87
|
-
requirements:
|
101
|
+
requirements:
|
88
102
|
- - ~>
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.5.4
|
91
105
|
type: :development
|
106
|
+
version_requirements: *id008
|
107
|
+
- !ruby/object:Gem::Dependency
|
108
|
+
name: webmock
|
92
109
|
prerelease: false
|
93
|
-
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: simplecov
|
96
|
-
requirement: &70339789387340 !ruby/object:Gem::Requirement
|
110
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
97
111
|
none: false
|
98
|
-
requirements:
|
99
|
-
- -
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version:
|
112
|
+
requirements:
|
113
|
+
- - ~>
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: 1.7.10
|
102
116
|
type: :development
|
117
|
+
version_requirements: *id009
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
name: vcr
|
103
120
|
prerelease: false
|
104
|
-
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: webmock
|
107
|
-
requirement: &70339789386860 !ruby/object:Gem::Requirement
|
121
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
108
122
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version:
|
123
|
+
requirements:
|
124
|
+
- - ~>
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 1.11.3
|
113
127
|
type: :development
|
128
|
+
version_requirements: *id010
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: timecop
|
114
131
|
prerelease: false
|
115
|
-
|
116
|
-
- !ruby/object:Gem::Dependency
|
117
|
-
name: vcr
|
118
|
-
requirement: &70339789386380 !ruby/object:Gem::Requirement
|
132
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
119
133
|
none: false
|
120
|
-
requirements:
|
121
|
-
- -
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version:
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: "0"
|
124
138
|
type: :development
|
125
|
-
|
126
|
-
|
127
|
-
description: Ruby gem for interacting with the checkd.in API. See http://checkd.in
|
128
|
-
or http://developer.checkd.in for more information.
|
139
|
+
version_requirements: *id011
|
140
|
+
description: Ruby gem for interacting with the checkd.in API. See http://checkd.in or http://developer.checkd.in for more information.
|
129
141
|
email: muellermr@gmail.com
|
130
142
|
executables: []
|
143
|
+
|
131
144
|
extensions: []
|
132
|
-
|
145
|
+
|
146
|
+
extra_rdoc_files:
|
133
147
|
- LICENSE.txt
|
134
148
|
- README.rdoc
|
135
|
-
files:
|
149
|
+
files:
|
136
150
|
- .document
|
137
151
|
- .rspec
|
138
152
|
- Gemfile
|
@@ -140,7 +154,6 @@ files:
|
|
140
154
|
- LICENSE.txt
|
141
155
|
- README.rdoc
|
142
156
|
- Rakefile
|
143
|
-
- VERSION
|
144
157
|
- lib/checkdin.rb
|
145
158
|
- lib/checkdin/activities.rb
|
146
159
|
- lib/checkdin/api_error.rb
|
@@ -150,6 +163,8 @@ files:
|
|
150
163
|
- lib/checkdin/leaderboard.rb
|
151
164
|
- lib/checkdin/promotions.rb
|
152
165
|
- lib/checkdin/users.rb
|
166
|
+
- lib/checkdin/user_bridge.rb
|
167
|
+
- lib/checkdin/version.rb
|
153
168
|
- lib/checkdin/won_rewards.rb
|
154
169
|
- spec/checkdin/activities_spec.rb
|
155
170
|
- spec/checkdin/campaigns_spec.rb
|
@@ -158,8 +173,8 @@ files:
|
|
158
173
|
- spec/checkdin/leaderboard_spec.rb
|
159
174
|
- spec/checkdin/promotions_spec.rb
|
160
175
|
- spec/checkdin/users_spec.rb
|
176
|
+
- spec/checkdin/user_bridge_spec.rb
|
161
177
|
- spec/checkdin/won_rewards_spec.rb
|
162
|
-
- spec/checkdin_spec.rb
|
163
178
|
- spec/fixtures/vcr_cassettes/Checkdin_Activities/viewing_a_list_of_activities.yml
|
164
179
|
- spec/fixtures/vcr_cassettes/Checkdin_Activities/viewing_a_single_activity.yml
|
165
180
|
- spec/fixtures/vcr_cassettes/Checkdin_Campaigns/viewing_a_list_of_campaigns.yml
|
@@ -173,32 +188,33 @@ files:
|
|
173
188
|
- spec/fixtures/vcr_cassettes/Checkdin_WonRewards/viewing_a_list_of_won_rewards.yml
|
174
189
|
- spec/fixtures/vcr_cassettes/Checkdin_WonRewards/viewing_a_single_won_reward.yml
|
175
190
|
- spec/spec_helper.rb
|
191
|
+
has_rdoc: true
|
176
192
|
homepage: http://github.com/mattmueller/checkdin
|
177
|
-
licenses:
|
193
|
+
licenses:
|
178
194
|
- MIT
|
179
195
|
post_install_message:
|
180
196
|
rdoc_options: []
|
181
|
-
|
197
|
+
|
198
|
+
require_paths:
|
182
199
|
- lib
|
183
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
184
201
|
none: false
|
185
|
-
requirements:
|
186
|
-
- -
|
187
|
-
- !ruby/object:Gem::Version
|
188
|
-
version:
|
189
|
-
|
190
|
-
- 0
|
191
|
-
hash: -3772188839643581347
|
192
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: "0"
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
207
|
none: false
|
194
|
-
requirements:
|
195
|
-
- -
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version:
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: "0"
|
198
212
|
requirements: []
|
213
|
+
|
199
214
|
rubyforge_project:
|
200
|
-
rubygems_version: 1.
|
215
|
+
rubygems_version: 1.6.2
|
201
216
|
signing_key:
|
202
217
|
specification_version: 3
|
203
218
|
summary: Ruby gem for interacting with the checkd.in API.
|
204
219
|
test_files: []
|
220
|
+
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.0
|