This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
module Hyperloop
2
2
define_setting :add_hyperloop_paths , true
3
-
3
+
4
4
define_setting :prerendering_files , [ 'hyperloop-prerender-loader.js' ]
5
5
6
6
class Railtie < ::Rails ::Railtie
@@ -34,6 +34,11 @@ def auto_config=(on)
34
34
# config.assets.paths.unshift(hps)
35
35
# end
36
36
config . assets . paths . unshift ::Rails . root . join ( 'app' , 'hyperloop' ) . to_s
37
+ if Rails . const_defined? 'Hyperloop::Console'
38
+ config . assets . precompile += %w( hyper-console-client.css )
39
+ config . assets . precompile += %w( hyper-console-client.min.js )
40
+ config . assets . precompile += %w( action_cable.js ) if Rails . const_defined? 'ActionCable'
41
+ end
37
42
else
38
43
delete_first config . eager_load_paths , "#{ config . root } /app/hyperloop/models"
39
44
delete_first config . eager_load_paths , "#{ config . root } /app/hyperloop/models/concerns"
Original file line number Diff line number Diff line change 12
12
Timecop . freeze
13
13
visit '/'
14
14
expect ( evaluate_script ( "Opal.Test.$const_get('TIME')" ) ) . to eq ( "#{ Time . now } " )
15
- binding . pry
16
15
%w[ test production staging development etc ] . each do |env |
17
16
expect ( evaluate_script ( "Opal.Hyperloop.$env().$send('#{ env } ?')" ) ) . to eq ( Rails . env . send ( :"#{ env } ?" ) )
18
17
expect ( Hyperloop . env ) . to eq ( Rails . env )
You can’t perform that action at this time.
0 commit comments