nodeify 0.0.3 → 0.0.4

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.
@@ -1,42 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nodeify (0.0.1)
5
- rails (~> 3.1.0.rc8)
6
- sprockets
4
+ nodeify (0.0.3)
5
+ rails (~> 3.1)
6
+ sandbox
7
+ tilt
7
8
 
8
9
  GEM
9
10
  remote: http://rubygems.org/
10
11
  specs:
11
- actionmailer (3.1.4)
12
- actionpack (= 3.1.4)
13
- mail (~> 2.3.0)
14
- actionpack (3.1.4)
15
- activemodel (= 3.1.4)
16
- activesupport (= 3.1.4)
12
+ actionmailer (3.2.2)
13
+ actionpack (= 3.2.2)
14
+ mail (~> 2.4.0)
15
+ actionpack (3.2.2)
16
+ activemodel (= 3.2.2)
17
+ activesupport (= 3.2.2)
17
18
  builder (~> 3.0.0)
18
19
  erubis (~> 2.7.0)
19
- i18n (~> 0.6)
20
- rack (~> 1.3.6)
20
+ journey (~> 1.0.1)
21
+ rack (~> 1.4.0)
21
22
  rack-cache (~> 1.1)
22
- rack-mount (~> 0.8.2)
23
23
  rack-test (~> 0.6.1)
24
- sprockets (~> 2.0.3)
25
- activemodel (3.1.4)
26
- activesupport (= 3.1.4)
24
+ sprockets (~> 2.1.2)
25
+ activemodel (3.2.2)
26
+ activesupport (= 3.2.2)
27
27
  builder (~> 3.0.0)
28
- i18n (~> 0.6)
29
- activerecord (3.1.4)
30
- activemodel (= 3.1.4)
31
- activesupport (= 3.1.4)
32
- arel (~> 2.2.3)
28
+ activerecord (3.2.2)
29
+ activemodel (= 3.2.2)
30
+ activesupport (= 3.2.2)
31
+ arel (~> 3.0.2)
33
32
  tzinfo (~> 0.3.29)
34
- activeresource (3.1.4)
35
- activemodel (= 3.1.4)
36
- activesupport (= 3.1.4)
37
- activesupport (3.1.4)
33
+ activeresource (3.2.2)
34
+ activemodel (= 3.2.2)
35
+ activesupport (= 3.2.2)
36
+ activesupport (3.2.2)
37
+ i18n (~> 0.6)
38
38
  multi_json (~> 1.0)
39
- arel (2.2.3)
39
+ arel (3.0.2)
40
40
  builder (3.0.0)
41
41
  diff-lcs (1.1.3)
42
42
  erubis (2.7.0)
@@ -48,34 +48,33 @@ GEM
48
48
  git (>= 1.2.5)
49
49
  rake
50
50
  rdoc
51
+ journey (1.0.3)
51
52
  json (1.6.5)
52
- mail (2.3.0)
53
+ mail (2.4.4)
53
54
  i18n (>= 0.4.0)
54
55
  mime-types (~> 1.16)
55
56
  treetop (~> 1.4.8)
56
57
  mime-types (1.17.2)
57
58
  multi_json (1.1.0)
58
59
  polyglot (0.3.3)
59
- rack (1.3.6)
60
+ rack (1.4.1)
60
61
  rack-cache (1.2)
61
62
  rack (>= 0.4)
62
- rack-mount (0.8.3)
63
- rack (>= 1.0.0)
64
63
  rack-ssl (1.3.2)
65
64
  rack
66
65
  rack-test (0.6.1)
67
66
  rack (>= 1.0)
68
- rails (3.1.4)
69
- actionmailer (= 3.1.4)
70
- actionpack (= 3.1.4)
71
- activerecord (= 3.1.4)
72
- activeresource (= 3.1.4)
73
- activesupport (= 3.1.4)
67
+ rails (3.2.2)
68
+ actionmailer (= 3.2.2)
69
+ actionpack (= 3.2.2)
70
+ activerecord (= 3.2.2)
71
+ activeresource (= 3.2.2)
72
+ activesupport (= 3.2.2)
74
73
  bundler (~> 1.0)
75
- railties (= 3.1.4)
76
- railties (3.1.4)
77
- actionpack (= 3.1.4)
78
- activesupport (= 3.1.4)
74
+ railties (= 3.2.2)
75
+ railties (3.2.2)
76
+ actionpack (= 3.2.2)
77
+ activesupport (= 3.2.2)
79
78
  rack-ssl (~> 1.3.2)
80
79
  rake (>= 0.8.7)
81
80
  rdoc (~> 3.4)
@@ -91,7 +90,8 @@ GEM
91
90
  rspec-expectations (2.8.0)
92
91
  diff-lcs (~> 1.1.2)
93
92
  rspec-mocks (2.8.0)
94
- sprockets (2.0.3)
93
+ sandbox (0.1.1)
94
+ sprockets (2.1.2)
95
95
  hike (~> 1.2)
96
96
  rack (~> 1.0)
97
97
  tilt (~> 1.1, != 1.3.0)
@@ -1,10 +1,25 @@
1
- require 'sprockets'
1
+ require 'tilt'
2
+ require 'sandbox'
2
3
 
3
4
  module Nodeify
4
- class JavaScript < Sprockets::Processor
5
- def render(context, options)
6
- @source = `node -e "var browserify = require('browserify'), _ = process.stdout.write(browserify({ entry: '#{file}', require: { http: 'dkastner-http-browserify' } }).bundle());"`
7
- @source
5
+ class JavaScript < Tilt::Template
6
+ attr_accessor :body
7
+
8
+ def initialize(*arg)
9
+ super
10
+ end
11
+
12
+ def prepare
13
+ end
14
+
15
+ def evaluate(context, options)
16
+ output = ''
17
+ Sandbox.play do |path|
18
+ file_path = File.join(path, File.basename(file))
19
+ File.open(file_path, 'w') { |f| f.puts data }
20
+ output = `node -e "var browserify = require('browserify'), _ = process.stdout.write(browserify({ entry: '#{file_path}', require: { http: 'dkastner-http-browserify' } }).bundle());"`
21
+ end
22
+ output
8
23
  end
9
24
  end
10
25
  end
@@ -7,8 +7,8 @@ require 'rails'
7
7
  module Nodeify
8
8
  class Rails < Rails::Railtie
9
9
  initializer "nodeify.sprockets.environment" do |app|
10
- app.assets.unregister_preprocessor 'application/javascript', Sprockets::DirectiveProcessor
11
- app.assets.register_bundle_processor 'application/javascript', Nodeify::JavaScript
10
+ app.assets.unregister_processor 'application/javascript', Sprockets::DirectiveProcessor
11
+ app.assets.register_engine '.js', Nodeify::JavaScript
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Nodeify
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -18,7 +18,8 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_dependency 'rails', '~> 3.1'
21
- s.add_dependency 'sprockets'
21
+ s.add_dependency 'sandbox'
22
+ s.add_dependency 'tilt'
22
23
  s.add_development_dependency 'jeweler'
23
24
  s.add_development_dependency 'rspec'
24
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nodeify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-05 00:00:00.000000000Z
12
+ date: 2012-03-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2153443420 !ruby/object:Gem::Requirement
16
+ requirement: &2165140480 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153443420
24
+ version_requirements: *2165140480
25
25
  - !ruby/object:Gem::Dependency
26
- name: sprockets
27
- requirement: &2153442040 !ruby/object:Gem::Requirement
26
+ name: sandbox
27
+ requirement: &2165140060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2153442040
35
+ version_requirements: *2165140060
36
+ - !ruby/object:Gem::Dependency
37
+ name: tilt
38
+ requirement: &2165139600 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2165139600
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: jeweler
38
- requirement: &2153436120 !ruby/object:Gem::Requirement
49
+ requirement: &2165139180 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *2153436120
57
+ version_requirements: *2165139180
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: rspec
49
- requirement: &2153434360 !ruby/object:Gem::Requirement
60
+ requirement: &2165138760 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ! '>='
@@ -54,7 +65,7 @@ dependencies:
54
65
  version: '0'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *2153434360
68
+ version_requirements: *2165138760
58
69
  description: ''
59
70
  email:
60
71
  - dkastner+nodeify@gmail.com