Cross package maker. DEB/RPM generation or conversion. Derived from jordansissel/fpm.

⌈⌋ branch:  cross package maker


Check-in [4f64f4ad70]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1:4f64f4ad70f56a23788d4aa1ef8eb66689f46751
Date: 2014-10-25 21:23:49
User: jls
Comment:Fix a whole bunch of Ruby 1.8.7 bugs There are still 4 test failures: * rspec ./spec/fpm/package/rpm_spec.rb:297 # FPM::Package::RPM#output package attributes should have the correct 'after_target_uninstall' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:288 # FPM::Package::RPM#output package attributes should have the correct 'before_uninstall' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:279 # FPM::Package::RPM#output package attributes should have the correct 'after_install' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:270 # FPM::Package::RPM#output package attributes should have the correct 'before_install' trigger script
Tags And Properties
  • sym-trunk inherited from [2b439be7d6]
Context
2014-10-25
21:54
[ccb17c8ab3] Update changelog (user: jls, tags: trunk)
21:23
[4f64f4ad70] Fix a whole bunch of Ruby 1.8.7 bugs There are still 4 test failures: * rspec ./spec/fpm/package/rpm_spec.rb:297 # FPM::Package::RPM#output package attributes should have the correct 'after_target_uninstall' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:288 # FPM::Package::RPM#output package attributes should have the correct 'before_uninstall' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:279 # FPM::Package::RPM#output package attributes should have the correct 'after_install' trigger script * rspec ./spec/fpm/package/rpm_spec.rb:270 # FPM::Package::RPM#output package attributes should have the correct 'before_install' trigger script (user: jls, tags: trunk)
05:41
[35d4af81fd] adding --rpm-init option (fix) (user: jls, tags: trunk)
Changes

Changes to spec/fpm/command_spec.rb.

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

  describe "--log" do
    subject { FPM::Command.new("fpm") }
    let (:args) { [ "-s", "mock", "-t", "mock" ] }

    context "when not given" do
      it "should not raise an exception" do
        subject.parse([*args])
      end
    end
    context "when given a valid log level" do
      it "should not raise an exception" do
        subject.parse([*args, "--log", "error"])
        subject.parse([*args, "--log", "warn"])
        subject.parse([*args, "--log", "info"])
        subject.parse([*args, "--log", "debug"])
      end
    end
    context "when given an invalid log level" do
      it "should raise an exception" do
        insist { subject.parse([*args, "--log", ""]) }.raises FPM::Package::InvalidArgument
        insist { subject.parse([*args, "--log", "whatever"]) }.raises FPM::Package::InvalidArgument
        insist { subject.parse([*args, "--log", "fatal"]) }.raises FPM::Package::InvalidArgument
      end
    end
  end
end







|




|
|
|
|




|
|
|




56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

  describe "--log" do
    subject { FPM::Command.new("fpm") }
    let (:args) { [ "-s", "mock", "-t", "mock" ] }

    context "when not given" do
      it "should not raise an exception" do
        subject.parse(args)
      end
    end
    context "when given a valid log level" do
      it "should not raise an exception" do
        subject.parse(args + ["--log", "error"])
        subject.parse(args + ["--log", "warn"])
        subject.parse(args + ["--log", "info"])
        subject.parse(args + ["--log", "debug"])
      end
    end
    context "when given an invalid log level" do
      it "should raise an exception" do
        insist { subject.parse(args + ["--log", ""]) }.raises FPM::Package::InvalidArgument
        insist { subject.parse(args + ["--log", "whatever"]) }.raises FPM::Package::InvalidArgument
        insist { subject.parse(args + ["--log", "fatal"]) }.raises FPM::Package::InvalidArgument
      end
    end
  end
end