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

Commit a2841b6

Browse files
committed
Clean up todos example app dependency
1 parent 16eaf32 commit a2841b6

File tree

6 files changed

+64
-78
lines changed

6 files changed

+64
-78
lines changed

example/todos/Gemfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
source 'https://rubygems.org'
22

3+
gem 'tilt', '~> 2.0.0'
4+
gem 'react.rb', :path => '../..'
35
gem 'rake'
4-
gem 'opal', :github => 'opal/opal', :ref => '85220f32136c74ac93f1cb721462324a3423cf44'
5-
gem 'opal-jquery', :github => 'opal/opal-jquery'
66
gem 'vienna', :github => 'opal/vienna', :ref => '593335cbd7fb99ce471fa720e9b9c849d99b8dda'
7-
gem 'opal-haml', :github => 'opal/opal-haml'
8-
gem 'opal-rspec', '0.3.0.beta2'
9-
gem 'react.rb', '~> 0.0.2'
10-
gem 'thin'
11-
gem 'react-source'
7+
gem 'opal-rspec', '0.3.0.beta3'
8+
gem 'react-source', '~> 0.12.0'

example/todos/Gemfile.lock

Lines changed: 36 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
GIT
2-
remote: git://github.com/opal/opal-haml.git
3-
revision: 0bdd3eb53ec03d380e14440a94f779ed7c3741e1
4-
specs:
5-
opal-haml (0.2.0)
6-
haml
7-
opal (>= 0.5.0, < 1.0.0)
8-
9-
GIT
10-
remote: git://github.com/opal/opal-jquery.git
11-
revision: 1814202085f168176231b877b2b7a967b75b0726
12-
specs:
13-
opal-jquery (0.1.2)
14-
opal (>= 0.5.0, < 1.0.0)
15-
16-
GIT
17-
remote: git://github.com/opal/opal.git
18-
revision: 85220f32136c74ac93f1cb721462324a3423cf44
19-
ref: 85220f32136c74ac93f1cb721462324a3423cf44
20-
specs:
21-
opal (0.6.0)
22-
source_map
23-
sprockets
24-
251
GIT
262
remote: git://github.com/opal/vienna.git
273
revision: 593335cbd7fb99ce471fa720e9b9c849d99b8dda
@@ -32,49 +8,57 @@ GIT
328
opal-activesupport
339
opal-jquery
3410

11+
PATH
12+
remote: ../..
13+
specs:
14+
react.rb (0.2.1)
15+
opal (~> 0.6.0)
16+
opal-activesupport (~> 0)
17+
sprockets-es6 (~> 0)
18+
therubyracer (~> 0)
19+
3520
GEM
3621
remote: https://rubygems.org/
3722
specs:
38-
daemons (1.1.9)
39-
eventmachine (1.0.3)
40-
haml (4.0.5)
41-
tilt
42-
hike (1.2.3)
23+
babel-source (5.0.12)
24+
babel-transpiler (0.7.0)
25+
babel-source (>= 4.0, < 6)
26+
execjs (~> 2.0)
27+
execjs (2.5.2)
4328
json (1.8.2)
44-
multi_json (1.10.1)
29+
libv8 (3.16.14.7)
30+
opal (0.6.3)
31+
source_map
32+
sprockets
4533
opal-activesupport (0.1.0)
4634
opal (>= 0.5.0, < 1.0.0)
47-
opal-rspec (0.3.0.beta2)
35+
opal-jquery (0.2.0)
36+
opal (>= 0.5.0, < 1.0.0)
37+
opal-rspec (0.3.0.beta3)
4838
opal (>= 0.6.0, < 1.0.0)
49-
rack (1.5.2)
50-
rake (10.1.1)
39+
rack (1.6.0)
40+
rake (10.4.2)
5141
react-source (0.12.2)
52-
react.rb (0.0.2)
53-
opal (~> 0.6.0)
54-
opal-activesupport
42+
ref (1.0.5)
5543
source_map (3.0.1)
5644
json
57-
sprockets (2.12.3)
58-
hike (~> 1.2)
59-
multi_json (~> 1.0)
45+
sprockets (3.0.0.rc.2)
6046
rack (~> 1.0)
61-
tilt (~> 1.1, != 1.3.0)
62-
thin (1.6.2)
63-
daemons (>= 1.0.9)
64-
eventmachine (>= 1.0.0)
65-
rack (>= 1.0.0)
66-
tilt (1.4.1)
47+
sprockets-es6 (0.6.0)
48+
babel-transpiler
49+
sprockets (~> 3.0.0.beta)
50+
therubyracer (0.12.2)
51+
libv8 (~> 3.16.14.0)
52+
ref
53+
tilt (2.0.1)
6754

6855
PLATFORMS
6956
ruby
7057

7158
DEPENDENCIES
72-
opal!
73-
opal-haml!
74-
opal-jquery!
75-
opal-rspec (= 0.3.0.beta2)
59+
opal-rspec (= 0.3.0.beta3)
7660
rake
77-
react-source
78-
react.rb (~> 0.0.2)
79-
thin
61+
react-source (~> 0.12.0)
62+
react.rb!
63+
tilt (~> 2.0.0)
8064
vienna!

example/todos/app/application.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'opal'
22
require 'jquery'
33
require 'opal-jquery'
4-
require 'opal-haml'
54
require 'vienna'
65
require "react"
76

@@ -11,7 +10,7 @@
1110

1211
Document.ready? do
1312
element = React.create_element(TodoAppView, filter: "all")
14-
component = React.render(element, Element.find('#todoapp').get(0))
13+
component = React.render(element, `document.getElementById('todoapp')`)
1514

1615
Vienna::Router.new.tap do |router|
1716
router.route('/:filter') do |params|

example/todos/config.ru

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ Bundler.require
33

44
require "react/source"
55

6+
Opal::Processor.source_map_enabled = false
7+
68
run Opal::Server.new { |s|
79
s.append_path 'app'
810
s.append_path 'vendor'
911
s.append_path File.dirname(::React::Source.bundled_path_for("react-with-addons.js"))
1012

1113
s.debug = true
1214
s.main = 'application'
13-
s.index_path = 'index.html.haml'
15+
s.index_path = 'index.html.erb'
1416
}

example/todos/index.html.erb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang='en'>
3+
<head>
4+
<meta charset='utf-8'>
5+
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
6+
<link href='/vendor/base.css' rel='stylesheet'>
7+
<%= javascript_include_tag 'react-with-addons.js' %>
8+
<%= javascript_include_tag 'application' %>
9+
</head>
10+
<body>
11+
<section id='todoapp'></section>
12+
<div id='info'>
13+
<p>Double-click to edit a todo</p>
14+
<p>
15+
Part of
16+
<a href='http://todomvc.com'>TodoMVC</a>
17+
</p>
18+
</div>
19+
</body>
20+
</html>

example/todos/index.html.haml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)