foreplay 0.9.10 → 0.9.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreplay/engine/secrets.rb +0 -4
- data/lib/foreplay/engine/steps.yml +5 -5
- data/lib/foreplay/engine.rb +0 -2
- data/lib/foreplay/version.rb +1 -1
- data/spec/lib/foreplay/deploy_spec.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33731b365e619f93a9a5f950b59bbeec1c1f6bde
|
4
|
+
data.tar.gz: ba47694849c84746f1cd75d9bdcb3ac51403bccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f87782c848542519af918f6e46e55f05260bca250f1eda2db647b9c7c245d13e872cddbf789b7f317e1f07fcddd1fb8de1edc15c24178439d0632dd29782625
|
7
|
+
data.tar.gz: 101180a567f815cd9033a2f464e0b277662214e6d84883ff87d045ccf022b3a72340d69c7c61cef47032ba2d8e1648a51d27877f5b66300774e5d9ed4f25662a
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'pp' # debug
|
2
|
-
|
3
1
|
class Foreplay::Engine::Secrets
|
4
2
|
attr_reader :environment, :secret_locations
|
5
3
|
|
@@ -17,7 +15,6 @@ class Foreplay::Engine::Secrets
|
|
17
15
|
secrets.merge! fetch_from(secret_location) || {}
|
18
16
|
end
|
19
17
|
|
20
|
-
pp secrets # debug
|
21
18
|
secrets
|
22
19
|
end
|
23
20
|
|
@@ -27,7 +24,6 @@ pp secrets # debug
|
|
27
24
|
headers = secret_location['headers']
|
28
25
|
header_string = headers.map { |k, v| " -H \"#{k}: #{v}\"" }.join if headers.is_a? Hash
|
29
26
|
command = "curl -k -L#{header_string} #{url}".fake_erb
|
30
|
-
puts command.magenta # debug
|
31
27
|
secrets_all = YAML.load(`#{command}`)
|
32
28
|
secrets = secrets_all[environment]
|
33
29
|
|
@@ -44,17 +44,17 @@
|
|
44
44
|
path: 'config/'
|
45
45
|
- command: 'if [ -d ../cache/vendor/bundle ] ; then rsync -aW --no-compress --delete --info=STATS1 ../cache/vendor/bundle/ vendor/bundle ; else echo No bundle to restore ; fi'
|
46
46
|
commentary: 'Attempting to restore bundle from cache'
|
47
|
+
- command: 'gem install bundler -v "> 1.8"'
|
48
|
+
commentary: 'Updating the bundler version'
|
47
49
|
- command: 'sudo ln -f `which bundle` /usr/bin/bundle || echo Using default version of bundle'
|
48
50
|
commentary: 'Setting the current version of bundle to be the default'
|
49
|
-
- command:
|
50
|
-
commentary: 'Updating the bundler version'
|
51
|
-
- command: 'bundle install --deployment --clean --jobs 2 --without development test'
|
51
|
+
- command: '/usr/bin/bundle install --deployment --clean --jobs 2 --without development test'
|
52
52
|
commentary: 'Using bundler to install the required gems in deployment mode'
|
53
53
|
- command: 'mkdir -p ../cache/vendor && rsync -aW --no-compress --delete --info=STATS1 vendor/bundle/ ../cache/vendor/bundle'
|
54
54
|
commentary: 'Caching bundle'
|
55
|
-
- command: 'if [ -f public/assets/manifest.yml ] ; then echo "Not precompiling assets" ; else RAILS_ENV=<%= environment %> bundle exec foreman run rake assets:precompile ; fi'
|
55
|
+
- command: 'if [ -f public/assets/manifest.yml ] ; then echo "Not precompiling assets" ; else RAILS_ENV=<%= environment %> /usr/bin/bundle exec foreman run rake assets:precompile ; fi'
|
56
56
|
commentary: 'Precompiling assets unless they were supplied'
|
57
|
-
- command: 'sudo bundle exec foreman export upstart /etc/init'
|
57
|
+
- command: 'sudo /usr/bin/bundle exec foreman export upstart /etc/init'
|
58
58
|
commentary: "Converting <%= current_service %> to an upstart service"
|
59
59
|
- command: "sudo start <%= current_service %> || sudo restart <%= current_service %>"
|
60
60
|
commentary: 'Starting the service'
|
data/lib/foreplay/engine.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'string'
|
3
3
|
require 'hash'
|
4
|
-
require 'pp' # debug
|
5
4
|
|
6
5
|
class Foreplay::Engine
|
7
6
|
include Foreplay
|
@@ -89,7 +88,6 @@ class Foreplay::Engine
|
|
89
88
|
|
90
89
|
@defaults['env'].merge! secrets
|
91
90
|
@defaults['application'] = secrets
|
92
|
-
pp @defaults # debug
|
93
91
|
@defaults = @defaults.supermerge(roles_all[DEFAULTS_KEY]) if roles_all.key? DEFAULTS_KEY
|
94
92
|
@defaults = @defaults.supermerge(roles[DEFAULTS_KEY]) if roles.key? DEFAULTS_KEY
|
95
93
|
@defaults
|
data/lib/foreplay/version.rb
CHANGED
@@ -135,6 +135,7 @@ describe Foreplay::Launcher do
|
|
135
135
|
'git clone -b master git@github.com:Xenapto/foreplay.git 50000',
|
136
136
|
'rvm rvmrc trust 50000',
|
137
137
|
'rvm rvmrc warning ignore 50000',
|
138
|
+
'gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys D39DC0E3',
|
138
139
|
'cd 50000 && mkdir -p tmp doc log config',
|
139
140
|
'if [ -f .ruby-version ] ; then rvm install `cat .ruby-version` ; else echo "No .ruby-version file found" ; fi',
|
140
141
|
'echo "RAILS_ENV=production" > .env',
|
@@ -153,13 +154,14 @@ describe Foreplay::Launcher do
|
|
153
154
|
'if [ -d ../cache/vendor/bundle ] ; then '\
|
154
155
|
'rsync -aW --no-compress --delete --info=STATS1 ../cache/vendor/bundle/ vendor/bundle'\
|
155
156
|
' ; else echo No bundle to restore ; fi',
|
157
|
+
'gem install bundler -v "> 1.8"',
|
156
158
|
'sudo ln -f `which bundle` /usr/bin/bundle || echo Using default version of bundle',
|
157
|
-
'bundle install --deployment --clean --jobs 2 --without development test',
|
159
|
+
'/usr/bin/bundle install --deployment --clean --jobs 2 --without development test',
|
158
160
|
'mkdir -p ../cache/vendor && '\
|
159
161
|
'rsync -aW --no-compress --delete --info=STATS1 vendor/bundle/ ../cache/vendor/bundle',
|
160
162
|
'if [ -f public/assets/manifest.yml ] ; then echo "Not precompiling assets"'\
|
161
|
-
' ; else RAILS_ENV=production bundle exec foreman run rake assets:precompile ; fi',
|
162
|
-
'sudo bundle exec foreman export upstart /etc/init',
|
163
|
+
' ; else RAILS_ENV=production /usr/bin/bundle exec foreman run rake assets:precompile ; fi',
|
164
|
+
'sudo /usr/bin/bundle exec foreman export upstart /etc/init',
|
163
165
|
'sudo start foreplay-50000 || sudo restart foreplay-50000',
|
164
166
|
'mkdir -p .foreplay/foreplay && touch .foreplay/foreplay/current_port && cat .foreplay/foreplay/current_port',
|
165
167
|
'echo 50000 > $HOME/.foreplay/foreplay/current_port',
|