modulation 0.14 → 0.15

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: b94cc76a203b03a1e578445f0ca8b7577d5643c54bc9b69e7fc68b5e96d00d7f
4
- data.tar.gz: 6bee9d467dfa3dd3ab2a87d7a3ada09a73fe8a978b37afc94076b1403f25448e
3
+ metadata.gz: 48d5edc681b84cf2e1c5774961f96c4e544ac0af84bbc5343e90f0fc4b1169d2
4
+ data.tar.gz: ac8f8ed76ae68a98dae475b9eaba677208688120dd15f4429a4d82024469409b
5
5
  SHA512:
6
- metadata.gz: 861eb29096e365728af1b0ebdb72ac55b6f36d82ac77d2628723f2dd6463e280dc28d6825cf99bf4e5ec143e5fdd80bcc0551d6b77252df36fef2be10e164c2e
7
- data.tar.gz: 90f9d91d5a37c018336381550950c60e95ec3ac8b4c6653764c86755a91d304bfddce13f9ce42525e6994b2bf1d4a6e0693be43bf9681478930bf89beabfff49
6
+ metadata.gz: d1028fbba22d36fad82cc003d6958d1302479fddceafc3937f4154e81fad81ed944f487d9f44fe3afa66e4099ea73c3f5a42e73fabc5ff5ae6ef99acfe4ca7d0
7
+ data.tar.gz: 7c4281980fed04ed041da843fded0e555e2d00b35b7f3feb28ef3ea5ac266821b9a007212a02dbab6e67fc6adce583607a2f6b4f1e0830c17b6a530c7b896547
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.15 2018-09-09
2
+ ---------------
3
+
4
+ * Fix include_from to include only exported constants
5
+
1
6
  0.14 2018-09-09
2
7
  ---------------
3
8
 
@@ -50,6 +50,7 @@ module Modulation
50
50
  # @param symbols [Array] array of exported symbols
51
51
  # @return [void]
52
52
  def set_exported_symbols(mod, symbols)
53
+ mod.__module_info[:exported_symbols] = symbols
53
54
  singleton = mod.singleton_class
54
55
 
55
56
  singleton.instance_methods(false).each do |sym|
@@ -34,12 +34,14 @@ class Module
34
34
  # @return [void]
35
35
  def include_from(path)
36
36
  mod = import(path, caller(1..1).first)
37
+ exported_symbols = mod.__module_info[:exported_symbols]
38
+
37
39
  mod.singleton_class.instance_methods(false).each do |sym|
38
- next if sym == :MODULE
39
40
  send(:define_method, sym, &mod.method(sym))
40
41
  end
41
42
 
42
43
  mod.singleton_class.constants(false).each do |sym|
44
+ next unless exported_symbols.include?(sym)
43
45
  const_set(sym, mod.singleton_class.const_get(sym))
44
46
  end
45
47
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modulation
4
- VERSION = '0.14'
4
+ VERSION = '0.15'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modulation
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.14'
4
+ version: '0.15'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner