spitball 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/spitball-server +6 -1
- data/lib/spitball.rb +7 -5
- data/lib/spitball/remote.rb +4 -10
- data/spitball.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/bin/spitball-server
CHANGED
data/lib/spitball.rb
CHANGED
@@ -53,15 +53,17 @@ class Spitball
|
|
53
53
|
|
54
54
|
File.open(gemfile_path, 'w') {|f| f.write gemfile }
|
55
55
|
|
56
|
-
if system "cd #{bundle_path} && bundle install #{bundle_path} --disable-shared-gems #{without_clause}"
|
56
|
+
if system "cd #{bundle_path} && bundle install #{bundle_path} --disable-shared-gems #{without_clause} 2>&1"
|
57
57
|
|
58
58
|
# rewrite bang lines to #!/usr/bin/env ruby
|
59
59
|
# in serious lameness, OS X sed (more posix compliant?) requires
|
60
60
|
# a slightly different sed incantation for in place editing
|
61
|
-
if
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
if Dir["#{bundle_path}/bin/*"].length > 0
|
62
|
+
if RUBY_PLATFORM =~ /linux/
|
63
|
+
system "cd #{bundle_path} && find bin/* -exec sed -i'' '1,1 s|^#!/.*/ruby[ ]*|#!/usr/bin/env ruby|' {} \\;"
|
64
|
+
else
|
65
|
+
system "cd #{bundle_path} && find bin/* -exec sed -i '' '1,1 s|^#!/.*/ruby[ ]*|#!/usr/bin/env ruby|' {} \\;"
|
66
|
+
end
|
65
67
|
end
|
66
68
|
|
67
69
|
system "tar czf #{tarball_path}.#{Process.pid} -C #{bundle_path} ."
|
data/lib/spitball/remote.rb
CHANGED
@@ -3,8 +3,6 @@ require 'uri'
|
|
3
3
|
|
4
4
|
class Spitball::Remote
|
5
5
|
|
6
|
-
WAIT_SECONDS = 240
|
7
|
-
|
8
6
|
def initialize(gemfile, host, port)
|
9
7
|
@gemfile = gemfile
|
10
8
|
@host = host
|
@@ -46,14 +44,10 @@ class Spitball::Remote
|
|
46
44
|
def get_tarball_data(location)
|
47
45
|
uri = URI.parse(location)
|
48
46
|
|
49
|
-
(
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
sleep 2
|
54
|
-
end
|
47
|
+
if (res = Net::HTTP.get_response(uri)).code == '200'
|
48
|
+
return res.body
|
49
|
+
else
|
50
|
+
raise Spitball::ServerFailure, "Spitball download failed."
|
55
51
|
end
|
56
|
-
|
57
|
-
raise Spitball::ServerFailure, "Spitball download timed out."
|
58
52
|
end
|
59
53
|
end
|
data/spitball.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spitball
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Freels
|