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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32c69af8ae4a13a59d37d737d92e5c6f80e692bb
4
- data.tar.gz: b17d95fe506861fcd0488cc67dbefd0dd6947ba1
3
+ metadata.gz: c44b6822680b6371125f9c0a0a5e6a251764dcb2
4
+ data.tar.gz: 5240ea416cb46082225173b10a88308dc9468b42
5
5
  SHA512:
6
- metadata.gz: a54884d1128e91b57cc092141413533232ae856b45e2288bee4f71903e60c74e1230212d94e1ad02d140ce92bb6ca87ccef8955cf48387591203d09dcfb07f27
7
- data.tar.gz: 9e14b0229098907fbbd363714982e85d9930fdf335bb30c07a0c0725d44a0f1744f7d8c97a829d5c6fc503c6626b218e438324bf40e9b42cd3c6dd457b8e620f
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
- Simply add this line to your base template.
24
- ```html
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["RORY_ENV"] || ENV["RAILS_ENV"] || ENV["RACK_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
- sha_via_cap_vic || sha_via_git_repo
4
+ sha_via_deploy || sha_via_git_repo
5
5
  end
6
6
 
7
7
  private
8
8
 
9
- def sha_via_cap_vic
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 ||= root.join("REVISION")
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
@@ -1,3 +1,3 @@
1
1
  module RfFooter
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
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.2.0
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-17 00:00:00.000000000 Z
11
+ date: 2016-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler