rails-zero 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/deployers/rails_zero/git_deployer.rb +11 -2
- data/lib/rails_zero.rb +1 -0
- data/lib/rails_zero/errors.rb +11 -0
- data/lib/rails_zero/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 633d49c207a8742a7222135569aeff6c659bb9b4
|
4
|
+
data.tar.gz: 3a480e119c0ee13841f9841db8d52863bb47ea72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87b300472f1a8b5b7789be70ec49e644f4f29c4426cdc0a44b051f6023da58e71c45321279f72a551f4402c1a59399ed45cde784184e04b84badc5176bbf98b
|
7
|
+
data.tar.gz: 1a7ae46814a4623ccc5ca2eb8392129c459293645b76138caa34b2cc35e1f4f66c20414a4c3cdec5c0fce54927b8fa46bcebe11d188744ac47d1c146775b3bfa
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module RailsZero
|
2
2
|
class GitDeployer
|
3
3
|
def run
|
4
|
+
remove_dir
|
5
|
+
create_dir
|
4
6
|
extract_package
|
5
7
|
push_package
|
6
8
|
end
|
@@ -26,10 +28,11 @@ module RailsZero
|
|
26
28
|
end
|
27
29
|
|
28
30
|
def extract_package
|
29
|
-
|
30
|
-
|
31
|
+
raise RailsZero::MissingPackageError, "Package #{package_path} does not exist"\
|
32
|
+
unless File.exists?(package_path)
|
31
33
|
command = "tar -xf #{package_path} -C #{dir}"
|
32
34
|
stdout_str, stderr_str, status = Open3.capture3(command)
|
35
|
+
raise RailsZero::Error, stderr_str if status.exitstatus > 0
|
33
36
|
end
|
34
37
|
|
35
38
|
def push_package
|
@@ -41,7 +44,13 @@ module RailsZero
|
|
41
44
|
commands << "#{git_binary} commit -m \"Deploy.\""
|
42
45
|
commands << "#{git_binary} push -u --force origin master"
|
43
46
|
stdout_str, stderr_str, status = Open3.capture3(commands.join(" && "))
|
47
|
+
raise RailsZero::GitError,
|
48
|
+
"Cannot git-deploy #{extracted_package_path} (binary=#{git_binary} "\
|
49
|
+
"remote=#{git_remote_url}): #{stdout_str} #{stderr_str}" \
|
50
|
+
if status.exitstatus > 0
|
44
51
|
end
|
52
|
+
rescue Errno::ENOENT => e
|
53
|
+
raise RailsZero::Error, e.message
|
45
54
|
end
|
46
55
|
|
47
56
|
def git_binary
|
data/lib/rails_zero.rb
CHANGED
data/lib/rails_zero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Bissinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/rails_zero/config.rb
|
91
91
|
- lib/rails_zero/drivers/poltergeist.rb
|
92
92
|
- lib/rails_zero/engine.rb
|
93
|
+
- lib/rails_zero/errors.rb
|
93
94
|
- lib/rails_zero/version.rb
|
94
95
|
- lib/rails_zero.rb
|
95
96
|
- lib/tasks/rails_zero.rake
|