Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-rails
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 143f6f2edc53
Choose a base ref
...
head repository: opal/opal-rails
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fd21a4dd8683
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on May 15, 2015

  1. Debug fsync on travis

    elia committed May 15, 2015
    Copy the full SHA
    52d770b View commit details
  2. Sprockets env is Rails.application.assets

    Not the config.
    elia committed May 15, 2015
    Copy the full SHA
    fd21a4d View commit details
Showing with 9 additions and 3 deletions.
  1. +9 −3 app/controllers/opal_spec_controller.rb
12 changes: 9 additions & 3 deletions app/controllers/opal_spec_controller.rb
Original file line number Diff line number Diff line change
@@ -8,10 +8,16 @@ class OpalSpecController < ActionController::Base

def run
logical_path = builder.runner_logical_path
sprockets = Rails.application.config.assets
sprockets = Rails.application.assets
runner = builder.runner_pathname
runner.open('w') { |f| f << builder.main_code; f.fsync }
sprockets[logical_path]
runner.open('w') do |file|
file << builder.main_code
file.fsync
end
written_to_disk = runner.read
unless written_to_disk == builder.main_code
raise "Something's wrong: written_to_disk: #{written_to_disk.inspect}"
end
end