sweetloader 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/lib/sweetloader.rb +5 -2
- data/sweetloader.gemspec +11 -11
- metadata +16 -16
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/sweetloader.rb
CHANGED
@@ -59,6 +59,9 @@ module AutoLoader
|
|
59
59
|
end
|
60
60
|
|
61
61
|
module ClassExt
|
62
|
+
class ModuleNotFoundError < StandardError; end
|
63
|
+
class ClassNotFoundError < StandardError; end
|
64
|
+
|
62
65
|
def get_module name
|
63
66
|
# Module.const_get(name)
|
64
67
|
name.to_s.camelize.constantize
|
@@ -117,7 +120,7 @@ module ClassExt
|
|
117
120
|
res << found_class if found_class
|
118
121
|
res
|
119
122
|
end
|
120
|
-
raise "Not one Class for any of: #{names} is currently loaded" if classes.empty?
|
123
|
+
raise ClassNotFoundError, "Not one Class for any of: #{names} is currently loaded" if classes.empty?
|
121
124
|
classes.first
|
122
125
|
end
|
123
126
|
|
@@ -127,7 +130,7 @@ module ClassExt
|
|
127
130
|
res << found_class if found_class
|
128
131
|
res
|
129
132
|
end
|
130
|
-
raise "Not one Module for any of: #{names} is currently loaded" if modules.empty?
|
133
|
+
raise ModuleNotFoundError, "Not one Module for any of: #{names} is currently loaded" if modules.empty?
|
131
134
|
modules.first
|
132
135
|
end
|
133
136
|
end
|
data/sweetloader.gemspec
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.1.
|
7
|
+
s.name = "sweetloader"
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["Kristian Mandrup"]
|
12
|
+
s.date = "2011-10-12"
|
13
|
+
s.description = "sweet autoloading using file structure conventions while allowing configuration overrides for special cases"
|
14
|
+
s.email = "kmandrup@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.textile"
|
@@ -46,11 +46,11 @@ Gem::Specification.new do |s|
|
|
46
46
|
"spec/sweetloader/sweetloader_spec.rb",
|
47
47
|
"sweetloader.gemspec"
|
48
48
|
]
|
49
|
-
s.homepage =
|
50
|
-
s.licenses = [
|
51
|
-
s.require_paths = [
|
52
|
-
s.rubygems_version =
|
53
|
-
s.summary =
|
49
|
+
s.homepage = "http://github.com/kristianmandrup/sweetloader"
|
50
|
+
s.licenses = ["MIT"]
|
51
|
+
s.require_paths = ["lib"]
|
52
|
+
s.rubygems_version = "1.8.10"
|
53
|
+
s.summary = "sweetens up autoloading using file structure conventions"
|
54
54
|
|
55
55
|
if s.respond_to? :specification_version then
|
56
56
|
s.specification_version = 3
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sweetloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-12 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156227500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156227500
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: i18n
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156226920 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156226920
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156226320 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.5.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156226320
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156225840 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.10
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156225840
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156225240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.6.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156225240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rcov
|
71
|
-
requirement: &
|
71
|
+
requirement: &2156224100 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156224100
|
80
80
|
description: sweet autoloading using file structure conventions while allowing configuration
|
81
81
|
overrides for special cases
|
82
82
|
email: kmandrup@gmail.com
|
@@ -129,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
segments:
|
131
131
|
- 0
|
132
|
-
hash:
|
132
|
+
hash: 406729261451437961
|
133
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
134
|
none: false
|
135
135
|
requirements:
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 1.8.
|
141
|
+
rubygems_version: 1.8.10
|
142
142
|
signing_key:
|
143
143
|
specification_version: 3
|
144
144
|
summary: sweetens up autoloading using file structure conventions
|