stitch_rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -4,22 +4,20 @@ modules = {}
4
4
  cache = {}
5
5
 
6
6
  require = (name, root) ->
7
- if module = cache[name]
8
- return module
7
+ return cache[name] if name of cache
9
8
 
10
9
  path = expand(root, name)
11
- if fn = modules[path] || modules[path = expand(path, './index')]
12
- module = id: name, exports: {}
13
- try
14
- cache[name] = module.exports
15
- fn(module.exports, ((name) -> require(name, dirname(path))), module)
16
- cache[name] = module.exports
17
- catch err
18
- delete cache[name];
19
- throw err
20
- else
21
- throw "module #{name} not found"
10
+ if fn = modules[path]
11
+ dir = dirname(path)
12
+ else if fn = modules[path + '/index']
13
+ dir = path
14
+
15
+ return throw "module #{name} not found" unless fn
22
16
 
17
+ return cache[path] if path of cache
18
+ module = id: name, exports: {}
19
+ fn(module.exports, ((name) -> require(name, dir)), module)
20
+ cache[path] = module.exports
23
21
 
24
22
  expand = (root, name) ->
25
23
  results = []
@@ -24,6 +24,10 @@ module Stitch
24
24
  @@excludes = excludes
25
25
  end
26
26
 
27
+ def self.javascripts_path
28
+ File.expand_path('../../assets/javascripts', __FILE__)
29
+ end
30
+
27
31
  def initialize_engine
28
32
  require_template_library 'coffee_script'
29
33
  end
data/stitch_rails.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "stitch_rails"
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ian Yang"]
12
- s.date = "2012-03-08"
12
+ s.date = "2012-03-12"
13
13
  s.description = "coffee CommonJS"
14
14
  s.email = "me@iany.me"
15
15
  s.extra_rdoc_files = [
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.homepage = "http://github.com/doitian/stitch_rails"
33
33
  s.licenses = ["MIT"]
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = "1.8.11"
35
+ s.rubygems_version = "1.8.10"
36
36
  s.summary = "coffee CommonJS"
37
37
 
38
38
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stitch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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: 2012-03-08 00:00:00.000000000 Z
12
+ date: 2012-03-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
16
- requirement: &16121180 !ruby/object:Gem::Requirement
16
+ requirement: &2153429660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16121180
24
+ version_requirements: *2153429660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &16120700 !ruby/object:Gem::Requirement
27
+ requirement: &2153428460 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *16120700
35
+ version_requirements: *2153428460
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &16119900 !ruby/object:Gem::Requirement
38
+ requirement: &2153427500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 1.8.3
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *16119900
46
+ version_requirements: *2153427500
47
47
  description: coffee CommonJS
48
48
  email: me@iany.me
49
49
  executables: []
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  segments:
80
80
  - 0
81
- hash: -1287820883361062371
81
+ hash: 1504000617516445167
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 1.8.11
90
+ rubygems_version: 1.8.10
91
91
  signing_key:
92
92
  specification_version: 3
93
93
  summary: coffee CommonJS