simple_provision 0.99.4 → 0.99.5
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/README.md +3 -0
- data/lib/simple_provision/scp.rb +14 -4
- data/lib/simple_provision/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: c1b94eb29ab3fa531033b62ec0f7b9f957c54122
|
4
|
+
data.tar.gz: 716bd8499c0435e8055c432b1561cbd17733d8da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42580941b0da8fa9e8c977a8a3f6326153c32aa9f3090b51f9bedbcd18d5683e060c2b9f5397674a281f0e54da6198c7ab9b8eae20cf22fc2f7a417e9ad9845a
|
7
|
+
data.tar.gz: c10a3d916d57b1d1f8b84401ffcbb2935e9bff921df3e57ec842a9187409789516af3b088fcd250a28c7e7dbb5402fe0358cddf8e77603d8c3fdce00d406ad66
|
data/README.md
CHANGED
@@ -11,6 +11,9 @@ we have the working provision profile in just half an hour. From that
|
|
11
11
|
moment, provision another instance is just the matter of kicking off
|
12
12
|
a command from the terminal.
|
13
13
|
|
14
|
+
I use simple_provision with mina in my Rails projects and the combination
|
15
|
+
has been working really well for me.
|
16
|
+
|
14
17
|
Let's rock.
|
15
18
|
|
16
19
|
### Recipes repo
|
data/lib/simple_provision/scp.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module SimpleProvision
|
2
2
|
class SCP
|
3
|
-
FILENAME = "
|
3
|
+
FILENAME = "simpro.tar.gz"
|
4
4
|
|
5
5
|
def initialize(server, opts)
|
6
6
|
@server, @opts = server, opts
|
@@ -24,11 +24,21 @@ module SimpleProvision
|
|
24
24
|
raise "Both files and scripts are empty. You should provide some"
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
system("mkdir tmp")
|
28
|
+
system("mkdir tmp/files")
|
29
|
+
system("mkdir tmp/scripts")
|
30
|
+
files.each do |f|
|
31
|
+
system("cp #{f} tmp/files/")
|
32
|
+
end
|
33
|
+
scripts.each do |f|
|
34
|
+
system("cp #{f} tmp/scripts/")
|
35
|
+
end
|
36
|
+
|
37
|
+
system("cd tmp && tar -czf #{FILENAME} files/ scripts/")
|
28
38
|
end
|
29
39
|
|
30
40
|
def scp_files_to_server
|
31
|
-
@server.scp(FILENAME, ".")
|
41
|
+
@server.scp("tmp/#{FILENAME}", ".")
|
32
42
|
end
|
33
43
|
|
34
44
|
def extract_remote_archive
|
@@ -36,7 +46,7 @@ module SimpleProvision
|
|
36
46
|
end
|
37
47
|
|
38
48
|
def remove_local_archive
|
39
|
-
`rm -
|
49
|
+
`rm -rf tmp`
|
40
50
|
end
|
41
51
|
end
|
42
52
|
end
|