File tree Expand file tree Collapse file tree 7 files changed +20
-20
lines changed
Expand file tree Collapse file tree 7 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -41,3 +41,16 @@ As an executable jar within Jetty:
4141| Sinatra | Streaming Demo | http://localhost:8080/stream | http://localhost:8080/sinatra/stream |
4242| Camping | Demo Index | http://localhost:8080/ | http://localhost:8080/camping |
4343| Camping | Snoop Dump | http://localhost:8080/snoop | http://localhost:8080/camping/snoop |
44+
45+ # # Development
46+
47+ You can run the examples using local source for warbler or jruby-rack using env vars, e.g
48+
49+ ` ` ` shell
50+ export WARBLER_SRC=true JRUBY_RACK_SRC=true && bundle && bundle exec warble executable war && java -Dwarbler.debug=true -jar rails* .war
51+ ` ` `
52+
53+ - Warbler can run directly from source
54+ - jruby-rack needs to be built, since it does not define a gemspec
55+ - There are alternate ways to do this by replacing the jruby-rack jar within the warbled jar/war, however this is more
56+ complex and error-prone that using the gem and ensuring compatibility since warbler itself depends on the jruby-rack gem.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ gem 'camping'
66gem 'rack' , '~> 2.2'
77
88group :development do
9- gem 'warbler' , '~> 2.1'
9+ if !ENV [ 'WARBLER_SRC' ] ; gem 'warbler' else gem 'warbler' , path : '../../../warbler' end
10+ if !ENV [ 'JRUBY_RACK_SRC' ] ; gem 'jruby-rack' else gem 'jruby-rack' , path : '../../target' end
1011 gem 'jruby-jars' , '< 10'
1112end
Original file line number Diff line number Diff line change 1717 # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
1818 # own versions if you directly set the value
1919 # config.java_libs += FileList["lib/java/*.jar"]
20- if ENV [ 'JRUBY_RACK_SRC' ]
21- config . java_libs . delete_if { |f | f =~ /jruby-rack[^\/ ]+\. jar/ }
22- config . java_libs += FileList [ "../../target/jruby-rack*.jar" ]
23- end
2420
2521 # Loose Java classes and miscellaneous files to be placed in WEB-INF/classes.
2622 # config.java_classes = FileList["target/classes/**.*"]
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ gem 'rack', '~> 2.2'
77gem 'sprockets-rails'
88
99group :development do
10- gem 'warbler' , '~> 2.1'
11- gem 'jruby-jars' , '< 10'
10+ if !ENV [ 'WARBLER_SRC' ] ; gem 'warbler' else gem 'warbler' , path : '../../../warbler' end
11+ if !ENV [ 'JRUBY_RACK_SRC' ] ; gem 'jruby-rack' else gem 'jruby-rack' , path : '../../target' end
12+ gem 'jruby-jars' , '~> 10'
1213end
Original file line number Diff line number Diff line change 2525 # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
2626 # own versions if you directly set the value
2727 # config.java_libs += FileList["lib/java/*.jar"]
28- if ENV [ 'JRUBY_RACK_SRC' ]
29- config . java_libs . delete_if { |f | f =~ /jruby-rack[^\/ ]+\. jar/ }
30- config . java_libs += FileList [ "../../target/jruby-rack*.jar" ]
31- end
32- if ENV [ 'JRUBY_COMPLETE_SRC' ]
33- config . java_libs . delete_if { |f | f =~ /jruby-(core|stdlib|complete)/ }
34- config . java_libs += FileList [ ENV [ 'JRUBY_COMPLETE_SRC' ] ]
35- end
3628
3729 # Loose Java classes and miscellaneous files to be included.
3830 # config.java_classes = FileList["target/classes/**.*"]
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ gem 'sinatra'
66gem 'rack' , '~> 2.2'
77
88group :development do
9- gem 'warbler' , '~> 2.1'
9+ if !ENV [ 'WARBLER_SRC' ] ; gem 'warbler' else gem 'warbler' , path : '../../../warbler' end
10+ if !ENV [ 'JRUBY_RACK_SRC' ] ; gem 'jruby-rack' else gem 'jruby-rack' , path : '../../target' end
1011 gem 'jruby-jars' , '< 10'
1112end
Original file line number Diff line number Diff line change 22Warbler ::Config . new do |config |
33 config . features += [ 'executable' ]
44
5- if ENV [ 'JRUBY_RACK_SRC' ]
6- config . java_libs . delete_if { |f | f =~ /jruby-rack[^\/ ]+\. jar/ }
7- config . java_libs += FileList [ "../../target/jruby-rack*.jar" ]
8- end
95 config . dirs += [ 'views' ]
106 require 'socket'
117 config . webxml . ENV_OUTPUT = File . expand_path ( '../../servers' , __FILE__ )
You can’t perform that action at this time.
0 commit comments