shuriken 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/coffeescripts/shuriken.coffee +6 -6
- data/lib/shuriken.rb +1 -1
- data/shuriken.gemspec +1 -1
- metadata +2 -2
@@ -5,7 +5,7 @@ if jQuery?
|
|
5
5
|
$.fn.dataAttr: (key, value) -> @attr stringToDataKey(key), value
|
6
6
|
$.fn.removeDataAttr: (key) -> @removeAttr stringToDataKey(key)
|
7
7
|
$.fn.hasDataAttr: (key) -> @is "[${stringToDataKey(key)}]"
|
8
|
-
$.
|
8
|
+
$.metaAttr: (key) -> $("meta[name='$key']").attr "content"
|
9
9
|
)(jQuery)
|
10
10
|
|
11
11
|
|
@@ -14,7 +14,7 @@ Shuriken: {
|
|
14
14
|
Util: {}
|
15
15
|
jsPathPrefix: "/javascripts/"
|
16
16
|
jsPathSuffix: ""
|
17
|
-
namespaces: {}
|
17
|
+
namespaces: {}
|
18
18
|
extensions: []
|
19
19
|
}
|
20
20
|
|
@@ -44,7 +44,7 @@ base.getNS: (namespace) ->
|
|
44
44
|
currentNS: @
|
45
45
|
for name in parts
|
46
46
|
return unless currentNS[name]?
|
47
|
-
currentNS
|
47
|
+
currentNS: currentNS[name]
|
48
48
|
currentNS
|
49
49
|
|
50
50
|
base.getRootNS: ->
|
@@ -59,7 +59,7 @@ base.withNS: (key, initializer) ->
|
|
59
59
|
parts: key.split "."
|
60
60
|
currentNS: @
|
61
61
|
for name in parts
|
62
|
-
currentNS[name]
|
62
|
+
currentNS[name]: makeNS(name, currentNS, @baseNS) if not currentNS[name]?
|
63
63
|
currentNS: currentNS[name]
|
64
64
|
hadSetup: $.isFunction currentNS.setup
|
65
65
|
Shuriken.Util.scopedClosure initializer, currentNS
|
@@ -96,7 +96,7 @@ base.autosetup: true
|
|
96
96
|
|
97
97
|
# Used as a part of the prototype chain.
|
98
98
|
Shuriken.Namespace: ->
|
99
|
-
Shuriken.Namespace.prototype
|
99
|
+
Shuriken.Namespace.prototype: Shuriken.Base
|
100
100
|
|
101
101
|
makeNS: (name, parent, sharedPrototype) ->
|
102
102
|
sharedPrototype?= new Shuriken.Namespace()
|
@@ -124,4 +124,4 @@ Shuriken.as: (name) ->
|
|
124
124
|
ns
|
125
125
|
|
126
126
|
Shuriken.root: @
|
127
|
-
@['Shuriken']
|
127
|
+
@['Shuriken']: Shuriken
|
data/lib/shuriken.rb
CHANGED
data/shuriken.gemspec
CHANGED