trinidad 0.9.4 → 0.9.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.
- data/History.txt +5 -0
- data/VERSION +1 -1
- data/lib/trinidad/core_ext.rb +0 -6
- data/lib/trinidad/extensions.rb +6 -1
- metadata +7 -7
data/History.txt
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.5
|
data/lib/trinidad/core_ext.rb
CHANGED
data/lib/trinidad/extensions.rb
CHANGED
|
@@ -33,7 +33,7 @@ module Trinidad
|
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def self.extension(name, type, options)
|
|
36
|
-
class_name = (name.to_s
|
|
36
|
+
class_name = (camelize(name.to_s) << type).to_sym
|
|
37
37
|
load_extension(name) unless const_defined?(class_name)
|
|
38
38
|
clazz = const_get(class_name) rescue nil
|
|
39
39
|
clazz.new(options) if clazz
|
|
@@ -68,5 +68,10 @@ module Trinidad
|
|
|
68
68
|
raise NotImplementedError, "#{self.class}#configure not implemented"
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
|
+
|
|
72
|
+
private
|
|
73
|
+
def self.camelize(string)
|
|
74
|
+
string.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
|
|
75
|
+
end
|
|
71
76
|
end
|
|
72
77
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trinidad
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 49
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 9
|
|
9
|
-
-
|
|
10
|
-
version: 0.9.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.9.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- David Calavera
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-08-
|
|
18
|
+
date: 2010-08-08 00:00:00 +02:00
|
|
19
19
|
default_executable: trinidad
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -41,12 +41,12 @@ dependencies:
|
|
|
41
41
|
requirements:
|
|
42
42
|
- - ">="
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
|
-
hash:
|
|
44
|
+
hash: 19
|
|
45
45
|
segments:
|
|
46
46
|
- 1
|
|
47
47
|
- 0
|
|
48
|
-
-
|
|
49
|
-
version: 1.0.
|
|
48
|
+
- 2
|
|
49
|
+
version: 1.0.2
|
|
50
50
|
type: :runtime
|
|
51
51
|
version_requirements: *id002
|
|
52
52
|
- !ruby/object:Gem::Dependency
|