git-version 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+ gem 'rake'
3
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/config/routes.rb ADDED
@@ -0,0 +1,10 @@
1
+ require 'grit'
2
+
3
+ GitVersion::Engine.routes.draw do
4
+ root :to => proc {|env| [200, {}, [Grit::Repo.new(Rails.root + '.git').commits.first.id[0...6]]]}
5
+ end
6
+
7
+ Rails.application.routes.draw do
8
+ mount GitVersion::Engine => "/version"
9
+ end
10
+
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "git-version/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "git-version"
7
+ s.version = GitVersion::VERSION
8
+ s.authors = ["Darrin Holst"]
9
+ s.email = ["darrinholst@gmail.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Add current git commit as a rails endpoint}
12
+ s.description = %q{Add current git commit hash as a rails endpoint bound to /version}
13
+
14
+ s.rubyforge_project = "git-version"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_runtime_dependency "grit"
22
+ end
@@ -0,0 +1,5 @@
1
+ require "git-version/version"
2
+ require "git-version/engine"
3
+
4
+ module GitVersion
5
+ end
@@ -0,0 +1,5 @@
1
+ module GitVersion
2
+ class Engine < Rails::Engine
3
+ isolate_namespace GitVersion
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module GitVersion
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: git-version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Darrin Holst
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-01-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: grit
16
+ requirement: &70261405942140 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70261405942140
25
+ description: Add current git commit hash as a rails endpoint bound to /version
26
+ email:
27
+ - darrinholst@gmail.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - Rakefile
35
+ - config/routes.rb
36
+ - git-version.gemspec
37
+ - lib/git-version.rb
38
+ - lib/git-version/engine.rb
39
+ - lib/git-version/version.rb
40
+ homepage: ''
41
+ licenses: []
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ segments:
53
+ - 0
54
+ hash: 2942392060820395344
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ segments:
62
+ - 0
63
+ hash: 2942392060820395344
64
+ requirements: []
65
+ rubyforge_project: git-version
66
+ rubygems_version: 1.8.10
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Add current git commit as a rails endpoint
70
+ test_files: []