Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix OutputParser unique error message code, allow jruby to fail on tr…

…avis-ci
  • Loading branch information...
commit c901bf57b50827bac50e397a731253dd38be7d27 1 parent 9be070b
sshaw authored
View
4 .travis.yml
@@ -4,3 +4,7 @@ rvm:
- 1.9.2
- 1.9.3
- jruby-19mode
+
+matrix:
+ allow_failures:
+ - rvm: jruby-19mode
View
4 README.rdoc
@@ -96,14 +96,14 @@ Default options and email notifications can be placed in a YAML file at <code>$H
upload:
shortname: enc0d3rz
transport: Aspera
- rate: 750_000
+ rate: 750000
# Email notifications for the upload command
email:
success:
cc: assets@example.com
subject: iTunes Upload <%= @apple_id %>
message: |
- <% @username > uploaded it using <%= @transport %>
+ <%= @username %> uploaded it using <%= @transport %>
Bye!
failure:
View
1  bin/itms
@@ -90,7 +90,6 @@ module Command
k = k.to_s.capitalize.gsub("_", " ")
printf "%-#{width}s %s\n", k, v
end
-
end
class Upload < Base
View
2  lib/itunes/store/transporter/command/verify.rb
@@ -21,7 +21,7 @@ def initialize(*config)
protected
def create_transporter_options(optz)
- # Incude the option if false
+ # Include the option if false
optz[:verify_assets] = !optz[:verify_assets] if optz.include?(:verify_assets)
super
end
View
9 lib/itunes/store/transporter/output_parser.rb
@@ -48,12 +48,11 @@ def parse_output(output)
end
end
- # Unique messages only. The block form of uniq() not available on Ruby < 1.9.2
+ # Unique messages only. The block form of uniq() is not available on Ruby < 1.9.2
[errors, warnings].each do |e|
- e.replace(e.inject({}) do |uniq, x|
- uniq[x.message] = x
- uniq
- end.values)
+ next if e.empty?
+ uniq = {}
+ e.replace(e.select { |m| uniq.include?(m.message) ? false : uniq[m.message] = true })
end
end
View
20 spec/shell_spec.rb
@@ -1,8 +1,8 @@
require "spec_helper"
require "rbconfig"
-describe ITunes::Store::Transporter::Shell do
- it "yields stdout and stderr as they become available" do
+describe ITunes::Store::Transporter::Shell do
+ it "yields stdout and stderr as they become available" do
ruby = File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"])
temp = Tempfile.new ""
# sleep else poll() (select) can favor the 1st FD in the read array, causing the
@@ -24,27 +24,27 @@
output = []
expect = [ [ :stdout, "OUT 1" ],
- [ :stderr, "ERR 1" ],
- [ :stdout, "OUT 2" ],
+ [ :stderr, "ERR 1" ],
+ [ :stdout, "OUT 2" ],
[ :stderr, "ERR 2" ] ]
-
- described_class.new(ruby).exec([temp.path]) do |line, stream|
+
+ described_class.new(ruby).exec([temp.path]) do |line, stream|
output << [ stream, line.chomp! ]
end
output.should == expect
end
- context "when on Windows" do
+ context "when on Windows" do
before(:all) { ENV["PROGRAMFILES"] = "C:\\" }
- it "selects the Windows executable" do
+ it "selects the Windows executable" do
described_class.stub(:windows? => true)
described_class.new.path.should match /#{described_class::WINDOWS_EXE}\Z/
end
end
- context "when on anything but Windows" do
- it "selects the right executable" do
+ context "when on anything but Windows" do
+ it "selects the right executable" do
described_class.stub(:windows? => false)
described_class.new.path.should match /#{described_class::EXE_NAME}\Z/
end
Please sign in to comment.
Something went wrong with that request. Please try again.