rf_footer 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/rf_footer/environment.rb +1 -1
- data/lib/rf_footer/git.rb +3 -13
- data/lib/rf_footer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c44b6822680b6371125f9c0a0a5e6a251764dcb2
|
4
|
+
data.tar.gz: 5240ea416cb46082225173b10a88308dc9468b42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34f40719ca5ee2ccffea1b5f7360bd4f8801cf4910154b19f8f5615c34368a0f2354fdd9b851379628c1a478af452441e2ff1c1f5e019ad1b974bcab17f62697
|
7
|
+
data.tar.gz: 8e480a5db305d136e5c9192a65e892765ecc9a243bc3d153983c2e9856ecc8c51e9a5044ede60c9bbe0f25614bf47f5feabe868cfa5a9effab2faec2836d308e
|
data/README.md
CHANGED
@@ -20,8 +20,12 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
24
|
-
```
|
23
|
+
Add one of the following lines to your base template.
|
24
|
+
```erb
|
25
|
+
<%== RfFooter::Notes.print %>
|
26
|
+
```
|
27
|
+
|
28
|
+
```erb
|
25
29
|
<%= raw RfFooter::Notes.print %>
|
26
30
|
```
|
27
31
|
|
@@ -19,7 +19,7 @@ module RfFooter
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def stage_via_env
|
22
|
-
@stage_via_env ||= ENV["RF_ENV"] || ENV["
|
22
|
+
@stage_via_env ||= ENV["RF_ENV"] || ENV["RACK_ENV"] || ENV["RAILS_ENV"] || ENV["RORY_ENV"] # ordered by accuracy
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
data/lib/rf_footer/git.rb
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
module RfFooter
|
2
2
|
module Git
|
3
3
|
def sha
|
4
|
-
|
4
|
+
sha_via_deploy || sha_via_git_repo
|
5
5
|
end
|
6
6
|
|
7
7
|
private
|
8
8
|
|
9
|
-
def
|
10
|
-
return unless root
|
11
|
-
|
9
|
+
def sha_via_deploy
|
12
10
|
File.read(path) if File.exists?(path)
|
13
11
|
end
|
14
12
|
|
@@ -19,19 +17,11 @@ module RfFooter
|
|
19
17
|
end
|
20
18
|
|
21
19
|
def path
|
22
|
-
@path ||=
|
20
|
+
@path ||= Pathname.getwd.join("../../shared/deploy_sha")
|
23
21
|
end
|
24
22
|
|
25
23
|
def bash_response
|
26
24
|
@bash_response ||= `git log --pretty=format:'%h' -n 1`
|
27
25
|
end
|
28
|
-
|
29
|
-
def root
|
30
|
-
@root ||= if ENV["RAILS_ENV"]
|
31
|
-
Rails.root
|
32
|
-
elsif ENV["RORY_ENV"]
|
33
|
-
Rory.root
|
34
|
-
end
|
35
|
-
end
|
36
26
|
end
|
37
27
|
end
|
data/lib/rf_footer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rf_footer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jozw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|