omniauth-lockitron 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 36d086e3195cc7bf319baf6eaff85e1ae8299f08
4
+ data.tar.gz: 969bd74ee3ce5e6b9cc2471388e20855d285c6c6
5
+ SHA512:
6
+ metadata.gz: 97aa6965a794fe0de136e3ea136986f567c9fbb1027e0efeae90e2909cb9dd9b122166b51328e7f6e1636ba1b4b755ec6077d104a86fb5c28fc5c3b7698e072e
7
+ data.tar.gz: 63deeaa585dbf72efcf87552880c70704c9fee8f4de7b5837f7e9e5be3bf62b1eafe0e3cc863a1618c7a3285a5697f45bb3bdc10f372a3fb3263fe3b8c8e247c
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .env
6
+ .yardoc
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1 @@
1
+ 2.0.0
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ script: rspec spec
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lockitron.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Kurt Nelson
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,33 @@
1
+ #Lockitron
2
+ [![Build Status](https://secure.travis-ci.org/kurtisnelson/omniauth-lockitron.png)](http://travis-ci.org/kurtisnelson/omniauth-lockitron)
3
+ [![Gem Version](https://badge.fury.io/rb/omniauth-lockitron.png)](http://badge.fury.io/rb/omniauth-lockitron)
4
+ [![Code Climate](https://codeclimate.com/github/kurtisnelson/omniauth-lockitron.png)](https://codeclimate.com/github/kurtisnelson/omniauth-lockitron)
5
+ [![Coverage Status](https://coveralls.io/repos/kurtisnelson/omniauth-lockitron/badge.png?branch=master)](https://coveralls.io/r/kurtisnelson/omniauth-lockitron)
6
+ [![Dependency Status](https://gemnasium.com/kurtisnelson/omniauth-lockitron.png)](https://gemnasium.com/kurtisnelson/omniauth-lockitron)
7
+ [Documentation](http://rubydoc.info/gems/omniauth-lockitron/)
8
+
9
+ Communicates with the [Lockitron API](http://api.lockitron.com)
10
+
11
+ ##Usage
12
+
13
+ `gem install omniauth-lockitron`
14
+
15
+ For more examples, check the request tests in spec/request or the documentation.
16
+
17
+ ##Contributing to omniauth-lockitron
18
+
19
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
20
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
21
+ * Fork the project.
22
+ * Start a feature/bugfix branch.
23
+ * Commit and push until you are happy with your contribution.
24
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
25
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
26
+
27
+ If you want messages from Faraday, set DEBUG in your environment to true.
28
+
29
+ ##Copyright
30
+
31
+ Copyright (c) 2012 Kurt Nelson. See LICENSE.txt for
32
+ further details.
33
+
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ require_relative 'omniauth/lockitron.rb'
@@ -0,0 +1 @@
1
+ require_relative 'strategies/lockitron.rb'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Lockitron
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,29 @@
1
+ require 'omniauth/strategies/oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Lockitron < OmniAuth::Strategies::OAuth2
6
+ API_ENDPOINT = "https://api.lockitron.com/v1"
7
+ option :name, "lockitron"
8
+
9
+ # This is where you pass the options you would pass when
10
+ # initializing your consumer from the OAuth gem.
11
+ option :client_options, {
12
+ site: "https://api.lockitron.com/v1",
13
+ authorize_url: "oauth/authorize",
14
+ token_url: "oauth/token"
15
+ }
16
+
17
+ info do
18
+ {
19
+ }
20
+ end
21
+
22
+ extra do
23
+ {
24
+ 'raw_info' => {}
25
+ }
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ require File.expand_path(File.join('..', 'lib', 'omniauth', 'lockitron', 'version'), __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "omniauth-lockitron"
6
+ s.version = OmniAuth::Lockitron::VERSION
7
+
8
+ s.authors = ["Kurt Nelson"]
9
+ s.date = "2013-07-21"
10
+ s.description = "Omniauth lockitron strategy"
11
+ s.email = "kurtisnelson@gmail.com"
12
+ s.extra_rdoc_files = [
13
+ "LICENSE.txt",
14
+ "README.md"
15
+ ]
16
+ s.homepage = "http://github.com/kurtisnelson/omniauth-lockitron"
17
+ s.licenses = ["MIT"]
18
+ s.rubygems_version = "0.0.1"
19
+ s.summary = "Omniauth lockitron strategy"
20
+
21
+ s.files = `git ls-files`.split($/)
22
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
24
+ s.require_paths = ["lib"]
25
+
26
+ s.add_dependency 'omniauth-oauth2'
27
+ s.add_development_dependency 'rspec', ">= 2.8.0"
28
+ s.add_development_dependency 'rdoc', ">= 3.12"
29
+ s.add_development_dependency 'bundler', ">= 1.0.0"
30
+ s.add_development_dependency 'dotenv'
31
+ s.add_development_dependency 'coveralls'
32
+ s.add_development_dependency 'pry'
33
+ s.add_development_dependency 'vcr'
34
+ s.add_development_dependency 'webmock'
35
+ end
36
+
@@ -0,0 +1,36 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'coveralls'
4
+ Coveralls.wear! 'rails'
5
+ require 'pry'
6
+ require 'rspec'
7
+ require 'vcr'
8
+
9
+ require 'dotenv'
10
+ Dotenv.load
11
+
12
+ require 'omniauth-lockitron'
13
+
14
+ #Setup test constants
15
+ CLIENT_ID = 'f0605493712611e3fd2e53b96b0b54836b11d1b05985cc1f908e7a149a7bf5c4'
16
+ ENV['CLIENT_SECRET'] ||= 'yay_client_secret'
17
+ CLIENT_SECRET = ENV['CLIENT_SECRET']
18
+ REDIRECT_URI = 'http://lockitron.com'
19
+ ENV['AUTH_CODE'] = 'yay_auth_code'
20
+ AUTH_CODE = ENV['AUTH_CODE']
21
+ ENV['OAUTH_TOKEN'] ||= 'yay_auth_token'
22
+ OAUTH_TOKEN = ENV['OAUTH_TOKEN']
23
+
24
+ # Requires supporting files with custom matchers and macros, etc,
25
+ # in ./support/ and its subdirectories.
26
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
27
+ VCR.configure do |c|
28
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
29
+ c.hook_into :webmock
30
+ c.filter_sensitive_data('<OAUTH_TOKEN>') { ENV['OAUTH_TOKEN'] }
31
+ c.filter_sensitive_data('<CLIENT_SECRET>') { ENV['CLIENT_SECRET'] }
32
+ end
33
+
34
+ RSpec.configure do |config|
35
+
36
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-lockitron
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kurt Nelson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: omniauth-oauth2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.8.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 2.8.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '3.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: dotenv
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: vcr
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: webmock
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: Omniauth lockitron strategy
140
+ email: kurtisnelson@gmail.com
141
+ executables: []
142
+ extensions: []
143
+ extra_rdoc_files:
144
+ - LICENSE.txt
145
+ - README.md
146
+ files:
147
+ - .document
148
+ - .gitignore
149
+ - .rspec
150
+ - .ruby-version
151
+ - .travis.yml
152
+ - Gemfile
153
+ - LICENSE.txt
154
+ - README.md
155
+ - Rakefile
156
+ - lib/omniauth-lockitron.rb
157
+ - lib/omniauth/lockitron.rb
158
+ - lib/omniauth/lockitron/version.rb
159
+ - lib/omniauth/strategies/lockitron.rb
160
+ - omniauth-lockitron.gemspec
161
+ - spec/spec_helper.rb
162
+ homepage: http://github.com/kurtisnelson/omniauth-lockitron
163
+ licenses:
164
+ - MIT
165
+ metadata: {}
166
+ post_install_message:
167
+ rdoc_options: []
168
+ require_paths:
169
+ - lib
170
+ required_ruby_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - '>='
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ requirements: []
181
+ rubyforge_project:
182
+ rubygems_version: 2.0.3
183
+ signing_key:
184
+ specification_version: 4
185
+ summary: Omniauth lockitron strategy
186
+ test_files:
187
+ - spec/spec_helper.rb
188
+ has_rdoc: