This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +35
-16
lines changed Expand file tree Collapse file tree 4 files changed +35
-16
lines changed Original file line number Diff line number Diff line change 1
1
source 'https://rubygems.org'
2
2
#gem 'opal-rails', git: "https://github.com/opal/opal-rails.git"
3
+ #gem 'opal', "~> 0.9.x"
4
+ #gem 'opal-rails', git: "https://github.com/reactrb/opal-rails.git"
5
+ #gem 'opal-rspec-rails', git: 'https://github.com/reactrb/opal-rspec-rails.git'
6
+
3
7
gemspec
Original file line number Diff line number Diff line change @@ -6,18 +6,20 @@ require "opal-jquery"
6
6
7
7
Opal . append_path File . expand_path ( '../spec' , __FILE__ )
8
8
9
- sprockets_env = Opal ::RSpec ::SprocketsEnvironment . new
10
- run Opal ::Server . new ( sprockets : sprockets_env ) { |s |
11
- s . main = 'opal/rspec/sprockets_runner'
12
- sprockets_env . add_spec_paths_to_sprockets
13
- s . debug = false
14
- s . index_path = 'spec/index.html.erb'
15
- }
16
-
17
- # run Opal::Server.new { |s|
18
- # s.main = 'opal/rspec/sprockets_runner'
19
- # s.append_path 'spec'
20
- # #s.append_path File.dirname(::React::Source.bundled_path_for("react-with-addons.js"))
21
- # s.debug = true
22
- # s.index_path = 'spec/index.html.erb'
23
- # }
9
+ sprockets_env = Opal ::RSpec ::SprocketsEnvironment . new rescue nil
10
+ if sprockets_env
11
+ run Opal ::Server . new ( sprockets : sprockets_env ) { |s |
12
+ s . main = 'opal/rspec/sprockets_runner'
13
+ sprockets_env . add_spec_paths_to_sprockets
14
+ s . debug = false
15
+ s . index_path = 'spec/index.html.erb'
16
+ }
17
+ else
18
+ run Opal ::Server . new { |s |
19
+ s . main = 'opal/rspec/sprockets_runner'
20
+ s . append_path 'spec'
21
+ #s.append_path File.dirname(::React::Source.bundled_path_for("react-with-addons.js"))
22
+ s . debug = true
23
+ s . index_path = 'spec/index.html.erb'
24
+ }
25
+ end
Original file line number Diff line number Diff line change
1
+ class Hash
2
+
3
+ alias_method :_pre_react_patch_initialize , :initialize
4
+
5
+ def initialize ( defaults = undefined , &block )
6
+ if ( `defaults===null` )
7
+ _pre_react_patch_initialize ( &block )
8
+ else
9
+ _pre_react_patch_initialize ( defaults , &block )
10
+ end
11
+ end
12
+
13
+ end
Original file line number Diff line number Diff line change 1
1
module React
2
- VERSION = "0.8.1 "
2
+ VERSION = "0.8.2 "
3
3
end
You can’t perform that action at this time.
0 commit comments