junctions 0.0.4 → 0.0.5

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
  SHA256:
3
- metadata.gz: f388269fa2d0322f3aca648d2d728243d2991b72556f9dea85c0f5a27274518a
4
- data.tar.gz: 8f4405e1f4847ef3d1d8cce4efa4b2dcdabd8b6721cc764eefa38e97b9301f6f
3
+ metadata.gz: ba9b0c6bbb7f1551509b794fe40fc714591435b7bed1fde0a405f3f0cf9673f2
4
+ data.tar.gz: add9919b0f50038beb17c162921476285e1c1d8e1c6e77f8fb5634e18993208a
5
5
  SHA512:
6
- metadata.gz: c12f6ab3d2de5cbeccec949c9e5b406470ce2ea1903ba62d6634c5c5e41718ab7099ce40dc9ab514651944b39ab83a92ae1dcc16850b8e111aabe8142900e9b0
7
- data.tar.gz: d302033b81ee62522f37f5bfec6401bca2dc5370fae9231c7bc34470d33467808863ce599baa0b4c7ba2aafc42b0eafb1df8cfa6fe796a6f96cfdb5cced71a5a
6
+ metadata.gz: 2ba3e6693ebe7591a973e3568cf34b16cb221a8b7807c96a974de22e5fe7e8942917bd1ada860e1744fb3782f685da60c99ae64ae868b3f195eb9f484b21e297
7
+ data.tar.gz: 11603f724721fb86e4790997396048ea953b834f4c6b7183cb37ce2293c59cb62c5ca9b7c1971da1bc35e27927f6060a1c1e9bedbd3386efb180e48676b15be5
@@ -9,6 +9,10 @@ module Junctions
9
9
  @junction_list||=get_initializer_roots('junctions')
10
10
  end
11
11
 
12
+ def junction_classes
13
+ junction_list.reverse
14
+ end
15
+
12
16
  def core
13
17
  @core||='core'
14
18
  end
@@ -17,14 +21,10 @@ module Junctions
17
21
  def get_initializer_roots(*args)
18
22
  args.map do |arg|
19
23
  root=ENV[arg]
20
- root && root.split(',') or nil
24
+ root && root.split(',').map(&:squish) or nil
21
25
  end.flatten.compact << core
22
26
  end
23
27
 
24
- def junction_classes
25
- junction_list.reverse
26
- end
27
-
28
28
  def switch_to_junction(junction_class, base, base_name)
29
29
  name=base_name.gsub("#{core.classify}::", "#{junction_class}::")
30
30
  begin
@@ -32,6 +32,7 @@ module Junctions
32
32
  base.instance_eval {
33
33
  include name.constantize
34
34
  } if name.gsub(/::[^:]*$/, '').constantize.const_defined?(name.demodulize)
35
+ rescue NameError
35
36
  rescue Exception => e
36
37
  puts(e.message)
37
38
  puts(e.backtrace)
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Junctions
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: junctions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul McKibbin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-23 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport