smart_properties 1.16.2 → 1.16.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d970dbdc63b4c78e01ec7f569bd00d9c37a61c672f97d084a5a01b205c80159
4
- data.tar.gz: 0db3dca56f41fafc8c96cef4c2ebd54068ce505101a3f949549724522b88bf3f
3
+ metadata.gz: 4cab5fbc87f1af758c2b385feaed5c43cf2f7555f2f55322e1bbbfe47771a42d
4
+ data.tar.gz: a79f9fd570f548895fcd3cc4d65e7f6ba614692f0671e09ce70be6704b49428a
5
5
  SHA512:
6
- metadata.gz: 186ffbca4f484bd2dcf39fef28bf49523323d195c515567266dfe1c1166b513a426b8da3548a350025d11ca4188984ad312302198ec8d365de00d120b93921a5
7
- data.tar.gz: dffb5d926bc985cf751d654782d152acb38ef1a9b1febd9ccec9bb2589fb61e55b6f471d83d82f106d2f504b1276c2f00166ff18b2f3ea48fc550687d60cf5de
6
+ metadata.gz: 42c3abfd70e12c52f185a49d6ccb2bfe4429a52eab2d18e8613058bc5687d6c525ac3ad3d5eaab75c1cbe092536673bb2c675d5adc2e26759a8a824e0ff4a096
7
+ data.tar.gz: 21eb0b7ab6ab434f512525f5a36fbf07c0a79ce53173c4c417ee379b52de737a4db1baf226019bc4d0eb813e2f7e6a502101f6674d6ba5703bc671bee1fd385c
@@ -1,3 +1,3 @@
1
1
  module SmartProperties
2
- VERSION = "1.16.2"
2
+ VERSION = "1.16.3"
3
3
  end
@@ -109,7 +109,7 @@ module SmartProperties
109
109
  #
110
110
  def included(base)
111
111
  base.extend(ClassMethods)
112
- base.extend(ModuleMethods) if base.is_a?(Module)
112
+ base.extend(ModuleMethods) unless base.is_a?(Class)
113
113
  end
114
114
  end
115
115
 
@@ -265,6 +265,24 @@ RSpec.describe SmartProperties, 'intheritance' do
265
265
  expect { klass.new(m: 4, n: 5, p: 6) }.to_not raise_error
266
266
  end
267
267
 
268
+ it "always extends module with ModuleMethods but never classes" do
269
+ n = self.n
270
+
271
+ klass = Class.new do
272
+ include n
273
+ end
274
+
275
+ module_singleton_class_ancestors = n.singleton_class.ancestors
276
+
277
+ expect(module_singleton_class_ancestors).to include(SmartProperties::ClassMethods)
278
+ expect(module_singleton_class_ancestors).to include(SmartProperties::ModuleMethods)
279
+
280
+ singleton_class_ancestors = klass.singleton_class.ancestors
281
+
282
+ expect(singleton_class_ancestors).to include(SmartProperties::ClassMethods)
283
+ expect(singleton_class_ancestors).not_to include(SmartProperties::ModuleMethods)
284
+ end
285
+
268
286
  it "yields properly ordered properties – child properties have higher precedence than parent properties" do
269
287
  n = self.n
270
288
  m = self.m
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_properties
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.2
4
+ version: 1.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Tennhard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-03 00:00:00.000000000 Z
11
+ date: 2021-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec