commit_hash 1.0.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 845f182579e763b8d418a30b5b55d15bb00373bc
4
+ data.tar.gz: 1663bd68e1d25afcd4d4461f4cedeab7c36d41e6
5
+ SHA512:
6
+ metadata.gz: 90d35e1a746113a0d5fc6365cc34b0f7bc47b5f0adbe7d28cf83db84decf8567904fa4d02f037ccb837cbfbe8e9d69329e5d80c0503ddbc88046474471c236d0
7
+ data.tar.gz: cdbab8fa873c8f4c22144ce554a3498d84e864d2e77b754000061243b880bfa7dd23292a2b98e65dcdc9d302f5e2203ccb1df274b621fc416be986ceb6757622
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # commit_hash
2
+ Add `/_commit` route where it shows the result of `ENV['RELEASE_COMMIT']`
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ get '/_commit', to: 'commit_hash/commit#show', defaults: { format: 'txt' }
3
+ end
@@ -0,0 +1,6 @@
1
+ module CommitHash
2
+ class Engine < ::Rails::Engine
3
+ end
4
+ end
5
+
6
+ require 'commit_hash/commit_controller'
@@ -0,0 +1,11 @@
1
+ class CommitHash::CommitController < ActionController::Base
2
+ def show
3
+ commit = ENV['RELEASE_COMMIT']
4
+
5
+ if commit
6
+ render plain: commit, status: 200
7
+ else
8
+ render plain: "ENV['RELEASE_COMMIT'] => nil", status: 500
9
+ end
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: commit_hash
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - mroutis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ description:
28
+ email:
29
+ - outis@civica.digital
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - README.md
35
+ - config/routes.rb
36
+ - lib/commit_hash.rb
37
+ - lib/commit_hash/commit_controller.rb
38
+ homepage: https://github.com/civica-digital/commit_hash
39
+ licenses:
40
+ - Unlicense
41
+ metadata: {}
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 2.6.11
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Add `/_commit` route where it shows the result of `ENV['RELEASE_COMMIT']`
62
+ test_files: []