ubalo 0.0.26 → 0.0.27
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.
- data/bin/ubalo +6 -9
- data/lib/ubalo.rb +4 -2
- data/lib/ubalo/version.rb +1 -1
- metadata +10 -10
data/bin/ubalo
CHANGED
@@ -136,7 +136,7 @@ def process_download pod_response, destination_path=nil
|
|
136
136
|
FileUtils.mkdir(File.join(destination_path, ".ubalo"))
|
137
137
|
|
138
138
|
File.open(File.join(destination_path, ".ubalo", "config"), "w") do |f|
|
139
|
-
f.puts(YAML.dump("pod_url" => url
|
139
|
+
f.puts(YAML.dump("pod_url" => url))
|
140
140
|
end
|
141
141
|
|
142
142
|
files.each do |filename,content|
|
@@ -291,12 +291,9 @@ command :push do |c|
|
|
291
291
|
c.action do |global_options,options,args|
|
292
292
|
pod_url = local_config.fetch('pod_url')
|
293
293
|
|
294
|
-
$stderr.print "Looking for .ubaloignore: "
|
295
294
|
if File.exist?(".ubaloignore")
|
296
295
|
ignore_patterns = File.read(".ubaloignore").each_line.map(&:strip)
|
297
|
-
$stderr.puts "found."
|
298
296
|
else
|
299
|
-
$stderr.puts "not found."
|
300
297
|
ignore_patterns = []
|
301
298
|
end
|
302
299
|
|
@@ -304,7 +301,7 @@ command :push do |c|
|
|
304
301
|
|
305
302
|
filenames = []
|
306
303
|
Dir.glob('{.**,**}').each do |path|
|
307
|
-
next if ignore_patterns.any?{|pattern| File.fnmatch?(pattern, path)}
|
304
|
+
next if ignore_patterns.any?{|pattern| File.fnmatch?(pattern, path, File::FNM_DOTMATCH)}
|
308
305
|
|
309
306
|
filenames << path
|
310
307
|
end
|
@@ -388,7 +385,7 @@ pre do |global,command,options,args|
|
|
388
385
|
|
389
386
|
if global[:version]
|
390
387
|
print "Ubalo version #{Ubalo::VERSION}"
|
391
|
-
raise
|
388
|
+
raise UbaloOKExit
|
392
389
|
end
|
393
390
|
|
394
391
|
# When logging in, don't use the authorization:
|
@@ -421,16 +418,16 @@ on_error do |exception|
|
|
421
418
|
$stderr.puts exception.inspect.sub('400 Bad Request', 'Error')
|
422
419
|
false # no additional raise required.
|
423
420
|
when RestClient::ResourceNotFound
|
424
|
-
$stderr.puts exception.inspect
|
421
|
+
$stderr.puts exception.inspect
|
425
422
|
false # no additional raise required.
|
426
423
|
when RestClient::Unauthorized, RestClient::Forbidden
|
427
424
|
$stderr.puts "Invalid credentials. Please run ubalo login."
|
428
425
|
true # fall back to GLI's handling
|
429
426
|
when GLI::BadCommandLine
|
430
427
|
true # fall back to GLI's handling
|
431
|
-
when
|
428
|
+
when UbaloOKExit
|
432
429
|
# Normal exit, preserving the correct exit code.
|
433
|
-
exit
|
430
|
+
exit 0
|
434
431
|
when UbaloMessage
|
435
432
|
$stderr.puts "Error: #{exception.message}"
|
436
433
|
exit 1
|
data/lib/ubalo.rb
CHANGED
@@ -42,7 +42,7 @@ class NilClass
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
class
|
45
|
+
class UbaloOKExit < StandardError
|
46
46
|
|
47
47
|
end
|
48
48
|
|
@@ -91,7 +91,7 @@ class Ubalo
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def format_pod pod
|
94
|
-
" #{pod.fetch('fullname')}
|
94
|
+
" #{pod.fetch('fullname')}"
|
95
95
|
end
|
96
96
|
|
97
97
|
private
|
@@ -203,6 +203,8 @@ class Ubalo
|
|
203
203
|
|
204
204
|
def download(pod_name)
|
205
205
|
get("#{base_url}/pods/#{pod_name}")
|
206
|
+
rescue RestClient::ResourceNotFound
|
207
|
+
raise UbaloMessage, "could not find #{pod_name}"
|
206
208
|
end
|
207
209
|
|
208
210
|
def pods
|
data/lib/ubalo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ubalo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gli
|
16
|
-
requirement: &
|
16
|
+
requirement: &70147294336420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70147294336420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: highline
|
27
|
-
requirement: &
|
27
|
+
requirement: &70147294335260 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70147294335260
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70147294334080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70147294334080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rest-client
|
49
|
-
requirement: &
|
49
|
+
requirement: &70147294327800 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.6.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70147294327800
|
58
58
|
description: CLI and API client for Ubalo
|
59
59
|
email: dev@ubalo.com
|
60
60
|
executables:
|