jubilee 1.0.2 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG +17 -0
- data/Gemfile +19 -1
- data/Gemfile.lock +189 -31
- data/LICENSE.txt +20 -0
- data/README.md +44 -5
- data/ROADMAP +5 -0
- data/Rakefile +6 -5
- data/examples/chatapp/Gemfile +2 -1
- data/examples/chatapp/Gemfile.lock +8 -6
- data/examples/chatapp/README.md +5 -2
- data/examples/chatapp/app.rb +24 -0
- data/examples/chatapp/public/assets/javascripts/application.js +59 -6
- data/examples/chatapp/public/assets/stylesheets/application.css +25 -0
- data/examples/jubilee.conf.rb +0 -3
- data/jars/{hazelcast-2.6.jar → hazelcast-2.6.3.jar} +0 -0
- data/jars/{netty-all-4.0.4.Final.jar → netty-all-4.0.13.Final.jar} +0 -0
- data/jars/vertx-core-2.1M3-SNAPSHOT.jar +0 -0
- data/jars/vertx-hazelcast-2.1M3-SNAPSHOT.jar +0 -0
- data/java/src/jubilee/JubileeService.java +7 -7
- data/java/src/org/jruby/jubilee/Const.java +10 -35
- data/java/src/org/jruby/jubilee/RackApplication.java +77 -46
- data/java/src/org/jruby/jubilee/RackResponse.java +1 -3
- data/java/src/org/jruby/jubilee/RubyHttpServerResponse.java +88 -0
- data/java/src/org/jruby/jubilee/{Server.java → RubyServer.java} +17 -14
- data/java/src/org/jruby/jubilee/impl/RackEnvironment.java +157 -0
- data/java/src/org/jruby/jubilee/impl/RackEnvironmentHash.java +449 -0
- data/java/src/org/jruby/jubilee/impl/RubyIORackInput.java +5 -5
- data/java/src/org/jruby/jubilee/impl/{NullIO.java → RubyNullIO.java} +5 -9
- data/java/src/org/jruby/jubilee/utils/RubyHelper.java +37 -0
- data/jubilee.gemspec +101 -14
- data/lib/jubilee.rb +4 -3
- data/lib/jubilee/cli.rb +2 -1
- data/lib/jubilee/configuration.rb +4 -9
- data/lib/jubilee/const.rb +2 -2
- data/lib/jubilee/jubilee.jar +0 -0
- data/lib/jubilee/response.rb +9 -8
- data/lib/jubilee/server.rb +1 -1
- data/lib/jubilee/version.rb +8 -1
- data/lib/rack/chunked.rb +38 -0
- data/spec/apps/rack/basic/config.ru +50 -0
- data/spec/apps/rails4/basic/.gitignore +16 -0
- data/spec/apps/rails4/basic/Gemfile +41 -0
- data/spec/apps/rails4/basic/Gemfile.lock +127 -0
- data/spec/apps/rails4/basic/README.rdoc +28 -0
- data/spec/apps/rails4/basic/Rakefile +6 -0
- data/spec/apps/rails4/basic/app/assets/images/.keep +0 -0
- data/spec/apps/rails4/basic/app/assets/images/rails.png +0 -0
- data/spec/apps/rails4/basic/app/assets/javascripts/application.js +16 -0
- data/spec/apps/rails4/basic/app/assets/stylesheets/application.css +13 -0
- data/spec/apps/rails4/basic/app/controllers/application_controller.rb +5 -0
- data/spec/apps/rails4/basic/app/controllers/concerns/.keep +0 -0
- data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb +11 -0
- data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb.erb +11 -0
- data/spec/apps/rails4/basic/app/controllers/root_controller.rb +14 -0
- data/spec/apps/rails4/basic/app/helpers/application_helper.rb +2 -0
- data/spec/apps/rails4/basic/app/mailers/.keep +0 -0
- data/spec/apps/rails4/basic/app/models/.keep +0 -0
- data/spec/apps/rails4/basic/app/models/concerns/.keep +0 -0
- data/spec/apps/rails4/basic/app/views/layouts/application.html.erb +14 -0
- data/spec/apps/rails4/basic/app/views/reloader/index.html.erb +1 -0
- data/spec/apps/rails4/basic/app/views/root/index.html.erb +8 -0
- data/spec/apps/rails4/basic/app/views/root/streaming.html.erb +6 -0
- data/spec/apps/rails4/basic/bin/bundle +3 -0
- data/spec/apps/rails4/basic/bin/rails +4 -0
- data/spec/apps/rails4/basic/bin/rake +4 -0
- data/spec/apps/rails4/basic/config.ru +4 -0
- data/spec/apps/rails4/basic/config/application.rb +23 -0
- data/spec/apps/rails4/basic/config/boot.rb +4 -0
- data/spec/apps/rails4/basic/config/database.yml +20 -0
- data/spec/apps/rails4/basic/config/environment.rb +5 -0
- data/spec/apps/rails4/basic/config/environments/development.rb +29 -0
- data/spec/apps/rails4/basic/config/environments/production.rb +80 -0
- data/spec/apps/rails4/basic/config/environments/test.rb +36 -0
- data/spec/apps/rails4/basic/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/apps/rails4/basic/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/apps/rails4/basic/config/initializers/inflections.rb +16 -0
- data/spec/apps/rails4/basic/config/initializers/mime_types.rb +5 -0
- data/spec/apps/rails4/basic/config/initializers/secret_token.rb +12 -0
- data/spec/apps/rails4/basic/config/initializers/session_store.rb +2 -0
- data/spec/apps/rails4/basic/config/initializers/wrap_parameters.rb +14 -0
- data/spec/apps/rails4/basic/config/locales/en.yml +23 -0
- data/spec/apps/rails4/basic/config/routes.rb +5 -0
- data/spec/apps/rails4/basic/db/seeds.rb +7 -0
- data/spec/apps/rails4/basic/lib/assets/.keep +0 -0
- data/spec/apps/rails4/basic/lib/tasks/.keep +0 -0
- data/spec/apps/rails4/basic/public/404.html +58 -0
- data/spec/apps/rails4/basic/public/422.html +58 -0
- data/spec/apps/rails4/basic/public/500.html +57 -0
- data/spec/apps/rails4/basic/public/favicon.ico +0 -0
- data/spec/apps/rails4/basic/public/robots.txt +5 -0
- data/spec/apps/rails4/basic/public/some_page.html +7 -0
- data/spec/apps/rails4/basic/test/controllers/.keep +0 -0
- data/spec/apps/rails4/basic/test/fixtures/.keep +0 -0
- data/spec/apps/rails4/basic/test/helpers/.keep +0 -0
- data/spec/apps/rails4/basic/test/integration/.keep +0 -0
- data/spec/apps/rails4/basic/test/mailers/.keep +0 -0
- data/spec/apps/rails4/basic/test/models/.keep +0 -0
- data/spec/apps/rails4/basic/test/test_helper.rb +15 -0
- data/spec/apps/rails4/basic/vendor/assets/javascripts/.keep +0 -0
- data/spec/apps/rails4/basic/vendor/assets/stylesheets/.keep +0 -0
- data/spec/apps/sinatra/basic/Gemfile +4 -0
- data/spec/apps/sinatra/basic/Gemfile.lock +20 -0
- data/spec/apps/sinatra/basic/basic.rb +27 -0
- data/spec/apps/sinatra/basic/config.ru +7 -0
- data/spec/apps/sinatra/basic/public/some_page.html +7 -0
- data/spec/apps/sinatra/basic/views/index.erb +4 -0
- data/spec/apps/sinatra/basic/views/posted.haml +2 -0
- data/spec/apps/sinatra/basic/views/poster.haml +4 -0
- data/spec/apps/sinatra/basic/views/request_mapping.haml +4 -0
- data/spec/integration/basic_rack_spec.rb +89 -0
- data/spec/integration/basic_rails4_spec.rb +64 -0
- data/spec/integration/basic_sinatra_spec.rb +80 -0
- data/spec/spec_helper.rb +13 -0
- data/test/jubilee/test_cli.rb +1 -1
- data/test/jubilee/test_configuration.rb +18 -1
- data/test/jubilee/test_rack_server.rb +7 -7
- data/test/jubilee/test_response.rb +35 -36
- data/test/jubilee/test_server.rb +1 -1
- data/test/jubilee/test_upload.rb +14 -11
- data/test/test_helper.rb +1 -0
- metadata +97 -18
- data/VERSION +0 -1
- data/jars/vertx-core-2.1.0-SNAPSHOT.jar +0 -0
- data/java/src/org/jruby/jubilee/RackErrors.java +0 -44
- data/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java +0 -99
- data/java/src/org/jruby/jubilee/impl/RubyIORackErrors.java +0 -68
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'rack'
|
2
|
+
|
3
|
+
class BasicMiddleware
|
4
|
+
def initialize(app, options={})
|
5
|
+
@app = app
|
6
|
+
end
|
7
|
+
def call(env)
|
8
|
+
# We had a bug triggered at one point by trying to access any HTTP
|
9
|
+
# header with a key less than 10 bytes long
|
10
|
+
env['HTTP_foo']
|
11
|
+
# Save off the accept header before Rack::Lint messes with it
|
12
|
+
env['tb.accept_header'] = env['HTTP_ACCEPT']
|
13
|
+
@app.call(env)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
use BasicMiddleware
|
18
|
+
use Rack::Lint
|
19
|
+
|
20
|
+
app = lambda { |env|
|
21
|
+
body = <<-EOF
|
22
|
+
<div id='success' class='basic-rack'>it worked</div>
|
23
|
+
<div id='ruby-version'>#{RUBY_VERSION}</div>
|
24
|
+
<div id='path'>#{__FILE__}</div>
|
25
|
+
<div id='script_name'>#{env['SCRIPT_NAME']}</div>
|
26
|
+
<div id='path_info'>#{env['PATH_INFO']}</div>
|
27
|
+
<div id='request_uri'>#{env['REQUEST_URI']}</div>
|
28
|
+
<div id='accept_header'>#{env['tb.accept_header']}</div>
|
29
|
+
EOF
|
30
|
+
if env['REQUEST_METHOD'] == 'POST'
|
31
|
+
input = env['rack.input']
|
32
|
+
if env['PATH_INFO'] == '/basic-rack/gets'
|
33
|
+
posted = ''
|
34
|
+
posted_line = input.gets
|
35
|
+
while posted_line != nil
|
36
|
+
posted << posted_line
|
37
|
+
posted_line = input.gets
|
38
|
+
end
|
39
|
+
elsif env['PATH_INFO'] == '/basic-rack/read'
|
40
|
+
posted = input.read(2)
|
41
|
+
posted << input.read
|
42
|
+
elsif env['PATH_INFO'] == '/basic-rack/each'
|
43
|
+
posted = ""
|
44
|
+
input.each { |str| posted << str}
|
45
|
+
end
|
46
|
+
body << "<div id='posted'>#{posted}</div>"
|
47
|
+
end
|
48
|
+
[200, { 'Content-Type' => 'text/html' }, [body]]
|
49
|
+
}
|
50
|
+
run app
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
@@ -0,0 +1,41 @@
|
|
1
|
+
source :rubygems
|
2
|
+
|
3
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
4
|
+
gem 'rails', '4.0.1'
|
5
|
+
|
6
|
+
# Use jdbcsqlite3 as the database for Active Record
|
7
|
+
gem 'activerecord-jdbc-adapter'
|
8
|
+
gem 'jdbc-sqlite3'
|
9
|
+
|
10
|
+
# Use SCSS for stylesheets
|
11
|
+
gem 'sass-rails', '~> 4.0.0'
|
12
|
+
|
13
|
+
# Use Uglifier as compressor for JavaScript assets
|
14
|
+
gem 'uglifier', '>= 1.3.0'
|
15
|
+
|
16
|
+
# Use CoffeeScript for .js.coffee assets and views
|
17
|
+
gem 'coffee-rails', '~> 4.0.0'
|
18
|
+
|
19
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
20
|
+
gem 'therubyrhino'
|
21
|
+
|
22
|
+
# Use jquery as the JavaScript library
|
23
|
+
gem 'jquery-rails', '>= 3.0'
|
24
|
+
|
25
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
26
|
+
gem 'turbolinks'
|
27
|
+
|
28
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
29
|
+
gem 'jbuilder', '~> 1.2'
|
30
|
+
|
31
|
+
gem 'jubilee'
|
32
|
+
|
33
|
+
# Use ActiveModel has_secure_password
|
34
|
+
# gem 'bcrypt-ruby', '~> 3.0.0'
|
35
|
+
|
36
|
+
# Use unicorn as the app server
|
37
|
+
# gem 'unicorn'
|
38
|
+
|
39
|
+
# Use Capistrano for deployment
|
40
|
+
# gem 'capistrano', group: :development
|
41
|
+
|
@@ -0,0 +1,127 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actionmailer (4.0.1)
|
5
|
+
actionpack (= 4.0.1)
|
6
|
+
mail (~> 2.5.4)
|
7
|
+
actionpack (4.0.1)
|
8
|
+
activesupport (= 4.0.1)
|
9
|
+
builder (~> 3.1.0)
|
10
|
+
erubis (~> 2.7.0)
|
11
|
+
rack (~> 1.5.2)
|
12
|
+
rack-test (~> 0.6.2)
|
13
|
+
activemodel (4.0.1)
|
14
|
+
activesupport (= 4.0.1)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
activerecord (4.0.1)
|
17
|
+
activemodel (= 4.0.1)
|
18
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
19
|
+
activesupport (= 4.0.1)
|
20
|
+
arel (~> 4.0.0)
|
21
|
+
activerecord-deprecated_finders (1.0.3)
|
22
|
+
activerecord-jdbc-adapter (1.3.4)
|
23
|
+
activerecord (>= 2.2)
|
24
|
+
activesupport (4.0.1)
|
25
|
+
i18n (~> 0.6, >= 0.6.4)
|
26
|
+
minitest (~> 4.2)
|
27
|
+
multi_json (~> 1.3)
|
28
|
+
thread_safe (~> 0.1)
|
29
|
+
tzinfo (~> 0.3.37)
|
30
|
+
arel (4.0.1)
|
31
|
+
atomic (1.1.14-java)
|
32
|
+
builder (3.1.4)
|
33
|
+
coffee-rails (4.0.1)
|
34
|
+
coffee-script (>= 2.2.0)
|
35
|
+
railties (>= 4.0.0, < 5.0)
|
36
|
+
coffee-script (2.2.0)
|
37
|
+
coffee-script-source
|
38
|
+
execjs
|
39
|
+
coffee-script-source (1.6.3)
|
40
|
+
erubis (2.7.0)
|
41
|
+
execjs (2.0.2)
|
42
|
+
ffi (1.9.3-java)
|
43
|
+
hike (1.2.3)
|
44
|
+
i18n (0.6.9)
|
45
|
+
jbuilder (1.5.3)
|
46
|
+
activesupport (>= 3.0.0)
|
47
|
+
multi_json (>= 1.2.0)
|
48
|
+
jdbc-sqlite3 (3.7.2.1)
|
49
|
+
jquery-rails (3.0.4)
|
50
|
+
railties (>= 3.0, < 5.0)
|
51
|
+
thor (>= 0.14, < 2.0)
|
52
|
+
json (1.8.1-java)
|
53
|
+
jubilee (1.1.0.rc1)
|
54
|
+
rack (>= 1.4.1)
|
55
|
+
spoon (~> 0.0.4)
|
56
|
+
mail (2.5.4)
|
57
|
+
mime-types (~> 1.16)
|
58
|
+
treetop (~> 1.4.8)
|
59
|
+
mime-types (1.25.1)
|
60
|
+
minitest (4.7.5)
|
61
|
+
multi_json (1.8.2)
|
62
|
+
polyglot (0.3.3)
|
63
|
+
rack (1.5.2)
|
64
|
+
rack-test (0.6.2)
|
65
|
+
rack (>= 1.0)
|
66
|
+
rails (4.0.1)
|
67
|
+
actionmailer (= 4.0.1)
|
68
|
+
actionpack (= 4.0.1)
|
69
|
+
activerecord (= 4.0.1)
|
70
|
+
activesupport (= 4.0.1)
|
71
|
+
bundler (>= 1.3.0, < 2.0)
|
72
|
+
railties (= 4.0.1)
|
73
|
+
sprockets-rails (~> 2.0.0)
|
74
|
+
railties (4.0.1)
|
75
|
+
actionpack (= 4.0.1)
|
76
|
+
activesupport (= 4.0.1)
|
77
|
+
rake (>= 0.8.7)
|
78
|
+
thor (>= 0.18.1, < 2.0)
|
79
|
+
rake (10.1.1)
|
80
|
+
sass (3.2.13)
|
81
|
+
sass-rails (4.0.1)
|
82
|
+
railties (>= 4.0.0, < 5.0)
|
83
|
+
sass (>= 3.1.10)
|
84
|
+
sprockets-rails (~> 2.0.0)
|
85
|
+
spoon (0.0.4)
|
86
|
+
ffi
|
87
|
+
sprockets (2.10.1)
|
88
|
+
hike (~> 1.2)
|
89
|
+
multi_json (~> 1.0)
|
90
|
+
rack (~> 1.0)
|
91
|
+
tilt (~> 1.1, != 1.3.0)
|
92
|
+
sprockets-rails (2.0.1)
|
93
|
+
actionpack (>= 3.0)
|
94
|
+
activesupport (>= 3.0)
|
95
|
+
sprockets (~> 2.8)
|
96
|
+
therubyrhino (2.0.2)
|
97
|
+
therubyrhino_jar (>= 1.7.3)
|
98
|
+
therubyrhino_jar (1.7.4)
|
99
|
+
thor (0.18.1)
|
100
|
+
thread_safe (0.1.3-java)
|
101
|
+
atomic
|
102
|
+
tilt (1.4.1)
|
103
|
+
treetop (1.4.15)
|
104
|
+
polyglot
|
105
|
+
polyglot (>= 0.3.1)
|
106
|
+
turbolinks (2.1.0)
|
107
|
+
coffee-rails
|
108
|
+
tzinfo (0.3.38)
|
109
|
+
uglifier (2.4.0)
|
110
|
+
execjs (>= 0.3.0)
|
111
|
+
json (>= 1.8.0)
|
112
|
+
|
113
|
+
PLATFORMS
|
114
|
+
java
|
115
|
+
|
116
|
+
DEPENDENCIES
|
117
|
+
activerecord-jdbc-adapter
|
118
|
+
coffee-rails (~> 4.0.0)
|
119
|
+
jbuilder (~> 1.2)
|
120
|
+
jdbc-sqlite3
|
121
|
+
jquery-rails (>= 3.0)
|
122
|
+
jubilee
|
123
|
+
rails (= 4.0.1)
|
124
|
+
sass-rails (~> 4.0.0)
|
125
|
+
therubyrhino
|
126
|
+
turbolinks
|
127
|
+
uglifier (>= 1.3.0)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
File without changes
|
Binary file
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
16
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class ReloaderController < ApplicationController
|
2
|
+
def index
|
3
|
+
@version = 'INITIAL'
|
4
|
+
|
5
|
+
new_version = params[:version]
|
6
|
+
template = ERB.new(File.read(File.join(File.dirname(__FILE__), 'reloader_controller.rb.erb')))
|
7
|
+
File.open(File.join(File.dirname(__FILE__), 'reloader_controller.rb'), 'w') do |f|
|
8
|
+
f.write template.result(binding)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class ReloaderController < ApplicationController
|
2
|
+
def index
|
3
|
+
@version = <%= new_version %>
|
4
|
+
|
5
|
+
new_version = params[:version]
|
6
|
+
template = ERB.new(File.read(File.join(File.dirname(__FILE__), 'reloader_controller.rb.erb')))
|
7
|
+
File.open(File.join(File.dirname(__FILE__), 'reloader_controller.rb'), 'w') do |f|
|
8
|
+
f.write template.result(binding)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class RootController < ApplicationController
|
2
|
+
|
3
|
+
def streaming
|
4
|
+
render :stream => true
|
5
|
+
end
|
6
|
+
|
7
|
+
def multiple_cookies
|
8
|
+
cookies['foo1'] = 'bar1'
|
9
|
+
cookies['foo2'] = { :value => 'bar2', :expires => 1.hour.from_now }
|
10
|
+
cookies['foo3'] = 'bar3'
|
11
|
+
render :text => "something\n"
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Basic</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div id="success"><%= @version %></div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env)
|
8
|
+
|
9
|
+
module Basic
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
end
|
23
|
+
end
|