Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 1bf7a6f

Browse files
committed
closes #15
1 parent b593425 commit 1bf7a6f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/hyperloop/rail_tie.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Hyperloop
22
define_setting :add_hyperloop_paths, true
3-
3+
44
define_setting :prerendering_files, ['hyperloop-prerender-loader.js']
55

66
class Railtie < ::Rails::Railtie
@@ -34,6 +34,11 @@ def auto_config=(on)
3434
# config.assets.paths.unshift(hps)
3535
# end
3636
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
3742
else
3843
delete_first config.eager_load_paths, "#{config.root}/app/hyperloop/models"
3944
delete_first config.eager_load_paths, "#{config.root}/app/hyperloop/models/concerns"

spec/hyperloop_config_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
Timecop.freeze
1313
visit '/'
1414
expect(evaluate_script("Opal.Test.$const_get('TIME')")).to eq("#{Time.now}")
15-
binding.pry
1615
%w[test production staging development etc].each do |env|
1716
expect(evaluate_script("Opal.Hyperloop.$env().$send('#{env}?')")).to eq(Rails.env.send(:"#{env}?"))
1817
expect(Hyperloop.env).to eq(Rails.env)

0 commit comments

Comments
 (0)