lotusrb 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +53 -0
  3. data/README.md +241 -311
  4. data/bin/lotus +4 -0
  5. data/lib/lotus/application.rb +111 -15
  6. data/lib/lotus/cli.rb +85 -0
  7. data/lib/lotus/commands/console.rb +62 -0
  8. data/lib/lotus/commands/new.rb +32 -0
  9. data/lib/lotus/commands/routes.rb +14 -0
  10. data/lib/lotus/commands/server.rb +65 -0
  11. data/lib/lotus/config/assets.rb +24 -10
  12. data/lib/lotus/config/configure.rb +17 -0
  13. data/lib/lotus/config/framework_configuration.rb +30 -0
  14. data/lib/lotus/config/load_paths.rb +1 -1
  15. data/lib/lotus/config/sessions.rb +97 -0
  16. data/lib/lotus/configuration.rb +698 -40
  17. data/lib/lotus/container.rb +30 -0
  18. data/lib/lotus/environment.rb +377 -0
  19. data/lib/lotus/frameworks.rb +17 -28
  20. data/lib/lotus/generators/abstract.rb +31 -0
  21. data/lib/lotus/generators/application/container/.gitkeep +1 -0
  22. data/lib/lotus/generators/application/container/Gemfile.tt +29 -0
  23. data/lib/lotus/generators/application/container/Rakefile.minitest.tt +10 -0
  24. data/lib/lotus/generators/application/container/config/.env.development.tt +2 -0
  25. data/lib/lotus/generators/application/container/config/.env.test.tt +2 -0
  26. data/lib/lotus/generators/application/container/config/.env.tt +1 -0
  27. data/lib/lotus/generators/application/container/config/environment.rb.tt +7 -0
  28. data/lib/lotus/generators/application/container/config.ru.tt +3 -0
  29. data/lib/lotus/generators/application/container/db/.gitkeep +1 -0
  30. data/lib/lotus/generators/application/container/features_helper.rb.tt +11 -0
  31. data/lib/lotus/generators/application/container/lib/app_name.rb.tt +31 -0
  32. data/lib/lotus/generators/application/container/lib/chirp/entities/.gitkeep +1 -0
  33. data/lib/lotus/generators/application/container/lib/chirp/repositories/.gitkeep +1 -0
  34. data/lib/lotus/generators/application/container/spec_helper.rb.tt +7 -0
  35. data/lib/lotus/generators/application/container.rb +70 -0
  36. data/lib/lotus/generators/slice/.gitkeep.tt +1 -0
  37. data/lib/lotus/generators/slice/action.rb.tt +8 -0
  38. data/lib/lotus/generators/slice/application.rb.tt +182 -0
  39. data/lib/lotus/generators/slice/config/mapping.rb.tt +10 -0
  40. data/lib/lotus/generators/slice/config/routes.rb.tt +8 -0
  41. data/lib/lotus/generators/slice/templates/application.html.erb +9 -0
  42. data/lib/lotus/generators/slice/templates/application.html.erb.tt +9 -0
  43. data/lib/lotus/generators/slice/templates/template.html.erb.tt +2 -0
  44. data/lib/lotus/generators/slice/view.rb.tt +5 -0
  45. data/lib/lotus/generators/slice/views/application_layout.rb.tt +7 -0
  46. data/lib/lotus/generators/slice.rb +103 -0
  47. data/lib/lotus/loader.rb +99 -19
  48. data/lib/lotus/middleware.rb +92 -9
  49. data/lib/lotus/rendering_policy.rb +42 -19
  50. data/lib/lotus/routing/default.rb +1 -1
  51. data/lib/lotus/setup.rb +5 -0
  52. data/lib/lotus/templates/welcome.html +49 -0
  53. data/lib/lotus/version.rb +1 -1
  54. data/lib/lotus/views/default.rb +13 -0
  55. data/lib/lotus/views/default_template_finder.rb +19 -0
  56. data/lib/lotus/welcome.rb +14 -0
  57. data/lib/lotus.rb +1 -0
  58. data/lotusrb.gemspec +9 -5
  59. metadata +122 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74fd948b607c701d1250dc47afc23b7aa1162f7c
4
- data.tar.gz: c8785125081fc134d26b79e278679cafa3b35133
3
+ metadata.gz: 4e0890eb6c32566368913554cabd9edeb2f00304
4
+ data.tar.gz: 248452822b63ecc6ceb19224fa837d46bb3f5686
5
5
  SHA512:
6
- metadata.gz: c8e7ad9a91a5ebc28557a55bcb320fe96986f36822499be4abe127e038bb06afa17c3e4c4767c04687ec4e55d2f44a77fb50fe81b763d344dc0d8ddb3e55ac53
7
- data.tar.gz: a4e96da94c3d7f60f88fd719e02f692b86a919f2a56dbb6a173a1e528089cccfad0b344dcf365eb3b0f1ee857e77dde5918c4b0d46c2b8c534dc187b5d85f748
6
+ metadata.gz: 733c6c3d35a5939982b130b71d7cafd10ab78efa01594fac918adcbdce3bfd87d7ce8e9311c3b937aeccf93761ddb6704b8f02403092ca6ad54382a8b2f5a09b
7
+ data.tar.gz: 59be6d52f37a14ca8d7190528496bc46ce67ee0f29745a38d3ee6459ea9f7cbf88cecd08f3987fa872726f5fdef3518a67166ad4a121ebf14558d6df05a323de
data/CHANGELOG.md ADDED
@@ -0,0 +1,53 @@
1
+ # Lotus
2
+ A complete web framework for Ruby
3
+
4
+ ## v0.2.0 - 2014-06-23
5
+ ### Added
6
+ - [Luca Guidi] Introduced `lotus new` as a command to generate applications. It supports "container" architecture for now.
7
+ - [Luca Guidi] Show a welcome page when the application doesn't have routes
8
+ - [Luca Guidi] Introduced `Lotus::Application.preload!` to preload all the Lotus applications in a given Ruby process. (Bulk `Lotus::Application.load!`)
9
+ - [Trung Lê] Allow browsers to fake non `GET`/`POST` requests via `Rack::MethodOverride`
10
+ - [Josue Abreu] Allow to define body parses for non `GET` HTTP requests (`body_parsers` configuration)
11
+ - [Alfonso Uceda Pompa] Allow to toggle static assets serving (`serve_assets` configuration)
12
+ - [Alfonso Uceda Pompa] Allow to serve assets from multiple sources (`assets` configuration)
13
+ - [Luca Guidi] Allow to configure `ENV` vars with per environment `.env` files
14
+ - [Alfonso Uceda Pompa] Introduced `lotus routes` command
15
+ - [Luca Guidi] Allow to configure low level settings for MVC frameworks (`model`, `view` and `controller` configuration)
16
+ - [Luca Guidi] Introduced `Lotus::Container`
17
+ - [Trung Lê] Include `Lotus::Presenter` as part of the duplicated modules
18
+ - [Trung Lê] Include `Lotus::Entity` and `Lotus::Repository` as part of the duplicated modules
19
+ - [Luca Guidi] Introduced code reloading for `lotus server`
20
+ - [Trung Lê] Allow to configure database adapter (`adapter` configuration)
21
+ - [Luca Guidi & Trung Lê] Allow to configure database mapping (`mapping` configuration)
22
+ - [Piotr Kurek] Introduced custom templates for non successful responses
23
+ - [Luca Guidi] Allow to configure exceptions handling (`handle_exceptions` configuration)
24
+ - [Michal Muskala] Allow to configure sessions (`sessions` configuration)
25
+ - [Josue Abreu] Allow to configure cookies (`cookies` configuration)
26
+ - [Piotr Kurek] Allow to yield multiple configurations per application, according to the current environment
27
+ - [David Celis] Allow to configure Rack middleware stack (`middleware` configuration)
28
+ - [David Celis] Introduced `lotus console` command. It runs the REPL configured in `Gemfile` (eg. pry or ripl). Defaults to IRb.
29
+ - [Luca Guidi] Introduced `Lotus::Environment` which holds the informations about the current environment, and CLI arguments
30
+ - [Luca Guidi] Introduced `Lotus::Application.load!` to load and configure an application without requiring user defined code (controllers, views, etc.)
31
+ - [Leonard Garvey] Introduced `lotus server` command. It runs the application with the Rack server declared in `Gemfile` (eg. puma, thin, unicorn). It defaults to `WEBRick`.
32
+ - [Luca Guidi] Official support for MRI 2.1 and 2.2
33
+
34
+ ### Changed
35
+ - [Alfonso Uceda Pompa] Changed semantic of `assets` configuration. Now it's only used to set the sources for the assets. Static serving assets has now a new configuration: `serve_assets`.
36
+
37
+ ### Fixed
38
+ - [Luca Guidi] Ensure `HEAD` requests return empty body
39
+
40
+ ## v0.1.0 - 2014-06-23
41
+ ### Added
42
+ - [Luca Guidi] Allow to run multiple Lotus applications in the same Ruby process (framework duplication)
43
+ - [Luca Guidi] Introduced `Lotus::Routes` as factory to generate application URLs
44
+ - [Luca Guidi] Allow to configure scheme, host and port (`scheme`, `host` and `port` configuration)
45
+ - [Luca Guidi] Allow to configure a layout to use for all the views of an application (`layout` configuration)
46
+ - [Luca Guidi] Allow to configure routes (`routes` configuration)
47
+ - [Luca Guidi] Allow to configure several load paths for Ruby source files (`load_paths` configuration)
48
+ - [Luca Guidi] Allow to serve static files (`assets` configuration)
49
+ - [Luca Guidi] Render default pages for non successful responses (eg `404` or `500`)
50
+ - [Luca Guidi] Allow to configure the root of an application (`root` configuration)
51
+ - [Luca Guidi] Introduced `Lotus::Configuration`
52
+ - [Luca Guidi] Introduced `Lotus::Application`
53
+ - [Luca Guidi] Official support for MRI 2.0