capun 0.0.26 → 0.0.28
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 +4 -4
- data/lib/capun/setup.rb +3 -4
- data/lib/capun/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: f687ea72e07c645a7a15bb41b7aba245c100e400
|
|
4
|
+
data.tar.gz: d72d3dfb58567f90f1ce03205d907df96a581fb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 542b23dd8bfaa65c6a1715a1bce54c1678d875b54cc2ee4468e3e1b6134d694467100bac7bc9de2a8b17ec47e06da14066935611a02e60e392a6a2ee4875ebdd
|
|
7
|
+
data.tar.gz: 9125d5cc76404ce291c8e82e2e88264fb5a395d92fdc272a9a63343994d168ed81f98dc598e2f85062cf85837bdd67aa95f501151ed00e26b5621a7eb2add5e4
|
data/lib/capun/setup.rb
CHANGED
|
@@ -33,7 +33,7 @@ set :std_uploads, [
|
|
|
33
33
|
# database.yml
|
|
34
34
|
{what: "config/deploy/database.yml.erb", where: '#{shared_path}/config/database.yml', upload: true, overwrite: true},
|
|
35
35
|
# jenkins' config.xml
|
|
36
|
-
{what: "config/deploy/jenkins.config.xml.erb", where: '
|
|
36
|
+
{what: "config/deploy/jenkins.config.xml.erb", where: '/var/lib/jenkins/jobs/#{fetch(:application)}/config.xml', upload: -> { !!fetch(:addJenkins) }, overwrite: false},
|
|
37
37
|
# newrelic.yml
|
|
38
38
|
{what: "config/deploy/newrelic.yml.erb", where: '#{shared_path}/config/newrelic.yml', upload: -> { !!fetch(:addNewRelic) }, overwrite: true}
|
|
39
39
|
]
|
|
@@ -45,7 +45,6 @@ set :std_symlinks, [
|
|
|
45
45
|
{what: "logrotate.config", where: '/etc/logrotate.d/#{fetch(:application)}'},
|
|
46
46
|
{what: "database.yml", where: '#{release_path}/config/database.yml'},
|
|
47
47
|
{what: "application.yml", where: '#{release_path}/config/application.yml'},
|
|
48
|
-
{what: "jenkins.config.xml", where: '/var/lib/jenkins/jobs/#{fetch(:application)}/config.xml'},
|
|
49
48
|
{what: "newrelic.yml", where: '#{release_path}/config/newrelic.yml'}
|
|
50
49
|
]
|
|
51
50
|
|
|
@@ -76,7 +75,7 @@ namespace :deploy do
|
|
|
76
75
|
next unless File.exists?(what)
|
|
77
76
|
where = eval "\"" + file_hash[:where] + "\""
|
|
78
77
|
next if !file_hash[:overwrite] && test("[ -f #{where} ]")
|
|
79
|
-
# compile
|
|
78
|
+
# compile template if it ends with .erb before upload
|
|
80
79
|
upload! (what.end_with?(".erb") ? StringIO.new(ERB.new(File.read(what)).result(binding)) : what), where
|
|
81
80
|
info "copying: #{what} to: #{where}"
|
|
82
81
|
end
|
|
@@ -103,7 +102,7 @@ namespace :deploy do
|
|
|
103
102
|
task :make_dirs do
|
|
104
103
|
on roles(:app) do
|
|
105
104
|
execute :mkdir, "-p", "/home/#{fetch(:user)}/apps/#{fetch(:application)}"
|
|
106
|
-
if fetch(:addJenkins)
|
|
105
|
+
if fetch(:addJenkins) && !test("[ -d /var/lib/jenkins/jobs/#{fetch(:application)}/ ]")
|
|
107
106
|
execute :sudo, :mkdir, "-p", "/var/lib/jenkins/jobs/#{fetch(:application)}"
|
|
108
107
|
execute :sudo, :chown, "#{fetch(:user)}", "/var/lib/jenkins/jobs/#{fetch(:application)}"
|
|
109
108
|
end
|
data/lib/capun/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capun
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Zamylin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|