rack-git-version 0.0.2 → 0.0.3

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.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ .rvmrc
@@ -0,0 +1,34 @@
1
+ # Rack::GitVersion
2
+
3
+ GitVersion adds the output of `git describe` to your HTTP response headers. This makes it easier to know which version of the app is deployed.
4
+
5
+ ## How to use
6
+
7
+ 1. Add `gem 'rack-git-version'` to your Gemfile
8
+ 2. Add this to your `application.rb` (Rails 3) or `environment.rb` (Rails 2):
9
+
10
+ ```ruby
11
+ require 'rack-git-version'
12
+ config.middleware.use Rack::GitVersion
13
+ ```
14
+ ## License
15
+
16
+ > Copyright (C) 2011 by Mike Nicholaides
17
+
18
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
19
+ of this software and associated documentation files (the "Software"), to deal
20
+ in the Software without restriction, including without limitation the rights
21
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
+ copies of the Software, and to permit persons to whom the Software is
23
+ furnished to do so, subject to the following conditions:
24
+
25
+ > The above copyright notice and this permission notice shall be included in
26
+ all copies or substantial portions of the Software.
27
+
28
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34
+ THE SOFTWARE.
@@ -7,13 +7,13 @@ module Rack
7
7
  end
8
8
 
9
9
  def git_version
10
- @@git_version ||= `git describe`.strip
10
+ @@git_version ||= `git describe --always`.strip
11
11
  end
12
12
 
13
13
  def call env
14
- status, headers, response = @app.call env
14
+ status, headers, body = @app.call env
15
15
  headers["X-Git-Version"] ||= git_version
16
- [status, headers, response]
16
+ [status, headers, body]
17
17
  end
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class GitVersion
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-git-version
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Nicholaides
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-08 00:00:00 -05:00
18
+ date: 2011-11-10 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -59,6 +59,7 @@ files:
59
59
  - .gitignore
60
60
  - .rspec
61
61
  - Gemfile
62
+ - README.markdown
62
63
  - Rakefile
63
64
  - lib/rack-git-version.rb
64
65
  - lib/rack-git-version/version.rb