opal-rails 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/Appraisals +1 -1
- data/CHANGELOG.md +22 -2
- data/Gemfile +4 -0
- data/README.md +63 -55
- data/lib/opal/rails/engine.rb +1 -0
- data/lib/opal/rails/template_handler.rb +10 -14
- data/lib/opal/rails/version.rb +1 -1
- data/lib/rails/generators/opal/assets/assets_generator.rb +1 -11
- data/lib/rails/generators/opal/assets/templates/javascript.js.rb +21 -18
- data/opal-rails.gemspec +4 -2
- data/spec/integration/assigns_spec.rb +43 -16
- data/spec/integration/template_spec.rb +9 -0
- data/spec/support/reset_config.rb +5 -0
- data/test_apps/application_controller.rb +1 -10
- data/test_apps/assets/javascripts/with_assignments.js.rb +9 -0
- metadata +28 -10
- data/.spectator.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36eac0db3f7ca54d4e90348a784fc39719be3524
|
4
|
+
data.tar.gz: db4a917040f7c9869303fa76131dde1f297135d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c79a5503e7c54e39c83f71349e053a5cb5c3eca1d6d1cc93847813b560f14fb05396fa885562ea088b36db64a573b6f788adf82096413a53926f5f4d6aa17722
|
7
|
+
data.tar.gz: 78332734b60237a4e77a6797d76c659bf6b9e5b3013098973c93c33d53bff27dd3a2127d87d37f3945887e2ff40ebe59ac577b865f0d229f4459fe83e35ff237
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -22,7 +22,22 @@ Whitespace conventions:
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
## [0.9.
|
25
|
+
## [0.9.1] - 2016-11-30
|
26
|
+
|
27
|
+
|
28
|
+
### Added
|
29
|
+
|
30
|
+
- Added ability to disable passing local and instance variables to the Opal template handler by setting `Rails.application.config.opal.assigns_in_templates = false` in `config/initializers/assets.rb` (thanks to @lorefnon)
|
31
|
+
- Added dependency to `opal-sprockets` in preparation for Opal 0.11
|
32
|
+
|
33
|
+
|
34
|
+
### Changed
|
35
|
+
|
36
|
+
- Simplified the Opal file generated for a controller
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
## [0.9.0] - 2016-06-16
|
26
41
|
|
27
42
|
|
28
43
|
### Added
|
@@ -136,7 +151,12 @@ Whitespace conventions:
|
|
136
151
|
- Add `opal_ujs`, now it's possible to use Opal for new Rails apps: `rails new <app-name> -j opal`
|
137
152
|
- Updated README examples
|
138
153
|
|
139
|
-
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
[Unreleased]: https://github.com/opal/opal-rails/compare/v0.9.1...HEAD
|
158
|
+
[0.9.1]: https://github.com/opal/opal-rails/compare/v0.9.0...v0.9.1
|
159
|
+
[0.9.0]: https://github.com/opal/opal-rails/compare/v0.8.1...v0.9.0
|
140
160
|
[0.8.1]: https://github.com/opal/opal-rails/compare/v0.8.0...v0.8.1
|
141
161
|
[0.8.0]: https://github.com/opal/opal-rails/compare/v0.7.0...v0.8.0
|
142
162
|
[0.7.0]: https://github.com/opal/opal-rails/compare/v0.6.3...v0.7.0
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -27,82 +27,78 @@ rails new <app-name> --javascript=opal
|
|
27
27
|
|
28
28
|
### Configuration
|
29
29
|
|
30
|
-
Add your configuration in `config/
|
30
|
+
Add your configuration in `config/initializers/assets.rb` with the following contents:
|
31
31
|
|
32
32
|
```ruby
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
config.opal.optimized_operators = true
|
40
|
-
config.opal.arity_check = false
|
41
|
-
config.opal.const_missing = true
|
42
|
-
config.opal.dynamic_require_severity = :ignore
|
43
|
-
|
44
|
-
# Enable/disable /opal_specs route
|
45
|
-
config.opal.enable_specs = true
|
46
|
-
|
47
|
-
# The path to opal specs from Rails.root
|
48
|
-
config.opal.spec_location = 'spec-opal'
|
49
|
-
end
|
50
|
-
end
|
33
|
+
# Compiler options
|
34
|
+
Rails.application.config.opal.method_missing = true
|
35
|
+
Rails.application.config.opal.optimized_operators = true
|
36
|
+
Rails.application.config.opal.arity_check = !Rails.env.production?
|
37
|
+
Rails.application.config.opal.const_missing = true
|
38
|
+
Rails.application.config.opal.dynamic_require_severity = :ignore
|
51
39
|
```
|
52
40
|
|
53
|
-
|
54
|
-
## Usage
|
41
|
+
For a full list of the available configuration options please refer to: [lib/opal/config.rb](https://github.com/opal/opal/blob/master/lib/opal/config.rb).
|
55
42
|
|
56
43
|
|
57
|
-
### Asset Pipeline
|
58
44
|
|
59
|
-
|
60
|
-
Sprockets' `//= require` statements won't be known by the opal builder and therefore you can end up adding something twice.
|
45
|
+
## Usage
|
61
46
|
|
62
|
-
|
47
|
+
Rename `app/assets/javascripts/application.js` to `app/assets/javascripts/application.js.rb` and
|
48
|
+
replace the Sprockets directives with plain requires as follows:
|
63
49
|
|
64
50
|
```ruby
|
65
|
-
# app/assets/javascripts/application.js.rb
|
66
|
-
|
67
51
|
require 'opal'
|
68
52
|
require 'opal_ujs'
|
69
53
|
require 'turbolinks'
|
70
|
-
require_tree '.'
|
71
|
-
```
|
54
|
+
require_tree '.' # a Ruby equivalent of the require_tree Sprockets directive is available
|
72
55
|
|
73
|
-
|
56
|
+
# ---- YOUR FANCY RUBY CODE HERE ----
|
57
|
+
#
|
58
|
+
# Examples:
|
74
59
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
Opal.load('greeter');
|
81
|
-
```
|
60
|
+
# == Print something in the browser's console
|
61
|
+
puts "Hello world!"
|
62
|
+
pp hello: :world
|
63
|
+
require 'console'
|
64
|
+
$console.log %w[Hello world!]
|
82
65
|
|
83
|
-
|
66
|
+
# == Use Native to wrap native JS objects, $$ is preconfigured to wrap `window`
|
67
|
+
require 'native'
|
68
|
+
$$.alert "Hello world!"
|
84
69
|
|
85
|
-
|
86
|
-
|
87
|
-
```ruby
|
88
|
-
# app/assets/javascripts/greeter.js.rb
|
89
|
-
|
90
|
-
puts "G'day world!" # check the console!
|
91
|
-
|
92
|
-
# Dom manipulation
|
70
|
+
# == Do some DOM manipulation with jQuery
|
93
71
|
require 'opal-jquery'
|
94
|
-
|
95
72
|
Document.ready? do
|
96
|
-
Element.find('body
|
73
|
+
Element.find('body').html = '<h1>Hello world!</h1>'
|
97
74
|
end
|
75
|
+
|
76
|
+
# == Or access the DOM api directly
|
77
|
+
$$[:document].addEventListener(:DOMContentLoaded, -> {
|
78
|
+
$$[:document].querySelector('body')[:innerHTML] = '<h1>Hello world!</h1>'
|
79
|
+
})
|
80
|
+
|
98
81
|
```
|
99
82
|
|
100
83
|
|
84
|
+
### Using Sprockets directives
|
85
|
+
|
86
|
+
If you want to use `application.js` (instead of `application.js.rb`) and keep Sprockets directives, you'll need to load the Opal files you require via Sprockets manually, e.g.:
|
87
|
+
|
88
|
+
```js
|
89
|
+
//= require opal
|
90
|
+
//= require opal_ujs
|
91
|
+
//= require turbolinks
|
92
|
+
//= require_tree .
|
93
|
+
//= require foobar
|
94
|
+
|
95
|
+
Opal.load('foobar');
|
96
|
+
```
|
101
97
|
|
102
98
|
|
103
99
|
### As a template
|
104
100
|
|
105
|
-
You can use it for your views too
|
101
|
+
You can use it for your views too:
|
106
102
|
|
107
103
|
```ruby
|
108
104
|
# app/controllers/posts_controller.rb
|
@@ -113,7 +109,7 @@ def create
|
|
113
109
|
end
|
114
110
|
```
|
115
111
|
|
116
|
-
|
112
|
+
Assigned instance that would normally be available in your views are converted to JSON objects first.
|
117
113
|
|
118
114
|
```ruby
|
119
115
|
# app/views/posts/create.js.opal
|
@@ -124,6 +120,17 @@ post.find('.body').html = @post[:body]
|
|
124
120
|
post.find('.comments').html = comments_html
|
125
121
|
```
|
126
122
|
|
123
|
+
#### Instance and local variables in templates
|
124
|
+
|
125
|
+
By default `opal-rails` will forward any instance and local variable you'll pass to the template.
|
126
|
+
|
127
|
+
This behavior can be disabled by setting `Rails.application.config.opal.assigns_in_templates` to `false` in `config/initializers/assets.rb`:
|
128
|
+
|
129
|
+
```ruby
|
130
|
+
Rails.application.config.opal.assigns_in_templates = false
|
131
|
+
```
|
132
|
+
|
133
|
+
|
127
134
|
|
128
135
|
### As a Haml filter (optional)
|
129
136
|
|
@@ -156,14 +163,15 @@ Of course you need to require `haml-rails` separately since its presence is not
|
|
156
163
|
|
157
164
|
### RSpec support
|
158
165
|
|
159
|
-
_Extracted to [`opal-rspec-rails`](https://github.com/opal/opal-rspec-rails)_
|
166
|
+
_Extracted to (unreleased) [`opal-rspec-rails`](https://github.com/opal/opal-rspec-rails)_
|
160
167
|
|
161
|
-
Add this line to your `Gemfile
|
168
|
+
Add this line to your `Gemfile`:
|
162
169
|
|
163
170
|
```ruby
|
164
171
|
gem 'opal-rspec-rails', github: 'opal/opal-rspec-rails'
|
165
172
|
```
|
166
173
|
|
174
|
+
|
167
175
|
### Minitest support
|
168
176
|
|
169
177
|
_Upcoming as `opal-minitest-rails`_
|
@@ -171,7 +179,7 @@ _Upcoming as `opal-minitest-rails`_
|
|
171
179
|
|
172
180
|
### Shared templates
|
173
181
|
|
174
|
-
As long as the templates are inside the
|
182
|
+
As long as the templates are inside the Sprockets/Opal load path, then you should be able to just require them.
|
175
183
|
|
176
184
|
Let's say we have this template `app/views/shared/test.haml`:
|
177
185
|
|
@@ -206,7 +214,7 @@ template.render(self)
|
|
206
214
|
|
207
215
|
### Using Ruby gems from Opal
|
208
216
|
|
209
|
-
Just use `Opal.use_gem` in your asset initializer (
|
217
|
+
Just use `Opal.use_gem` in your asset initializer (`config/initializers/assets.rb`).
|
210
218
|
|
211
219
|
Example:
|
212
220
|
|
@@ -218,7 +226,7 @@ Opal.use_gem 'cannonbol'
|
|
218
226
|
|
219
227
|
## License
|
220
228
|
|
221
|
-
© 2012-
|
229
|
+
© 2012-2016 Elia Schito
|
222
230
|
|
223
231
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
224
232
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/opal/rails/engine.rb
CHANGED
@@ -10,6 +10,7 @@ module Opal
|
|
10
10
|
config.opal = ActiveSupport::OrderedOptions.new
|
11
11
|
|
12
12
|
config.opal.dynamic_require_severity = :ignore
|
13
|
+
config.opal.assigns_in_templates = true
|
13
14
|
|
14
15
|
# Cache eager_load_paths now, otherwise the assets dir is added
|
15
16
|
# and its .rb files are eagerly loaded.
|
@@ -6,24 +6,20 @@ module Opal
|
|
6
6
|
new.call(template)
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
9
|
def call(template)
|
11
10
|
escaped = template.source.gsub(':', '\:')
|
12
11
|
string = '%q:' + escaped + ':'
|
13
|
-
"Opal.compile('Object.new.instance_eval {' << #{assigns} << #{local_assigns} << #{string} << '}')"
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
|
18
|
-
def local_assigns
|
19
|
-
<<-'RUBY'.strip
|
20
|
-
JSON.parse(local_assigns.to_json).map { |key, val| "#{key} = #{val.inspect};" }.join
|
21
|
-
RUBY
|
22
|
-
end
|
23
12
|
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
<<-RUBY
|
14
|
+
code = []
|
15
|
+
code << 'Object.new.instance_eval {'
|
16
|
+
if ::Rails.application.config.opal.assigns_in_templates
|
17
|
+
code << JSON.parse(local_assigns.to_json).map { |key, val| "\#{key} = \#{val.inspect};" }.join
|
18
|
+
code << JSON.parse(@_assigns.to_json).map { |key, val| "@\#{key} = \#{val.inspect};" }.join
|
19
|
+
end
|
20
|
+
code << #{string}
|
21
|
+
code << '}'
|
22
|
+
Opal.compile(code.join("\n"))
|
27
23
|
RUBY
|
28
24
|
end
|
29
25
|
end
|
data/lib/opal/rails/version.rb
CHANGED
@@ -1,21 +1,11 @@
|
|
1
1
|
require 'rails/generators/named_base'
|
2
|
-
require 'rails/generators/resource_helpers'
|
3
2
|
|
4
3
|
module Opal
|
5
4
|
module Generators
|
6
5
|
class AssetsGenerator < ::Rails::Generators::NamedBase
|
7
|
-
include ::Rails::Generators::ResourceHelpers
|
8
6
|
source_root __dir__+'/templates'
|
9
|
-
|
10
|
-
def initialize(*args)
|
11
|
-
|
12
|
-
module_name = ::Rails::Generators.const_defined?('ModelHelpers') ? 'ModelHelpers' : 'ResourceHelpers'
|
13
|
-
::Rails::Generators.const_get(module_name).skip_warn = true
|
14
|
-
super
|
15
|
-
end
|
16
|
-
|
17
7
|
def copy_opal
|
18
|
-
template 'javascript.js.rb', File.join('app/assets/javascripts', "#{
|
8
|
+
template 'javascript.js.rb', File.join('app/assets/javascripts', class_path, "#{file_name}.js.rb")
|
19
9
|
end
|
20
10
|
end
|
21
11
|
end
|
@@ -6,37 +6,40 @@
|
|
6
6
|
# Here's an example view class for your controller:
|
7
7
|
#
|
8
8
|
<% if namespaced? -%>
|
9
|
-
|
10
|
-
#= require <%= namespaced_file_path %>
|
9
|
+
require <%= namespaced_file_path.to_s.inspect %>
|
11
10
|
|
12
11
|
<% end -%>
|
13
12
|
<% module_namespacing do -%>
|
14
|
-
class <%=
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
class <%= class_name %>View
|
14
|
+
# We should have <body class="controller-<%%= controller_name %>"> in layouts
|
15
|
+
def initialize(selector = 'body.controller-<%= class_name.underscore %>')
|
16
|
+
@selector = selector
|
18
17
|
end
|
19
|
-
attr_reader :element
|
20
18
|
|
21
19
|
def setup
|
22
|
-
|
23
|
-
say_hello_when_a_link_is_clicked
|
20
|
+
on(:click, 'a', &method(:link_clicked))
|
24
21
|
end
|
25
22
|
|
26
|
-
def
|
27
|
-
|
28
|
-
|
29
|
-
# event.prevent_default
|
30
|
-
|
31
|
-
puts "Hello! (You just clicked on a link: #{event.current_target.text})"
|
32
|
-
end
|
23
|
+
def link_clicked(event)
|
24
|
+
event.prevent
|
25
|
+
puts "Hello! (You just clicked on a link: #{event.current_target.text})"
|
33
26
|
end
|
34
27
|
|
35
28
|
|
36
29
|
private
|
37
30
|
|
38
|
-
|
39
|
-
|
31
|
+
attr_reader :selector, :element
|
32
|
+
|
33
|
+
# Look for elements in the scope of the base selector
|
34
|
+
def find(selector)
|
35
|
+
Element.find("#{@selector} #{selector}")
|
36
|
+
end
|
37
|
+
|
38
|
+
# Register events on document to save memory and be friends to Turbolinks
|
39
|
+
def on(event, selector = nil, &block)
|
40
|
+
Element[`document`].on(event, selector, &block)
|
40
41
|
end
|
41
42
|
end
|
43
|
+
|
44
|
+
<%= class_name %>View.new.setup
|
42
45
|
<% end -%>
|
data/opal-rails.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Opal::Rails::VERSION
|
8
8
|
s.authors = ['Elia Schito']
|
9
9
|
s.email = ['elia@schito.me']
|
10
|
-
s.homepage = '
|
10
|
+
s.homepage = 'https://github.com/opal/opal-rails#readme'
|
11
11
|
s.summary = %q{Rails bindings for opal JS engine}
|
12
12
|
s.description = %q{Rails bindings for opal JS engine}
|
13
13
|
s.license = 'MIT-LICENSE'
|
@@ -27,9 +27,11 @@ Gem::Specification.new do |s|
|
|
27
27
|
|
28
28
|
s.add_dependency 'rails', '>= 4.0', '< 6.0'
|
29
29
|
s.add_dependency 'sprockets-rails', '< 3.0'
|
30
|
+
s.add_dependency 'jquery-rails'
|
31
|
+
|
30
32
|
s.add_dependency 'opal', '>= 0.8.0', '< 0.11'
|
31
33
|
s.add_dependency 'opal-jquery', '~> 0.4.0'
|
32
|
-
s.add_dependency '
|
34
|
+
s.add_dependency 'opal-sprockets', '~> 0.4.0'
|
33
35
|
s.add_dependency 'opal-activesupport', '>= 0.0.5'
|
34
36
|
|
35
37
|
s.add_development_dependency 'execjs'
|
@@ -2,20 +2,46 @@ require 'spec_helper'
|
|
2
2
|
require 'execjs'
|
3
3
|
|
4
4
|
describe 'controller assignments' do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
5
|
+
context 'when enabled' do
|
6
|
+
before do
|
7
|
+
Rails.application.config.opal.assigns_in_templates = true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'are in the template' do
|
11
|
+
source = get_source_of '/application/with_assignments.js'
|
12
|
+
assignments = opal_eval(source)
|
13
|
+
|
14
|
+
{
|
15
|
+
:number_var => 1234,
|
16
|
+
:string_var => 'hello',
|
17
|
+
:array_var => [1,'a'],
|
18
|
+
:hash_var => {:a => 1, :b => 2},
|
19
|
+
:object_var => {:contents => 'json representation'},
|
20
|
+
:local_var => 'i am local',
|
21
|
+
}.each_pair do |ivar, assignment|
|
22
|
+
expect(assignments[ivar]).to eq(assignment)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'when disabled' do
|
28
|
+
before do
|
29
|
+
Rails.application.config.opal.assigns_in_templates = false
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'are not in the template' do
|
33
|
+
source = get_source_of '/application/with_assignments.js'
|
34
|
+
assignments = opal_eval(source)
|
35
|
+
{
|
36
|
+
:number_var => 1234,
|
37
|
+
:string_var => 'hello',
|
38
|
+
:array_var => [1,'a'],
|
39
|
+
:hash_var => {:a => 1, :b => 2},
|
40
|
+
:object_var => {:contents => 'json representation'},
|
41
|
+
:local_var => 'i am local',
|
42
|
+
}.each_pair do |ivar, assignment|
|
43
|
+
expect(assignments[ivar]).not_to eq(assignment)
|
44
|
+
end
|
19
45
|
end
|
20
46
|
end
|
21
47
|
|
@@ -26,15 +52,16 @@ describe 'controller assignments' do
|
|
26
52
|
end
|
27
53
|
|
28
54
|
def opal_eval source
|
55
|
+
source = source.gsub(/;\s*\Z/,'') # execjs eval doesn't like the trailing semicolon
|
29
56
|
builder = Opal::Builder.new
|
30
57
|
builder.build 'opal'
|
31
58
|
|
32
59
|
# Any lib should be already required in the page,
|
33
60
|
# require won't work in this kind of templates.
|
34
|
-
builder.build '
|
61
|
+
builder.build 'json'
|
35
62
|
|
36
63
|
context = ExecJS.compile builder.to_s
|
37
|
-
context.eval
|
64
|
+
JSON.parse context.eval(source), symbolize_names: true
|
38
65
|
rescue
|
39
66
|
$!.message << "\n\n#{source}"
|
40
67
|
raise
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'template handler' do
|
4
|
+
it 'has the correct content type' do
|
5
|
+
get '/application/with_assignments.js'
|
6
|
+
expect(response).to be_success
|
7
|
+
expect(response.headers['Content-Type']).to eq('text/javascript; charset=utf-8')
|
8
|
+
end
|
9
|
+
end
|
@@ -12,16 +12,7 @@ raise 'pippo'
|
|
12
12
|
</script>
|
13
13
|
HTML
|
14
14
|
|
15
|
-
WITH_ASSIGNMENTS =
|
16
|
-
return {
|
17
|
-
number_var: @number_var,
|
18
|
-
string_var: @string_var,
|
19
|
-
array_var: @array_var,
|
20
|
-
hash_var: @hash_var,
|
21
|
-
object_var: @object_var,
|
22
|
-
local_var: local_var
|
23
|
-
}.to_n
|
24
|
-
RUBY
|
15
|
+
WITH_ASSIGNMENTS = File.read "#{__dir__}/assets/javascripts/with_assignments.js.rb"
|
25
16
|
|
26
17
|
class ApplicationController < ActionController::Base
|
27
18
|
include Rails.application.routes.url_helpers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia Schito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '3.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: jquery-rails
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: opal
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,19 +93,19 @@ dependencies:
|
|
79
93
|
- !ruby/object:Gem::Version
|
80
94
|
version: 0.4.0
|
81
95
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
96
|
+
name: opal-sprockets
|
83
97
|
requirement: !ruby/object:Gem::Requirement
|
84
98
|
requirements:
|
85
|
-
- - "
|
99
|
+
- - "~>"
|
86
100
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
101
|
+
version: 0.4.0
|
88
102
|
type: :runtime
|
89
103
|
prerelease: false
|
90
104
|
version_requirements: !ruby/object:Gem::Requirement
|
91
105
|
requirements:
|
92
|
-
- - "
|
106
|
+
- - "~>"
|
93
107
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
108
|
+
version: 0.4.0
|
95
109
|
- !ruby/object:Gem::Dependency
|
96
110
|
name: opal-activesupport
|
97
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,7 +228,6 @@ files:
|
|
214
228
|
- ".gitignore"
|
215
229
|
- ".powder"
|
216
230
|
- ".rspec"
|
217
|
-
- ".spectator.rb"
|
218
231
|
- ".travis.yml"
|
219
232
|
- Appraisals
|
220
233
|
- CHANGELOG.md
|
@@ -238,18 +251,21 @@ files:
|
|
238
251
|
- spec/helpers/opal_helper_spec.rb
|
239
252
|
- spec/integration/assigns_spec.rb
|
240
253
|
- spec/integration/source_map_spec.rb
|
254
|
+
- spec/integration/template_spec.rb
|
241
255
|
- spec/spec_helper.rb
|
242
256
|
- spec/support/capybara.rb
|
243
257
|
- spec/support/reset_assets_cache.rb
|
258
|
+
- spec/support/reset_config.rb
|
244
259
|
- spec/support/test_app.rb
|
245
260
|
- test_apps/application_controller.rb
|
246
261
|
- test_apps/assets/javascripts/application.js.rb
|
247
262
|
- test_apps/assets/javascripts/bar.rb
|
248
263
|
- test_apps/assets/javascripts/foo.js.rb
|
249
264
|
- test_apps/assets/javascripts/source_map_example.js.rb
|
265
|
+
- test_apps/assets/javascripts/with_assignments.js.rb
|
250
266
|
- test_apps/rails4.rb
|
251
267
|
- test_apps/rails5.rb
|
252
|
-
homepage:
|
268
|
+
homepage: https://github.com/opal/opal-rails#readme
|
253
269
|
licenses:
|
254
270
|
- MIT-LICENSE
|
255
271
|
metadata: {}
|
@@ -271,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
287
|
version: '0'
|
272
288
|
requirements: []
|
273
289
|
rubyforge_project: opal-rails
|
274
|
-
rubygems_version: 2.
|
290
|
+
rubygems_version: 2.5.1
|
275
291
|
signing_key:
|
276
292
|
specification_version: 4
|
277
293
|
summary: Rails bindings for opal JS engine
|
@@ -279,7 +295,9 @@ test_files:
|
|
279
295
|
- spec/helpers/opal_helper_spec.rb
|
280
296
|
- spec/integration/assigns_spec.rb
|
281
297
|
- spec/integration/source_map_spec.rb
|
298
|
+
- spec/integration/template_spec.rb
|
282
299
|
- spec/spec_helper.rb
|
283
300
|
- spec/support/capybara.rb
|
284
301
|
- spec/support/reset_assets_cache.rb
|
302
|
+
- spec/support/reset_config.rb
|
285
303
|
- spec/support/test_app.rb
|
data/.spectator.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ENV['RSPEC_COMMAND'] = 'rspec'
|