| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Extension
- Updated, and enhanced specs
- Improved documentation
|
|\
| |
| | |
StrictKeyAccess Extension
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accessed that does not exist in the hash.
In Python a "Hash" is called a "Dictionary", and ...
> "It is an error to extract a value using a non-existent key."
See: https://docs.python.org/2/tutorial/datastructures.html#dictionaries
EXAMPLE:
class StrictHash < Hash
include Hashie::Extensions::StrictKeyAccess
end
>> hash = StrictHash[foo: "bar"]
=> {:foo=>"bar"}
>> hash[:foo]
=> "bar"
>> hash[:cow]
KeyError: key not found: :cow
|
|\
| |
| | |
Default bin scripts from bundle gem command: bin/console and bin/setup
|
| | |
|
|/
|
|
|
|
| |
- Update 2.2.2 to 2.2.3
- Update 2.1.6 to 2.1.7
- Add rbx-2.5.8
|
|\
| |
| | |
Restrict pending the spec to only Ruby versions 2.2.0, 2.2.1, 2.2.2
|
| |
| |
| |
| |
| | |
- a one liner with no complexity for pending specs by Ruby Engine / Version
- removes all complexity from Hashie
|
|/
|
|
| |
- Better paradigm for pending specs due to bugs in interpreter
|
|\
| |
| | |
Refactor `Hashie::Extensions::Coercion`, add cache.
|
| | |
|
|\ \
| |/
|/| |
Speed up SafeAssignment and fix private methods.
|
|/ |
|
|\
| |
| | |
Some micro optimizations to Hashie::Mash.
|
| | |
|
|\ \
| | |
| | | |
Remove needless code
|
|/ / |
|
|\ \
| |/
|/| |
Introduce Hashie::Extensions::Dash::Coercion.
|
|/ |
|
|\
| |
| | |
Fixed #303 (deep_merge/stringify_keys/symbolize_keys not working via hash.extend(…))
|
|/
|
|
| |
extended singleton objects.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Extract Trash behavior into an extension
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #188 brought up the fact that a Trash is really just a Dash with
some extended behavior. Why don't we make that a little more explicit
and define its behavior as an extension?
*Follow Up*
If this is merged, I move that we deprecate Trash for removal in 4.0.
I think reducing the number of classes will help users better understand
what behavior they are including in their subclasses.
In the long run, a 4.0 release would look really good with all of the behavior
factored out into extension methods. As we continue down that path, we can
slowly deprecate all of the `*ash` classes with the 3.x releases.
What do the other maintainers think of this suggestion?
Fixes #188
|
|\ \
| |/
|/| |
Add documentation about circular coercion
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `coerce_key` method in the Coercion extension is a class-level
method. As such, using circular coercion is not possible without using
a coercion proc/lambda, since the coercion in the first type will not
have the second type defined at load time.
This can be worked around through the use of a coercion proc. I have
added docs about this to the README, as well as tests that demonstrate
the behavior.
I don't see this as a bug, since doing this raises a Ruby-level error
that makes sense.
The only way I can think of to make the non-working demonstration work
that I can think of would make the DSL a lot noisier (i.e. make all of
the "intos" use procs/lambdas to yield the class name/structure that
you'd like. Something like `coerce_key :model, to: -> { Model }`, which
then grabs that returned `Model` and is applied. I think this is a
reduction in user experience, so I chose not to pursue it.
Fixes #115
|
|
|
|
| |
Fixes #284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a way to handle the broken spec in MRI 2.2.x that was
introduced by a regression in the language. It is slated to be in 2.3.0
and seems partially fixed in 2.2.2.
In order to have the full spec suite run on every version of Ruby but
keep the brevity of the Mash specs, we needed a way to check for the
Ruby version and selectively disable the two errant specs.
We need to be testing on the latest Ruby, so this seems to be the best
compromise.
For more information on the breakage in Ruby, see [issue 285][rubybug].
For more information on this decision, see [issue 294][workaround].
Fixes #294
/cc #285
[rubybug]: https://github.com/intridea/hashie/pull/285
[workaround]: https://github.com/intridea/hashie/pull/294
|
| |
|
|
|
|
|
|
| |
Fixes #295
[ci skip]
|
|
|
|
|
| |
The Travis builds were pretty noisy due to all of the warnings that were
being output from this deprecated syntax.
|
|
|
|
|
|
|
|
|
|
| |
Along with the Docker enhancement, this should speed up our build time
by quite a bit. It's been verified on several open source Ruby projects,
so shouldn't be an issue.
The main bottleneck for our CI now is that Rubinius takes a while to
install from RVM. I'm not sure if there's anything we can do about that,
but it is an order of magnitude slower than the rest of the tests.
|
|\
| |
| | |
Fixed specs to run with Ruby 2.2
|
| | |
|
|/ |
|
|\
| |
| | |
Add MRI 2.2.1 to travis
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ruby 1.8.7 had Object#id and #type, both of which were deprecated,
which Hashie::Mash wanted to cover with more reasonable methods.
These methods in Object were removed in ruby 1.9. The cover methods
are unneeded, and can cause problems with Mash::SafeAssignment
preventing you from using these as keys.
Fixes #290
|
|\ \
| | |
| | | |
Minor fix in doc
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix typo in changelog
|
|/ / |
|