torba 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/torba/remote_sources/zip.rb +1 -1
- data/lib/torba.rb +6 -3
- data/test/remote_sources/zip_test.rb +7 -0
- data/torba.gemspec +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: 8077046fe1ce43eba5020e6c3bf29c60ddbb5e78
|
4
|
+
data.tar.gz: bd3ebc23042ec750e0b7079b89b4b5cc5bc05886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2466b9ec97f44de5aec27493474978ec031679f1d6527b1365dbae4335a7725ccaf7acf4ff3a83c8e89b567b05c099d6210b0b3cded8710a123ae622e9f42c47
|
7
|
+
data.tar.gz: 19cb9f0cc57317562981ce3e795b0615a1082ad098ce4e5bb242ba7b253fcff14b05dda659282b81f07c68679c00bbcac1af26dfa55a17528d03c99092f23f83
|
data/CHANGELOG.md
ADDED
@@ -39,7 +39,7 @@ module Torba
|
|
39
39
|
Torba.ui.info "downloading '#{url}'"
|
40
40
|
|
41
41
|
[
|
42
|
-
"curl -
|
42
|
+
"curl -Lf -o #{tempfile.path} #{url}",
|
43
43
|
"unzip -oqq -d #{cache_path} #{tempfile.path}",
|
44
44
|
].each do |command|
|
45
45
|
system(command) || raise(Errors::ShellCommandFailed.new(command))
|
data/lib/torba.rb
CHANGED
@@ -63,16 +63,19 @@ module Torba
|
|
63
63
|
# @yield a block, converts common exceptions into useful messages
|
64
64
|
def self.pretty_errors
|
65
65
|
yield
|
66
|
-
rescue
|
66
|
+
rescue Errors::UnbuiltPackage
|
67
67
|
ui.error "Your Torba is not packed yet."
|
68
68
|
ui.suggest "Run `bundle exec torba pack` to install missing packages."
|
69
69
|
exit(false)
|
70
|
-
rescue
|
70
|
+
rescue Errors::ShellCommandFailed => e
|
71
|
+
ui.error "Couldn't execute command '#{e.message}'"
|
72
|
+
exit(false)
|
73
|
+
rescue Errors::NothingToImport => e
|
71
74
|
ui.error "Couldn't import an asset(-s) '#{e.path}' from import list in '#{e.package}'."
|
72
75
|
ui.suggest "Check for typos."
|
73
76
|
ui.suggest "Make sure that the path has trailing '/' if its a directory."
|
74
77
|
exit(false)
|
75
|
-
rescue
|
78
|
+
rescue Errors::AssetNotFound => e
|
76
79
|
ui.error "Couldn't found an asset with path '#{e.message}'."
|
77
80
|
ui.suggest "Make sure that you've imported all image assets mentioned in a stylesheet(-s)."
|
78
81
|
exit(false)
|
@@ -17,5 +17,12 @@ module Torba
|
|
17
17
|
|
18
18
|
refute_equal remote.digest, another_remote.digest
|
19
19
|
end
|
20
|
+
|
21
|
+
def test_404
|
22
|
+
exception = assert_raises(Errors::ShellCommandFailed) do
|
23
|
+
RemoteSources::Zip.new("http://jquery.com/jquery.zip")["*"]
|
24
|
+
end
|
25
|
+
assert_includes exception.message, "curl"
|
26
|
+
end
|
20
27
|
end
|
21
28
|
end
|
data/torba.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrii Malyshko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- ".gitignore"
|
78
78
|
- ".travis.yml"
|
79
79
|
- ".yardopts"
|
80
|
+
- CHANGELOG.md
|
80
81
|
- CONTRIBUTING.md
|
81
82
|
- Gemfile
|
82
83
|
- LICENSE.txt
|