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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f5fa1401f5bcc897aaaabc33aeafee618f897c
4
- data.tar.gz: 8016bdbf66329b3b10828483e7d796f821fb08b3
3
+ metadata.gz: 00dabdcf3fafd25816d94ca0fbf02d51c1fcfbb5
4
+ data.tar.gz: 4b51e80ff0a1083105a60b01ac9e8f8e52b6583b
5
5
  SHA512:
6
- metadata.gz: ec2759ee9eda655e9c5a777b16d4e57484cda1a87f45232cdcc5f22ea61308b57fe6891527ff9097ed6c5a1dfce70769784098b7adb821edab8c7ab50c1a94ae
7
- data.tar.gz: b59163b7641f8c4584ee6d872a72a8999bd767d47df5f8d5e34e912e6b2cb3676b5c93ff355df25fa98ffe08556709c2274a428bc45cca60b999c87416f39c9c
6
+ metadata.gz: 932b5fd62369f9ace408cca39974ce8da13a16515a2e5405343cda7486b4207ca6f98d633a54ad681bd71e8a2122971794aa6f04298a2165e56f8ad87a290344
7
+ data.tar.gz: d86f623cc7dd7a8ff5b8a1f760127c5bf47b5def9c26b3f3b981e0dd59c2cab1cb9abcd1a255f1dd70d192229e931d4479734db92def6b1db37843c79d9255e1
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format documentation
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
+ Dir.glob('tasks/**/*.rake').each(&method(:import))
3
4
 
4
5
  Rake::TestTask.new do |t|
5
6
  t.libs << 'test'
@@ -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
@@ -0,0 +1,3 @@
1
+ APP_KEY = '5bc9c3ddf1f46265e03a'
2
+ APP_SECRET = '70a99aa7f4de7f48f235215ce2708b6e4f19377c'
3
+ CALLBACK_URL = 'http://10.99.114.161/:3000/stamp_info'
@@ -1,3 +1,3 @@
1
1
  module SnowshoeRuby
2
- VERSION = "0.0.1.alpha"
2
+ VERSION = "0.0.2.beta"
3
3
  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
- #client = Client.new('5bc9c3ddf1f46265e03a', '70a99aa7f4de7f48f235215ce2708b6e4f19377c')
6
+ client = Client.new(APP_KEY, APP_SECRET)
6
7
 
7
- @callback_url = "http://10.99.114.161/:3000/stamp_info"
8
+ @callback_url = CALLBACK_URL
8
9
  @data = {"data" => params["data"]}
9
10
 
10
11
  @consumer = OAuth::Consumer.new(
@@ -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 SDK for SnowShoe}
12
- spec.description = %q{SDK allowing developers to easily integrate SnowShoe stamps into their app.}
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
@@ -0,0 +1 @@
1
+ require 'snowshoe_ruby'
data/tasks/rspec.rake ADDED
@@ -0,0 +1,3 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
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.1.alpha
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-13 00:00:00.000000000 Z
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
- description: SDK allowing developers to easily integrate SnowShoe stamps into their
57
- app.
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.0.14
114
+ rubygems_version: 2.2.2
95
115
  signing_key:
96
116
  specification_version: 4
97
- summary: Ruby SDK for SnowShoe
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