hanami 1.3.1 → 2.0.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +110 -6
- data/FEATURES.md +9 -1
- data/LICENSE.md +1 -1
- data/README.md +4 -5
- data/hanami.gemspec +26 -30
- data/lib/hanami.rb +40 -243
- data/lib/hanami/application.rb +338 -174
- data/lib/hanami/application/autoloader/inflector_adapter.rb +22 -0
- data/lib/hanami/application/container/boot/inflector.rb +7 -0
- data/lib/hanami/application/container/boot/logger.rb +8 -0
- data/lib/hanami/application/container/boot/rack_logger.rb +19 -0
- data/lib/hanami/application/container/boot/rack_monitor.rb +12 -0
- data/lib/hanami/application/container/boot/settings.rb +7 -0
- data/lib/hanami/application/router.rb +59 -0
- data/lib/hanami/application/routing/middleware/stack.rb +89 -0
- data/lib/hanami/application/routing/resolver.rb +82 -0
- data/lib/hanami/application/routing/resolver/node.rb +50 -0
- data/lib/hanami/application/routing/resolver/trie.rb +59 -0
- data/lib/hanami/application/settings.rb +23 -0
- data/lib/hanami/application/settings/definition.rb +26 -0
- data/lib/hanami/application/settings/loader.rb +97 -0
- data/lib/hanami/application/settings/struct.rb +65 -0
- data/lib/hanami/boot.rb +5 -0
- data/lib/hanami/cli/application/cli.rb +40 -0
- data/lib/hanami/cli/application/command.rb +47 -0
- data/lib/hanami/cli/application/commands.rb +16 -0
- data/lib/hanami/cli/application/commands/console.rb +81 -0
- data/lib/hanami/cli/base_command.rb +48 -0
- data/lib/hanami/cli/commands.rb +6 -42
- data/lib/hanami/cli/commands/command.rb +20 -30
- data/lib/hanami/cli/commands/server.rb +63 -14
- data/lib/hanami/configuration.rb +248 -190
- data/lib/hanami/configuration/middleware.rb +8 -28
- data/lib/hanami/configuration/router.rb +50 -0
- data/lib/hanami/configuration/sessions.rb +50 -0
- data/lib/hanami/init.rb +5 -0
- data/lib/hanami/server.rb +5 -69
- data/lib/hanami/setup.rb +8 -2
- data/lib/hanami/slice.rb +138 -0
- data/lib/hanami/version.rb +3 -1
- data/lib/hanami/web/rack_logger.rb +96 -0
- metadata +84 -228
- data/bin/hanami +0 -6
- data/lib/hanami/action/csrf_protection.rb +0 -211
- data/lib/hanami/action/routing_helpers.rb +0 -40
- data/lib/hanami/app.rb +0 -96
- data/lib/hanami/application_configuration.rb +0 -1495
- data/lib/hanami/application_name.rb +0 -108
- data/lib/hanami/application_namespace.rb +0 -14
- data/lib/hanami/assets/asset.rb +0 -72
- data/lib/hanami/assets/static.rb +0 -102
- data/lib/hanami/cli/commands/assets.rb +0 -16
- data/lib/hanami/cli/commands/assets/precompile.rb +0 -42
- data/lib/hanami/cli/commands/console.rb +0 -95
- data/lib/hanami/cli/commands/db.rb +0 -32
- data/lib/hanami/cli/commands/db/apply.rb +0 -32
- data/lib/hanami/cli/commands/db/console.rb +0 -44
- data/lib/hanami/cli/commands/db/create.rb +0 -32
- data/lib/hanami/cli/commands/db/drop.rb +0 -32
- data/lib/hanami/cli/commands/db/migrate.rb +0 -39
- data/lib/hanami/cli/commands/db/prepare.rb +0 -32
- data/lib/hanami/cli/commands/db/rollback.rb +0 -59
- data/lib/hanami/cli/commands/db/version.rb +0 -32
- data/lib/hanami/cli/commands/destroy.rb +0 -26
- data/lib/hanami/cli/commands/destroy/action.rb +0 -137
- data/lib/hanami/cli/commands/destroy/app.rb +0 -159
- data/lib/hanami/cli/commands/destroy/mailer.rb +0 -74
- data/lib/hanami/cli/commands/destroy/migration.rb +0 -51
- data/lib/hanami/cli/commands/destroy/model.rb +0 -84
- data/lib/hanami/cli/commands/generate.rb +0 -28
- data/lib/hanami/cli/commands/generate/action.rb +0 -321
- data/lib/hanami/cli/commands/generate/action/action.erb +0 -7
- data/lib/hanami/cli/commands/generate/action/action_spec.minitest.erb +0 -11
- data/lib/hanami/cli/commands/generate/action/action_spec.rspec.erb +0 -9
- data/lib/hanami/cli/commands/generate/action/action_without_view.erb +0 -7
- data/lib/hanami/cli/commands/generate/action/view.erb +0 -7
- data/lib/hanami/cli/commands/generate/action/view_spec.minitest.erb +0 -12
- data/lib/hanami/cli/commands/generate/action/view_spec.rspec.erb +0 -10
- data/lib/hanami/cli/commands/generate/app.rb +0 -243
- data/lib/hanami/cli/commands/generate/app/application.erb +0 -313
- data/lib/hanami/cli/commands/generate/app/favicon.ico +0 -0
- data/lib/hanami/cli/commands/generate/app/gitkeep.erb +0 -0
- data/lib/hanami/cli/commands/generate/app/layout.erb +0 -7
- data/lib/hanami/cli/commands/generate/app/layout_spec.minitest.erb +0 -10
- data/lib/hanami/cli/commands/generate/app/layout_spec.rspec.erb +0 -10
- data/lib/hanami/cli/commands/generate/app/routes.erb +0 -5
- data/lib/hanami/cli/commands/generate/app/template.erb.erb +0 -10
- data/lib/hanami/cli/commands/generate/app/template.haml.erb +0 -7
- data/lib/hanami/cli/commands/generate/app/template.slim.erb +0 -8
- data/lib/hanami/cli/commands/generate/mailer.rb +0 -104
- data/lib/hanami/cli/commands/generate/mailer/mailer.erb +0 -9
- data/lib/hanami/cli/commands/generate/mailer/mailer_spec.minitest.erb +0 -7
- data/lib/hanami/cli/commands/generate/mailer/mailer_spec.rspec.erb +0 -5
- data/lib/hanami/cli/commands/generate/migration.rb +0 -41
- data/lib/hanami/cli/commands/generate/migration/migration.erb +0 -4
- data/lib/hanami/cli/commands/generate/model.rb +0 -125
- data/lib/hanami/cli/commands/generate/model/entity.erb +0 -2
- data/lib/hanami/cli/commands/generate/model/entity_spec.minitest.erb +0 -5
- data/lib/hanami/cli/commands/generate/model/entity_spec.rspec.erb +0 -3
- data/lib/hanami/cli/commands/generate/model/migration.erb +0 -10
- data/lib/hanami/cli/commands/generate/model/repository.erb +0 -5
- data/lib/hanami/cli/commands/generate/model/repository_spec.minitest.erb +0 -5
- data/lib/hanami/cli/commands/generate/model/repository_spec.rspec.erb +0 -3
- data/lib/hanami/cli/commands/generate/secret.rb +0 -48
- data/lib/hanami/cli/commands/new.rb +0 -578
- data/lib/hanami/cli/commands/new/.env.development.erb +0 -3
- data/lib/hanami/cli/commands/new/.env.test.erb +0 -3
- data/lib/hanami/cli/commands/new/.gitkeep.erb +0 -0
- data/lib/hanami/cli/commands/new/Gemfile.erb +0 -58
- data/lib/hanami/cli/commands/new/README.md.erb +0 -33
- data/lib/hanami/cli/commands/new/config.ru.erb +0 -3
- data/lib/hanami/cli/commands/new/config/boot.erb +0 -2
- data/lib/hanami/cli/commands/new/config/environment.erb +0 -49
- data/lib/hanami/cli/commands/new/gitignore.erb +0 -2
- data/lib/hanami/cli/commands/new/gitignore_with_sqlite.erb +0 -3
- data/lib/hanami/cli/commands/new/hanamirc.erb +0 -3
- data/lib/hanami/cli/commands/new/lib/project.erb +0 -2
- data/lib/hanami/cli/commands/new/minitest/Rakefile.erb +0 -12
- data/lib/hanami/cli/commands/new/minitest/features_helper.erb +0 -11
- data/lib/hanami/cli/commands/new/minitest/spec_helper.erb +0 -7
- data/lib/hanami/cli/commands/new/rspec/Rakefile.erb +0 -9
- data/lib/hanami/cli/commands/new/rspec/capybara.erb +0 -8
- data/lib/hanami/cli/commands/new/rspec/features_helper.erb +0 -12
- data/lib/hanami/cli/commands/new/rspec/rspec.erb +0 -2
- data/lib/hanami/cli/commands/new/rspec/spec_helper.erb +0 -103
- data/lib/hanami/cli/commands/new/schema.sql.erb +0 -0
- data/lib/hanami/cli/commands/project.rb +0 -421
- data/lib/hanami/cli/commands/routes.rb +0 -21
- data/lib/hanami/cli/commands/templates.rb +0 -31
- data/lib/hanami/cli/commands/version.rb +0 -19
- data/lib/hanami/common_logger.rb +0 -93
- data/lib/hanami/components.rb +0 -156
- data/lib/hanami/components/app/assets.rb +0 -59
- data/lib/hanami/components/app/controller.rb +0 -74
- data/lib/hanami/components/app/routes.rb +0 -59
- data/lib/hanami/components/app/view.rb +0 -44
- data/lib/hanami/components/component.rb +0 -182
- data/lib/hanami/components/components.rb +0 -479
- data/lib/hanami/components/routes_inspector.rb +0 -72
- data/lib/hanami/config/cookies.rb +0 -69
- data/lib/hanami/config/framework_configuration.rb +0 -43
- data/lib/hanami/config/load_paths.rb +0 -46
- data/lib/hanami/config/mapper.rb +0 -47
- data/lib/hanami/config/routes.rb +0 -20
- data/lib/hanami/config/security.rb +0 -110
- data/lib/hanami/config/sessions.rb +0 -103
- data/lib/hanami/configuration/app.rb +0 -18
- data/lib/hanami/early_hints.rb +0 -129
- data/lib/hanami/env.rb +0 -69
- data/lib/hanami/environment.rb +0 -513
- data/lib/hanami/environment_application_configurations.rb +0 -37
- data/lib/hanami/frameworks.rb +0 -22
- data/lib/hanami/hanamirc.rb +0 -169
- data/lib/hanami/mailer/glue.rb +0 -27
- data/lib/hanami/middleware_stack.rb +0 -172
- data/lib/hanami/rake_helper.rb +0 -78
- data/lib/hanami/rake_tasks.rb +0 -2
- data/lib/hanami/rendering_policy.rb +0 -95
- data/lib/hanami/routes.rb +0 -219
- data/lib/hanami/routing/default.rb +0 -32
- data/lib/hanami/static.rb +0 -63
- data/lib/hanami/templates/default.html.erb +0 -30
- data/lib/hanami/templates/welcome.html.erb +0 -52
- data/lib/hanami/views/default.rb +0 -37
- data/lib/hanami/views/default_template_finder.rb +0 -22
- data/lib/hanami/views/null_view.rb +0 -15
- data/lib/hanami/welcome.rb +0 -36
@@ -1,52 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Hanami | The web, with simplicity</title>
|
5
|
-
<link rel="shortcut icon" type="image/x-icon" href="/assets/favicon.ico">
|
6
|
-
<style>
|
7
|
-
* { margin: 0; padding: 0; }
|
8
|
-
body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; color: #333; background-color: #ecf0f1; font-size: 16px; line-height: 24px; }
|
9
|
-
h2, h3 { margin: -20px; line-height: 100px; text-align: center; }
|
10
|
-
.logo { text-align: center; margin-top: 0.5em; }
|
11
|
-
h2 { font-size: 30px; }
|
12
|
-
h3 { font-size: 20px; line-height: 22px; color: #666; }
|
13
|
-
hr { margin: 2em; color: #ecf0f1; }
|
14
|
-
ul { text-align: center; }
|
15
|
-
li { display: inline; margin: 2em; line-height: 24px; list-style-type: none; vertical-align: text-top;}
|
16
|
-
p { margin-top: 60px; text-align: center; }
|
17
|
-
a { color: #333; padding: 1px; }
|
18
|
-
code { padding: .2em; background-color: #ecf0f1 }
|
19
|
-
#container { margin:0 auto; padding: 24px; width:700px; background-color:#fff; border: 1px solid #999; border-width: 0 1px 1px 1px; }
|
20
|
-
#content { margin: 30px 10px 0 10px; }
|
21
|
-
#footer { margin:0 auto 0; padding: 12px; width:700px; line-height: 24px; font-size: 12px; }
|
22
|
-
.bold { font-weight: bold; }
|
23
|
-
</style>
|
24
|
-
</head>
|
25
|
-
<body>
|
26
|
-
<div id="container">
|
27
|
-
<div class="logo">
|
28
|
-
<img alt="Hanami Logo" width="150" height="150" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUm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0xL0mon+SEP2EuD2jeXet3N+v5QAqg9wXvLjAGrgw8X5c9Hj0tHXyCrfiWeFfxzB2eHGBNfLkP6JzxU1+CPr6f+tH6w1xgZVf4UkkDWKlnhvNN8KSvLviymDFbYbmigssVwpH/l+AAQD4EhrmuMFYlQAAAABJRU5ErkJggg=="/>
|
29
|
-
</div>
|
30
|
-
<hr />
|
31
|
-
<h2>The web, with simplicity.</h2>
|
32
|
-
|
33
|
-
<h3>Hanami is Open Source Software for MVC web development with Ruby.</h3>
|
34
|
-
|
35
|
-
<p>Please generate a new action with:<br><code>bundle exec hanami generate action <%= application_name %> home#index --url=/</code></p>
|
36
|
-
|
37
|
-
<hr style="margin-top: 4em;"/>
|
38
|
-
<div id="content">
|
39
|
-
<ul>
|
40
|
-
<li><a href="http://hanamirb.org">Website</a></li>
|
41
|
-
<li><a href="http://hanamirb.org/guides">Guides</a></li>
|
42
|
-
<li><a href="http://www.rubydoc.info/gems/hanami">API docs</a></li>
|
43
|
-
<li><a href="https://github.com/hanami/hanami">Source code</a></li>
|
44
|
-
<li><a href="https://gitter.im/hanami/chat">Chat</a></li>
|
45
|
-
</ul>
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
<div id="footer">
|
49
|
-
© 2014 ‐ <%= Time.now.year %> Luca Guidi — Hanami is released under the MIT License.
|
50
|
-
</div>
|
51
|
-
</body>
|
52
|
-
</html>
|
data/lib/hanami/views/default.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
require 'hanami/views/default_template_finder'
|
2
|
-
|
3
|
-
module Hanami
|
4
|
-
# @api private
|
5
|
-
module Views
|
6
|
-
# The default view that is rendered for non successful responses (200 and 201)
|
7
|
-
#
|
8
|
-
# @since 0.1.0
|
9
|
-
# @api private
|
10
|
-
class Default
|
11
|
-
include Hanami::View
|
12
|
-
|
13
|
-
configuration.reset!
|
14
|
-
|
15
|
-
layout nil
|
16
|
-
root Pathname.new(File.dirname(__FILE__)).join('../templates').realpath
|
17
|
-
template 'default'
|
18
|
-
|
19
|
-
# @api private
|
20
|
-
def title
|
21
|
-
"#{response[0]} - #{response[2].first || Http::Status.message_for(response[0])}"
|
22
|
-
end
|
23
|
-
|
24
|
-
# @api private
|
25
|
-
def self.render(root, template_name, context)
|
26
|
-
format = context[:format]
|
27
|
-
template = DefaultTemplateFinder.new(self, root, template_name, format).find
|
28
|
-
|
29
|
-
if template
|
30
|
-
new(template, context).render
|
31
|
-
else
|
32
|
-
super(context)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Hanami
|
2
|
-
module Views
|
3
|
-
# @api private
|
4
|
-
class DefaultTemplateFinder < View::Rendering::TemplateFinder
|
5
|
-
# Template Finder
|
6
|
-
#
|
7
|
-
# @since 0.2.0
|
8
|
-
# @api private
|
9
|
-
def initialize(view, root, template_name, format)
|
10
|
-
@view = view
|
11
|
-
@root = root
|
12
|
-
@options = { template: template_name, format: format }
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
# @api private
|
17
|
-
def root
|
18
|
-
@root
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
data/lib/hanami/welcome.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'erb'
|
2
|
-
require 'pathname'
|
3
|
-
require 'hanami/environment'
|
4
|
-
require 'hanami/utils/string'
|
5
|
-
|
6
|
-
module Hanami
|
7
|
-
# @api private
|
8
|
-
class Welcome
|
9
|
-
# @api private
|
10
|
-
def initialize(_app)
|
11
|
-
@root = Pathname.new(__dir__).join('templates').realpath
|
12
|
-
end
|
13
|
-
|
14
|
-
# @api private
|
15
|
-
def call(env)
|
16
|
-
@request_path = env['REQUEST_PATH'] || ''
|
17
|
-
@body = [ERB.new(@root.join('welcome.html.erb').read).result(binding)]
|
18
|
-
|
19
|
-
[200, {}, @body]
|
20
|
-
end
|
21
|
-
|
22
|
-
# @api private
|
23
|
-
def application_name
|
24
|
-
application_class.app_name
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
# @api private
|
30
|
-
def application_class
|
31
|
-
Hanami.configuration.apps do |app|
|
32
|
-
return app if @request_path.include?(app.path_prefix)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|