camping 2.1.532 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +72 -53
  3. data/Rakefile +25 -20
  4. data/bin/camping +1 -0
  5. data/book/01_introduction.md +6 -6
  6. data/book/02_getting_started.md +348 -267
  7. data/book/03_more_about_controllers.md +124 -0
  8. data/book/04_more_about_views.md +118 -0
  9. data/book/05_more_about_markaby.md +173 -0
  10. data/book/06_more_about_models.md +58 -0
  11. data/book/06_rules_of_thumb.md +143 -0
  12. data/book/07_philosophy.md +23 -0
  13. data/book/08_publishing_an_app.md +118 -0
  14. data/book/09_upgrade_notes.md +96 -0
  15. data/book/10_middleware.md +69 -0
  16. data/book/11_gear.md +50 -0
  17. data/examples/blog.rb +38 -38
  18. data/lib/camping/ar.rb +20 -5
  19. data/lib/camping/commands.rb +388 -0
  20. data/lib/camping/gear/filters.rb +48 -0
  21. data/lib/camping/gear/inspection.rb +32 -0
  22. data/lib/camping/gear/kuddly.rb +178 -0
  23. data/lib/camping/gear/nancy.rb +170 -0
  24. data/lib/camping/loads.rb +15 -0
  25. data/lib/camping/mab.rb +1 -1
  26. data/lib/camping/reloader.rb +22 -17
  27. data/lib/camping/server.rb +145 -70
  28. data/lib/camping/session.rb +8 -5
  29. data/lib/camping/template.rb +1 -2
  30. data/lib/camping/tools.rb +43 -0
  31. data/lib/camping/version.rb +6 -0
  32. data/lib/camping-unabridged.rb +360 -133
  33. data/lib/camping.rb +78 -47
  34. data/lib/campingtrip.md +341 -0
  35. data/test/app_camping_gear.rb +121 -0
  36. data/test/app_camping_tools.rb +1 -0
  37. data/test/app_config.rb +30 -0
  38. data/test/app_cookies.rb +1 -1
  39. data/test/app_file.rb +3 -3
  40. data/test/app_goes_meta.rb +23 -0
  41. data/test/app_inception.rb +39 -0
  42. data/test/app_markup.rb +5 -20
  43. data/test/app_migrations.rb +16 -0
  44. data/test/app_partials.rb +1 -1
  45. data/test/app_prefixed.rb +88 -0
  46. data/test/app_reloader.rb +1 -2
  47. data/test/app_route_generating.rb +69 -2
  48. data/test/app_sessions.rb +24 -2
  49. data/test/app_simple.rb +18 -18
  50. data/test/apps/migrations.rb +82 -82
  51. data/test/apps/misc.rb +1 -1
  52. data/test/gear/gear_nancy.rb +129 -0
  53. data/test/test_helper.rb +69 -12
  54. metadata +138 -92
  55. data/CHANGELOG +0 -145
  56. data/book/51_upgrading.md +0 -110
@@ -0,0 +1,129 @@
1
+ require 'test_helper'
2
+ require 'camping'
3
+ require 'camping/commands'
4
+ require 'rack'
5
+
6
+ # nuke all the apps
7
+
8
+ Camping.goes :Frank
9
+ Frank.use Rack::Lint
10
+
11
+ module Frank
12
+ get "/" do
13
+ "Hello Friends"
14
+ end
15
+
16
+ get "/accounts" do
17
+ "Get Some Accounts"
18
+ end
19
+
20
+ get '/account/(\d+)' do |*a|
21
+ "Get Some Account numbered #{a.first}"
22
+ end
23
+
24
+ post "/accounts/new" do
25
+ "Try my hardest."
26
+ end
27
+
28
+ get "/home", "/about" do
29
+ "About page"
30
+ end
31
+
32
+ put "/it/all/out/there" do
33
+ "It's all out there now."
34
+ end
35
+
36
+ delete '/this/stuff/' do
37
+ "Everything will be deleted"
38
+ end
39
+
40
+ head '/get/ahead' do
41
+ "The very best you can do"
42
+ end
43
+
44
+ patch '/this/boat' do
45
+ "Row Row Row your boat"
46
+ end
47
+
48
+ link '/to/the/past' do
49
+ "Link! He come to town! come to save! The princess Zelda!"
50
+ end
51
+
52
+ unlink '/game/over' do
53
+ "start over?"
54
+ end
55
+
56
+ end
57
+
58
+ Camping.goes :Bill
59
+
60
+ module Bill::Controllers
61
+ class Friends
62
+ def get
63
+ "It looks like you have lots of friends."
64
+ end
65
+ end
66
+ end
67
+
68
+ module Frank
69
+ get '/friends', &Bill
70
+ end
71
+
72
+ class Frank::Test < TestCase
73
+
74
+ def the_app
75
+ Camping::Apps.select{|a| a.name == "Frank" }.first
76
+ end
77
+
78
+ def the_controllers
79
+ app = the_app
80
+ app::X.constants.filter { |el|
81
+ con = el.to_s
82
+ con != 'I' && con != 'Camper'
83
+ }
84
+ end
85
+
86
+ def test_number_of_controllers
87
+ controllers = the_controllers
88
+ assert (controllers.count == 12), "There are not the right number of controllers: #{controllers.count}."
89
+ end
90
+
91
+ def test_controller_names
92
+ controllers = the_controllers
93
+ assert controllers.include?(:GetIndex), "Not Found: :GetIndex. Controllers: #{controllers}."
94
+ assert controllers.include?(:GetAccounts), "Not Found: :GetAccounts. Controllers: #{controllers}."
95
+ assert controllers.include?(:GetAccountd), "Not Found: :GetAccount. Controllers: #{controllers}."
96
+ assert controllers.include?(:PostAccountsNew), "Not Found: :PostAccountsNew. Controllers: #{controllers}."
97
+ assert controllers.include?(:GetHomeAbout), "Not Found: :GetHomeAbout. Controllers: #{controllers}."
98
+ assert controllers.include?(:PutItAllOutThere), "Not Found: :PutItAllOutThere. Controllers: #{controllers}."
99
+ assert controllers.include?(:DeleteThisStuff), "Not Found: :DeleteThisStuff. Controllers: #{controllers}."
100
+
101
+ assert controllers.include?(:HeadGetAhead), "Not Found: :HeadGetAhead. Controllers: #{controllers}."
102
+ # assert controllers.include?(:OptionsAllTheOptions), "Not Found: :OptionsAllTheOptions. Controllers: #{controllers}."
103
+ assert controllers.include?(:PatchThisBoat), "Not Found: :PatchThisBoat. Controllers: #{controllers}."
104
+ assert controllers.include?(:LinkToThePast), "Not Found: :LinkToThePast. Controllers: #{controllers}."
105
+ assert controllers.include?(:UnlinkGameOver), "Not Found: :UnlinkGameOver. Controllers: #{controllers}."
106
+
107
+ end
108
+
109
+ def test_get_works_for_controllers
110
+ get '/accounts/'
111
+ assert_body "Get Some Accounts", "Body is not what we expect."
112
+ end
113
+
114
+ def test_blocks_take_arguments
115
+ get '/account/15'
116
+ assert_body "Get Some Account numbered 15", "Body is not what we expect."
117
+ end
118
+
119
+ def test_to_proc_works_for_apps
120
+ get '/friends/'
121
+ assert_body "It looks like you have lots of friends.", "Well this is a bummer. Frank is left out, and not called."
122
+ end
123
+
124
+ # TODO: Test that we are returning proper headers, that are not symbols, When Nancying.
125
+ def test_that_header_keys_aint_symbols
126
+
127
+ end
128
+
129
+ end
data/test/test_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  $:.unshift File.dirname(__FILE__) + '/../lib'
2
+ $VERBOSE = nil
2
3
 
3
4
  begin
4
5
  require 'rubygems'
@@ -13,22 +14,78 @@ end
13
14
 
14
15
  require 'minitest/autorun'
15
16
  require 'rack/test'
17
+ require "minitest/reporters"
18
+ Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(:color => true)]
16
19
 
17
- class TestCase < MiniTest::Unit::TestCase
20
+
21
+ module CommandLineCommands
22
+
23
+ def move_to_tmp
24
+ @original_dir = Dir.pwd
25
+ Dir.chdir "test"
26
+ Dir.mkdir("tmp") unless Dir.exist?("tmp")
27
+ Dir.chdir "tmp"
28
+ end
29
+
30
+ def leave_tmp
31
+ Dir.chdir @original_dir
32
+ `rm -rf test/tmp` if File.exist?('test/tmp')
33
+ end
34
+
35
+ def write(file, content)
36
+ raise "cannot write nil" unless file
37
+ file = tmp_file(file)
38
+ folder = File.dirname(file)
39
+ `mkdir -p #{folder}` unless File.exist?(folder)
40
+ File.open(file, 'w') { |f| f.write content }
41
+ end
42
+
43
+ def read(file)
44
+ File.read(tmp_file(file))
45
+ end
46
+
47
+ def tmp_file(file)
48
+ "#{file}"
49
+ end
50
+
51
+ def write_config
52
+ write 'config.kdl', <<-TXT
53
+ // config.kdl
54
+ database {
55
+ default adapter="sqlite3" host="localhost" max_connections=5 timeout=5000
56
+ development
57
+ production adapter="postgres" database="kow"
58
+ }
59
+ hostname "crickets.com"
60
+ friends "_why" "judofyr" "chunky bacon"
61
+ TXT
62
+ end
63
+
64
+ def trash_config
65
+ `rm -rf config.kdl` if File.exist?('config.kdl')
66
+ end
67
+
68
+ end
69
+
70
+ class TestCase < MiniTest::Test
18
71
  include Rack::Test::Methods
19
-
72
+ include CommandLineCommands
73
+
20
74
  def self.inherited(mod)
21
75
  mod.app = Object.const_get(mod.to_s[/\w+/])
22
76
  super
23
77
  end
24
-
78
+
25
79
  class << self
26
80
  attr_accessor :app
27
81
  end
28
-
82
+
29
83
  def body() last_response.body end
30
84
  def app() self.class.app end
31
-
85
+
86
+ # adding this because sometimes the response is wonky???
87
+ def response_body() last_response.to_a end
88
+
32
89
  def assert_reverse
33
90
  begin
34
91
  yield
@@ -37,18 +94,18 @@ class TestCase < MiniTest::Unit::TestCase
37
94
  assert false, "Block didn't fail"
38
95
  end
39
96
  end
40
-
41
- def assert_body(str)
97
+
98
+ def assert_body(str, message="")
42
99
  case str
43
100
  when Regexp
44
- assert_match(str, last_response.body.strip)
101
+ assert_match(str, last_response.body.strip, message)
45
102
  else
46
- assert_equal(str.to_s, last_response.body.strip)
103
+ assert_equal(str.to_s, last_response.body.strip, message)
47
104
  end
48
105
  end
49
-
50
- def assert_status(code)
51
- assert_equal(code, last_response.status)
106
+
107
+ def assert_status(code, message="")
108
+ assert_equal(code, last_response.status, message)
52
109
  end
53
110
 
54
111
  def test_silly; end
metadata CHANGED
@@ -1,126 +1,133 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camping
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.532
5
- prerelease:
4
+ version: 3.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - why the lucky stiff
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-21 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
13
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mab
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.0.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.0.3
14
33
  - !ruby/object:Gem::Dependency
15
34
  name: rack
16
35
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
36
  requirements:
19
- - - ! '>='
37
+ - - "~>"
20
38
  - !ruby/object:Gem::Version
21
- version: '1.0'
39
+ version: '3.0'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 3.0.4.1
22
43
  type: :runtime
23
44
  prerelease: false
24
45
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
46
  requirements:
27
- - - ! '>='
47
+ - - "~>"
28
48
  - !ruby/object:Gem::Version
29
- version: '1.0'
49
+ version: '3.0'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 3.0.4.1
30
53
  - !ruby/object:Gem::Dependency
31
- name: mab
54
+ name: rack-session
32
55
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
56
  requirements:
35
- - - ! '>='
57
+ - - "~>"
36
58
  - !ruby/object:Gem::Version
37
- version: 0.0.3
59
+ version: '2.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 2.0.0
38
63
  type: :runtime
39
64
  prerelease: false
40
65
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
66
  requirements:
43
- - - ! '>='
67
+ - - "~>"
44
68
  - !ruby/object:Gem::Version
45
- version: 0.0.3
69
+ version: '2.0'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.0.0
46
73
  - !ruby/object:Gem::Dependency
47
- name: rake
74
+ name: rackup
48
75
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
76
  requirements:
51
- - - ! '>='
77
+ - - "~>"
52
78
  - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
79
+ version: 2.1.0
80
+ type: :runtime
55
81
  prerelease: false
56
82
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
83
  requirements:
59
- - - ! '>='
84
+ - - "~>"
60
85
  - !ruby/object:Gem::Version
61
- version: '0'
86
+ version: 2.1.0
62
87
  - !ruby/object:Gem::Dependency
63
- name: rack-test
88
+ name: kdl
64
89
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
90
  requirements:
67
- - - ! '>='
91
+ - - "~>"
68
92
  - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
93
+ version: '1.0'
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.3
97
+ type: :runtime
71
98
  prerelease: false
72
99
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
100
  requirements:
75
- - - ! '>='
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.0'
104
+ - - ">="
76
105
  - !ruby/object:Gem::Version
77
- version: '0'
78
- description:
106
+ version: 1.0.3
107
+ description:
79
108
  email: why@ruby-lang.org
80
109
  executables:
81
110
  - camping
82
111
  extensions: []
83
- extra_rdoc_files:
84
- - README.md
85
- - CHANGELOG
86
- - COPYING
87
- - book/01_introduction.md
88
- - book/02_getting_started.md
89
- - book/51_upgrading.md
112
+ extra_rdoc_files: []
90
113
  files:
91
114
  - COPYING
92
115
  - README.md
93
116
  - Rakefile
94
117
  - bin/camping
95
- - test/app_cookies.rb
96
- - test/app_file.rb
97
- - test/app_helpers.rb
98
- - test/app_inline_templates.rb
99
- - test/app_markup.rb
100
- - test/app_partials.rb
101
- - test/app_reloader.rb
102
- - test/app_route_generating.rb
103
- - test/app_sessions.rb
104
- - test/app_simple.rb
105
- - test/apps/env_debug.rb
106
- - test/apps/forms.rb
107
- - test/apps/forward_to_other_controller.rb
108
- - test/apps/migrations.rb
109
- - test/apps/misc.rb
110
- - test/apps/reloader/config.ru
111
- - test/apps/reloader/reload_me.rb
112
- - test/apps/reloader.rb
113
- - test/apps/reloader_indirect.rb
114
- - test/apps/sessions.rb
115
- - test/test_helper.rb
116
- - lib/camping/ar.rb
117
- - lib/camping/mab.rb
118
- - lib/camping/reloader.rb
119
- - lib/camping/server.rb
120
- - lib/camping/session.rb
121
- - lib/camping/template.rb
122
- - lib/camping-unabridged.rb
123
- - lib/camping.rb
118
+ - book/01_introduction.md
119
+ - book/02_getting_started.md
120
+ - book/03_more_about_controllers.md
121
+ - book/04_more_about_views.md
122
+ - book/05_more_about_markaby.md
123
+ - book/06_more_about_models.md
124
+ - book/06_rules_of_thumb.md
125
+ - book/07_philosophy.md
126
+ - book/08_publishing_an_app.md
127
+ - book/09_upgrade_notes.md
128
+ - book/10_middleware.md
129
+ - book/11_gear.md
130
+ - examples/blog.rb
124
131
  - extras/images/badge.gif
125
132
  - extras/images/boys-life.png
126
133
  - extras/images/deerputer.png
@@ -143,41 +150,80 @@ files:
143
150
  - extras/rdoc/generator/template/flipbook/readme.rhtml
144
151
  - extras/rdoc/generator/template/flipbook/reference.rhtml
145
152
  - extras/rdoc/generator/template/flipbook/toc.rhtml
146
- - book/01_introduction.md
147
- - book/02_getting_started.md
148
- - book/51_upgrading.md
149
- - examples/blog.rb
150
- - CHANGELOG
153
+ - lib/camping-unabridged.rb
154
+ - lib/camping.rb
155
+ - lib/camping/ar.rb
156
+ - lib/camping/commands.rb
157
+ - lib/camping/gear/filters.rb
158
+ - lib/camping/gear/inspection.rb
159
+ - lib/camping/gear/kuddly.rb
160
+ - lib/camping/gear/nancy.rb
161
+ - lib/camping/loads.rb
162
+ - lib/camping/mab.rb
163
+ - lib/camping/reloader.rb
164
+ - lib/camping/server.rb
165
+ - lib/camping/session.rb
166
+ - lib/camping/template.rb
167
+ - lib/camping/tools.rb
168
+ - lib/camping/version.rb
169
+ - lib/campingtrip.md
170
+ - test/app_camping_gear.rb
171
+ - test/app_camping_tools.rb
172
+ - test/app_config.rb
173
+ - test/app_cookies.rb
174
+ - test/app_file.rb
175
+ - test/app_goes_meta.rb
176
+ - test/app_helpers.rb
177
+ - test/app_inception.rb
178
+ - test/app_inline_templates.rb
179
+ - test/app_markup.rb
180
+ - test/app_migrations.rb
181
+ - test/app_partials.rb
182
+ - test/app_prefixed.rb
183
+ - test/app_reloader.rb
184
+ - test/app_route_generating.rb
185
+ - test/app_sessions.rb
186
+ - test/app_simple.rb
187
+ - test/apps/env_debug.rb
188
+ - test/apps/forms.rb
189
+ - test/apps/forward_to_other_controller.rb
190
+ - test/apps/migrations.rb
191
+ - test/apps/misc.rb
192
+ - test/apps/reloader.rb
193
+ - test/apps/reloader/config.ru
194
+ - test/apps/reloader/reload_me.rb
195
+ - test/apps/reloader_indirect.rb
196
+ - test/apps/sessions.rb
197
+ - test/gear/gear_nancy.rb
198
+ - test/test_helper.rb
151
199
  homepage: http://camping.rubyforge.org/
152
200
  licenses: []
153
- post_install_message:
201
+ metadata: {}
202
+ post_install_message:
154
203
  rdoc_options:
155
- - --line-numbers
156
- - --quiet
157
- - --main
204
+ - "--line-numbers"
205
+ - "--quiet"
206
+ - "--main"
158
207
  - README
159
- - --exclude
160
- - ^(examples|extras)\/
161
- - --exclude
208
+ - "--exclude"
209
+ - "^(examples|extras)\\/"
210
+ - "--exclude"
162
211
  - lib/camping.rb
163
212
  require_paths:
164
213
  - lib
165
214
  required_ruby_version: !ruby/object:Gem::Requirement
166
- none: false
167
215
  requirements:
168
- - - ! '>='
216
+ - - ">="
169
217
  - !ruby/object:Gem::Version
170
- version: 1.8.2
218
+ version: 3.1.2
171
219
  required_rubygems_version: !ruby/object:Gem::Requirement
172
- none: false
173
220
  requirements:
174
- - - ! '>='
221
+ - - ">="
175
222
  - !ruby/object:Gem::Version
176
223
  version: '0'
177
224
  requirements: []
178
- rubyforge_project: camping
179
- rubygems_version: 1.8.25
180
- signing_key:
181
- specification_version: 3
182
- summary: minature rails for stay-at-home moms
225
+ rubygems_version: 3.4.10
226
+ signing_key:
227
+ specification_version: 4
228
+ summary: micro mighty websites for anyone
183
229
  test_files: []
data/CHANGELOG DELETED
@@ -1,145 +0,0 @@
1
- = 2.1
2
- === 19th Aug, 2010 (whyday)
3
- * Helpers#R now calls to_param on any object it passes in
4
- * Fix route generation issue with routes including "." (#22)
5
- * Improved tests
6
- * Improved 1.9 support
7
- * Camping::Server is now built upon Rack::Server
8
- * Add support for ERB, Haml etc through Tilt
9
- * Introducing Camping.options and Camping#set
10
- * Camping::Server only loads ActiveRecord when needed
11
-
12
- = 2.0
13
- === 9th Apr, 2010
14
- * Speed-up of Camping::Mab (thanks zimbatm!)
15
- * @state is now an alias of @env['rack.session']
16
- * Camping.use injects a Rack middleware.
17
- * Update Flipbook to RDoc 2.4
18
- * Removed old examples.
19
- * Updated examples/blog.rb
20
- * Camping::Apps returns!
21
- * Session-cookies now timeout naturally (thanks jenna!)
22
- * You can now `throw :halt` to halt the response in a helper.
23
- * Camping::H#u is gone (was an alias to merge!)
24
- * Camping::Session now uses session-cookies. The AR-backend is gone for now.
25
- * camping/db.rb has been renamed to camping/ar.rb.
26
- * Camping now uses Rack internally. Every app responds to #call.
27
-
28
- = 1.6
29
- === Never released
30
-
31
- * Camping::Apps removed, it wasn't reliable.
32
- * bin/camping server kinds splitted in various files.
33
- * NotFound and ServerError controllers changed to methods :
34
-
35
- r404 : called when a controller was not found
36
- r500 : called on uncaught exception
37
- r501 : called on undefined method
38
-
39
- All of those can be overridden at your taste.
40
-
41
- * Markaby no longer required. Like AR, is it autoloaded on (Mab) usage.
42
- * Camping::H is now inheriting from Hash instead of HashWithIndifferentAccess.
43
- * Which made possible to remove the last strict dependency : active_support
44
- * #errors_for removed, it wasn't really used
45
- * Bug fixes !
46
-
47
- = 1.5
48
- === 3rd Oct, 2006
49
-
50
- * Camping::Apps stores an array of classes for all loaded apps.
51
- * bin/camping can be given a directory. Like: <tt>camping examples/</tt>
52
- * Console mode -- thank zimbatm. Use: camping -C yourapp.rb
53
- * Call controllers with Camping.method_missing.
54
-
55
- Tepee.get(:Index) #=> (Response)
56
- Blog.post(:Delete, id) #=> (Response)
57
-
58
- Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'})
59
- #=> #<Blog::Controllers::Login @user=... >
60
-
61
- Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'})
62
- #=> #<Blog::Controllers::Info @env={'HTTP_HOST'=>'wagon'} ...>
63
-
64
- * Using \r\n instead of \n on output. FastCGI has these needs.
65
- * ActiveRecord no longer required or installed.
66
- * If you refer to Models::Base, however, ActiveRecord will be loaded with autoload. (see lib/camping/db.rb)
67
- * new Camping::FastCGI.serve which will serve a whole directory of apps
68
- (see http://code.whytheluckystiff.net/camping/wiki/TheCampingServer)
69
- * ~/.campingrc can contain database connection info if you want your default to be something other than SQLite.
70
-
71
- database:
72
- adapter: mysql
73
- username: camping
74
- socket: /tmp/mysql.sock
75
- password: NOFORESTFIRES
76
- database: camping
77
-
78
- * controllers are now *ordered*. uses the inherited hook to keep track of all
79
- classes created with R. those classes are scanned, in order, when a request is
80
- made. any other controllers are handled first. so if you plan on overriding the
81
- urls method, be sure to subclass from R().
82
- * Console mode will load .irbrc in the working directory, if present.
83
- (for example, in my ~/git/balloon directory, i have this in the .irbrc:
84
- include Balloon::Models
85
- when camping -C balloon.rb gets run, the models all get included in main.)
86
- * And, of course, many other bugfixes from myself and the loyal+kind zimbatm...
87
- * Markaby updated to 0.5. (See its CHANGELOG.)
88
-
89
- = 1.4.2
90
- === 18th May, 2006
91
-
92
- * Efficient file uploads for multipart/form-data POSTs.
93
- * Camping tool now uses Mongrel, if available. If not, sticks with WEBrick.
94
- * Multiple apps can be loaded with the camping tool, each mounted according to their file name.
95
-
96
- = 1.4.1
97
- === 3rd May, 2006
98
-
99
- * Streaming HTTP support. If body is IO, will simply pass to the controller. Mongrel, in particular, supports this nicely.
100
-
101
- = 1.4
102
- === 11th April, 2006
103
-
104
- * Moved Camping::Controllers::Base to Camping::Base.
105
- * Moved Camping::Controllers::R to Camping::R.
106
- * New session library (lib/camping/session.rb).
107
- * WEBrick handler (lib/camping/webrick.rb) and Mongrel handler (lib/camping/mongrel.rb).
108
- * Helpers#URL, builds a complete URL for a route. Returns a URI object. This way relative links could just return self.URL.path.
109
- * Base#initialize takes over some of Base#service's duties.
110
- * ENV now available as @env in controllers and views.
111
- * Beautiful multi-page docs without frames!
112
-
113
- = 1.3
114
- === 28th January, 2006
115
-
116
- * bin/camping: an application launcher.
117
- * <tt>Camping.run(request, response)</tt> now changed to <tt>controller = Camping.run(request, env)</tt>
118
- * This means outputting the response is the wrapper/server's job. See bin/camping, you can do a controller.to_s at the least.
119
- * <tt>Controllers::Base.env</tt> is the new thread-safe home for <tt>ENV</tt>.
120
- * The input hash now works more like Rails params. You can call keys
121
- like methods or with symbols or strings.
122
- * Queries are now parsed more like PHP/Rails, in that you can denote
123
- structure with brackets: post[user]=_why;post[id]=2
124
- * Auto-prefix table names, to help prevent name clash.
125
- * Helpers.errors_for simple validation.
126
- * Lots of empty :href and :action attributes, a bug.
127
- * New single-page flipbook RDoc template.
128
-
129
- = 1.2
130
- === 23rd January, 2006
131
-
132
- * Camping.goes allows fresh modules build from all Camping parts.
133
- * File uploads now supported (multipart/form-data).
134
- * Helpers.R can rebuild routes.
135
- * Helpers./ for tracing paths from the root.
136
-
137
- = 1.1
138
- === 19th January, 2006
139
-
140
- * Allowed request and response streams to be passed in, to allow WEBrick and FastCGI support.
141
-
142
- = 1.0
143
- === 17th January, 2006
144
-
145
- * Initial checkin, see announcement at http://redhanded.hobix.com/bits/campingAMicroframework.html.