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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9771bbda4dc72fc7aeb7d2806a0288fea6ae3e4b
4
- data.tar.gz: 2e8bf81e28f33b89fc124200f8514669af17d73d
3
+ metadata.gz: ad932d7fcb0744401d5dbd5504a4e6ef7c730901
4
+ data.tar.gz: 6b74c794e55d644ee6f1abe038c6ae5a9ceaf36e
5
5
  SHA512:
6
- metadata.gz: 76ffc255893c320edd0e4262503b746a0eba402abd0bb7018ef2a44fc96f7fb2fabd40f5929cd5d6516571227951e0bd8cb57d80b3d4f161ad92622b418d9329
7
- data.tar.gz: f84a95a6049838d443dc1fb283637e0a62ae52bb26e7b4ce2883758ac0fac0ca26147325de18d474105bfdaf0c0c8399e8d5104704e31ca917a5641e096f6264
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 = %q(Deploying Rails projects to Ubuntu using Foreman)
11
- spec.summary = %q(Example: foreplay push to production)
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 , type: :numeric
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
@@ -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} && git clone -b #{branch} #{repository} #{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` ; else echo "No .ruby-version file found" ; fi',
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].kind_of?(Hash)
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 = '>>'
@@ -1,3 +1,3 @@
1
1
  module Foreplay
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -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
@@ -12,7 +12,7 @@ RSpec.configure do |config|
12
12
  config.order = 'random'
13
13
 
14
14
  # Manually-added
15
- config.color_enabled = true
15
+ config.color = true
16
16
  config.tty = true
17
17
  config.formatter = :documentation
18
18
  end
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.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-07 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport