foreplay 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +10 -0
- data/foreplay.gemspec +2 -2
- data/lib/foreplay/cli.rb +1 -1
- data/lib/foreplay/deploy.rb +6 -6
- data/lib/foreplay/version.rb +1 -1
- data/spec/lib/foreplay/deploy_spec.rb +2 -3
- data/spec/spec_helper.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: ad932d7fcb0744401d5dbd5504a4e6ef7c730901
|
4
|
+
data.tar.gz: 6b74c794e55d644ee6f1abe038c6ae5a9ceaf36e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfc144cab8d1d9cde8b2b1fa813a1d49f175e66124427d3b97cf5acaf7ae87d2c193714323edce3aa8245fcb4a460b14d21a4c9c923829ec446f97e9aa443cc3
|
7
|
+
data.tar.gz: 4a3ca00244950d5330ef5b87e99b9fd31d23ad3dad485b306fe58d32b07358a3e16b678a414c3efbcc614db0417d05df17460935283d522300cba00601d17509
|
data/.hound.yml
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
---
|
2
|
+
StringLiterals:
|
3
|
+
EnforcedStyle: single_quotes
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
DotPosition:
|
7
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
8
|
+
EnforcedStyle: leading
|
9
|
+
# EnforcedStyle: trailing
|
10
|
+
Enabled: true
|
11
|
+
|
2
12
|
LineLength:
|
3
13
|
Description: 'Limit lines to 137 characters.'
|
4
14
|
Max: 137
|
data/foreplay.gemspec
CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Foreplay::VERSION
|
8
8
|
spec.authors = ['Xenapto']
|
9
9
|
spec.email = ['developers@xenapto.com']
|
10
|
-
spec.description =
|
11
|
-
spec.summary =
|
10
|
+
spec.description = 'Deploying Rails projects to Ubuntu using Foreman'
|
11
|
+
spec.summary = 'Example: foreplay push to production'
|
12
12
|
spec.homepage = 'https://github.com/Xenapto/foreplay'
|
13
13
|
spec.license = 'MIT'
|
14
14
|
|
data/lib/foreplay/cli.rb
CHANGED
@@ -35,7 +35,7 @@ module Foreplay
|
|
35
35
|
method_option :db_adapter, aliases: '-a'
|
36
36
|
method_option :db_encoding, aliases: '-e'
|
37
37
|
method_option :db_name, aliases: '-d'
|
38
|
-
method_option :db_pool
|
38
|
+
method_option :db_pool, type: :numeric
|
39
39
|
method_option :db_host, aliases: '-h'
|
40
40
|
method_option :db_user
|
41
41
|
method_option :db_password
|
data/lib/foreplay/deploy.rb
CHANGED
@@ -153,18 +153,18 @@ module Foreplay
|
|
153
153
|
|
154
154
|
# Commands to execute on remote server
|
155
155
|
steps = [
|
156
|
-
{ command: "mkdir -p #{path} && cd #{path} && rm -rf #{current_port}
|
156
|
+
{ command: "mkdir -p #{path} && cd #{path} && rm -rf #{current_port} "\
|
157
|
+
"&& git clone -b #{branch} #{repository} #{current_port}",
|
157
158
|
commentary: "Cloning repository #{repository}" },
|
158
159
|
{ command: "rvm rvmrc trust #{current_port}",
|
159
160
|
commentary: 'Trusting the .rvmrc file for the new instance' },
|
160
161
|
{ command: "rvm rvmrc warning ignore #{current_port}",
|
161
162
|
commentary: 'Ignoring the .rvmrc warning for the new instance' },
|
162
|
-
{ command: "cd #{current_port} && mkdir -p log",
|
163
|
+
{ command: "cd #{current_port} && mkdir -p tmp doc log config",
|
163
164
|
commentary: 'If you have a .rvmrc file there may be a delay now while we install a new ruby' },
|
164
|
-
{ command: 'if [ -f .ruby-version ] ; then rvm install `cat .ruby-version` ;
|
165
|
+
{ command: 'if [ -f .ruby-version ] ; then rvm install `cat .ruby-version` ; '\
|
166
|
+
'else echo "No .ruby-version file found" ; fi',
|
165
167
|
commentary: 'If you have a .ruby-version file there may be a delay now while we install a new ruby' },
|
166
|
-
{ command: 'mkdir -p config',
|
167
|
-
commentary: 'Making sure the config directory exists' },
|
168
168
|
{ key: :env,
|
169
169
|
delimiter: '=',
|
170
170
|
prefix: '.',
|
@@ -344,7 +344,7 @@ module Foreplay
|
|
344
344
|
redirect = '>'
|
345
345
|
end
|
346
346
|
|
347
|
-
if instructions[key].
|
347
|
+
if instructions[key].is_a? Hash
|
348
348
|
instructions[key].each do |k, v|
|
349
349
|
commands << "echo \"#{before}#{k}#{delimiter}#{v}#{after}\" #{redirect} #{filename}"
|
350
350
|
redirect = '>>'
|
data/lib/foreplay/version.rb
CHANGED
@@ -89,12 +89,11 @@ describe Foreplay::Deploy do
|
|
89
89
|
Net::SSH.should_receive(:start).with('web1.example.com', 'fred', verbose: :warn, port: 22, password: 'trollope').and_yield(session)
|
90
90
|
|
91
91
|
[
|
92
|
-
'mkdir -p apps/foreplay && cd apps/foreplay && rm -rf 50000 && git clone git@github.com:Xenapto/foreplay.git 50000',
|
92
|
+
'mkdir -p apps/foreplay && cd apps/foreplay && rm -rf 50000 && git clone -b master git@github.com:Xenapto/foreplay.git 50000',
|
93
93
|
'rvm rvmrc trust 50000',
|
94
94
|
'rvm rvmrc warning ignore 50000',
|
95
|
-
'cd 50000 && mkdir -p log',
|
95
|
+
'cd 50000 && mkdir -p tmp doc log config',
|
96
96
|
'if [ -f .ruby-version ] ; then rvm install `cat .ruby-version` ; else echo "No .ruby-version file found" ; fi',
|
97
|
-
'mkdir -p config',
|
98
97
|
'echo "RAILS_ENV=production" > .env',
|
99
98
|
'echo "concurrency: web=1,worker=0,scheduler=0" > .foreman',
|
100
99
|
'echo "app: foreplay-50000" >> .foreman',
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreplay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xenapto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|