j-cap-recipes 0.0.10 → 0.0.11
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/CHANGELOG.md +10 -2
- data/Gemfile.lock +1 -1
- data/README.md +20 -0
- data/lib/j-cap-recipes/git.rb +1 -0
- data/lib/j-cap-recipes/handy.rb +1 -0
- data/lib/j-cap-recipes/tasks/git.rake +12 -0
- data/lib/j-cap-recipes/tasks/handy.rake +34 -0
- data/lib/j-cap-recipes/version.rb +1 -1
- metadata +31 -13
- checksums.yaml +0 -7
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
## Changelog
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
## 0.0.11
|
4
|
+
|
5
|
+
* Added support to manage https://github.com/bigbinary/handy config settings files.
|
6
|
+
* Added recipe to git tag the deployed branch
|
7
|
+
|
8
|
+
## 0.0.10
|
9
|
+
|
10
|
+
## 0.0.9
|
11
|
+
|
12
|
+
## 0.0.8
|
5
13
|
|
6
14
|
## 0.0.7
|
7
15
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -81,6 +81,26 @@ test:
|
|
81
81
|
|
82
82
|
`honeybadger:deploy` - notify the service about deploy and it would be invoked after `deploy:migrate`
|
83
83
|
|
84
|
+
### Handy
|
85
|
+
|
86
|
+
Support to manage https://github.com/bigbinary/handy config files. First should add `require 'j-cap-recipes/handy'` to `Capfile`.
|
87
|
+
There are three tasks available:
|
88
|
+
|
89
|
+
|
90
|
+
- `cap staging config:settings` Show the current staging config files;
|
91
|
+
- `cap staging config:settings:delete` Remove the custom env settings file;
|
92
|
+
- `cap staging config:settings:upload` Update the remote config file with local one;
|
93
|
+
|
94
|
+
### Git
|
95
|
+
|
96
|
+
- `cap staging git:release:tag` Create tag in local repo by variable `git_tag_name`
|
97
|
+
Example of usage in your `deploy.rb`:
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
set :git_tag_name, proc { Time.now.to_s.gsub(/[\s\+]+/, '_') }
|
101
|
+
after 'deploy:finished', 'git:release:tag'
|
102
|
+
```
|
103
|
+
|
84
104
|
## Contributing
|
85
105
|
|
86
106
|
1. Fork it
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/git.rake', __FILE__)
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/handy.rake', __FILE__)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :git do
|
2
|
+
namespace :release do
|
3
|
+
desc 'Add tag on success deploy on production'
|
4
|
+
task :tag do
|
5
|
+
version_number = fetch(:git_tag_name) { Time.now.to_s.gsub(/[\s\+:]+/, '_') }
|
6
|
+
tag_name = "#{fetch(:stage)}-#{version_number}"
|
7
|
+
system("git tag -a -m \"Version #{tag_name} released\" '#{tag_name}'") &&
|
8
|
+
(puts "Created tag `#{tag_name}`") &&
|
9
|
+
`git push --tags`
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
namespace :config do
|
2
|
+
|
3
|
+
task settings: 'settings:show'
|
4
|
+
|
5
|
+
namespace :settings do
|
6
|
+
desc 'Update the remote config/settings/<stage>.yml file with local'
|
7
|
+
task :upload do
|
8
|
+
invoke "config/settings/#{fetch(:stage)}.yml"
|
9
|
+
end
|
10
|
+
|
11
|
+
desc 'Delete remote config/settings/<stage>.yml file'
|
12
|
+
task :delete do
|
13
|
+
on roles(:all) do |host|
|
14
|
+
within shared_path do
|
15
|
+
execute :rm, '-f', "config/settings/#{fetch(:stage)}.yml"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'Show current settings'
|
21
|
+
task :show do
|
22
|
+
on roles(:all) do |host|
|
23
|
+
within shared_path do
|
24
|
+
execute :cat, 'config/settings.yml', "config/settings/#{fetch(:stage)}.yml"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
stages.each do |stage|
|
33
|
+
remote_file "config/settings/#{stage}.yml" => File.join(Dir.pwd, 'config', 'settings', "#{stage}.yml")
|
34
|
+
end
|
metadata
CHANGED
@@ -1,55 +1,62 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j-cap-recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Michael Nikitochkin
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '1.3'
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.3'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: capistrano
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: 3.0.0
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: 3.0.0
|
55
62
|
description: A litle knife to deploy Rails application
|
@@ -70,6 +77,8 @@ files:
|
|
70
77
|
- lib/j-cap-recipes/check.rb
|
71
78
|
- lib/j-cap-recipes/database.rb
|
72
79
|
- lib/j-cap-recipes/delayed_job.rb
|
80
|
+
- lib/j-cap-recipes/git.rb
|
81
|
+
- lib/j-cap-recipes/handy.rb
|
73
82
|
- lib/j-cap-recipes/honeybadger.rb
|
74
83
|
- lib/j-cap-recipes/hpusher.rb
|
75
84
|
- lib/j-cap-recipes/log.rb
|
@@ -81,6 +90,8 @@ files:
|
|
81
90
|
- lib/j-cap-recipes/tasks/check.rake
|
82
91
|
- lib/j-cap-recipes/tasks/database.rake
|
83
92
|
- lib/j-cap-recipes/tasks/delayed_job.rake
|
93
|
+
- lib/j-cap-recipes/tasks/git.rake
|
94
|
+
- lib/j-cap-recipes/tasks/handy.rake
|
84
95
|
- lib/j-cap-recipes/tasks/honeybadger.rake
|
85
96
|
- lib/j-cap-recipes/tasks/hpusher.rake
|
86
97
|
- lib/j-cap-recipes/tasks/log.rake
|
@@ -96,25 +107,32 @@ files:
|
|
96
107
|
homepage: https://github.com/jetthoughts/j-cap-recipes
|
97
108
|
licenses:
|
98
109
|
- MIT
|
99
|
-
metadata: {}
|
100
110
|
post_install_message:
|
101
111
|
rdoc_options: []
|
102
112
|
require_paths:
|
103
113
|
- lib
|
104
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
105
116
|
requirements:
|
106
|
-
- -
|
117
|
+
- - ! '>='
|
107
118
|
- !ruby/object:Gem::Version
|
108
119
|
version: '0'
|
120
|
+
segments:
|
121
|
+
- 0
|
122
|
+
hash: -2289146561815529984
|
109
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
110
125
|
requirements:
|
111
|
-
- -
|
126
|
+
- - ! '>='
|
112
127
|
- !ruby/object:Gem::Version
|
113
128
|
version: '0'
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
hash: -2289146561815529984
|
114
132
|
requirements: []
|
115
133
|
rubyforge_project:
|
116
|
-
rubygems_version:
|
134
|
+
rubygems_version: 1.8.23
|
117
135
|
signing_key:
|
118
|
-
specification_version:
|
136
|
+
specification_version: 3
|
119
137
|
summary: Capistrano 3 recipes for nginx, monit, rails log, setup, unicorn
|
120
138
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: da279ff2f50191a136573a58815445997e167405
|
4
|
-
data.tar.gz: 58d1690c6eda61d6983250f7fc826e4369bc2dfe
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 06aa320b82126b34b7ddda9136013445533aaa1f4c83584fd624f0d41e54a807dbf90e98e77216ca31981799806d41bd5ac61f9793e159b350f1889f5321a81c
|
7
|
-
data.tar.gz: 84653499f822cfaec9589ed41f0a1d59222c44d5a2758683ce2a1403d59e06fdb3cb09bf627a257372b32c400a15cf0f7a226bb2f3eb73f5f637dadffbcf2ea6
|