autoloading 0.0.2 → 0.0.3

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: 20cb351318bcb6d21e1f084e93e447206560a1d2
4
- data.tar.gz: b1021431be32b4569b5b5145e4966cc80f4363ac
3
+ metadata.gz: 77128c169f9a8e7d0e675cb2e7d4ea979023be4f
4
+ data.tar.gz: c8ac7617269d7e4e4b8ef2456924c2bf70a0bfb0
5
5
  SHA512:
6
- metadata.gz: 79892a3428c6ea54c664f9e48004973091ea7042d3ff0783a1d11b193dabb59c10c5c10eb9e74cd2513b5698da6a2ba9e3d12d010cf8a5d8fae6a901e76f27a2
7
- data.tar.gz: f3475cf5f2939abdd26dcb8b0639aa70681a0a555ac93ec5d513706a0f6c21f238d61c027dec0f98a3d46c02039af7eec174ed540f0c30290c46a06caa33cb7b
6
+ metadata.gz: ef59748137907e428cfbefa5134cbdcc78a0b085f3743ecae700b4184dcdbd9f48721e3c134d9ee8bae5123e2353a9ce1636b48519bc6253af8e78282c23ef2a
7
+ data.tar.gz: 3905b9dd9e80bd8c0996e2a033c6a5ab86abf4c9c34661e473246a290ab2c36b8510d733d59d88ce448c4d6b8793a40cceb8b2bd8cf23ee6909af7fa636bf43c
data/lib/autoloading.rb CHANGED
@@ -36,6 +36,6 @@ module Autoloading
36
36
 
37
37
  def autoload_without_namespacing(*dirnames)
38
38
  @autoload_without_namespacing ||= []
39
- @autoload_without_namespacing.concat(dirnames)
39
+ @autoload_without_namespacing.concat(Array(dirnames).flatten)
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module Autoloading
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -46,5 +46,23 @@ describe Autoloading do
46
46
  require 'zoo'
47
47
  Zoo::Kitty
48
48
  end
49
+
50
+ it "can autoload without namespacing - array" do
51
+ create_test_file "space.rb", <<-FILE
52
+ module Space
53
+ extend Autoloading
54
+ autoload_without_namespacing %w(planets asteroids)
55
+ end
56
+ FILE
57
+
58
+ create_test_file "space/planets/saturn.rb", <<-FILE
59
+ module Space::Saturn
60
+ end
61
+ FILE
62
+
63
+ $: << temp_file_root.to_s
64
+ require 'space'
65
+ Space::Saturn
66
+ end
49
67
  end
50
68
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoloading
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Levente Bagi