Skip to content

Commit c27d9ca

Browse files
committed
Merge pull request #4 from jakubmal/appraisal
Integration with appraisal. Closes #1
2 parents 5c7a970 + f01ed3f commit c27d9ca

14 files changed

+357
-12
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ language: ruby
33
rvm:
44
- 2.0.0
55
- 1.9.3
6+
before_install:
7+
- gem install bundler --version '>= 1.2.2'
8+
before_script: 'bundle exec rake appraisal:install'
9+
script: 'bundle exec rake appraisal test'

Appraisals

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
appraise "rails-3.1" do
2+
gem 'rails', '~> 3.1'
3+
end
4+
5+
appraise "rails-3.2" do
6+
gem 'rails', '~> 3.2'
7+
end
8+
9+
appraise "rails-4.0" do
10+
gem 'rails', '~> 4.0'
11+
end

Rakefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ rescue LoadError
44
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
55
end
66

7-
87
Bundler::GemHelper.install_tasks
98

9+
require 'appraisal'
1010
require 'rake/testtask'
1111

1212
Rake::TestTask.new(:test) do |t|
@@ -16,6 +16,4 @@ Rake::TestTask.new(:test) do |t|
1616
t.verbose = false
1717
end
1818

19-
2019
task default: :test
21-

gemfiles/rails_3.1.gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by Appraisal
2+
3+
source "http://rubygems.org"
4+
5+
gem "rails", "~> 3.1"
6+
7+
gemspec :path=>"../"

gemfiles/rails_3.1.gemfile.lock

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
PATH
2+
remote: /home/jakub/code/react-rails
3+
specs:
4+
react-rails (0.4.1.0)
5+
execjs
6+
rails (>= 3.1)
7+
react-source (= 0.4.1)
8+
9+
GEM
10+
remote: http://rubygems.org/
11+
specs:
12+
actionmailer (3.2.14)
13+
actionpack (= 3.2.14)
14+
mail (~> 2.5.4)
15+
actionpack (3.2.14)
16+
activemodel (= 3.2.14)
17+
activesupport (= 3.2.14)
18+
builder (~> 3.0.0)
19+
erubis (~> 2.7.0)
20+
journey (~> 1.0.4)
21+
rack (~> 1.4.5)
22+
rack-cache (~> 1.2)
23+
rack-test (~> 0.6.1)
24+
sprockets (~> 2.2.1)
25+
activemodel (3.2.14)
26+
activesupport (= 3.2.14)
27+
builder (~> 3.0.0)
28+
activerecord (3.2.14)
29+
activemodel (= 3.2.14)
30+
activesupport (= 3.2.14)
31+
arel (~> 3.0.2)
32+
tzinfo (~> 0.3.29)
33+
activeresource (3.2.14)
34+
activemodel (= 3.2.14)
35+
activesupport (= 3.2.14)
36+
activesupport (3.2.14)
37+
i18n (~> 0.6, >= 0.6.4)
38+
multi_json (~> 1.0)
39+
appraisal (0.5.2)
40+
bundler
41+
rake
42+
arel (3.0.2)
43+
builder (3.0.4)
44+
erubis (2.7.0)
45+
execjs (1.4.0)
46+
multi_json (~> 1.0)
47+
hike (1.2.3)
48+
i18n (0.6.4)
49+
journey (1.0.4)
50+
json (1.8.0)
51+
mail (2.5.4)
52+
mime-types (~> 1.16)
53+
treetop (~> 1.4.8)
54+
mime-types (1.23)
55+
multi_json (1.7.8)
56+
polyglot (0.3.3)
57+
rack (1.4.5)
58+
rack-cache (1.2)
59+
rack (>= 0.4)
60+
rack-ssl (1.3.3)
61+
rack
62+
rack-test (0.6.2)
63+
rack (>= 1.0)
64+
rails (3.2.14)
65+
actionmailer (= 3.2.14)
66+
actionpack (= 3.2.14)
67+
activerecord (= 3.2.14)
68+
activeresource (= 3.2.14)
69+
activesupport (= 3.2.14)
70+
bundler (~> 1.0)
71+
railties (= 3.2.14)
72+
railties (3.2.14)
73+
actionpack (= 3.2.14)
74+
activesupport (= 3.2.14)
75+
rack-ssl (~> 1.3.2)
76+
rake (>= 0.8.7)
77+
rdoc (~> 3.4)
78+
thor (>= 0.14.6, < 2.0)
79+
rake (10.1.0)
80+
rdoc (3.12.2)
81+
json (~> 1.4)
82+
react-source (0.4.1)
83+
sprockets (2.2.2)
84+
hike (~> 1.2)
85+
multi_json (~> 1.0)
86+
rack (~> 1.0)
87+
tilt (~> 1.1, != 1.3.0)
88+
sqlite3 (1.3.7)
89+
thor (0.18.1)
90+
tilt (1.4.1)
91+
treetop (1.4.14)
92+
polyglot
93+
polyglot (>= 0.3.1)
94+
tzinfo (0.3.37)
95+
96+
PLATFORMS
97+
ruby
98+
99+
DEPENDENCIES
100+
appraisal
101+
bundler (>= 1.2.2)
102+
rails (~> 3.1)
103+
react-rails!
104+
sqlite3

gemfiles/rails_3.2.gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by Appraisal
2+
3+
source "http://rubygems.org"
4+
5+
gem "rails", "~> 3.2"
6+
7+
gemspec :path=>"../"

gemfiles/rails_3.2.gemfile.lock

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
PATH
2+
remote: /home/jakub/code/react-rails
3+
specs:
4+
react-rails (0.4.1.0)
5+
execjs
6+
rails (>= 3.1)
7+
react-source (= 0.4.1)
8+
9+
GEM
10+
remote: http://rubygems.org/
11+
specs:
12+
actionmailer (3.2.14)
13+
actionpack (= 3.2.14)
14+
mail (~> 2.5.4)
15+
actionpack (3.2.14)
16+
activemodel (= 3.2.14)
17+
activesupport (= 3.2.14)
18+
builder (~> 3.0.0)
19+
erubis (~> 2.7.0)
20+
journey (~> 1.0.4)
21+
rack (~> 1.4.5)
22+
rack-cache (~> 1.2)
23+
rack-test (~> 0.6.1)
24+
sprockets (~> 2.2.1)
25+
activemodel (3.2.14)
26+
activesupport (= 3.2.14)
27+
builder (~> 3.0.0)
28+
activerecord (3.2.14)
29+
activemodel (= 3.2.14)
30+
activesupport (= 3.2.14)
31+
arel (~> 3.0.2)
32+
tzinfo (~> 0.3.29)
33+
activeresource (3.2.14)
34+
activemodel (= 3.2.14)
35+
activesupport (= 3.2.14)
36+
activesupport (3.2.14)
37+
i18n (~> 0.6, >= 0.6.4)
38+
multi_json (~> 1.0)
39+
appraisal (0.5.2)
40+
bundler
41+
rake
42+
arel (3.0.2)
43+
builder (3.0.4)
44+
erubis (2.7.0)
45+
execjs (1.4.0)
46+
multi_json (~> 1.0)
47+
hike (1.2.3)
48+
i18n (0.6.4)
49+
journey (1.0.4)
50+
json (1.8.0)
51+
mail (2.5.4)
52+
mime-types (~> 1.16)
53+
treetop (~> 1.4.8)
54+
mime-types (1.23)
55+
multi_json (1.7.8)
56+
polyglot (0.3.3)
57+
rack (1.4.5)
58+
rack-cache (1.2)
59+
rack (>= 0.4)
60+
rack-ssl (1.3.3)
61+
rack
62+
rack-test (0.6.2)
63+
rack (>= 1.0)
64+
rails (3.2.14)
65+
actionmailer (= 3.2.14)
66+
actionpack (= 3.2.14)
67+
activerecord (= 3.2.14)
68+
activeresource (= 3.2.14)
69+
activesupport (= 3.2.14)
70+
bundler (~> 1.0)
71+
railties (= 3.2.14)
72+
railties (3.2.14)
73+
actionpack (= 3.2.14)
74+
activesupport (= 3.2.14)
75+
rack-ssl (~> 1.3.2)
76+
rake (>= 0.8.7)
77+
rdoc (~> 3.4)
78+
thor (>= 0.14.6, < 2.0)
79+
rake (10.1.0)
80+
rdoc (3.12.2)
81+
json (~> 1.4)
82+
react-source (0.4.1)
83+
sprockets (2.2.2)
84+
hike (~> 1.2)
85+
multi_json (~> 1.0)
86+
rack (~> 1.0)
87+
tilt (~> 1.1, != 1.3.0)
88+
sqlite3 (1.3.7)
89+
thor (0.18.1)
90+
tilt (1.4.1)
91+
treetop (1.4.14)
92+
polyglot
93+
polyglot (>= 0.3.1)
94+
tzinfo (0.3.37)
95+
96+
PLATFORMS
97+
ruby
98+
99+
DEPENDENCIES
100+
appraisal
101+
bundler (>= 1.2.2)
102+
rails (~> 3.2)
103+
react-rails!
104+
sqlite3

gemfiles/rails_4.0.gemfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by Appraisal
2+
3+
source "http://rubygems.org"
4+
5+
gem "rails", "~> 4.0"
6+
7+
gemspec :path=>"../"

gemfiles/rails_4.0.gemfile.lock

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
PATH
2+
remote: /home/jakub/code/react-rails
3+
specs:
4+
react-rails (0.4.1.0)
5+
execjs
6+
rails (>= 3.1)
7+
react-source (= 0.4.1)
8+
9+
GEM
10+
remote: http://rubygems.org/
11+
specs:
12+
actionmailer (4.0.0)
13+
actionpack (= 4.0.0)
14+
mail (~> 2.5.3)
15+
actionpack (4.0.0)
16+
activesupport (= 4.0.0)
17+
builder (~> 3.1.0)
18+
erubis (~> 2.7.0)
19+
rack (~> 1.5.2)
20+
rack-test (~> 0.6.2)
21+
activemodel (4.0.0)
22+
activesupport (= 4.0.0)
23+
builder (~> 3.1.0)
24+
activerecord (4.0.0)
25+
activemodel (= 4.0.0)
26+
activerecord-deprecated_finders (~> 1.0.2)
27+
activesupport (= 4.0.0)
28+
arel (~> 4.0.0)
29+
activerecord-deprecated_finders (1.0.3)
30+
activesupport (4.0.0)
31+
i18n (~> 0.6, >= 0.6.4)
32+
minitest (~> 4.2)
33+
multi_json (~> 1.3)
34+
thread_safe (~> 0.1)
35+
tzinfo (~> 0.3.37)
36+
appraisal (0.5.2)
37+
bundler
38+
rake
39+
arel (4.0.0)
40+
atomic (1.1.12)
41+
builder (3.1.4)
42+
erubis (2.7.0)
43+
execjs (1.4.0)
44+
multi_json (~> 1.0)
45+
hike (1.2.3)
46+
i18n (0.6.4)
47+
mail (2.5.4)
48+
mime-types (~> 1.16)
49+
treetop (~> 1.4.8)
50+
mime-types (1.23)
51+
minitest (4.7.5)
52+
multi_json (1.7.8)
53+
polyglot (0.3.3)
54+
rack (1.5.2)
55+
rack-test (0.6.2)
56+
rack (>= 1.0)
57+
rails (4.0.0)
58+
actionmailer (= 4.0.0)
59+
actionpack (= 4.0.0)
60+
activerecord (= 4.0.0)
61+
activesupport (= 4.0.0)
62+
bundler (>= 1.3.0, < 2.0)
63+
railties (= 4.0.0)
64+
sprockets-rails (~> 2.0.0)
65+
railties (4.0.0)
66+
actionpack (= 4.0.0)
67+
activesupport (= 4.0.0)
68+
rake (>= 0.8.7)
69+
thor (>= 0.18.1, < 2.0)
70+
rake (10.1.0)
71+
react-source (0.4.1)
72+
sprockets (2.10.0)
73+
hike (~> 1.2)
74+
multi_json (~> 1.0)
75+
rack (~> 1.0)
76+
tilt (~> 1.1, != 1.3.0)
77+
sprockets-rails (2.0.0)
78+
actionpack (>= 3.0)
79+
activesupport (>= 3.0)
80+
sprockets (~> 2.8)
81+
sqlite3 (1.3.7)
82+
thor (0.18.1)
83+
thread_safe (0.1.2)
84+
atomic
85+
tilt (1.4.1)
86+
treetop (1.4.14)
87+
polyglot
88+
polyglot (>= 0.3.1)
89+
tzinfo (0.3.37)
90+
91+
PLATFORMS
92+
ruby
93+
94+
DEPENDENCIES
95+
appraisal
96+
bundler (>= 1.2.2)
97+
rails (~> 4.0)
98+
react-rails!
99+
sqlite3

lib/react/rails/engine.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
module React
22
module Rails
33
class Engine < ::Rails::Engine
4-
config.before_initialize do |app|
5-
# force autoloading? what?
6-
Sprockets::Engines
7-
Sprockets.register_engine '.jsx', React::JSX::Template
4+
initializer "react_rails.setup_engine", :after => "sprockets.environment", :group => :all do |app|
5+
app.assets.register_engine '.jsx', React::JSX::Template
86
end
97
end
108
end

0 commit comments

Comments
 (0)