execjs-rails 0.2.2.1 → 0.2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/execjs/rails/engine.rb +6 -0
- data/lib/execjs/rails/renderer.rb +1 -1
- data/lib/execjs/rails/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98f5d7d4483bf8903f59fb04a0c3bac4c83ecb89
|
4
|
+
data.tar.gz: baaf5d83ce0e099bdc06a02ac53d96e8c6fc995c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fbd33ceb0e480021600799a01029e5bc8a53355c35071cce85e216a90d10235a1a24f6bf208306cd8d1b2c22afcf9afdb9a7b08b381506414b14eb3270c9016
|
7
|
+
data.tar.gz: 43e460d679f2d4602ff0b0816785764b45e61fe5ffb6ef66cef90f2300daa96358fe232d036d0afaee526b3d34a2d8e9cc916cf668c6129659c4d9fa7a3853f6
|
data/lib/execjs/rails/engine.rb
CHANGED
@@ -6,6 +6,7 @@ module ExecJS
|
|
6
6
|
|
7
7
|
config.execjs_rails = ActiveSupport::OrderedOptions.new
|
8
8
|
config.execjs_rails.memoize_context = ::Rails.env.production?
|
9
|
+
config.execjs_rails.compile_eagerly = ::Rails.env.production?
|
9
10
|
config.execjs_rails.on_error = lambda { |error| raise error }
|
10
11
|
config.execjs_rails.server_javascripts = ['server.js']
|
11
12
|
config.execjs_rails.has_view_function_name = 'execjs_rails_has_view'
|
@@ -48,6 +49,10 @@ module ExecJS
|
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
52
|
+
initializer "execjs_rails.setup_assets_precompile" do
|
53
|
+
config.assets.precompile += config.execjs_rails.server_javascripts
|
54
|
+
end
|
55
|
+
|
51
56
|
config.after_initialize do |app|
|
52
57
|
app.config.execjs_rails.build_source ||= lambda do
|
53
58
|
app.config.execjs_rails.server_javascripts.map do |filename|
|
@@ -56,6 +61,7 @@ module ExecJS
|
|
56
61
|
end.join(";")
|
57
62
|
end
|
58
63
|
Renderer.setup!(app.config.execjs_rails)
|
64
|
+
Renderer.reset! if app.config.execjs_rails.compile_eagerly
|
59
65
|
end
|
60
66
|
|
61
67
|
end
|
@@ -14,7 +14,7 @@ module ExecJS
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.reset!
|
17
|
-
unless @@config.memoize_context
|
17
|
+
unless @@config.memoize_context && !@@context.nil?
|
18
18
|
begin
|
19
19
|
@@context = ExecJS.compile(@@config.build_source.call())
|
20
20
|
rescue ExecJS::Rails::RuntimeSupport.error_class => error
|
data/lib/execjs/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: execjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.2.
|
4
|
+
version: 0.2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Revelry Labs, LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Use ExecJS to write your views in JavaScript.
|
@@ -73,10 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- README.md
|
77
76
|
- lib/assets/javascripts/server.js
|
78
|
-
- lib/execjs-rails.rb
|
79
|
-
- lib/execjs/rails.rb
|
80
77
|
- lib/execjs/rails/concern.rb
|
81
78
|
- lib/execjs/rails/engine.rb
|
82
79
|
- lib/execjs/rails/renderer.rb
|
@@ -84,6 +81,9 @@ files:
|
|
84
81
|
- lib/execjs/rails/template_resolver.rb
|
85
82
|
- lib/execjs/rails/version.rb
|
86
83
|
- lib/execjs/rails/view_helper.rb
|
84
|
+
- lib/execjs/rails.rb
|
85
|
+
- lib/execjs-rails.rb
|
86
|
+
- README.md
|
87
87
|
homepage: https://github.com/revelrylabs/execjs-rails
|
88
88
|
licenses:
|
89
89
|
- MIT
|
@@ -94,17 +94,17 @@ require_paths:
|
|
94
94
|
- lib
|
95
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
107
|
+
rubygems_version: 2.0.14
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Simple JavaScript rendering for Ruby on Rails.
|