Skip to content

Commit

Permalink
Use latest Blade Runner with mountable Rack adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed Jun 23, 2015
1 parent bd1365a commit 8cee1a6
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 43 deletions.
3 changes: 2 additions & 1 deletion .blade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ framework: qunit

load_paths:
- test/src
- test/blade_runner_assets
- src
- polyfills

Expand All @@ -11,7 +12,7 @@ logical_paths:

ci:
plugins:
sauce:
sauce_labs:
browsers:
- name: "Google Chrome"
platforms: ["Mac", "Windows"]
Expand Down
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ gem 'rack-rewrite'
gem 'uglifier'
gem 'sass'

gem 'blade_runner', github: 'javan/blade_runner'
gem 'blade_runner-sauce', github: 'javan/blade_runner-sauce'
gem 'blade_runner'
gem 'blade_runner-qunit_adapter', github: 'javan/blade_runner-qunit_adapter'
gem 'blade_runner-sauce_labs_plugin', github: 'javan/blade_runner-sauce_labs_plugin'
47 changes: 23 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
GIT
remote: git://github.com/javan/blade_runner-sauce.git
revision: cb9446569153702e845fd4d13a374f814680d1d7
remote: git://github.com/javan/blade_runner-qunit_adapter.git
revision: 961acc78da3207d9f49f054ab2d516fadd2c7d5e
specs:
blade_runner-sauce (0.1.0)
childprocess
faraday
blade_runner-qunit_adapter (0.1.0)

GIT
remote: git://github.com/javan/blade_runner.git
revision: 39d87a495f6b85a1ceb1a0f51e5a992612fb8c92
remote: git://github.com/javan/blade_runner-sauce_labs_plugin.git
revision: 0cb36905420b0e10504bf42318776a09e88d5d83
specs:
blade_runner (0.1.0)
activesupport (>= 3.0.0)
coffee-script (~> 2.4.0)
coffee-script-source (~> 1.9.0)
curses (~> 1.0.0)
eventmachine (~> 1.0.0)
faye (~> 1.1.1)
sprockets (~> 3.2.0)
thin (~> 1.6.0)
useragent (~> 0.13.0)
blade_runner-sauce_labs_plugin (0.1.0)
childprocess
faraday

PATH
remote: .
Expand All @@ -29,13 +20,23 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.1)
activesupport (4.2.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
blade_runner (0.1.0)
activesupport (>= 3.0.0)
coffee-script (~> 2.4.0)
coffee-script-source (~> 1.9.0)
curses (~> 1.0.0)
eventmachine (~> 1.0.0)
faye (~> 1.1.1)
sprockets (~> 3.2.0)
thin (~> 1.6.0)
useragent (~> 0.13.0)
childprocess (0.5.6)
ffi (~> 1.0, >= 1.0.11)
coffee-script (2.4.1)
Expand Down Expand Up @@ -74,7 +75,7 @@ GEM
i18n (0.7.0)
json (1.8.3)
minitest (5.7.0)
multi_json (1.11.0)
multi_json (1.11.1)
multipart-post (2.0.0)
rack (1.6.1)
rack-rewrite (1.5.0)
Expand All @@ -101,8 +102,9 @@ PLATFORMS
ruby

DEPENDENCIES
blade_runner!
blade_runner-sauce!
blade_runner
blade_runner-qunit_adapter!
blade_runner-sauce_labs_plugin!
coffee-script
coffee-script-source (~> 1.9.1)
ejs
Expand All @@ -112,6 +114,3 @@ DEPENDENCIES
sprockets
trix!
uglifier

BUNDLED WITH
1.10.3
4 changes: 4 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require 'bundler/setup'
require 'rack/rewrite'
require 'pathname'
require 'json'
require 'blade_runner'

root = Pathname.new(File.dirname(__FILE__))

Expand All @@ -12,6 +13,9 @@ environment.paths = %w( assets polyfills src )
require root.join('lib/trix/attachment_server')
Trix::AttachmentServer.root = root.join('tmp/attachments')


use BladeRunner::RackAdapter, mount: '/test'

map '/' do
run environment.sprockets_environment
use Rack::Rewrite do
Expand Down
1 change: 1 addition & 0 deletions test/assets/body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div id="trix-container" style="height: 150px"></div>
1 change: 1 addition & 0 deletions test/blade_runner_assets/body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div id="trix-container" style="height: 150px"></div>
6 changes: 6 additions & 0 deletions test/blade_runner_assets/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style type="text/css">
trix-toolbar { margin-bottom: 10px }
trix-toolbar button { border: 1px solid #ccc; background: #fff }
trix-toolbar button.active { background: #d3e6fd }
trix-toolbar button:disabled { color: #ccc }
</style>
16 changes: 0 additions & 16 deletions test/src/test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,3 @@
#= require_tree ./fixtures
#= require_tree ./system
#= require_tree ./unit

document.addEventListener "DOMContentLoaded", ->
container = """
<div id="trix-container" style="height: 150px"></div>
"""
document.body.insertAdjacentHTML("afterbegin", container)

styles = """
<style type="text/css">
trix-toolbar { margin-bottom: 10px }
trix-toolbar button { border: 1px solid #ccc; background: #fff }
trix-toolbar button.active { background: #d3e6fd }
trix-toolbar button:disabled { color: #ccc }
</style>
"""
document.head.insertAdjacentHTML("beforeend", styles)

0 comments on commit 8cee1a6

Please sign in to comment.