• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape / 12515799369

27 Dec 2024 12:02PM UTC coverage: 98.335% (+0.5%) from 97.809%
12515799369

push

github

web-flow
Dynamic registration (#2516)

* use `to_enum` instead of including `Enumerable` to attributes_iterator.rb and validation_errors.rb

* Remove unused build_coercer.rb

* Remove const_missing in api.rb

* Add Grape::Util::Registry
Add deregister module in spec

* Add Grape::Parser::Base and use Grape::Util::Registry

* Add Grape::Formatter::Base and use Grape::Util::Registry

* Add Grape::Middleware::Versioner::Base and use Grape::Util::Registry

* Add Grape::ErrorFormatter::Base and use Grape::Util::Registry

* Add Grape::Util::Registry to Grape::Validations
ContractScope validator has been moved to validations/validators and renamed properly

* Add `deregister in `before(:all)``

* Add `deregister` to Grape::Validations only

* Use `prepend`

* Fix Ruby 2.7
Fix rubocop

* Refactor collection_coercer_for
Refactor Grape::Validations::Types cache_key

* Add CHANGELOG.md

* Revert coercer_cache changes. Will do it another time

* Revert enumerable change

* Refactor registry

* Update CHANGELOG.md

Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>

---------

Co-authored-by: Daniel (dB.) Doubrovkine <dblock@dblock.org>

194 of 199 new or added lines in 27 files covered. (97.49%)

3544 of 3604 relevant lines covered (98.34%)

62111.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/lib/grape/formatter/json.rb
1
# frozen_string_literal: true
2

3
module Grape
51✔
4
  module Formatter
51✔
5
    class Json < Base
51✔
6
      def self.call(object, _env)
51✔
7
        return object.to_json if object.respond_to?(:to_json)
12,605✔
8

NEW
9
        ::Grape::Json.dump(object)
×
10
      end
11
    end
12
  end
13
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc