teabag 0.3.2 → 0.3.3
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/README.md +11 -2
- data/app/assets/javascripts/teabag/base/reporters/console.coffee +1 -1
- data/app/assets/javascripts/teabag/base/teabag.coffee +1 -0
- data/app/assets/javascripts/teabag-jasmine.js +3 -1
- data/app/assets/javascripts/teabag-mocha.js +3 -1
- data/lib/generators/teabag/install/templates/initializer.rb +12 -61
- data/lib/teabag/configuration.rb +2 -2
- data/lib/teabag/formatters/base_formatter.rb +4 -0
- data/lib/teabag/formatters/progress_formatter.rb +3 -3
- data/lib/teabag/formatters/swayze_or_oprah_formatter.rb +71 -0
- data/lib/teabag/runner.rb +2 -2
- data/lib/teabag/version.rb +1 -1
- data/spec/dummy/log/development.log +3800 -0
- data/spec/dummy/log/test.log +80 -0
- data/spec/dummy/tmp/cache/assets/C4E/9B0/sprockets%2Fa807397434c9262c3d62da3e91152184 +0 -0
- data/spec/dummy/tmp/cache/assets/C75/D50/sprockets%2F5302968a40e08d2c011aa38666d273f6 +0 -0
- data/spec/dummy/tmp/cache/assets/C8A/460/sprockets%2F77bffd9959420103906722b404ae8d59 +0 -0
- data/spec/dummy/tmp/cache/assets/C91/FA0/sprockets%2F2eb81283f5789ae91a69344552db3856 +0 -0
- data/spec/dummy/tmp/cache/assets/CE1/730/sprockets%2Fa1678837061e18d7aca0286c07acf676 +0 -0
- data/spec/dummy/tmp/cache/assets/CE9/9E0/sprockets%2F135480d497ed7e4884462dc0ef0b80d7 +0 -0
- data/spec/dummy/tmp/cache/assets/CEB/680/sprockets%2F67f0794ef8c0576d5c7da34f4437305a +0 -0
- data/spec/dummy/tmp/cache/assets/D00/110/sprockets%2F6a6353b7723a8b21708e0fbfe04bd422 +0 -0
- data/spec/dummy/tmp/cache/assets/D35/7C0/sprockets%2Ff536a2606eaf7d542c0985104cb62baf +0 -0
- data/spec/dummy/tmp/cache/assets/D35/F00/sprockets%2F8e7f22358123b7eb5e21d17f442ce0ac +0 -0
- data/spec/dummy/tmp/cache/assets/D49/A10/sprockets%2Fc4656bd995a6f297c26d19b13aadb963 +0 -0
- data/spec/dummy/tmp/cache/assets/D50/D70/sprockets%2Fe2a3e6c95b11e0801a4eebae3a026026 +0 -0
- data/spec/dummy/tmp/cache/assets/D51/400/sprockets%2Ff5e433d8a31e80985b75ce598de236be +0 -0
- data/spec/dummy/tmp/cache/assets/D8C/520/sprockets%2F221cd58a042baac534d27e4cfedc1188 +0 -0
- data/spec/dummy/tmp/cache/assets/DA5/0A0/sprockets%2F7a4b5928cec69ab65afff309a04d6b47 +0 -0
- data/spec/dummy/tmp/cache/assets/DB5/040/sprockets%2F9a9da5df88713663b9fbc945facca891 +0 -0
- data/spec/dummy/tmp/cache/assets/DC7/A10/sprockets%2F84a8af0fcbf401864e1ae5bf092cba94 +0 -0
- data/spec/dummy/tmp/cache/assets/DEB/110/sprockets%2F2dbdab0ce5babca645cdb5780004f875 +0 -0
- data/spec/dummy/tmp/cache/assets/DF6/0E0/sprockets%2F85b10db6e1afe643aba6d396abdd77f0 +0 -0
- data/spec/dummy/tmp/cache/assets/DFC/C30/sprockets%2Fb50a07cb30b0bd0eec8e98e5de79d65d +0 -0
- data/spec/dummy/tmp/cache/assets/E17/EF0/sprockets%2Fa291ad64a26afd055dfadabbdf03f154 +0 -0
- data/spec/javascripts/teabag/base/teabag_spec.coffee +13 -3
- data/spec/teabag/formatters/progress_formatter_spec.rb +4 -4
- data/spec/teabag/runner_spec.rb +6 -3
- metadata +5 -4
    
        data/spec/dummy/log/test.log
    CHANGED
    
    | @@ -3467,3 +3467,83 @@ Processing by Teabag::SpecController#index as */* | |
| 3467 3467 | 
             
              Parameters: {"suite"=>"foo"}
         | 
| 3468 3468 | 
             
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.8ms)
         | 
| 3469 3469 | 
             
            Completed 200 OK in 33ms (Views: 32.4ms)
         | 
| 3470 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:42:06 -0700
         | 
| 3471 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3472 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3473 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.8ms)
         | 
| 3474 | 
            +
            Completed 200 OK in 17ms (Views: 17.0ms)
         | 
| 3475 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:42:24 -0700
         | 
| 3476 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3477 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3478 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.4ms)
         | 
| 3479 | 
            +
            Completed 200 OK in 32ms (Views: 32.3ms)
         | 
| 3480 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:43:32 -0700
         | 
| 3481 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3482 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3483 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.9ms)
         | 
| 3484 | 
            +
            Completed 200 OK in 16ms (Views: 15.8ms)
         | 
| 3485 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:55:38 -0700
         | 
| 3486 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3487 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3488 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.8ms)
         | 
| 3489 | 
            +
            Completed 200 OK in 33ms (Views: 33.3ms)
         | 
| 3490 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:56:59 -0700
         | 
| 3491 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3492 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3493 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.9ms)
         | 
| 3494 | 
            +
            Completed 200 OK in 34ms (Views: 33.5ms)
         | 
| 3495 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:57:15 -0700
         | 
| 3496 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3497 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3498 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.6ms)
         | 
| 3499 | 
            +
            Completed 200 OK in 33ms (Views: 33.0ms)
         | 
| 3500 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:57:41 -0700
         | 
| 3501 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3502 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3503 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.6ms)
         | 
| 3504 | 
            +
            Completed 200 OK in 15ms (Views: 15.2ms)
         | 
| 3505 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 18:58:22 -0700
         | 
| 3506 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3507 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3508 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.6ms)
         | 
| 3509 | 
            +
            Completed 200 OK in 16ms (Views: 15.9ms)
         | 
| 3510 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 19:01:33 -0700
         | 
| 3511 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3512 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3513 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.9ms)
         | 
| 3514 | 
            +
            Completed 200 OK in 16ms (Views: 15.9ms)
         | 
| 3515 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 19:26:52 -0700
         | 
| 3516 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3517 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3518 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.7ms)
         | 
| 3519 | 
            +
            Completed 200 OK in 17ms (Views: 16.4ms)
         | 
| 3520 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 19:31:38 -0700
         | 
| 3521 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3522 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3523 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.8ms)
         | 
| 3524 | 
            +
            Completed 200 OK in 18ms (Views: 17.7ms)
         | 
| 3525 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 19:32:17 -0700
         | 
| 3526 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3527 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3528 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (24.8ms)
         | 
| 3529 | 
            +
            Completed 200 OK in 35ms (Views: 34.9ms)
         | 
| 3530 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-14 19:32:32 -0700
         | 
| 3531 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3532 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3533 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.9ms)
         | 
| 3534 | 
            +
            Completed 200 OK in 16ms (Views: 15.7ms)
         | 
| 3535 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-16 20:15:50 -0700
         | 
| 3536 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3537 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3538 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (8.1ms)
         | 
| 3539 | 
            +
            Completed 200 OK in 21ms (Views: 20.9ms)
         | 
| 3540 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-16 20:16:30 -0700
         | 
| 3541 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3542 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3543 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (7.5ms)
         | 
| 3544 | 
            +
            Completed 200 OK in 18ms (Views: 17.6ms)
         | 
| 3545 | 
            +
            Started GET "/teabag/foo" for 127.0.0.1 at 2012-12-16 20:18:48 -0700
         | 
| 3546 | 
            +
            Processing by Teabag::SpecController#index as */*
         | 
| 3547 | 
            +
              Parameters: {"suite"=>"foo"}
         | 
| 3548 | 
            +
              Rendered /Users/jejacks0n/Projects/teabag/app/views/teabag/spec/index.html.erb (6.7ms)
         | 
| 3549 | 
            +
            Completed 200 OK in 33ms (Views: 33.1ms)
         | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| Binary file | 
| @@ -3,9 +3,19 @@ describe "Teabag", -> | |
| 3 3 | 
             
              describe "class level API", ->
         | 
| 4 4 |  | 
| 5 5 | 
             
                it "has the expected API", ->
         | 
| 6 | 
            -
                   | 
| 7 | 
            -
             | 
| 8 | 
            -
                   | 
| 6 | 
            +
                  keys = Object.keys(Teabag)
         | 
| 7 | 
            +
                  # common
         | 
| 8 | 
            +
                  expect(keys).toContain("defer")
         | 
| 9 | 
            +
                  expect(keys).toContain("slow")
         | 
| 10 | 
            +
                  expect(keys).toContain("fixturePath")
         | 
| 11 | 
            +
                  expect(keys).toContain("finished")
         | 
| 12 | 
            +
                  expect(keys).toContain("execute")
         | 
| 13 | 
            +
                  expect(keys).toContain("version")
         | 
| 14 | 
            +
                  # caching
         | 
| 15 | 
            +
                  expect(keys).toContain("Date")
         | 
| 16 | 
            +
                  expect(keys).toContain("location")
         | 
| 17 | 
            +
                  expect(keys).toContain("console")
         | 
| 18 | 
            +
             | 
| 9 19 |  | 
| 10 20 | 
             
              describe "@execute", ->
         | 
| 11 21 |  | 
| @@ -63,11 +63,11 @@ describe Teabag::Formatters::ProgressFormatter do | |
| 63 63 | 
             
                describe "with failures" do
         | 
| 64 64 |  | 
| 65 65 | 
             
                  it "logs the details and raises an exception" do
         | 
| 66 | 
            -
                    subject.failures << Teabag::Result.build_from_json("default", "spec" => "some spec", "message" => "some message", "link" => "?grep=some%20spec")
         | 
| 66 | 
            +
                    subject.failures << Teabag::Result.build_from_json("default", "spec" => "some spec", "full_description" => "full description some spec", "message" => "some message", "link" => "?grep=some%20spec")
         | 
| 67 67 | 
             
                    expect {
         | 
| 68 68 | 
             
                      subject.results("elapsed" => 0.31337)
         | 
| 69 69 | 
             
                    }.to raise_error(Teabag::Failure)
         | 
| 70 | 
            -
                    expect(@log).to eq("\n\nFailures:\n\n  1) some spec\n\e[31m     Failure/Error: some message\n\e[0m\nFinished in 0.31337 seconds\n\e[31m666 examples, 1 failure\n\e[0m\nFailed examples:\n\e[31m\n/teabag/default?grep=some%20spec\e[0m\n\n")
         | 
| 70 | 
            +
                    expect(@log).to eq("\n\nFailures:\n\n  1) full description some spec\n\e[31m     Failure/Error: some message\n\e[0m\nFinished in 0.31337 seconds\n\e[31m666 examples, 1 failure\n\e[0m\nFailed examples:\n\e[31m\n/teabag/default?grep=some%20spec\e[0m\n\n")
         | 
| 71 71 | 
             
                    expect(subject.failures.length).to be(1)
         | 
| 72 72 | 
             
                  end
         | 
| 73 73 |  | 
| @@ -91,9 +91,9 @@ describe Teabag::Formatters::ProgressFormatter do | |
| 91 91 | 
             
                describe "with pending" do
         | 
| 92 92 |  | 
| 93 93 | 
             
                  it "logs the details" do
         | 
| 94 | 
            -
                    subject.pendings << Teabag::Result.build_from_json("default", "spec" => "some spec")
         | 
| 94 | 
            +
                    subject.pendings << Teabag::Result.build_from_json("default", "spec" => "some spec", "full_description" => "full description some spec")
         | 
| 95 95 | 
             
                    subject.results("elapsed" => 0.31337)
         | 
| 96 | 
            -
                    expect(@log).to eq("\n\nPending:\e[33m\n  some spec\n\e[0m\e[36m    # Not yet implemented\n\e[0m\nFinished in 0.31337 seconds\n\e[33m666 examples, 0 failures, 1 pending\n\e[0m")
         | 
| 96 | 
            +
                    expect(@log).to eq("\n\nPending:\e[33m\n  full description some spec\n\e[0m\e[36m    # Not yet implemented\n\e[0m\nFinished in 0.31337 seconds\n\e[33m666 examples, 0 failures, 1 pending\n\e[0m")
         | 
| 97 97 | 
             
                  end
         | 
| 98 98 |  | 
| 99 99 | 
             
                end
         | 
    
        data/spec/teabag/runner_spec.rb
    CHANGED
    
    | @@ -1,6 +1,5 @@ | |
| 1 1 | 
             
            require "spec_helper"
         | 
| 2 2 | 
             
            require "teabag/runner"
         | 
| 3 | 
            -
            require "teabag/formatters/progress_formatter"
         | 
| 4 3 | 
             
            require "teabag/exceptions"
         | 
| 5 4 |  | 
| 6 5 | 
             
            describe Teabag::Runner do
         | 
| @@ -13,7 +12,11 @@ describe Teabag::Runner do | |
| 13 12 | 
             
              describe "its constructor" do
         | 
| 14 13 |  | 
| 15 14 | 
             
                it "creates a progress formatter if no other formatter is provided" do
         | 
| 16 | 
            -
                   | 
| 15 | 
            +
                  Teabag::Formatters::XmlFormatter = Class.new
         | 
| 16 | 
            +
                  Teabag.configuration.formatters = "progress, xml"
         | 
| 17 | 
            +
                  expect(subject.formatters[0]).to be_a(Teabag::Formatters::ProgressFormatter)
         | 
| 18 | 
            +
                  expect(subject.formatters[1]).to be_a(Teabag::Formatters::XmlFormatter)
         | 
| 19 | 
            +
                  Teabag.configuration.formatters = "progress"
         | 
| 17 20 | 
             
                end
         | 
| 18 21 |  | 
| 19 22 | 
             
              end
         | 
| @@ -66,7 +69,7 @@ describe Teabag::Runner do | |
| 66 69 | 
             
                  subject.process('{"_teabag": true, "type": "error"}')
         | 
| 67 70 | 
             
                  subject.process('{"_teabag": true, "type": "exception"}')
         | 
| 68 71 | 
             
                  subject.process('{"_teabag": true, "type": "results"}')
         | 
| 69 | 
            -
                  subject.failure_count. | 
| 72 | 
            +
                  expect(subject.failure_count).to be(1)
         | 
| 70 73 | 
             
                end
         | 
| 71 74 |  | 
| 72 75 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: teabag
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.3
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2012-12- | 
| 12 | 
            +
            date: 2012-12-17 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: railties
         | 
| @@ -99,6 +99,7 @@ files: | |
| 99 99 | 
             
            - lib/teabag/exceptions.rb
         | 
| 100 100 | 
             
            - lib/teabag/formatters/base_formatter.rb
         | 
| 101 101 | 
             
            - lib/teabag/formatters/progress_formatter.rb
         | 
| 102 | 
            +
            - lib/teabag/formatters/swayze_or_oprah_formatter.rb
         | 
| 102 103 | 
             
            - lib/teabag/phantomjs/runner.coffee
         | 
| 103 104 | 
             
            - lib/teabag/result.rb
         | 
| 104 105 | 
             
            - lib/teabag/runner.rb
         | 
| @@ -575,7 +576,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 575 576 | 
             
                  version: '0'
         | 
| 576 577 | 
             
                  segments:
         | 
| 577 578 | 
             
                  - 0
         | 
| 578 | 
            -
                  hash:  | 
| 579 | 
            +
                  hash: 1417140311627210250
         | 
| 579 580 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 580 581 | 
             
              none: false
         | 
| 581 582 | 
             
              requirements:
         | 
| @@ -584,7 +585,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 584 585 | 
             
                  version: '0'
         | 
| 585 586 | 
             
                  segments:
         | 
| 586 587 | 
             
                  - 0
         | 
| 587 | 
            -
                  hash:  | 
| 588 | 
            +
                  hash: 1417140311627210250
         | 
| 588 589 | 
             
            requirements: []
         | 
| 589 590 | 
             
            rubyforge_project: 
         | 
| 590 591 | 
             
            rubygems_version: 1.8.24
         |