simplecov-idobata 0.0.1
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.
- checksums.yaml +7 -0
 - data/.gitignore +22 -0
 - data/.travis.yml +7 -0
 - data/Gemfile +4 -0
 - data/LICENSE.txt +22 -0
 - data/README.md +49 -0
 - data/Rakefile +5 -0
 - data/lib/simplecov/idobata.rb +24 -0
 - data/lib/simplecov/idobata/badge.rb +36 -0
 - data/lib/simplecov/idobata/version.rb +7 -0
 - data/simplecov-idobata.gemspec +28 -0
 - data/simplecov-idobata.png +0 -0
 - data/test/test_helper.rb +5 -0
 - data/test/test_idobata_formatter_badge.rb +131 -0
 - data/test/test_idobata_formatter_hook.rb +84 -0
 - metadata +174 -0
 
    
        checksums.yaml
    ADDED
    
    | 
         @@ -0,0 +1,7 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            SHA1:
         
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 84f5cb5d07724f21f150297465fc7a2d16a25fdf
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 510a65c095c6d15a72b89bb26ed961e06e61ba3f
         
     | 
| 
      
 5 
     | 
    
         
            +
            SHA512:
         
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: dbe7778a3ae2f9c97dfb43944cd471eddb9aff8dee4107cb73deced0c4c3697daf43608977fc376cd1b315afd8319b87f552f202d7240f5fe0e47d9bb52f6ac0
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c9f5d5a5722ee6f0a3461868cbaeeaf21ba080fea182977a466d7654c4ac463fda6c2701b9b98ceaddcf79c32b41ca8b8cfe3b0c424497588e7109b446c9f8c9
         
     | 
    
        data/.gitignore
    ADDED
    
    | 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            *.gem
         
     | 
| 
      
 2 
     | 
    
         
            +
            *.rbc
         
     | 
| 
      
 3 
     | 
    
         
            +
            .bundle
         
     | 
| 
      
 4 
     | 
    
         
            +
            .config
         
     | 
| 
      
 5 
     | 
    
         
            +
            .yardoc
         
     | 
| 
      
 6 
     | 
    
         
            +
            Gemfile.lock
         
     | 
| 
      
 7 
     | 
    
         
            +
            InstalledFiles
         
     | 
| 
      
 8 
     | 
    
         
            +
            _yardoc
         
     | 
| 
      
 9 
     | 
    
         
            +
            coverage
         
     | 
| 
      
 10 
     | 
    
         
            +
            doc/
         
     | 
| 
      
 11 
     | 
    
         
            +
            lib/bundler/man
         
     | 
| 
      
 12 
     | 
    
         
            +
            pkg
         
     | 
| 
      
 13 
     | 
    
         
            +
            rdoc
         
     | 
| 
      
 14 
     | 
    
         
            +
            spec/reports
         
     | 
| 
      
 15 
     | 
    
         
            +
            test/tmp
         
     | 
| 
      
 16 
     | 
    
         
            +
            test/version_tmp
         
     | 
| 
      
 17 
     | 
    
         
            +
            tmp
         
     | 
| 
      
 18 
     | 
    
         
            +
            *.bundle
         
     | 
| 
      
 19 
     | 
    
         
            +
            *.so
         
     | 
| 
      
 20 
     | 
    
         
            +
            *.o
         
     | 
| 
      
 21 
     | 
    
         
            +
            *.a
         
     | 
| 
      
 22 
     | 
    
         
            +
            mkmf.log
         
     | 
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Copyright (c) 2014 Seiei Higa
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            MIT License
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining
         
     | 
| 
      
 6 
     | 
    
         
            +
            a copy of this software and associated documentation files (the
         
     | 
| 
      
 7 
     | 
    
         
            +
            "Software"), to deal in the Software without restriction, including
         
     | 
| 
      
 8 
     | 
    
         
            +
            without limitation the rights to use, copy, modify, merge, publish,
         
     | 
| 
      
 9 
     | 
    
         
            +
            distribute, sublicense, and/or sell copies of the Software, and to
         
     | 
| 
      
 10 
     | 
    
         
            +
            permit persons to whom the Software is furnished to do so, subject to
         
     | 
| 
      
 11 
     | 
    
         
            +
            the following conditions:
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be
         
     | 
| 
      
 14 
     | 
    
         
            +
            included in all copies or substantial portions of the Software.
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         
     | 
| 
      
 17 
     | 
    
         
            +
            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         
     | 
| 
      
 18 
     | 
    
         
            +
            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
         
     | 
| 
      
 19 
     | 
    
         
            +
            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
         
     | 
| 
      
 20 
     | 
    
         
            +
            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
         
     | 
| 
      
 21 
     | 
    
         
            +
            OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         
     | 
| 
      
 22 
     | 
    
         
            +
            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         
     | 
    
        data/README.md
    ADDED
    
    | 
         @@ -0,0 +1,49 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # SimpleCov::Formatter::IdobataFormatter
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            [](https://travis-ci.org/hanachin/simplecov-idobata)
         
     | 
| 
      
 4 
     | 
    
         
            +
            [](https://codeclimate.com/github/hanachin/simplecov-idobata)
         
     | 
| 
      
 5 
     | 
    
         
            +
            [](https://codeclimate.com/github/hanachin/simplecov-idobata)
         
     | 
| 
      
 6 
     | 
    
         
            +
            [](https://gemnasium.com/hanachin/simplecov-idobata)
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            report your test coverage to idobata.io.
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            ## Installation
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            Add this line to your application's Gemfile:
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                gem 'simplecov-idobata', require: false
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            And then execute:
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                $ bundle
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            Or install it yourself as:
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                $ gem install simplecov-idobata
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            ## Usage
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            ``` ruby
         
     | 
| 
      
 29 
     | 
    
         
            +
            require 'simplecov/idobata'
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            SimpleCov.formatters = [
         
     | 
| 
      
 32 
     | 
    
         
            +
              SimpleCov::Formatter::HTMLFormatter,
         
     | 
| 
      
 33 
     | 
    
         
            +
              SimpleCov::Formatter::IdobataFormatter,
         
     | 
| 
      
 34 
     | 
    
         
            +
            ]
         
     | 
| 
      
 35 
     | 
    
         
            +
            # Set environment variable SIMPLECOV_IDOBATA_HOOK_URL or
         
     | 
| 
      
 36 
     | 
    
         
            +
            SimpleCov::Formatter::IdobataFormatter.hook_url = "Your idobata generic webhook endpoint url"
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
            # You can customize the coverage thresholds, default is here:
         
     | 
| 
      
 39 
     | 
    
         
            +
            SimpleCov::Formatter::IdobataFormatter.goal = 90
         
     | 
| 
      
 40 
     | 
    
         
            +
            SimpleCov::Formatter::IdobataFormatter.warning = 80
         
     | 
| 
      
 41 
     | 
    
         
            +
            ```
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            ## Contributing
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            1. Fork it ( https://github.com/hanachin/simplecov-idobata/fork )
         
     | 
| 
      
 46 
     | 
    
         
            +
            2. Create your feature branch (`git checkout -b my-new-feature`)
         
     | 
| 
      
 47 
     | 
    
         
            +
            3. Commit your changes (`git commit -am 'Add some feature'`)
         
     | 
| 
      
 48 
     | 
    
         
            +
            4. Push to the branch (`git push origin my-new-feature`)
         
     | 
| 
      
 49 
     | 
    
         
            +
            5. Create a new Pull Request
         
     | 
    
        data/Rakefile
    ADDED
    
    
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "simplecov/idobata/version"
         
     | 
| 
      
 2 
     | 
    
         
            +
            require "simplecov/idobata/badge"
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "idobata_hook"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "idobadge"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            class SimpleCov::Formatter::IdobataFormatter
         
     | 
| 
      
 7 
     | 
    
         
            +
              class << self
         
     | 
| 
      
 8 
     | 
    
         
            +
                attr_accessor :hook_url, :goal, :warning
         
     | 
| 
      
 9 
     | 
    
         
            +
              end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              def initialize
         
     | 
| 
      
 12 
     | 
    
         
            +
                @hook_url = self.class.hook_url || ENV['SIMPLECOV_IDOBATA_HOOK_URL']
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              def format(result)
         
     | 
| 
      
 16 
     | 
    
         
            +
                client.send(Badge.new(result).to_s, format: :html)
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
              private
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              def client
         
     | 
| 
      
 22 
     | 
    
         
            +
                IdobataHook::Client.new(@hook_url)
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            class SimpleCov::Formatter::IdobataFormatter
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Badge
         
     | 
| 
      
 3 
     | 
    
         
            +
                def initialize(result)
         
     | 
| 
      
 4 
     | 
    
         
            +
                  @result = result
         
     | 
| 
      
 5 
     | 
    
         
            +
                end
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 8 
     | 
    
         
            +
                  Idobadge.send(badge_method, message)
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                private
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                def message
         
     | 
| 
      
 14 
     | 
    
         
            +
                  "%d / %d LOC (%.1f%%) covered." %  [@result.covered_lines, @result.total_lines, @result.covered_percent]
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                def goal_reached?
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @result.covered_percent >= (SimpleCov::Formatter::IdobataFormatter.goal || 90)
         
     | 
| 
      
 19 
     | 
    
         
            +
                end
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                def warning?
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @result.covered_percent >= (SimpleCov::Formatter::IdobataFormatter.warning || 80)
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def badge_method
         
     | 
| 
      
 26 
     | 
    
         
            +
                  case
         
     | 
| 
      
 27 
     | 
    
         
            +
                  when goal_reached?
         
     | 
| 
      
 28 
     | 
    
         
            +
                    :success
         
     | 
| 
      
 29 
     | 
    
         
            +
                  when warning?
         
     | 
| 
      
 30 
     | 
    
         
            +
                    :warning
         
     | 
| 
      
 31 
     | 
    
         
            +
                  else
         
     | 
| 
      
 32 
     | 
    
         
            +
                    :failure
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # coding: utf-8
         
     | 
| 
      
 2 
     | 
    
         
            +
            lib = File.expand_path('../lib', __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'simplecov/idobata/version'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |spec|
         
     | 
| 
      
 7 
     | 
    
         
            +
              spec.name          = "simplecov-idobata"
         
     | 
| 
      
 8 
     | 
    
         
            +
              spec.version       = SimpleCov::Formatter::IdobataFormatter::VERSION
         
     | 
| 
      
 9 
     | 
    
         
            +
              spec.authors       = ["Seiei Higa"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              spec.email         = ["hanachin@gmail.com"]
         
     | 
| 
      
 11 
     | 
    
         
            +
              spec.summary       = %q{report your test coverage to idobata.io.}
         
     | 
| 
      
 12 
     | 
    
         
            +
              spec.homepage      = "https://github.com/hanachin/simplecov-idobata"
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.license       = "MIT"
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              spec.files         = `git ls-files -z`.split("\x0")
         
     | 
| 
      
 16 
     | 
    
         
            +
              spec.executables   = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
         
     | 
| 
      
 17 
     | 
    
         
            +
              spec.test_files    = spec.files.grep(%r{^(test|spec|features)/})
         
     | 
| 
      
 18 
     | 
    
         
            +
              spec.require_paths = ["lib"]
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              spec.add_dependency "simplecov"
         
     | 
| 
      
 21 
     | 
    
         
            +
              spec.add_dependency "idobadge"
         
     | 
| 
      
 22 
     | 
    
         
            +
              spec.add_dependency "idobata_hook"
         
     | 
| 
      
 23 
     | 
    
         
            +
              spec.add_development_dependency "bundler", "~> 1.6"
         
     | 
| 
      
 24 
     | 
    
         
            +
              spec.add_development_dependency "codeclimate-test-reporter"
         
     | 
| 
      
 25 
     | 
    
         
            +
              spec.add_development_dependency "minitest"
         
     | 
| 
      
 26 
     | 
    
         
            +
              spec.add_development_dependency "webmock"
         
     | 
| 
      
 27 
     | 
    
         
            +
              spec.add_development_dependency "rake"
         
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
| 
         Binary file 
     | 
    
        data/test/test_helper.rb
    ADDED
    
    
| 
         @@ -0,0 +1,131 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'minitest/autorun'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'simplecov/idobata'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe SimpleCov::Formatter::IdobataFormatter do
         
     | 
| 
      
 5 
     | 
    
         
            +
              before do
         
     | 
| 
      
 6 
     | 
    
         
            +
                @result = MiniTest::Mock.new
         
     | 
| 
      
 7 
     | 
    
         
            +
                @client = MiniTest::Mock.new
         
     | 
| 
      
 8 
     | 
    
         
            +
                @client.expect(:send, ':D') do |badge, options|
         
     | 
| 
      
 9 
     | 
    
         
            +
                  badge.must_equal @badge_source
         
     | 
| 
      
 10 
     | 
    
         
            +
                  options[:format].must_equal :html
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
                @formatter = SimpleCov::Formatter::IdobataFormatter.new
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              describe 'when covered 90%' do
         
     | 
| 
      
 16 
     | 
    
         
            +
                before do
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @result.expect(:covered_lines, 9)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @result.expect(:total_lines, 10)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  3.times { @result.expect(:covered_percent, 90.0) }
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                it "should post success badge" do
         
     | 
| 
      
 23 
     | 
    
         
            +
                  @formatter.stub :client, @client do
         
     | 
| 
      
 24 
     | 
    
         
            +
                    @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 25 
     | 
    
         
            +
                      <span class="label label-success"><i class="fa fa-sun-o"></i> <span class="label label-inverse">9 / 10 LOC (90.0%) covered.</span></span>
         
     | 
| 
      
 26 
     | 
    
         
            +
                    SOURCE
         
     | 
| 
      
 27 
     | 
    
         
            +
                    @formatter.format(@result)
         
     | 
| 
      
 28 
     | 
    
         
            +
                    @client.verify
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
                end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                describe 'when goal is set to 95%' do
         
     | 
| 
      
 33 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 34 
     | 
    
         
            +
                    @original_goal = SimpleCov::Formatter::IdobataFormatter.goal
         
     | 
| 
      
 35 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.goal = 95.0
         
     | 
| 
      
 36 
     | 
    
         
            +
                  end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                  after do
         
     | 
| 
      
 39 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.goal = @original_goal
         
     | 
| 
      
 40 
     | 
    
         
            +
                  end
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                  it "should post warning badge" do
         
     | 
| 
      
 43 
     | 
    
         
            +
                    @formatter.stub :client, @client do
         
     | 
| 
      
 44 
     | 
    
         
            +
                      @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 45 
     | 
    
         
            +
                        <span class="label label-warning"><i class="fa fa-umbrella"></i> <span class="label label-inverse">9 / 10 LOC (90.0%) covered.</span></span>
         
     | 
| 
      
 46 
     | 
    
         
            +
                      SOURCE
         
     | 
| 
      
 47 
     | 
    
         
            +
                      @formatter.format(@result)
         
     | 
| 
      
 48 
     | 
    
         
            +
                      @client.verify
         
     | 
| 
      
 49 
     | 
    
         
            +
                    end
         
     | 
| 
      
 50 
     | 
    
         
            +
                  end
         
     | 
| 
      
 51 
     | 
    
         
            +
                end
         
     | 
| 
      
 52 
     | 
    
         
            +
              end
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
              describe 'when covered 80%' do
         
     | 
| 
      
 55 
     | 
    
         
            +
                before do
         
     | 
| 
      
 56 
     | 
    
         
            +
                  @result.expect(:covered_lines, 8)
         
     | 
| 
      
 57 
     | 
    
         
            +
                  @result.expect(:total_lines, 10)
         
     | 
| 
      
 58 
     | 
    
         
            +
                  3.times { @result.expect(:covered_percent, 80.0) }
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
                it "should post warning badge" do
         
     | 
| 
      
 62 
     | 
    
         
            +
                  @formatter.stub :client, @client do
         
     | 
| 
      
 63 
     | 
    
         
            +
                    @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 64 
     | 
    
         
            +
                      <span class="label label-warning"><i class="fa fa-umbrella"></i> <span class="label label-inverse">8 / 10 LOC (80.0%) covered.</span></span>
         
     | 
| 
      
 65 
     | 
    
         
            +
                    SOURCE
         
     | 
| 
      
 66 
     | 
    
         
            +
                    @formatter.format(@result)
         
     | 
| 
      
 67 
     | 
    
         
            +
                    @client.verify
         
     | 
| 
      
 68 
     | 
    
         
            +
                  end
         
     | 
| 
      
 69 
     | 
    
         
            +
                end
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                describe 'when warning is set to 85%' do
         
     | 
| 
      
 72 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 73 
     | 
    
         
            +
                    @original_warning = SimpleCov::Formatter::IdobataFormatter.warning
         
     | 
| 
      
 74 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.warning = 85.0
         
     | 
| 
      
 75 
     | 
    
         
            +
                  end
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
                  after do
         
     | 
| 
      
 78 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.warning = @original_warning
         
     | 
| 
      
 79 
     | 
    
         
            +
                  end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
                  it "should post failure badge" do
         
     | 
| 
      
 82 
     | 
    
         
            +
                    @formatter.stub :client, @client do
         
     | 
| 
      
 83 
     | 
    
         
            +
                      @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 84 
     | 
    
         
            +
                        <span class="label label-important"><i class="fa fa-bomb"></i> <span class="label label-inverse">8 / 10 LOC (80.0%) covered.</span></span>
         
     | 
| 
      
 85 
     | 
    
         
            +
                      SOURCE
         
     | 
| 
      
 86 
     | 
    
         
            +
                      @formatter.format(@result)
         
     | 
| 
      
 87 
     | 
    
         
            +
                      @client.verify
         
     | 
| 
      
 88 
     | 
    
         
            +
                    end
         
     | 
| 
      
 89 
     | 
    
         
            +
                  end
         
     | 
| 
      
 90 
     | 
    
         
            +
                end
         
     | 
| 
      
 91 
     | 
    
         
            +
              end
         
     | 
| 
      
 92 
     | 
    
         
            +
             
     | 
| 
      
 93 
     | 
    
         
            +
              describe 'when covered 79%' do
         
     | 
| 
      
 94 
     | 
    
         
            +
                before do
         
     | 
| 
      
 95 
     | 
    
         
            +
                  @result.expect(:covered_lines, 79)
         
     | 
| 
      
 96 
     | 
    
         
            +
                  @result.expect(:total_lines, 100)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  3.times { @result.expect(:covered_percent, 79.0) }
         
     | 
| 
      
 98 
     | 
    
         
            +
                end
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                it "should post failure badge" do
         
     | 
| 
      
 101 
     | 
    
         
            +
                  @formatter.stub :client, @client do
         
     | 
| 
      
 102 
     | 
    
         
            +
                    @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 103 
     | 
    
         
            +
                      <span class="label label-important"><i class="fa fa-bomb"></i> <span class="label label-inverse">79 / 100 LOC (79.0%) covered.</span></span>
         
     | 
| 
      
 104 
     | 
    
         
            +
                    SOURCE
         
     | 
| 
      
 105 
     | 
    
         
            +
                    @formatter.format(@result)
         
     | 
| 
      
 106 
     | 
    
         
            +
                    @client.verify
         
     | 
| 
      
 107 
     | 
    
         
            +
                  end
         
     | 
| 
      
 108 
     | 
    
         
            +
                end
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
                describe 'when goal is set to 79%' do
         
     | 
| 
      
 111 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 112 
     | 
    
         
            +
                    @original_goal = SimpleCov::Formatter::IdobataFormatter.goal
         
     | 
| 
      
 113 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.goal = 79.0
         
     | 
| 
      
 114 
     | 
    
         
            +
                  end
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
                  after do
         
     | 
| 
      
 117 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.goal = @original_goal
         
     | 
| 
      
 118 
     | 
    
         
            +
                  end
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                  it "should post success badge" do
         
     | 
| 
      
 121 
     | 
    
         
            +
                    @formatter.stub :client, @client do
         
     | 
| 
      
 122 
     | 
    
         
            +
                      @badge_source = (<<-SOURCE).strip
         
     | 
| 
      
 123 
     | 
    
         
            +
                        <span class="label label-success"><i class="fa fa-sun-o"></i> <span class="label label-inverse">79 / 100 LOC (79.0%) covered.</span></span>
         
     | 
| 
      
 124 
     | 
    
         
            +
                      SOURCE
         
     | 
| 
      
 125 
     | 
    
         
            +
                      @formatter.format(@result)
         
     | 
| 
      
 126 
     | 
    
         
            +
                      @client.verify
         
     | 
| 
      
 127 
     | 
    
         
            +
                    end
         
     | 
| 
      
 128 
     | 
    
         
            +
                  end
         
     | 
| 
      
 129 
     | 
    
         
            +
                end
         
     | 
| 
      
 130 
     | 
    
         
            +
              end
         
     | 
| 
      
 131 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,84 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'minitest/autorun'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'simplecov/idobata'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            describe SimpleCov::Formatter::IdobataFormatter do
         
     | 
| 
      
 5 
     | 
    
         
            +
              before do
         
     | 
| 
      
 6 
     | 
    
         
            +
                @original_simplecov_idobata_hook_url = ENV['SIMPLECOV_IDOBATA_HOOK_URL']
         
     | 
| 
      
 7 
     | 
    
         
            +
                @original_hook_url = SimpleCov::Formatter::IdobataFormatter.hook_url
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                @badge = -> (result) {
         
     | 
| 
      
 10 
     | 
    
         
            +
                  result.must_equal 'result'
         
     | 
| 
      
 11 
     | 
    
         
            +
                  'hi'
         
     | 
| 
      
 12 
     | 
    
         
            +
                }
         
     | 
| 
      
 13 
     | 
    
         
            +
              end
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              after do
         
     | 
| 
      
 16 
     | 
    
         
            +
                ENV['SIMPLECOV_IDOBATA_HOOK_URL'] = @original_simplecov_idobata_hook_url
         
     | 
| 
      
 17 
     | 
    
         
            +
                SimpleCov::Formatter::IdobataFormatter.hook_url = @original_hook_url
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              describe 'when hook_url is provided' do
         
     | 
| 
      
 21 
     | 
    
         
            +
                before do
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @hook_url = 'https://idobata.io/hook/generic/00000000-0000-0000-0000-000000000000'
         
     | 
| 
      
 23 
     | 
    
         
            +
                  SimpleCov::Formatter::IdobataFormatter.hook_url = @hook_url
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @stub_https = stub_request(:post, @hook_url).with {|request|
         
     | 
| 
      
 25 
     | 
    
         
            +
                    request.body == 'format=html&source=hi'
         
     | 
| 
      
 26 
     | 
    
         
            +
                  }
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                it "should post badge to hook_url" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                  SimpleCov::Formatter::IdobataFormatter::Badge.stub :new, @badge do
         
     | 
| 
      
 31 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.new.format('result')
         
     | 
| 
      
 32 
     | 
    
         
            +
                    assert_requested(@stub_https)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  end
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                describe 'when SIMPLECOV_IDOBATA_HOOK_URL is provided' do
         
     | 
| 
      
 37 
     | 
    
         
            +
                  before do
         
     | 
| 
      
 38 
     | 
    
         
            +
                    ENV['SIMPLECOV_IDOBATA_HOOK_URL'] = 'https://idobata.io/hook/generic/11111111-1111-1111-1111-111111111111'
         
     | 
| 
      
 39 
     | 
    
         
            +
                  end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                  it "should post badge to hook_url" do
         
     | 
| 
      
 42 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter::Badge.stub :new, @badge do
         
     | 
| 
      
 43 
     | 
    
         
            +
                      SimpleCov::Formatter::IdobataFormatter.new.format('result')
         
     | 
| 
      
 44 
     | 
    
         
            +
                      assert_requested(@stub_https)
         
     | 
| 
      
 45 
     | 
    
         
            +
                    end
         
     | 
| 
      
 46 
     | 
    
         
            +
                  end
         
     | 
| 
      
 47 
     | 
    
         
            +
                end
         
     | 
| 
      
 48 
     | 
    
         
            +
              end
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
              describe 'when SIMPLECOV_IDOBATA_HOOK_URL is provided' do
         
     | 
| 
      
 51 
     | 
    
         
            +
                before do
         
     | 
| 
      
 52 
     | 
    
         
            +
                  @simplecov_idobata_hook_url = 'https://idobata.io/hook/generic/11111111-1111-1111-1111-111111111111'
         
     | 
| 
      
 53 
     | 
    
         
            +
                  ENV['SIMPLECOV_IDOBATA_HOOK_URL'] = @simplecov_idobata_hook_url
         
     | 
| 
      
 54 
     | 
    
         
            +
                  @stub_https = stub_request(:post, @simplecov_idobata_hook_url).with {|request|
         
     | 
| 
      
 55 
     | 
    
         
            +
                    request.body == 'format=html&source=hi'
         
     | 
| 
      
 56 
     | 
    
         
            +
                  }
         
     | 
| 
      
 57 
     | 
    
         
            +
                end
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
                it "should post badge to SIMPLECOV_IDOBATA_HOOK_URL environment variable" do
         
     | 
| 
      
 60 
     | 
    
         
            +
                  SimpleCov::Formatter::IdobataFormatter::Badge.stub :new, @badge do
         
     | 
| 
      
 61 
     | 
    
         
            +
                    SimpleCov::Formatter::IdobataFormatter.new.format('result')
         
     | 
| 
      
 62 
     | 
    
         
            +
                    assert_requested(@stub_https)
         
     | 
| 
      
 63 
     | 
    
         
            +
                  end
         
     | 
| 
      
 64 
     | 
    
         
            +
                end
         
     | 
| 
      
 65 
     | 
    
         
            +
              end
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
              describe 'when both SIMPLECOV_IDOBATA_HOOK_URL and hook_url not provided' do
         
     | 
| 
      
 68 
     | 
    
         
            +
                before do
         
     | 
| 
      
 69 
     | 
    
         
            +
                  WebMock.allow_net_connect!
         
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                after do
         
     | 
| 
      
 73 
     | 
    
         
            +
                  WebMock.disable_net_connect!(allow: /codeclimate.com/)
         
     | 
| 
      
 74 
     | 
    
         
            +
                end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                it "should raise error" do
         
     | 
| 
      
 77 
     | 
    
         
            +
                  SimpleCov::Formatter::IdobataFormatter::Badge.stub :new, @badge do
         
     | 
| 
      
 78 
     | 
    
         
            +
                    proc {
         
     | 
| 
      
 79 
     | 
    
         
            +
                      SimpleCov::Formatter::IdobataFormatter.new.format('result')
         
     | 
| 
      
 80 
     | 
    
         
            +
                    }.must_raise URI::InvalidURIError
         
     | 
| 
      
 81 
     | 
    
         
            +
                  end
         
     | 
| 
      
 82 
     | 
    
         
            +
                end
         
     | 
| 
      
 83 
     | 
    
         
            +
              end
         
     | 
| 
      
 84 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,174 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: simplecov-idobata
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 5 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 6 
     | 
    
         
            +
            authors:
         
     | 
| 
      
 7 
     | 
    
         
            +
            - Seiei Higa
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 9 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 10 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-08-10 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: simplecov
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: idobadge
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 41 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 42 
     | 
    
         
            +
              name: idobata_hook
         
     | 
| 
      
 43 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 44 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 45 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 47 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 48 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 51 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 52 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 54 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '1.6'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '1.6'
         
     | 
| 
      
 69 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 70 
     | 
    
         
            +
              name: codeclimate-test-reporter
         
     | 
| 
      
 71 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 72 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 73 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 74 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 75 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 76 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 77 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 79 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 80 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 81 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 82 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 83 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 84 
     | 
    
         
            +
              name: minitest
         
     | 
| 
      
 85 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 86 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 87 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 88 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 93 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 94 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 95 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 96 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 97 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 98 
     | 
    
         
            +
              name: webmock
         
     | 
| 
      
 99 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 100 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 101 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 102 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 103 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 104 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 105 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 106 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 107 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 108 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 109 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 110 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 111 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 112 
     | 
    
         
            +
              name: rake
         
     | 
| 
      
 113 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 114 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 115 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 116 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 117 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 118 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 119 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 120 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 121 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 122 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 123 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 124 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 125 
     | 
    
         
            +
            description: 
         
     | 
| 
      
 126 
     | 
    
         
            +
            email:
         
     | 
| 
      
 127 
     | 
    
         
            +
            - hanachin@gmail.com
         
     | 
| 
      
 128 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 129 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 130 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 131 
     | 
    
         
            +
            files:
         
     | 
| 
      
 132 
     | 
    
         
            +
            - ".gitignore"
         
     | 
| 
      
 133 
     | 
    
         
            +
            - ".travis.yml"
         
     | 
| 
      
 134 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 135 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 136 
     | 
    
         
            +
            - README.md
         
     | 
| 
      
 137 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 138 
     | 
    
         
            +
            - lib/simplecov/idobata.rb
         
     | 
| 
      
 139 
     | 
    
         
            +
            - lib/simplecov/idobata/badge.rb
         
     | 
| 
      
 140 
     | 
    
         
            +
            - lib/simplecov/idobata/version.rb
         
     | 
| 
      
 141 
     | 
    
         
            +
            - simplecov-idobata.gemspec
         
     | 
| 
      
 142 
     | 
    
         
            +
            - simplecov-idobata.png
         
     | 
| 
      
 143 
     | 
    
         
            +
            - test/test_helper.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            - test/test_idobata_formatter_badge.rb
         
     | 
| 
      
 145 
     | 
    
         
            +
            - test/test_idobata_formatter_hook.rb
         
     | 
| 
      
 146 
     | 
    
         
            +
            homepage: https://github.com/hanachin/simplecov-idobata
         
     | 
| 
      
 147 
     | 
    
         
            +
            licenses:
         
     | 
| 
      
 148 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 149 
     | 
    
         
            +
            metadata: {}
         
     | 
| 
      
 150 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 151 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 152 
     | 
    
         
            +
            require_paths:
         
     | 
| 
      
 153 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 154 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 155 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 156 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 157 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 158 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 159 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
      
 160 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 161 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 162 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 163 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 164 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 165 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 166 
     | 
    
         
            +
            rubygems_version: 2.2.2
         
     | 
| 
      
 167 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 168 
     | 
    
         
            +
            specification_version: 4
         
     | 
| 
      
 169 
     | 
    
         
            +
            summary: report your test coverage to idobata.io.
         
     | 
| 
      
 170 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 171 
     | 
    
         
            +
            - test/test_helper.rb
         
     | 
| 
      
 172 
     | 
    
         
            +
            - test/test_idobata_formatter_badge.rb
         
     | 
| 
      
 173 
     | 
    
         
            +
            - test/test_idobata_formatter_hook.rb
         
     | 
| 
      
 174 
     | 
    
         
            +
            has_rdoc: 
         
     |