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

Commit 1415ca0

Browse files
committed
Merge branch 'master' of github.com:ruby-hyperloop/rails-clone-and-go
2 parents 4fe0f3e + 997f106 commit 1415ca0

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.c9/project.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@
8686
"@preview": false,
8787
"@useOwnerSettings": false
8888
}
89-
}
89+
}

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ group :development do
5252
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
5353
gem 'spring'
5454
gem 'spring-watcher-listen', '~> 2.0.0'
55-
gem 'opal_hot_reloader', git: 'https://github.com/catmando/opal-hot-reloader.git'
55+
gem 'opal_hot_reloader', git: 'https://github.com/fkchang/opal-hot-reloader.git'
5656
end
5757

5858
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
2-
remote: https://github.com/catmando/opal-hot-reloader.git
3-
revision: 87d85ac0e3d4be44a8a3fe3eda97ea898c05034b
2+
remote: https://github.com/fkchang/opal-hot-reloader.git
3+
revision: 3438a1cf49c3f5b3d0936b08b6c594c8458a651c
44
specs:
55
opal_hot_reloader (0.1.4)
66
listen (~> 3.0)
@@ -353,4 +353,4 @@ DEPENDENCIES
353353
web-console (>= 3.3.0)
354354

355355
BUNDLED WITH
356-
1.15.0
356+
1.15.1

app/assets/javascripts/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
//= require 'jquery'
1616
//= require_tree .
1717
//= require hyperloop-loader
18-
Opal.OpalHotReloader.$listen(8081)
18+
Opal.OpalHotReloader.$listen() // optional (port, false, poll_seconds) i.e. (8081, false, 1)

bin/setup

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ chdir APP_ROOT do
3333
application_path = File.join(APP_ROOT, 'config', 'application.rb')
3434
IO.write(application_path, File.open(application_path) {|f| f.read.gsub(/HyperloopCloneAndGo/, "#{APP_CLASS}")})
3535

36-
unless ENV['C9_PROJECT']
36+
if ENV['C9_PROJECT']
37+
puts "== Updating Hot Reloader Settings =="
38+
application_path = File.join(APP_ROOT, 'app', 'assets', 'javascripts', 'application.js')
39+
IO.write(application_path, File.open(application_path) {|f| f.read.gsub(/\$listen\(\)/, '$listen(8081, false, 1)')})
40+
else
3741
puts "== Updating Procfile ports =="
3842
application_path = File.join(APP_ROOT, 'Procfile')
3943
IO.write(application_path, File.open(application_path) {|f| f.read.gsub(/ -p 808\d/, '')})

0 commit comments

Comments
 (0)