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.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG +17 -0
  4. data/Gemfile +19 -1
  5. data/Gemfile.lock +189 -31
  6. data/LICENSE.txt +20 -0
  7. data/README.md +44 -5
  8. data/ROADMAP +5 -0
  9. data/Rakefile +6 -5
  10. data/examples/chatapp/Gemfile +2 -1
  11. data/examples/chatapp/Gemfile.lock +8 -6
  12. data/examples/chatapp/README.md +5 -2
  13. data/examples/chatapp/app.rb +24 -0
  14. data/examples/chatapp/public/assets/javascripts/application.js +59 -6
  15. data/examples/chatapp/public/assets/stylesheets/application.css +25 -0
  16. data/examples/jubilee.conf.rb +0 -3
  17. data/jars/{hazelcast-2.6.jar → hazelcast-2.6.3.jar} +0 -0
  18. data/jars/{netty-all-4.0.4.Final.jar → netty-all-4.0.13.Final.jar} +0 -0
  19. data/jars/vertx-core-2.1M3-SNAPSHOT.jar +0 -0
  20. data/jars/vertx-hazelcast-2.1M3-SNAPSHOT.jar +0 -0
  21. data/java/src/jubilee/JubileeService.java +7 -7
  22. data/java/src/org/jruby/jubilee/Const.java +10 -35
  23. data/java/src/org/jruby/jubilee/RackApplication.java +77 -46
  24. data/java/src/org/jruby/jubilee/RackResponse.java +1 -3
  25. data/java/src/org/jruby/jubilee/RubyHttpServerResponse.java +88 -0
  26. data/java/src/org/jruby/jubilee/{Server.java → RubyServer.java} +17 -14
  27. data/java/src/org/jruby/jubilee/impl/RackEnvironment.java +157 -0
  28. data/java/src/org/jruby/jubilee/impl/RackEnvironmentHash.java +449 -0
  29. data/java/src/org/jruby/jubilee/impl/RubyIORackInput.java +5 -5
  30. data/java/src/org/jruby/jubilee/impl/{NullIO.java → RubyNullIO.java} +5 -9
  31. data/java/src/org/jruby/jubilee/utils/RubyHelper.java +37 -0
  32. data/jubilee.gemspec +101 -14
  33. data/lib/jubilee.rb +4 -3
  34. data/lib/jubilee/cli.rb +2 -1
  35. data/lib/jubilee/configuration.rb +4 -9
  36. data/lib/jubilee/const.rb +2 -2
  37. data/lib/jubilee/jubilee.jar +0 -0
  38. data/lib/jubilee/response.rb +9 -8
  39. data/lib/jubilee/server.rb +1 -1
  40. data/lib/jubilee/version.rb +8 -1
  41. data/lib/rack/chunked.rb +38 -0
  42. data/spec/apps/rack/basic/config.ru +50 -0
  43. data/spec/apps/rails4/basic/.gitignore +16 -0
  44. data/spec/apps/rails4/basic/Gemfile +41 -0
  45. data/spec/apps/rails4/basic/Gemfile.lock +127 -0
  46. data/spec/apps/rails4/basic/README.rdoc +28 -0
  47. data/spec/apps/rails4/basic/Rakefile +6 -0
  48. data/spec/apps/rails4/basic/app/assets/images/.keep +0 -0
  49. data/spec/apps/rails4/basic/app/assets/images/rails.png +0 -0
  50. data/spec/apps/rails4/basic/app/assets/javascripts/application.js +16 -0
  51. data/spec/apps/rails4/basic/app/assets/stylesheets/application.css +13 -0
  52. data/spec/apps/rails4/basic/app/controllers/application_controller.rb +5 -0
  53. data/spec/apps/rails4/basic/app/controllers/concerns/.keep +0 -0
  54. data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb +11 -0
  55. data/spec/apps/rails4/basic/app/controllers/reloader_controller.rb.erb +11 -0
  56. data/spec/apps/rails4/basic/app/controllers/root_controller.rb +14 -0
  57. data/spec/apps/rails4/basic/app/helpers/application_helper.rb +2 -0
  58. data/spec/apps/rails4/basic/app/mailers/.keep +0 -0
  59. data/spec/apps/rails4/basic/app/models/.keep +0 -0
  60. data/spec/apps/rails4/basic/app/models/concerns/.keep +0 -0
  61. data/spec/apps/rails4/basic/app/views/layouts/application.html.erb +14 -0
  62. data/spec/apps/rails4/basic/app/views/reloader/index.html.erb +1 -0
  63. data/spec/apps/rails4/basic/app/views/root/index.html.erb +8 -0
  64. data/spec/apps/rails4/basic/app/views/root/streaming.html.erb +6 -0
  65. data/spec/apps/rails4/basic/bin/bundle +3 -0
  66. data/spec/apps/rails4/basic/bin/rails +4 -0
  67. data/spec/apps/rails4/basic/bin/rake +4 -0
  68. data/spec/apps/rails4/basic/config.ru +4 -0
  69. data/spec/apps/rails4/basic/config/application.rb +23 -0
  70. data/spec/apps/rails4/basic/config/boot.rb +4 -0
  71. data/spec/apps/rails4/basic/config/database.yml +20 -0
  72. data/spec/apps/rails4/basic/config/environment.rb +5 -0
  73. data/spec/apps/rails4/basic/config/environments/development.rb +29 -0
  74. data/spec/apps/rails4/basic/config/environments/production.rb +80 -0
  75. data/spec/apps/rails4/basic/config/environments/test.rb +36 -0
  76. data/spec/apps/rails4/basic/config/initializers/backtrace_silencers.rb +7 -0
  77. data/spec/apps/rails4/basic/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/spec/apps/rails4/basic/config/initializers/inflections.rb +16 -0
  79. data/spec/apps/rails4/basic/config/initializers/mime_types.rb +5 -0
  80. data/spec/apps/rails4/basic/config/initializers/secret_token.rb +12 -0
  81. data/spec/apps/rails4/basic/config/initializers/session_store.rb +2 -0
  82. data/spec/apps/rails4/basic/config/initializers/wrap_parameters.rb +14 -0
  83. data/spec/apps/rails4/basic/config/locales/en.yml +23 -0
  84. data/spec/apps/rails4/basic/config/routes.rb +5 -0
  85. data/spec/apps/rails4/basic/db/seeds.rb +7 -0
  86. data/spec/apps/rails4/basic/lib/assets/.keep +0 -0
  87. data/spec/apps/rails4/basic/lib/tasks/.keep +0 -0
  88. data/spec/apps/rails4/basic/public/404.html +58 -0
  89. data/spec/apps/rails4/basic/public/422.html +58 -0
  90. data/spec/apps/rails4/basic/public/500.html +57 -0
  91. data/spec/apps/rails4/basic/public/favicon.ico +0 -0
  92. data/spec/apps/rails4/basic/public/robots.txt +5 -0
  93. data/spec/apps/rails4/basic/public/some_page.html +7 -0
  94. data/spec/apps/rails4/basic/test/controllers/.keep +0 -0
  95. data/spec/apps/rails4/basic/test/fixtures/.keep +0 -0
  96. data/spec/apps/rails4/basic/test/helpers/.keep +0 -0
  97. data/spec/apps/rails4/basic/test/integration/.keep +0 -0
  98. data/spec/apps/rails4/basic/test/mailers/.keep +0 -0
  99. data/spec/apps/rails4/basic/test/models/.keep +0 -0
  100. data/spec/apps/rails4/basic/test/test_helper.rb +15 -0
  101. data/spec/apps/rails4/basic/vendor/assets/javascripts/.keep +0 -0
  102. data/spec/apps/rails4/basic/vendor/assets/stylesheets/.keep +0 -0
  103. data/spec/apps/sinatra/basic/Gemfile +4 -0
  104. data/spec/apps/sinatra/basic/Gemfile.lock +20 -0
  105. data/spec/apps/sinatra/basic/basic.rb +27 -0
  106. data/spec/apps/sinatra/basic/config.ru +7 -0
  107. data/spec/apps/sinatra/basic/public/some_page.html +7 -0
  108. data/spec/apps/sinatra/basic/views/index.erb +4 -0
  109. data/spec/apps/sinatra/basic/views/posted.haml +2 -0
  110. data/spec/apps/sinatra/basic/views/poster.haml +4 -0
  111. data/spec/apps/sinatra/basic/views/request_mapping.haml +4 -0
  112. data/spec/integration/basic_rack_spec.rb +89 -0
  113. data/spec/integration/basic_rails4_spec.rb +64 -0
  114. data/spec/integration/basic_sinatra_spec.rb +80 -0
  115. data/spec/spec_helper.rb +13 -0
  116. data/test/jubilee/test_cli.rb +1 -1
  117. data/test/jubilee/test_configuration.rb +18 -1
  118. data/test/jubilee/test_rack_server.rb +7 -7
  119. data/test/jubilee/test_response.rb +35 -36
  120. data/test/jubilee/test_server.rb +1 -1
  121. data/test/jubilee/test_upload.rb +14 -11
  122. data/test/test_helper.rb +1 -0
  123. metadata +97 -18
  124. data/VERSION +0 -1
  125. data/jars/vertx-core-2.1.0-SNAPSHOT.jar +0 -0
  126. data/java/src/org/jruby/jubilee/RackErrors.java +0 -44
  127. data/java/src/org/jruby/jubilee/impl/DefaultRackEnvironment.java +0 -99
  128. 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>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Basic::Application.load_tasks
File without changes
@@ -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
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -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
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ 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,8 @@
1
+
2
+ <div id="success" class="basic-rails4">
3
+ It works
4
+ </div>
5
+
6
+ <%= image_tag("rails.png") %>
7
+
8
+ <%= link_to root_path %>
@@ -0,0 +1,6 @@
1
+ <% (params[:count] || 500).to_i.times do |i| %>
2
+ Some text to make the response longer - <%= i %>
3
+ <% end %>
4
+ <div id="success" class="basic-rails">
5
+ It works
6
+ </div>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -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