pakyow-core 0.8rc1 → 0.8.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/pakyow-core/lib/core/app.rb +448 -0
  3. data/pakyow-core/lib/core/base.rb +35 -12
  4. data/pakyow-core/lib/core/{configuration → config}/app.rb +38 -35
  5. data/pakyow-core/lib/core/config/base.rb +30 -0
  6. data/pakyow-core/lib/core/config/cookies.rb +21 -0
  7. data/pakyow-core/lib/core/config/logger.rb +37 -0
  8. data/pakyow-core/lib/core/{configuration → config}/server.rb +3 -1
  9. data/pakyow-core/lib/core/exceptions.rb +3 -0
  10. data/pakyow-core/lib/core/helpers.rb +20 -16
  11. data/pakyow-core/lib/core/loader.rb +1 -1
  12. data/pakyow-core/lib/core/middleware/logger.rb +170 -16
  13. data/pakyow-core/lib/core/middleware/static.rb +20 -8
  14. data/pakyow-core/lib/core/multilog.rb +19 -0
  15. data/pakyow-core/lib/core/request.rb +52 -30
  16. data/pakyow-core/lib/core/route_eval.rb +390 -0
  17. data/pakyow-core/lib/core/route_lookup.rb +17 -5
  18. data/pakyow-core/lib/core/route_set.rb +17 -210
  19. data/pakyow-core/lib/core/route_template_defaults.rb +18 -12
  20. data/pakyow-core/lib/core/router.rb +41 -31
  21. data/pakyow-core/lib/utils/dir.rb +19 -0
  22. data/pakyow-core/lib/utils/hash.rb +14 -4
  23. data/pakyow-core/lib/views/errors/404.html +77 -0
  24. data/pakyow-core/lib/views/errors/500.html +56 -0
  25. metadata +30 -53
  26. data/pakyow-core/bin/pakyow +0 -18
  27. data/pakyow-core/lib/commands/USAGE +0 -9
  28. data/pakyow-core/lib/commands/USAGE-CONSOLE +0 -12
  29. data/pakyow-core/lib/commands/USAGE-NEW +0 -11
  30. data/pakyow-core/lib/commands/USAGE-SERVER +0 -12
  31. data/pakyow-core/lib/commands/console.rb +0 -18
  32. data/pakyow-core/lib/commands/server.rb +0 -8
  33. data/pakyow-core/lib/core/application.rb +0 -330
  34. data/pakyow-core/lib/core/cache.rb +0 -25
  35. data/pakyow-core/lib/core/configuration/base.rb +0 -31
  36. data/pakyow-core/lib/core/fn_context.rb +0 -5
  37. data/pakyow-core/lib/core/log.rb +0 -39
  38. data/pakyow-core/lib/core/middleware/not_found.rb +0 -40
  39. data/pakyow-core/lib/core/middleware/presenter.rb +0 -25
  40. data/pakyow-core/lib/core/middleware/router.rb +0 -33
  41. data/pakyow-core/lib/core/middleware/setup.rb +0 -15
  42. data/pakyow-core/lib/core/presenter_base.rb +0 -11
  43. data/pakyow-core/lib/core/route_template.rb +0 -77
  44. data/pakyow-core/lib/generators/pakyow/app/app_generator.rb +0 -36
  45. data/pakyow-core/lib/generators/pakyow/app/templates/README +0 -54
  46. data/pakyow-core/lib/generators/pakyow/app/templates/app.rb +0 -12
  47. data/pakyow-core/lib/generators/pakyow/app/templates/config.ru +0 -3
  48. data/pakyow-core/lib/generators/pakyow/app/templates/public/favicon.ico +0 -0
  49. data/pakyow-core/lib/generators/pakyow/app/templates/rakefile +0 -2
  50. data/pakyow-core/lib/generators/pakyow/app/templates/views/main.html +0 -1
  51. data/pakyow-core/lib/generators/pakyow/app/templates/views/pakyow.html +0 -12
@@ -1,54 +0,0 @@
1
- # Introduction
2
-
3
- Pakyow is a web framework for Ruby that knocks out projects with a serious
4
- punch. Pound for pound its the best way to build a web app. Get ready to rumble.
5
-
6
- Pakyow brings a unique approach to development:
7
-
8
- ## Views are views.
9
- Views are 100% HTML, no template language required. The view has finally been
10
- freed from logic.
11
-
12
- ## Views are data aware.
13
- A view knows what it presents. Use this to create powerful connections between
14
- business logic and views.
15
-
16
- ## Keep you moving forward.
17
- Prototype an app by building the views first. Then write the view logic
18
- without changing a single view.
19
-
20
- There are two main components of Pakyow. The first is Pakyow Core, which
21
- handles routing requests to business logic. The second component is Pakyow
22
- Presenter, which gives an application the ability to have a presentation
23
- layer and provides mechanisms for the controller to bind data to the
24
- presentation layer. Pakyow Core can operate independently of Pakyow
25
- Presenter for those cases where an application doesn't need a presentation layer.
26
-
27
- # Getting Started
28
-
29
- 1. Install Pakyow:
30
-
31
- gem install pakyow
32
-
33
- 2. Create a new Pakyow application from the command prompt:
34
-
35
- pakyow new webapp
36
-
37
- 3. Move to the "webapp" directory and start the application:
38
-
39
- cd webapp; pakyow server
40
-
41
- 4. You'll find the application running here: http://localhost:3000
42
-
43
- # Next Steps
44
-
45
- The following resources might be handy:
46
-
47
- Website:
48
- http://pakyow.com
49
-
50
- Manual:
51
- http://pakyow.com/manual
52
-
53
- Code:
54
- http://github.com/metabahn/pakyow
@@ -1,12 +0,0 @@
1
- require 'rubygems'
2
- require 'pakyow'
3
-
4
- module PakyowApplication
5
- class Application < Pakyow::Application
6
- core do
7
- default {
8
- puts 'Pakyow says hello!'
9
- }
10
- end
11
- end
12
- end
@@ -1,3 +0,0 @@
1
- require File.expand_path('app', __FILE__)
2
- PakyowApplication::Application.builder.run(PakyowApplication::Application.stage(ENV['RACK_ENV']))
3
- run PakyowApplication::Application.builder.to_app
@@ -1,2 +0,0 @@
1
- require File.expand_path('application', __FILE__)
2
- PakyowApplication::Application.stage(ENV['ENV'])
@@ -1 +0,0 @@
1
- <h1>Welcome to Pakyow!</h1>
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Pakyow</title>
5
- </head>
6
-
7
- <body>
8
- <div id="wrapper">
9
- <div data-container="main"></div>
10
- </div>
11
- </body>
12
- </html>