A summary of data about the Ruby ecosystem.

https://github.com/solnic/coercible

Powerful, flexible and configurable coercion library. And nothing more.
https://github.com/solnic/coercible

Keywords from Contributors

data-validation dry-rb rubygem

Last synced: about 6 hours ago
JSON representation

Repository metadata

Powerful, flexible and configurable coercion library. And nothing more.

README.md

Coercible

Gem Version
Build Status
Dependency Status
Code Climate
Test Coverage
Inline docs

Installation

Add this line to your application's Gemfile:

gem 'coercible'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coercible

Usage

Coercible gives you access to coercer objects where each object is responsible
for coercing only one type into other types. For example a string coercer knows
only how to coerce string objects, integer coercer knows only how to coerce integers
etc.

Here's the most basic example:

coercer = Coercible::Coercer.new

# coerce a string to a date
coercer[String].to_date('2012/12/25') # => #<Date: 4912573/2,0,2299161>

# coerce a string to a boolean value
coercer[String].to_boolean('yes') # => true

# you got the idea :)

For more control you can configure your coercer like that:

# build coercer instance
coercer = Coercible::Coercer.new do |config|
  config.string.boolean_map = { 'yup' => true, 'nope' => false }
end

# coerce a string to boolean
coercer[String].to_boolean('yup') # => true
coercer[String].to_boolean('nope') # => false

Note that at the moment only Integer and String are configurable. More configurable
coercers will be added later whenever we find good usecases.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 84
Total Committers: 5
Avg Commits per committer: 16.8
Development Distribution Score (DDS): 0.071

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Piotr Solnica p****a@g****m 78
Markus Schirp m****j@s****m 3
Ken Dreyer k****r@k****m 1
DawidJanczak d****k@g****m 1
Handi Wiguna h****i@d****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 27 days ago

Total issues: 13
Total pull requests: 14
Average time to close issues: over 1 year
Average time to close pull requests: over 1 year
Total issue authors: 12
Total pull request authors: 13
Average comments per issue: 1.85
Average comments per pull request: 2.79
Merged pull request: 4
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/solnic/coercible

Top Issue Authors

  • boutil (2)
  • fredwu (1)
  • dspaeth-faber (1)
  • guyboertje (1)
  • lovehandle (1)
  • schmurfy (1)
  • maksar (1)
  • buszu (1)
  • eval (1)
  • reidmorrison (1)
  • Epigene (1)
  • kurbaitis (1)

Top Pull Request Authors

  • kml (2)
  • mbj (2)
  • handiwiguna (1)
  • EdwardBetts (1)
  • ktdreyer (1)
  • rrrene (1)
  • p-lambert (1)
  • danielbecker (1)
  • tb0yd (1)
  • ivoanjo (1)
  • jstepien (1)
  • DawidJanczak (1)
  • snusnu (1)

Top Issue Labels

  • feature (1)

Top Pull Request Labels


Package metadata

gem.coop: coercible

Powerful, flexible and configurable coercion library. And nothing more.

  • Homepage: https://github.com/solnic/coercible
  • Documentation: http://www.rubydoc.info/gems/coercible/
  • Licenses: MIT
  • Latest release: 1.0.0 (published about 12 years ago)
  • Last Synced: 2026-03-02T20:31:05.506Z (1 day ago)
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 126,343,736 Total
  • Docker Downloads: 553,139,189
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.092%
    • Docker downloads count: 0.178%
    • Downloads: 0.191%
  • Maintainers (1)
ubuntu-22.04: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses: mit
  • Latest release: 1.0.0-2.1 (published 19 days ago)
  • Last Synced: 2026-02-13T13:14:31.265Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.74%
    • Stargazers count: 1.304%
    • Forks count: 1.657%
rubygems.org: coercible

Powerful, flexible and configurable coercion library. And nothing more.

  • Homepage: https://github.com/solnic/coercible
  • Documentation: http://www.rubydoc.info/gems/coercible/
  • Licenses: MIT
  • Latest release: 1.0.0 (published about 12 years ago)
  • Last Synced: 2026-03-01T20:01:55.581Z (2 days ago)
  • Versions: 5
  • Dependent Packages: 15
  • Dependent Repositories: 9,550
  • Downloads: 126,277,827 Total
  • Docker Downloads: 553,139,189
  • Rankings:
    • Downloads: 0.191%
    • Docker downloads count: 0.209%
    • Dependent repos count: 0.338%
    • Dependent packages count: 1.292%
    • Average: 2.279%
    • Stargazers count: 4.711%
    • Forks count: 6.933%
  • Maintainers (1)
proxy.golang.org: github.com/solnic/coercible

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/solnic/coercible#section-documentation
  • Licenses: mit
  • Latest release: v1.0.0 (published about 12 years ago)
  • Last Synced: 2026-03-01T20:01:55.877Z (2 days ago)
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Stargazers count: 4.127%
    • Forks count: 5.421%
    • Average: 7.472%
    • Dependent packages count: 9.56%
    • Dependent repos count: 10.779%
ubuntu-23.10: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:16:42.626Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-13: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Documentation: https://packages.debian.org/trixie/ruby-coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 20 days ago)
  • Last Synced: 2026-02-13T13:14:16.993Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses:
  • Latest release: 1.0.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T07:11:28.440Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 21 days ago)
  • Last Synced: 2026-02-11T06:37:02.398Z (21 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 22 days ago)
  • Last Synced: 2026-02-09T16:18:13.653Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Documentation: https://packages.debian.org/bullseye/ruby-coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 21 days ago)
  • Last Synced: 2026-02-13T08:19:08.543Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-10: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Documentation: https://packages.debian.org/buster/ruby-coercible
  • Licenses:
  • Latest release: 1.0.0-2 (published 21 days ago)
  • Last Synced: 2026-02-13T04:19:55.613Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Documentation: https://packages.debian.org/bookworm/ruby-coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:27:21.297Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: ruby-coercible

  • Homepage: https://github.com/solnic/coercible
  • Licenses:
  • Latest release: 1.0.0-2.1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:02:22.462Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:

Dependencies

Gemfile rubygems
  • codeclimate-test-reporter >= 0 development
  • mutant >= 0
  • mutant-rspec >= 0
coercible.gemspec rubygems
  • rake ~> 10.0 development
  • rspec ~> 3.1.0 development
  • rspec-its ~> 1.0 development
  • descendants_tracker ~> 0.0.1

Score: 27.643332878509778