diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ccd811f..697aba0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -185,7 +185,7 @@ Any violations of this scheme are considered to be bugs. ### Fixed -* [#409](https://github.com/hashie/hashie/pull/409): Fixed Railtie detection for projects where Rails is defined but Railties are not availble - [@CallumD](https://github.com/callumd). +* [#409](https://github.com/hashie/hashie/pull/409): Fixed Railtie detection for projects where Rails is defined but Railties are not available - [@CallumD](https://github.com/callumd). * [#411](https://github.com/hashie/hashie/pull/411): Fixed a performance regression from 3.4.3 that caused a 10x slowdown in OmniAuth - [@michaelherold](https://github.com/michaelherold). ## [3.5.3] - 2017-02-11 @@ -464,7 +464,7 @@ Any violations of this scheme are considered to be bugs. ### Fixed -* [#131](https://github.com/hashie/hashie/pull/131): Added IgnoreUndeclared, an extension to silently ignore undeclared properties at intialization - [@righi](https://github.com/righi). +* [#131](https://github.com/hashie/hashie/pull/131): Added IgnoreUndeclared, an extension to silently ignore undeclared properties at initialization - [@righi](https://github.com/righi). * [#138](https://github.com/hashie/hashie/pull/138): Added Hashie::Rash, a hash whose keys can be regular expressions or ranges - [@epitron](https://github.com/epitron). * [#144](https://github.com/hashie/hashie/issues/144): Fixed regression invoking `to_hash` with no parameters - [@mbleigh](https://github.com/mbleigh). diff --git a/README.md b/README.md index 7eb039bb..e1b6a0a5 100644 --- a/README.md +++ b/README.md @@ -626,7 +626,7 @@ my_gem.dependencies.class #=> MyGem _How does Mash handle key types which cannot be symbolized?_ -Mash preserves keys which cannot be converted *directly* to both a string and a symbol, such as numeric keys. Since Mash is conceived to provide psuedo-object functionality, handling keys which cannot represent a method call falls outside its scope of value. +Mash preserves keys which cannot be converted *directly* to both a string and a symbol, such as numeric keys. Since Mash is conceived to provide pseudo-object functionality, handling keys which cannot represent a method call falls outside its scope of value. ```ruby Hashie::Mash.new('1' => 'one string', :'1' => 'one sym', 1 => 'one num') @@ -1106,7 +1106,7 @@ mapper["Get off my lawn!"] # => "Forget your lawn, old man!" If this value is too low or too high for your needs, you can tune it by setting: `rash.optimize_every = n`. ## Mascot -[![eierlegende Wollmilchsau](./mascot.svg)](https://en.wiktionary.org/wiki/eierlegende_Wollmilchsau) Meet Hashie's "offical" mascot, the [eierlegende Wollmilchsau](https://en.wiktionary.org/wiki/eierlegende_Wollmilchsau)! +[![eierlegende Wollmilchsau](./mascot.svg)](https://en.wiktionary.org/wiki/eierlegende_Wollmilchsau) Meet Hashie's "official" mascot, the [eierlegende Wollmilchsau](https://en.wiktionary.org/wiki/eierlegende_Wollmilchsau)! ## Contributing diff --git a/lib/hashie/dash.rb b/lib/hashie/dash.rb index cfb151ef..be937c11 100644 --- a/lib/hashie/dash.rb +++ b/lib/hashie/dash.rb @@ -10,7 +10,7 @@ module Hashie # lightweight data object that needs even fewer options and # resources than something like a DataMapper resource. # - # It is preferrable to a Struct because of the in-class + # It is preferable to a Struct because of the in-class # API for defining properties as well as per-property defaults. class Dash < Hash include Hashie::Extensions::PrettyInspect diff --git a/lib/hashie/extensions/deep_locate.rb b/lib/hashie/extensions/deep_locate.rb index 2b33b23f..a18b67ea 100644 --- a/lib/hashie/extensions/deep_locate.rb +++ b/lib/hashie/extensions/deep_locate.rb @@ -1,7 +1,7 @@ module Hashie module Extensions module DeepLocate - # The module level implementation of #deep_locate, incase you do not want + # The module level implementation of #deep_locate, in case you do not want # to include/extend the base datastructure. For further examples please # see #deep_locate. # diff --git a/lib/hashie/extensions/method_access.rb b/lib/hashie/extensions/method_access.rb index 6543fee0..17e62494 100644 --- a/lib/hashie/extensions/method_access.rb +++ b/lib/hashie/extensions/method_access.rb @@ -241,7 +241,7 @@ def self.included(base) end # MethodOverridingInitializer allows you to override default hash - # methods when passing in values from an existing hash. The overriden + # methods when passing in values from an existing hash. The overridden # methods are aliased with two leading underscores. # # @example diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 21bcadb8..13df879d 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -21,7 +21,7 @@ module Hashie # * Bang (!): Forces the existence of this key, used for deep Mashes. Think of it # as "touch" for mashes. # * Under Bang (_): Like Bang, but returns a new Mash rather than creating a key. - # Used to test existance in deep Mashes. + # Used to test existence in deep Mashes. # # == Basic Example # diff --git a/spec/hashie/dash_spec.rb b/spec/hashie/dash_spec.rb index e75ad1a5..b3f59daa 100644 --- a/spec/hashie/dash_spec.rb +++ b/spec/hashie/dash_spec.rb @@ -180,7 +180,7 @@ class DashMessageOptionWithoutRequiredTest < Hashie::Dash expect(DeferredTest.new[:created_at]).to be_instance_of(Time) end - it 'does not evalute proc after subsequent reads' do + it 'does not evaluate proc after subsequent reads' do deferred = DeferredTest.new expect(deferred[:created_at].object_id).to eq deferred[:created_at].object_id end diff --git a/spec/hashie/extensions/ignore_undeclared_spec.rb b/spec/hashie/extensions/ignore_undeclared_spec.rb index 6f2d818f..744972ec 100644 --- a/spec/hashie/extensions/ignore_undeclared_spec.rb +++ b/spec/hashie/extensions/ignore_undeclared_spec.rb @@ -5,18 +5,18 @@ class ForgivingTrash < Hashie::Trash include Hashie::Extensions::IgnoreUndeclared property :city - property :state, from: :provence + property :state, from: :province property :str_state, from: 'str_provence' end subject { ForgivingTrash } it 'silently ignores undeclared properties on initialization' do - expect { subject.new(city: 'Toronto', provence: 'ON', country: 'Canada') }.to_not raise_error + expect { subject.new(city: 'Toronto', province: 'ON', country: 'Canada') }.to_not raise_error end it 'works with translated properties (with symbol keys)' do - expect(subject.new(provence: 'Ontario').state).to eq('Ontario') + expect(subject.new(province: 'Ontario').state).to eq('Ontario') end it 'works with translated properties (with string keys)' do diff --git a/spec/hashie/extensions/mash/define_accessors_spec.rb b/spec/hashie/extensions/mash/define_accessors_spec.rb index de7abe7a..55cd9709 100644 --- a/spec/hashie/extensions/mash/define_accessors_spec.rb +++ b/spec/hashie/extensions/mash/define_accessors_spec.rb @@ -55,7 +55,7 @@ describe 'this subclass' do it_behaves_like 'class with dynamically defined accessors' - describe 'when accessors are overrided in class' do + describe 'when accessors are overridden in class' do before do subject.class_eval do def foo diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb index 091748fc..3969a7fd 100644 --- a/spec/hashie/mash_spec.rb +++ b/spec/hashie/mash_spec.rb @@ -764,12 +764,12 @@ class SubMash < Hashie::Mash expect(subject.production.foo).to eq config['production']['foo'] end - it 'freeze the attribtues' do + it 'freeze the attributes' do expect { subject.production = {} }.to raise_exception(RuntimeError, /can't modify frozen/) end end - context 'if the fils does not exists' do + context 'if the files does not exists' do before do expect(File).to receive(:file?).with(path).and_return(false) end diff --git a/spec/integration/rails_7/integration_spec.rb b/spec/integration/rails_7/integration_spec.rb index 0e698801..920b8239 100644 --- a/spec/integration/rails_7/integration_spec.rb +++ b/spec/integration/rails_7/integration_spec.rb @@ -43,14 +43,14 @@ class HashieKlass < Hashie::Mash; end context '#deep_transform_keys' do let(:klass) do Class.new(Hashie::Dash) do - property :foo_bar + property :foo_bar property :foo_baz, required: true end end - + subject(:hash) { klass.new(foo_bar: 'bar', foo_baz: 'baz') } - it 'sucessfully deep transforms keys' do + it 'successfully deep transforms keys' do pending('https://github.com/hashie/hashie/issues/559') transformed = hash.deep_transform_keys(&:to_s) expect(transformed.keys).to all(be_a(String))