gitshapage 0.0.5 → 0.0.6
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.
- data/README.md +9 -4
- data/lib/gitshapage.rb +4 -2
- metadata +1 -1
data/README.md
CHANGED
@@ -4,13 +4,18 @@ That's all it does.
|
|
4
4
|
|
5
5
|
If you're using bundler - put this in your Gemfile:
|
6
6
|
|
7
|
-
`gem "gitshapage", "0.0.
|
7
|
+
`gem "gitshapage", "0.0.6", :require => false`
|
8
8
|
|
9
9
|
Put this in your config/deploy.rb:
|
10
10
|
|
11
11
|
`require "gitshapage"`
|
12
|
-
`set :gitshapage_url, 'put-your-page-name-here.txt'`
|
13
12
|
|
14
|
-
After deploy:restart it will create the page.
|
13
|
+
After deploy:restart it will create the page - by default it puts it at public/version.txt.
|
15
14
|
|
16
|
-
|
15
|
+
If you'd like to put or name it something different:
|
16
|
+
|
17
|
+
`set :gitshapage_directory, "directory/goes/here"`
|
18
|
+
|
19
|
+
`set :gitshapage_url, "filename-goes-here.txt"`
|
20
|
+
|
21
|
+
NOTE: Don't put it in your Rails config/environment.rb - that does bad things.
|
data/lib/gitshapage.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
Capistrano::Configuration.instance(:must_exist).load do
|
2
|
-
_cset(:gitshapage_url) {
|
2
|
+
_cset(:gitshapage_url) { "version.txt" }
|
3
|
+
_cset(:gitshapage_directory) { "public" }
|
3
4
|
task :gitshapage do
|
4
|
-
run "cd #{deploy_to}/current && git rev-parse HEAD > '
|
5
|
+
run "cd #{deploy_to}/current && git rev-parse HEAD > '#{gitshapage_directory}/#{gitshapage_url}'"
|
6
|
+
run "cd #{deploy_to}/current && date >> '#{gitshapage_directory}/#{gitshapage_url}'"
|
5
7
|
end
|
6
8
|
after "deploy:restart", :gitshapage
|
7
9
|
end
|