snowshoe_ruby 0.0.1.alpha → 0.0.2.beta
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.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/Rakefile +1 -0
- data/lib/snowshoe_ruby/client.rb +2 -8
- data/lib/snowshoe_ruby/config.rb +3 -0
- data/lib/snowshoe_ruby/version.rb +1 -1
- data/lib/snowshoe_ruby.rb +3 -2
- data/snowshoe_ruby.gemspec +6 -5
- data/spec/snowshoe_ruby_spec.rb +30 -0
- data/spec/spec_helper.rb +1 -0
- data/tasks/rspec.rake +3 -0
- metadata +28 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00dabdcf3fafd25816d94ca0fbf02d51c1fcfbb5
|
4
|
+
data.tar.gz: 4b51e80ff0a1083105a60b01ac9e8f8e52b6583b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 932b5fd62369f9ace408cca39974ce8da13a16515a2e5405343cda7486b4207ca6f98d633a54ad681bd71e8a2122971794aa6f04298a2165e56f8ad87a290344
|
7
|
+
data.tar.gz: d86f623cc7dd7a8ff5b8a1f760127c5bf47b5def9c26b3f3b981e0dd59c2cab1cb9abcd1a255f1dd70d192229e931d4479734db92def6b1db37843c79d9255e1
|
data/.rspec
ADDED
data/Rakefile
CHANGED
data/lib/snowshoe_ruby/client.rb
CHANGED
@@ -1,18 +1,12 @@
|
|
1
1
|
class Client
|
2
|
-
attr_reader :app_key, :app_secret
|
2
|
+
attr_reader :base_url, :app_key, :app_secret
|
3
3
|
|
4
4
|
def initialize(app_key, app_secret)
|
5
5
|
@base_url = "http://beta.snowshoestamp.com/api/v2/"
|
6
|
+
|
6
7
|
# Instance variables
|
7
8
|
@app_key = app_key
|
8
9
|
@app_secret = app_secret
|
9
10
|
end
|
10
11
|
|
11
|
-
def self.app_key
|
12
|
-
@app_key
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.app_secret
|
16
|
-
@app_secret
|
17
|
-
end
|
18
12
|
end
|
data/lib/snowshoe_ruby.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require "snowshoe_ruby/version"
|
2
2
|
require "snowshoe_ruby/client"
|
3
|
+
require "snowshoe_ruby/config"
|
3
4
|
|
4
5
|
module SnowshoeRuby
|
5
|
-
|
6
|
+
client = Client.new(APP_KEY, APP_SECRET)
|
6
7
|
|
7
|
-
@callback_url =
|
8
|
+
@callback_url = CALLBACK_URL
|
8
9
|
@data = {"data" => params["data"]}
|
9
10
|
|
10
11
|
@consumer = OAuth::Consumer.new(
|
data/snowshoe_ruby.gemspec
CHANGED
@@ -7,19 +7,20 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "snowshoe_ruby"
|
8
8
|
spec.version = SnowshoeRuby::VERSION
|
9
9
|
spec.authors = ["IggyIgner", "dotfury"]
|
10
|
-
spec.email = ["jonathan.igner@gmail.com"]
|
11
|
-
spec.summary = %q{Ruby
|
12
|
-
spec.description = %q{
|
10
|
+
spec.email = ["jonathan.igner@gmail.com", "cm2jr4@gmail.com"]
|
11
|
+
spec.summary = %q{Ruby API Client for SnowShoe}
|
12
|
+
spec.description = %q{Add SnowShoe stamps to your Ruby app with simple calls to the SnowShoe API.}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.add_runtime_dependency "oauth", ["= 0.4.7"]
|
17
|
-
|
18
16
|
spec.files = `git ls-files -z`.split("\x0")
|
19
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
19
|
spec.require_paths = ["lib"]
|
22
20
|
|
21
|
+
spec.add_runtime_dependency "oauth", ["= 0.4.7"]
|
22
|
+
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec"
|
25
26
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Client do
|
4
|
+
subject { Client.new('5bc9c3ddf1f46265e03a', '70a99aa7f4de7f48f235215ce2708b6e4f19377c') }
|
5
|
+
|
6
|
+
describe '#initialize' do
|
7
|
+
|
8
|
+
it 'creates a new client with the correct base_url' do
|
9
|
+
expect(subject.base_url).to eq 'http://beta.snowshoestamp.com/api/v2/'
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'creates a new client with the correct app_key' do
|
13
|
+
expect(subject.app_key).to eq '5bc9c3ddf1f46265e03a'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'creates a new client with the correct app_secret' do
|
17
|
+
expect(subject.app_secret).to eq '70a99aa7f4de7f48f235215ce2708b6e4f19377c'
|
18
|
+
end
|
19
|
+
|
20
|
+
# it 'combines nouns with doge adjectives' do
|
21
|
+
# expect(output).to match /so grandmom\./i
|
22
|
+
# expect(output).to match /such sweater\./i
|
23
|
+
# expect(output).to match /very christmas\./i
|
24
|
+
# end
|
25
|
+
|
26
|
+
# it 'always appends "wow."' do
|
27
|
+
# expect(output).to end_with 'wow.'
|
28
|
+
# end
|
29
|
+
end
|
30
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'snowshoe_ruby'
|
data/tasks/rspec.rake
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snowshoe_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IggyIgner
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|
@@ -53,23 +53,43 @@ dependencies:
|
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '10.0'
|
56
|
-
|
57
|
-
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description: Add SnowShoe stamps to your Ruby app with simple calls to the SnowShoe
|
71
|
+
API.
|
58
72
|
email:
|
59
73
|
- jonathan.igner@gmail.com
|
74
|
+
- cm2jr4@gmail.com
|
60
75
|
executables: []
|
61
76
|
extensions: []
|
62
77
|
extra_rdoc_files: []
|
63
78
|
files:
|
64
79
|
- ".gitignore"
|
80
|
+
- ".rspec"
|
65
81
|
- Gemfile
|
66
82
|
- LICENSE.txt
|
67
83
|
- README.md
|
68
84
|
- Rakefile
|
69
85
|
- lib/snowshoe_ruby.rb
|
70
86
|
- lib/snowshoe_ruby/client.rb
|
87
|
+
- lib/snowshoe_ruby/config.rb
|
71
88
|
- lib/snowshoe_ruby/version.rb
|
72
89
|
- snowshoe_ruby.gemspec
|
90
|
+
- spec/snowshoe_ruby_spec.rb
|
91
|
+
- spec/spec_helper.rb
|
92
|
+
- tasks/rspec.rake
|
73
93
|
- test/test_snowshoe_ruby.rb
|
74
94
|
homepage: ''
|
75
95
|
licenses:
|
@@ -91,9 +111,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
111
|
version: 1.3.1
|
92
112
|
requirements: []
|
93
113
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.2.2
|
95
115
|
signing_key:
|
96
116
|
specification_version: 4
|
97
|
-
summary: Ruby
|
117
|
+
summary: Ruby API Client for SnowShoe
|
98
118
|
test_files:
|
119
|
+
- spec/snowshoe_ruby_spec.rb
|
120
|
+
- spec/spec_helper.rb
|
99
121
|
- test/test_snowshoe_ruby.rb
|