modulation 0.13 → 0.14

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: fb6a21e7962f3d8f536cae59ab3e8531c505edc64016420ac36240360d3fddd3
4
- data.tar.gz: 9f8a8e67aa994e78bbb5892671adfb41fed9d900fd06d9ff9f5bb82e85af4d64
3
+ metadata.gz: b94cc76a203b03a1e578445f0ca8b7577d5643c54bc9b69e7fc68b5e96d00d7f
4
+ data.tar.gz: 6bee9d467dfa3dd3ab2a87d7a3ada09a73fe8a978b37afc94076b1403f25448e
5
5
  SHA512:
6
- metadata.gz: cdffd351e444d5426028fd0c4f565323050d20f96028f11f8ace35f9e545d079ee9867e663f3f6f484f84b02b03b95930fa4c23a2c906fe1dbaf8e5cb7f93a3d
7
- data.tar.gz: e63034d5b713a057a0af869ef0f2aefb91152b51790ebfd2b79cb4624065b73fbabbde295da1cf257efd3325c5d138b5640d445c921dcb2d61016f25faf18cef
6
+ metadata.gz: 861eb29096e365728af1b0ebdb72ac55b6f36d82ac77d2628723f2dd6463e280dc28d6825cf99bf4e5ec143e5fdd80bcc0551d6b77252df36fef2be10e164c2e
7
+ data.tar.gz: 90f9d91d5a37c018336381550950c60e95ec3ac8b4c6653764c86755a91d304bfddce13f9ce42525e6994b2bf1d4a6e0693be43bf9681478930bf89beabfff49
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.14 2018-09-09
2
+ ---------------
3
+
4
+ * Fix include_from, extend_from to add constants to target object
5
+
1
6
  0.13 2018-09-06
2
7
  ---------------
3
8
 
@@ -21,6 +21,11 @@ class Module
21
21
  mod.singleton_class.instance_methods(false).each do |sym|
22
22
  self.class.send(:define_method, sym, mod.method(sym).to_proc)
23
23
  end
24
+
25
+ mod.singleton_class.constants(false).each do |sym|
26
+ next if sym == :MODULE
27
+ const_set(sym, mod.singleton_class.const_get(sym))
28
+ end
24
29
  end
25
30
 
26
31
  # Includes exported methods from the given file name in the receiver
@@ -30,7 +35,12 @@ class Module
30
35
  def include_from(path)
31
36
  mod = import(path, caller(1..1).first)
32
37
  mod.singleton_class.instance_methods(false).each do |sym|
33
- send(:define_method, sym, mod.method(sym).to_proc)
38
+ next if sym == :MODULE
39
+ send(:define_method, sym, &mod.method(sym))
40
+ end
41
+
42
+ mod.singleton_class.constants(false).each do |sym|
43
+ const_set(sym, mod.singleton_class.const_get(sym))
34
44
  end
35
45
  end
36
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulation
4
- VERSION = '0.13'
4
+ VERSION = '0.14'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulation
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.13'
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-06 00:00:00.000000000 Z
11
+ date: 2018-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest