sinatra_auth_github 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  module Sinatra
2
2
  module Auth
3
3
  module Github
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
6
6
  end
7
7
  end
@@ -17,10 +17,10 @@ Gem::Specification.new do |s|
17
17
  s.add_dependency "sinatra", "~>1.0"
18
18
  s.add_dependency "yajl-ruby", "~>1.1"
19
19
  s.add_dependency "rest-client", "~>1.6.1"
20
- s.add_dependency "warden-github", "~>0.4.0"
20
+ s.add_dependency "warden-github", "~>0.4.2"
21
21
 
22
22
  s.add_development_dependency "rake"
23
- s.add_development_dependency "rspec", "~>2.0"
23
+ s.add_development_dependency "rspec", "~>2.0.0"
24
24
  s.add_development_dependency "shotgun"
25
25
  s.add_development_dependency "randexp", "~>0.1.5"
26
26
  s.add_development_dependency "rack-test", "~>0.5.3"
@@ -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
@@ -6,6 +6,8 @@ require 'pp'
6
6
  require 'rack/test'
7
7
  require 'ruby-debug'
8
8
 
9
+ require 'rack/test'
10
+
9
11
  require 'sinatra/auth/github'
10
12
  require 'sinatra/auth/github/test/test_helper'
11
13
 
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: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
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-05-17 00:00:00 -07: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,11 +102,12 @@ dependencies:
102
102
  requirements:
103
103
  - - ~>
104
104
  - !ruby/object:Gem::Version
105
- hash: 3
105
+ hash: 15
106
106
  segments:
107
107
  - 2
108
108
  - 0
109
- version: "2.0"
109
+ - 0
110
+ version: 2.0.0
110
111
  type: :development
111
112
  version_requirements: *id006
112
113
  - !ruby/object:Gem::Dependency
@@ -194,6 +195,7 @@ files:
194
195
  - sinatra_auth_github.gemspec
195
196
  - spec/app.rb
196
197
  - spec/login_spec.rb
198
+ - spec/quality_spec.rb
197
199
  - spec/spec_helper.rb
198
200
  has_rdoc: true
199
201
  homepage: http://github.com/atmos/sinatra_auth_github
@@ -232,4 +234,5 @@ summary: A sinatra extension for easy oauth integration with github
232
234
  test_files:
233
235
  - spec/app.rb
234
236
  - spec/login_spec.rb
237
+ - spec/quality_spec.rb
235
238
  - spec/spec_helper.rb