foreplay 0.1.6 → 0.1.7
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/.hound.yml +26 -1
- data/.rubocop.yml +1 -25
- data/lib/foreplay/deploy.rb +8 -0
- data/lib/foreplay/version.rb +1 -1
- 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: 72b52317b0f1e0d3282b3a5eb4d57c4371e3b641
|
|
4
|
+
data.tar.gz: 4a152a118c1195a84a8840fe34fb8d8f8b22129d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ee43b18881ac8f6debb4e0a07abc3e88d94eeb7741095abbc40bc42e50e78995991c3b66c395dca7de6966cf6072e947696e8ca96322f716ce4f54dbf398c98
|
|
7
|
+
data.tar.gz: 6f739397d47e7d83b9b482842e9a039928ae1fc4225ef4d39bce5a7a55097255d5cbe285ba68c118c891e970f35c1de0fcee98c6b6dd5abc939253c52f08c3e3
|
data/.hound.yml
CHANGED
|
@@ -1 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
LineLength:
|
|
3
|
+
Description: 'Limit lines to 137 characters.'
|
|
4
|
+
Max: 137
|
|
5
|
+
Enabled: true
|
|
6
|
+
|
|
7
|
+
FileName:
|
|
8
|
+
Description: 'Use snake_case for source file names.'
|
|
9
|
+
Enabled: false
|
|
10
|
+
|
|
11
|
+
MethodLength:
|
|
12
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
|
13
|
+
Enabled: false
|
|
14
|
+
|
|
15
|
+
Documentation:
|
|
16
|
+
Description: 'Document classes and non-namespace modules.'
|
|
17
|
+
Enabled: false
|
|
18
|
+
|
|
19
|
+
CyclomaticComplexity:
|
|
20
|
+
Description: 'Avoid complex methods.'
|
|
21
|
+
Max: 13
|
|
22
|
+
|
|
23
|
+
ClassLength:
|
|
24
|
+
Description: 'Avoid classes longer than 100 lines of code.'
|
|
25
|
+
CountComments: false # count full line comments?
|
|
26
|
+
Max: 269
|
data/.rubocop.yml
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Description: 'Limit lines to 137 characters.'
|
|
3
|
-
Max: 137
|
|
4
|
-
Enabled: true
|
|
5
|
-
|
|
6
|
-
FileName:
|
|
7
|
-
Description: 'Use snake_case for source file names.'
|
|
8
|
-
Enabled: false
|
|
9
|
-
|
|
10
|
-
MethodLength:
|
|
11
|
-
Description: 'Avoid methods longer than 10 lines of code.'
|
|
12
|
-
Enabled: false
|
|
13
|
-
|
|
14
|
-
Documentation:
|
|
15
|
-
Description: 'Document classes and non-namespace modules.'
|
|
16
|
-
Enabled: false
|
|
17
|
-
|
|
18
|
-
CyclomaticComplexity:
|
|
19
|
-
Description: 'Avoid complex methods.'
|
|
20
|
-
Max: 13
|
|
21
|
-
|
|
22
|
-
ClassLength:
|
|
23
|
-
Description: 'Avoid classes longer than 100 lines of code.'
|
|
24
|
-
CountComments: false # count full line comments?
|
|
25
|
-
Max: 269
|
|
1
|
+
inherit_from: .hound.yml
|
data/lib/foreplay/deploy.rb
CHANGED
|
@@ -20,6 +20,7 @@ module Foreplay
|
|
|
20
20
|
INDENT = ' ' * 4
|
|
21
21
|
|
|
22
22
|
def parse
|
|
23
|
+
puts 'Hello world' # debug
|
|
23
24
|
# Explain what we're going to do
|
|
24
25
|
message = "#{mode.capitalize}ing #{environment.dup.yellow} environment, "
|
|
25
26
|
message += "#{explanatory_text(filters, 'role')}, #{explanatory_text(filters, 'server')}"
|
|
@@ -41,6 +42,9 @@ module Foreplay
|
|
|
41
42
|
terminate("No deployment configuration defined for #{environment} environment.\nCheck #{config_file}")
|
|
42
43
|
end
|
|
43
44
|
|
|
45
|
+
# Servers asked for
|
|
46
|
+
server_filter = filters['server'].split(',') if filters.key?('server')
|
|
47
|
+
|
|
44
48
|
# Establish defaults
|
|
45
49
|
# First the default defaults
|
|
46
50
|
defaults = {
|
|
@@ -67,6 +71,9 @@ module Foreplay
|
|
|
67
71
|
terminate("Required key #{key} not found in instructions for #{environment} environment.\nCheck #{config_file}")
|
|
68
72
|
end
|
|
69
73
|
|
|
74
|
+
# Apply server filter
|
|
75
|
+
instructions[:servers] &= server_filter if server_filter
|
|
76
|
+
|
|
70
77
|
deploy_role instructions
|
|
71
78
|
end
|
|
72
79
|
|
|
@@ -137,6 +144,7 @@ module Foreplay
|
|
|
137
144
|
instructions[:foreman]['app'] = current_service
|
|
138
145
|
instructions[:foreman]['port'] = current_port
|
|
139
146
|
instructions[:foreman]['user'] = user
|
|
147
|
+
instructions[:foreman]['log'] = "$HOME/#{path}"
|
|
140
148
|
|
|
141
149
|
# Commands to execute on remote server
|
|
142
150
|
steps = [
|
data/lib/foreplay/version.rb
CHANGED