rack-git_sha 1.1.0 → 1.2.0

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: 358cf6084f7c3b7c2613fb0ae1d2ed9938bc9813
4
+ data.tar.gz: 7de0e6cfc84d75154fca40f7394563154fcac9a0
5
+ SHA512:
6
+ metadata.gz: 0f2712644edc2d88098e8aac0d69c4e3a6d2a205d15fde01160d4fc1bdf61b3d97969cb8f390311c5054a1d45474a92e95635171d4eb9dbbaac3aeabf798d05e
7
+ data.tar.gz: 72cfd9f1e04e92e6a014cef79a8a139715a22870c8c2400aefe51721852acdb8d5520655ac158d8cfa57e5e35ec5cfeb1518a3cfe6917b5ed8140da21c52a20d
@@ -4,4 +4,3 @@ rvm:
4
4
  - 1.9.2
5
5
  - 1.9.3
6
6
  - jruby-18mode # JRuby in 1.8 mode
7
- - rbx-18mode
data/README.md CHANGED
@@ -26,7 +26,7 @@ If your using rails 3.0+ you can mount the app in your `routes.rb` file.
26
26
 
27
27
  ```ruby
28
28
  MyApp::Application.routes.draw do
29
- mount Rack::GitSha.new => '/sha'
29
+ mount Rack::GitSha => '/sha'
30
30
  end
31
31
  ```
32
32
 
@@ -36,7 +36,7 @@ If your using rack then you can map the middleware in your `config.ru`.
36
36
  require 'rack/git_sha'
37
37
 
38
38
  map '/sha' do
39
- run Rack::GitSha.new
39
+ run Rack::GitSha
40
40
  end
41
41
 
42
42
  map '/' do
@@ -68,6 +68,17 @@ pending (much like capistrano's `cap deploy:pending:diff`).
68
68
 
69
69
  * Does not work with Heroku.
70
70
 
71
+ ## Capistrano 3 support
72
+
73
+ This gem provides a capistrano task to ensure your app has the required
74
+ `REVISION` file for Rack::GitSha to work.
75
+
76
+ To enable the capistrano task add the following line to your `Capfile`
77
+
78
+ ```
79
+ require 'capistrano/revision'
80
+ ```
81
+
71
82
  ## More information
72
83
 
73
84
  ### Build status
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/revision.cap', __FILE__)
@@ -0,0 +1,13 @@
1
+ namespace :git do
2
+ desc 'Creates a file named REVISION containing the deployed Git SHA'
3
+ task :revision do
4
+ on roles :app do
5
+ within release_path do
6
+ revision = capture("cd #{repo_path} && git rev-parse HEAD")
7
+ execute(:echo, "#{revision} > REVISION")
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ after 'deploy:updated', 'git:revision'
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class GitSha
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-git_sha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Mytton
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-06-04 00:00:00.000000000 Z
11
+ date: 2013-12-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rack-test
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -72,6 +65,8 @@ files:
72
65
  - LICENSE
73
66
  - README.md
74
67
  - Rakefile
68
+ - lib/capistrano/revision.rb
69
+ - lib/capistrano/tasks/revision.cap
75
70
  - lib/rack-git_sha.rb
76
71
  - lib/rack/git_sha.rb
77
72
  - lib/rack/git_sha/version.rb
@@ -81,29 +76,29 @@ files:
81
76
  - spec/spec_helper.rb
82
77
  homepage: https://github.com/hecticjeff/rack-git_sha
83
78
  licenses: []
79
+ metadata: {}
84
80
  post_install_message:
85
81
  rdoc_options: []
86
82
  require_paths:
87
83
  - lib
88
84
  required_ruby_version: !ruby/object:Gem::Requirement
89
- none: false
90
85
  requirements:
91
- - - ! '>='
86
+ - - '>='
92
87
  - !ruby/object:Gem::Version
93
88
  version: '0'
94
89
  required_rubygems_version: !ruby/object:Gem::Requirement
95
- none: false
96
90
  requirements:
97
- - - ! '>='
91
+ - - '>='
98
92
  - !ruby/object:Gem::Version
99
93
  version: '0'
100
94
  requirements: []
101
95
  rubyforge_project:
102
- rubygems_version: 1.8.21
96
+ rubygems_version: 2.1.11
103
97
  signing_key:
104
- specification_version: 3
98
+ specification_version: 4
105
99
  summary: Tiny rack application that serves up the currently deployed git commit SHA
106
100
  test_files:
107
101
  - spec/fixtures/REVISION
108
102
  - spec/rack-git_sha_spec.rb
109
103
  - spec/spec_helper.rb
104
+ has_rdoc: