sinatra_auth_github 0.4.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ require 'rest_client'
6
6
  module Sinatra
7
7
  module Auth
8
8
  module Github
9
- VERSION = "0.4.0"
9
+ VERSION = "0.4.2"
10
10
 
11
11
  # Simple way to serve an image early in the stack and not get blocked by
12
12
  # application level before filters
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "sinatra_auth_github"
6
- s.version = "0.4.0"
6
+ s.version = "0.4.2"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Corey Donohoe"]
9
9
  s.email = ["atmos@atmos.org"]
@@ -16,12 +16,11 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency "sinatra", "~>1.0"
17
17
  s.add_dependency "yajl-ruby", "~>1.1"
18
18
  s.add_dependency "rest-client", "~>1.6.1"
19
- s.add_dependency "warden-github", "~>0.4.0"
19
+ s.add_dependency "warden-github", "~>0.4.2"
20
20
 
21
21
  s.add_development_dependency "rake"
22
- s.add_development_dependency "rspec", "~>1.3.0"
22
+ s.add_development_dependency "rspec", "~>2.0.0"
23
23
  s.add_development_dependency "shotgun"
24
- s.add_development_dependency "ZenTest", "~>4.5.0"
25
24
  s.add_development_dependency "randexp", "~>0.1.5"
26
25
  s.add_development_dependency "rack-test", "~>0.5.3"
27
26
  s.add_development_dependency "ruby-debug"
@@ -0,0 +1,41 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe "The library itself" do
4
+ Rspec::Matchers.define :have_no_tab_characters do
5
+ match do |filename|
6
+ @failing_lines = []
7
+ File.readlines(filename).each_with_index do |line,number|
8
+ @failing_lines << number + 1 if line =~ /\t/
9
+ end
10
+ @failing_lines.empty?
11
+ end
12
+
13
+ failure_message_for_should do |filename|
14
+ "The file #{filename} has tab characters on lines #{@failing_lines.join(', ')}"
15
+ end
16
+ end
17
+
18
+ Rspec::Matchers.define :have_no_extraneous_spaces do
19
+ match do |filename|
20
+ @failing_lines = []
21
+ File.readlines(filename).each_with_index do |line,number|
22
+ next if line =~ /^\s+#.*\s+\n$/
23
+ @failing_lines << number + 1 if line =~ /\s+\n$/
24
+ end
25
+ @failing_lines.empty?
26
+ end
27
+
28
+ failure_message_for_should do |filename|
29
+ "The file #{filename} has spaces on the EOL on lines #{@failing_lines.join(', ')}"
30
+ end
31
+ end
32
+
33
+ it "has no tab characters" do
34
+ Dir.chdir(File.dirname(__FILE__) + '/..') do
35
+ Dir.glob("./lib/**/*.rb").each do |filename|
36
+ filename.should have_no_tab_characters
37
+ filename.should have_no_extraneous_spaces
38
+ end
39
+ end
40
+ end
41
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,18 +1,13 @@
1
- Bundler.require(:default, :runtime, :test)
1
+ require "bundler/setup"
2
2
 
3
3
  require File.join(File.dirname(__FILE__), '..', 'lib', 'sinatra', 'auth', 'github')
4
4
 
5
5
  require 'pp'
6
6
 
7
- Webrat.configure do |config|
8
- config.mode = :rack
9
- config.application_port = 4567
10
- end
7
+ require 'rack/test'
11
8
 
12
- Spec::Runner.configure do |config|
9
+ RSpec.configure do |config|
13
10
  config.include(Rack::Test::Methods)
14
- config.include(Webrat::Methods)
15
- config.include(Webrat::Matchers)
16
11
 
17
12
  def app
18
13
  Example.app
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra_auth_github
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 2
10
+ version: 0.4.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-01 00:00:00 -08:00
18
+ date: 2012-05-24 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -72,12 +72,12 @@ dependencies:
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- hash: 15
75
+ hash: 11
76
76
  segments:
77
77
  - 0
78
78
  - 4
79
- - 0
80
- version: 0.4.0
79
+ - 2
80
+ version: 0.4.2
81
81
  type: :runtime
82
82
  version_requirements: *id004
83
83
  - !ruby/object:Gem::Dependency
@@ -102,12 +102,12 @@ dependencies:
102
102
  requirements:
103
103
  - - ~>
104
104
  - !ruby/object:Gem::Version
105
- hash: 27
105
+ hash: 15
106
106
  segments:
107
- - 1
108
- - 3
107
+ - 2
109
108
  - 0
110
- version: 1.3.0
109
+ - 0
110
+ version: 2.0.0
111
111
  type: :development
112
112
  version_requirements: *id006
113
113
  - !ruby/object:Gem::Dependency
@@ -124,26 +124,10 @@ dependencies:
124
124
  version: "0"
125
125
  type: :development
126
126
  version_requirements: *id007
127
- - !ruby/object:Gem::Dependency
128
- name: ZenTest
129
- prerelease: false
130
- requirement: &id008 !ruby/object:Gem::Requirement
131
- none: false
132
- requirements:
133
- - - ~>
134
- - !ruby/object:Gem::Version
135
- hash: 43
136
- segments:
137
- - 4
138
- - 5
139
- - 0
140
- version: 4.5.0
141
- type: :development
142
- version_requirements: *id008
143
127
  - !ruby/object:Gem::Dependency
144
128
  name: randexp
145
129
  prerelease: false
146
- requirement: &id009 !ruby/object:Gem::Requirement
130
+ requirement: &id008 !ruby/object:Gem::Requirement
147
131
  none: false
148
132
  requirements:
149
133
  - - ~>
@@ -155,11 +139,11 @@ dependencies:
155
139
  - 5
156
140
  version: 0.1.5
157
141
  type: :development
158
- version_requirements: *id009
142
+ version_requirements: *id008
159
143
  - !ruby/object:Gem::Dependency
160
144
  name: rack-test
161
145
  prerelease: false
162
- requirement: &id010 !ruby/object:Gem::Requirement
146
+ requirement: &id009 !ruby/object:Gem::Requirement
163
147
  none: false
164
148
  requirements:
165
149
  - - ~>
@@ -171,11 +155,11 @@ dependencies:
171
155
  - 3
172
156
  version: 0.5.3
173
157
  type: :development
174
- version_requirements: *id010
158
+ version_requirements: *id009
175
159
  - !ruby/object:Gem::Dependency
176
160
  name: ruby-debug
177
161
  prerelease: false
178
- requirement: &id011 !ruby/object:Gem::Requirement
162
+ requirement: &id010 !ruby/object:Gem::Requirement
179
163
  none: false
180
164
  requirements:
181
165
  - - ">="
@@ -185,7 +169,7 @@ dependencies:
185
169
  - 0
186
170
  version: "0"
187
171
  type: :development
188
- version_requirements: *id011
172
+ version_requirements: *id010
189
173
  description: A sinatra extension for easy oauth integration with github
190
174
  email:
191
175
  - atmos@atmos.org
@@ -208,6 +192,7 @@ files:
208
192
  - lib/sinatra_auth_github.rb
209
193
  - sinatra_auth_github.gemspec
210
194
  - spec/app.rb
195
+ - spec/quality_spec.rb
211
196
  - spec/spec_helper.rb
212
197
  has_rdoc: true
213
198
  homepage: http://github.com/atmos/sinatra_auth_github
@@ -245,4 +230,5 @@ specification_version: 3
245
230
  summary: A sinatra extension for easy oauth integration with github
246
231
  test_files:
247
232
  - spec/app.rb
233
+ - spec/quality_spec.rb
248
234
  - spec/spec_helper.rb