schema_plus_core 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bc2ae1c5d8dc9ed272efc4ac0df330ef2671f04
4
- data.tar.gz: 58490b0c286338615c6ec80c2772151a671fd039
3
+ metadata.gz: 5fdcb1b5d55bc09bdff0ca89474a8e550d35b020
4
+ data.tar.gz: ae536eca65f37ce4eb3686edf7eae712efdfc72d
5
5
  SHA512:
6
- metadata.gz: abae93a5c70f6c46b3e7781b2c40ab6a44d029066d9e8c37777b8ded5cffc5c79a5d8f1e8a06821b57b02a1f7ea5c4add33136de79720b8ec015a23715dbf390
7
- data.tar.gz: bbefabcfd1fa2bacec01a185ee4b3e689515962ad167809dc9b53458285b3d709fc7668b7b3081ec82f780a74de7a02a25895966e60dc111d1d09a7e0e621487
6
+ metadata.gz: 35f641bf268e73aacf8922e078b3e37a8f03ec35dbc4116f2cc9421f374e9a457059f934b52290392a48aceda41c3b63018974238c4d1188533b99b40e958c92
7
+ data.tar.gz: eab9a007c118a5f0875c7e1299182c075c306e61d6756a33b4c1dd3eab216760f49780477c914efea55d3d694ec5bdea3a161332cae72e6b55e76f08eda38c19
data/README.md CHANGED
@@ -441,6 +441,7 @@ SchemaPlus::Core provides a state object and of callbacks to various phases of t
441
441
 
442
442
  ## Release Notes
443
443
 
444
+ * 2.1.1 Bug fix: Don't lose habtm options. Thanks to [@iagopiimenta ](https://github.com/iagopiimenta)
444
445
  * 2.1.0 Added AR5.1 support. Thanks to [@iagopiimenta ](https://github.com/iagopiimenta)
445
446
  * 2.0.1 Tighten up AR dependency. Thanks to [@myabc](https://github.com/myabc).
446
447
  * 2.0.0 Added AR5 support, removed AR4.2 support. Thanks to [@boazy](https://github.com/boazy).
@@ -32,7 +32,7 @@ module SchemaPlus
32
32
  end.result
33
33
  end
34
34
 
35
- def has_and_belongs_to_many(name, scope = nil, options = {}, &extension)
35
+ def has_and_belongs_to_many(name, scope = nil, **options, &extension)
36
36
  SchemaMonkey::Middleware::Model::Association::Declaration.start(model: self, name: name, scope: scope, options: options, extension: extension) do |env|
37
37
  env.result = super(env.name, env.scope, env.options, &env.extension)
38
38
  end.result
@@ -1,5 +1,5 @@
1
1
  module SchemaPlus
2
2
  module Core
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  end
5
5
  end
@@ -117,6 +117,16 @@ describe SchemaMonkey::Middleware do
117
117
  expect_middleware { Thingamajig.belongs_to :another_thing, class_name: Thing.name }
118
118
  expect_middleware { Thingamajig.has_and_belongs_to_many :other_things, class_name: Thing.name }
119
119
  end
120
+
121
+ Then do
122
+ class TestThingamajig < ActiveRecord::Base
123
+ has_and_belongs_to_many :other_things, join_table: 'another_table'
124
+ end
125
+
126
+ expect(
127
+ TestThingamajig.reflect_on_association(:other_things).options[:join_table]
128
+ ).to eq('another_table')
129
+ end
120
130
  end
121
131
 
122
132
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_plus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-24 00:00:00.000000000 Z
11
+ date: 2017-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord