rack-git_sha 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - jruby-18mode # JRuby in 1.8 mode
7
+ - rbx-18mode
data/README.md CHANGED
@@ -68,6 +68,12 @@ pending (much like capistrano's `cap deploy:pending:diff`).
68
68
 
69
69
  * Does not work with Heroku.
70
70
 
71
+ ## More information
72
+
73
+ ### Build status
74
+
75
+ [![Build Status](https://secure.travis-ci.org/hecticjeff/rack-git_sha.png)](http://travis-ci.org/hecticjeff/rack-git_sha)
76
+
71
77
  ## Contributing
72
78
 
73
79
  1. Fork it
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class GitSha
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
data/lib/rack/git_sha.rb CHANGED
@@ -4,6 +4,10 @@ require 'pathname'
4
4
  module Rack
5
5
  class GitSha
6
6
 
7
+ def self.call(env)
8
+ new.call(env)
9
+ end
10
+
7
11
  # Public: Initialize a new GitSha app.
8
12
  #
9
13
  # root - The String path to application root.
@@ -5,13 +5,9 @@ describe Rack::GitSha do
5
5
 
6
6
  describe "GET /" do
7
7
  context "with no path" do
8
- def app
9
- Rack::GitSha.new
10
- end
8
+ let(:app) { Rack::GitSha }
11
9
 
12
- before do
13
- get '/'
14
- end
10
+ before { get '/' }
15
11
 
16
12
  it "is successful" do
17
13
  last_response.status.should == 200
@@ -22,13 +18,9 @@ describe Rack::GitSha do
22
18
  end
23
19
 
24
20
  context "with path" do
25
- def app
26
- Rack::GitSha.new File.expand_path('../fixtures', __FILE__)
27
- end
21
+ let(:app) { Rack::GitSha.new File.expand_path('../fixtures', __FILE__) }
28
22
 
29
- before do
30
- get '/'
31
- end
23
+ before { get '/' }
32
24
 
33
25
  it "uses the REVISION file" do
34
26
  last_response.body.should == "git-sha-goes-here\n"
@@ -36,13 +28,9 @@ describe Rack::GitSha do
36
28
  end
37
29
 
38
30
  context "with path that isn't git root or have REVISION file" do
39
- def app
40
- Rack::GitSha.new File.dirname(__FILE__)
41
- end
31
+ let(:app) { Rack::GitSha.new File.dirname(__FILE__) }
42
32
 
43
- before do
44
- get '/'
45
- end
33
+ before { get '/' }
46
34
 
47
35
  it "returns a 404" do
48
36
  last_response.status.should == 404
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-git_sha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-19 00:00:00.000000000 Z
12
+ date: 2012-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70263737936820 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 2.8.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70263737936820
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.8.0
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rack-test
27
- requirement: &70263737936300 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 0.6.1
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70263737936300
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.6.1
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rake
38
- requirement: &70263737935840 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: 0.9.2
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70263737935840
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.9.2
47
62
  description: Serve up the current git commit SHA from rack
48
63
  email:
49
64
  - self@hecticjeff.net
@@ -52,6 +67,7 @@ extensions: []
52
67
  extra_rdoc_files: []
53
68
  files:
54
69
  - .gitignore
70
+ - .travis.yml
55
71
  - Gemfile
56
72
  - LICENSE
57
73
  - README.md
@@ -83,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
99
  version: '0'
84
100
  requirements: []
85
101
  rubyforge_project:
86
- rubygems_version: 1.8.15
102
+ rubygems_version: 1.8.21
87
103
  signing_key:
88
104
  specification_version: 3
89
105
  summary: Tiny rack application that serves up the currently deployed git commit SHA