Defi
Challenge library.
Contact
- Home page: https://github.com/fixrb/defi
- Bugs/issues: https://github.com/fixrb/defi/issues
Rubies
Installation
Add this line to your application's Gemfile:
gem 'defi'
And then execute:
$ bundle
Or install it yourself as:
$ gem install defi
Usage
Let's multiply by 7
the number 6
:
Defi.send(:*, 7).to(6).call # => 42
Now, let's challenge "foo
" with boom
method:
Defi.send(:boom).to('foo').call # NoMethodError: undefined method `boom' for "foo":String
Let's challenge "hello world
" with gsub!
in isolation:
some_text = 'hello world'
Defi.send(:gsub!, 'world', 'Alice').to!(some_text).call # => "hello Alice"
some_text # => "hello world"
Security
As a basic form of security Defi provides a set of SHA512 checksums for
every Gem release. These checksums can be found in the checksum/
directory.
Although these checksums do not prevent malicious users from tampering with a
built Gem they can be used for basic integrity verification purposes.
The checksum of a file can be checked using the sha512sum
command. For
example:
$ sha512sum pkg/defi-1.0.0.gem
c30380a253c932bbff42a36611466f2b7d59e6a1d9578a4989e7b2cfd4078cf9d64e452b0eaa055c5ab88be4816d3f366d7aa705d29bb54e2db9f75d21f36cf7 pkg/defi-1.0.0.gem
Versioning
Defi follows Semantic Versioning 2.0.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
See LICENSE.md
file.