mango 0.5.0.beta1 → 0.5.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/.yardopts CHANGED
@@ -2,5 +2,4 @@
2
2
  --markup markdown
3
3
  -
4
4
  LICENSE
5
- doc/HISTORY.mdown
6
- doc/ROAD-MAP.mdown
5
+ CHANGES.mdown
@@ -1,11 +1,35 @@
1
- Mango release 0.5.0 (September 12, 2010)
2
- ========================================
1
+ Mango release 0.5.0.beta2 (October 21, 2010)
2
+ ============================================
3
3
 
4
+ ### Features
5
+
6
+ * Mango has been split into two pieces!
7
+ 1. A web framework, distributed as a Ruby gem, that is completely abstracted away from application code.
8
+ 2. A `mango` command-line tool that generates a [demo Mango application](http://mango-fireworks.heroku.com/).
9
+ * Mango now supports theme-switching!
10
+ * For example, add `class Mango::Application; set :theme, "theme_name"; end` to your application's config.ru.
11
+ * As a result of the new command-line application generator, all embedded application code has been removed.
12
+ * Now routes like `GET /images/` return a 200 response if the `themes/default/public/images/index.html` file is exists.
13
+
14
+ ### Dependencies
15
+
16
+ * Updated [Bundler](http://gembundler.com/) to 1.0.3
17
+ * Updated [Haml](http://haml-lang.com/) to 3.0.22
18
+ * Updated [Sass](http://sass-lang.com/) to 3.0.22 (bundled with Haml)
19
+ * Updated [BlueCloth](http://deveiate.org/projects/BlueCloth) to 2.0.9
20
+ * Updated [Rack::Test](http://github.com/brynary/rack-test) to 0.5.6
21
+ * Updated [RSpec](http://rspec.info/) to 2.0.1
22
+ * Updated [YARD](http://yardoc.org/) to 0.5.8
23
+ * Updated [YARD::Sinatra](http://github.com/rkh/yard-sinatra) to 0.5.1
24
+
25
+ ### Bugs
26
+
27
+ * The NOT_FOUND handler no longer renders the 404 template within a layout template.
4
28
 
5
29
  Mango release 0.4.0 (August 30, 2010)
6
30
  =====================================
7
31
 
8
- ### New Features:
32
+ ### Features
9
33
 
10
34
  * Added the beginnings of a default theme titled "Smashing Mangos".
11
35
  * Added `Mango::Rack::Debugger` to the middleware stack (Only loads in the `:development` rack environment).
@@ -13,7 +37,7 @@ Mango release 0.4.0 (August 30, 2010)
13
37
  * Refactored `Mango::Application` to utilize `Mango::ContentPage`. Now views have access to a `@content_page` instance variable.
14
38
  * Added `Mango::FlavoredMarkdown`, a subset of [GithubFlavoredMarkdown](http://github.github.com/github-flavored-markdown/), into the Markdown-to-HTML conversion.
15
39
 
16
- ### Dependencies:
40
+ ### Dependencies
17
41
 
18
42
  * Updated [Haml](http://haml-lang.com/) to 3.0.18
19
43
  * Updated [YARD::Sinatra](http://github.com/rkh/yard-sinatra) to 0.5.0
@@ -22,19 +46,19 @@ Mango release 0.4.0 (August 30, 2010)
22
46
  Mango release 0.3.0 (June 25, 2010)
23
47
  ===================================
24
48
 
25
- ### New Features:
49
+ ### Features
26
50
 
27
51
  * Added a route handler that renders [Sass](http://sass-lang.com/) templates to CSS!
28
52
  * Refactored tests for better spec coverage of route handling
29
53
  * Massive rewrite of internal documentation thanks to the [YARD::Sinatra (modified)](http://github.com/ryansobol/yard-sinatra)
30
54
  * Uploaded developer documentation to [http://yardoc.org/docs/ryansobol-mango](http://yardoc.org/docs/ryansobol-mango)
31
55
 
32
- ### Dependencies:
56
+ ### Dependencies
33
57
 
34
58
  * Updated [Haml](http://haml-lang.com/) to 3.0.13
35
59
  * Added [YARD::Sinatra](http://github.com/rkh/yard-sinatra) 0.4.0.1 [(modified)](http://github.com/ryansobol/yard-sinatra)
36
60
 
37
- ### Bug fixes:
61
+ ### Bugs
38
62
 
39
63
  * Fixed Regex when parsing LoadError messages on missing development dependencies
40
64
  * Fixed rspec gem name detection when requiring spec/rake/spectask in the Rakefile
data/README.mdown CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  Image courtesy of [B.C. Tree Fruits LTD.](http://www.bctree.com/products/sourced/mango.php)
4
4
 
5
- Mango release 0.5.0 (September 12, 2010)
6
- ========================================
5
+ Mango release 0.5.0.beta2 (October 21, 2010)
6
+ ============================================
7
7
 
8
8
  Copyright (c) 2010 Ryan Sobol. Licensed under the MIT license. Please see the {file:LICENSE} for more information.
9
9
 
10
10
  * **Source Code**: [http://github.com/ryansobol/mango](http://github.com/ryansobol/mango)
11
11
  * **Documentation**: [http://rubydoc.info/github/ryansobol/mango](http://rubydoc.info/github/ryansobol/mango)
12
- * **Bug Tracker**: [http://github.com/ryansobol/mango/issues](http://github.com/ryansobol/mango/issues)
12
+ * **Issue Tracker**: [http://github.com/ryansobol/mango/issues](http://github.com/ryansobol/mango/issues)
13
13
  * **Wiki**: [http://wiki.github.com/ryansobol/mango](http://wiki.github.com/ryansobol/mango)
14
14
 
15
15
  **Mango respects [Semantic Versioning](http://semver.org/)!**
@@ -17,21 +17,32 @@ Copyright (c) 2010 Ryan Sobol. Licensed under the MIT license. Please see the {
17
17
  WHAT'S NEW?
18
18
  -----------
19
19
 
20
- ### New Features:
20
+ ### Features
21
21
 
22
- * Added the beginnings of a default theme titled "Smashing Mangos".
23
- * Added `Mango::Rack::Debugger` to the middleware stack (Only loads in the `:development` rack environment).
24
- * Added a `Mango::ContentPage` model to convert user-generated content into HTML. Supports either [Haml](http://haml-lang.com/) or [Markdown](http://daringfireball.net/projects/markdown/syntax) formatted content.
25
- * Refactored `Mango::Application` to utilize `Mango::ContentPage`. Now views have access to a `@content_page` instance variable.
26
- * Added `Mango::FlavoredMarkdown`, a subset of [GithubFlavoredMarkdown](http://github.github.com/github-flavored-markdown/), into the Markdown-to-HTML conversion.
22
+ * Mango has been split into two pieces!
23
+ 1. A web framework, distributed as a Ruby gem, that is completely abstracted away from application code.
24
+ 2. A `mango` command-line tool that generates a [demo Mango application](http://mango-fireworks.heroku.com/).
25
+ * Mango now supports theme-switching!
26
+ * For example, add `class Mango::Application; set :theme, "theme_name"; end` to your application's config.ru.
27
+ * As a result of the new command-line application generator, all embedded application code has been removed.
28
+ * Now routes like `GET /images/` return a 200 response if the `themes/default/public/images/index.html` file is exists.
27
29
 
28
- ### Dependencies:
30
+ ### Dependencies
29
31
 
30
- * Updated [Haml](http://haml-lang.com/) to 3.0.18
31
- * Updated [YARD::Sinatra](http://github.com/rkh/yard-sinatra) to 0.5.0
32
- * Added [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.7 as a required dependency
32
+ * Updated [Bundler](http://gembundler.com/) to 1.0.3
33
+ * Updated [Haml](http://haml-lang.com/) to 3.0.22
34
+ * Updated [Sass](http://sass-lang.com/) to 3.0.22 (bundled with Haml)
35
+ * Updated [BlueCloth](http://deveiate.org/projects/BlueCloth) to 2.0.9
36
+ * Updated [Rack::Test](http://github.com/brynary/rack-test) to 0.5.6
37
+ * Updated [RSpec](http://rspec.info/) to 2.0.1
38
+ * Updated [YARD](http://yardoc.org/) to 0.5.8
39
+ * Updated [YARD::Sinatra](http://github.com/rkh/yard-sinatra) to 0.5.1
33
40
 
34
- Please see {file:doc/HISTORY.mdown} for the historical overview of the project.
41
+ ### Bugs
42
+
43
+ * The NOT_FOUND handler no longer renders the 404 template within a layout template.
44
+
45
+ Please see {file:CHANGES.mdown} for the historical overview of the project.
35
46
 
36
47
  SYNOPSIS
37
48
  --------
@@ -61,20 +72,21 @@ REQUIREMENTS
61
72
  **Required dependencies**
62
73
 
63
74
  * [Ruby](http://www.ruby-lang.org/) 1.9.1
75
+ * [Bundler](http://gembundler.com/) 1.0.3
64
76
  * [Rack](http://rack.rubyforge.org/) 1.2.1
65
77
  * [Sinatra](http://www.sinatrarb.com/) 1.0
66
- * [Haml](http://haml-lang.com/) 3.0.18
67
- * [Sass](http://sass-lang.com/) 3.0.18 (bundled with Haml)
68
- * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.7
78
+ * [Haml](http://haml-lang.com/) 3.0.22
79
+ * [Sass](http://sass-lang.com/) 3.0.22 (bundled with Haml)
80
+ * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.9
69
81
 
70
82
  **Optional development dependencies**
71
83
 
72
84
  * [Rake](http://rake.rubyforge.org/) 0.8.7 (bundled with Ruby)
73
- * [Rack::Test](http://github.com/brynary/rack-test) 0.5.4
74
- * [RSpec](http://rspec.info/) 1.3.0
85
+ * [Rack::Test](http://github.com/brynary/rack-test) 0.5.6
86
+ * [RSpec](http://rspec.info/) 2.0.1
75
87
  * [YARD](http://yardoc.org/) 0.5.8
76
- * [YARD::Sinatra](http://github.com/rkh/yard-sinatra) 0.5.0
77
- * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.7
88
+ * [YARD::Sinatra](http://github.com/rkh/yard-sinatra) 0.5.1
89
+ * [BlueCloth](http://deveiate.org/projects/BlueCloth) 2.0.9
78
90
 
79
91
  INSTALLING
80
92
  ----------
data/Rakefile CHANGED
@@ -5,9 +5,9 @@ Mango::Dependencies.warn_at_exit
5
5
  ###################################################################################################
6
6
 
7
7
  begin
8
- require "spec/rake/spectask"
8
+ require "rspec/core/rake_task"
9
9
  require "rack/test" # for Rack support
10
- Spec::Rake::SpecTask.new(:spec)
10
+ RSpec::Core::RakeTask.new(:spec)
11
11
  task :default => :spec
12
12
  rescue LoadError => e
13
13
  Mango::Dependencies.create_warning_for(e)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0.beta1
1
+ 0.5.0.beta2
@@ -114,6 +114,10 @@ module Mango
114
114
  set :styles, lambda { File.join(root, "themes", theme, "styles") }
115
115
  set :content, lambda { File.join(root, "content") }
116
116
 
117
+ configure :development do
118
+ use Mango::Rack::Debugger
119
+ end
120
+
117
121
  # Renders the `404.haml` template found within `settings.views` and sends it with 404 HTTP
118
122
  # response.
119
123
  #
@@ -41,11 +41,11 @@ module Mango
41
41
 
42
42
  # bluecloth is a hidden yard dependency for markdown support
43
43
  DEVELOPMENT_GEMS = {
44
- :"rack-test" => "0.5.4",
45
- :rspec => "1.3.0",
44
+ :"rack-test" => "0.5.6",
45
+ :rspec => "2.0.1",
46
46
  :yard => "0.5.8",
47
- :"yard-sinatra" => "0.5.0",
48
- :bluecloth => "2.0.7"
47
+ :"yard-sinatra" => "0.5.1",
48
+ :bluecloth => "2.0.9"
49
49
  }
50
50
 
51
51
  FILE_NAME_TO_GEM_NAME = {
@@ -87,9 +87,9 @@ module Mango
87
87
  # @example Sample warning message
88
88
  # The following development gem dependencies could not be found. Without them, some available development features are missing:
89
89
  # jeweler --version "1.4.0"
90
- # rspec --version "1.3.0"
90
+ # rspec --version "2.0.1"
91
91
  # yard --version "0.5.3"
92
- # bluecloth --version "2.0.7"
92
+ # bluecloth --version "2.0.9"
93
93
  def self.render_warnings
94
94
  unless @@warnings_cache.empty?
95
95
  message = []
data/lib/mango/runner.rb CHANGED
@@ -13,6 +13,7 @@ module Mango
13
13
  "Creates a new Mango application with a default directory structure and configuration at the path you specify."
14
14
  def create(destination)
15
15
  self.destination_root = destination
16
+ copy_file(".gitignore", File.join(self.destination_root, ".gitignore"))
16
17
  copy_file("config.ru", File.join(self.destination_root, "config.ru"))
17
18
  copy_file("Gemfile", File.join(self.destination_root, "Gemfile"))
18
19
  copy_file("README.md", File.join(self.destination_root, "README.md"))
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ .rvmrc
3
+ .bundle
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  source "http://rubygems.org"
3
3
 
4
- gem "mango", "0.5.0.beta1"
4
+ gem "mango", "0.5.0.beta2"
@@ -1,4 +1,3 @@
1
1
  # encoding: UTF-8
2
2
  require "mango"
3
- use Mango::Rack::Debugger if ENV["RACK_ENV"].to_sym == :development
4
3
  run Mango::Application
data/lib/mango/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mango
4
4
  # Current stable released version
5
- VERSION = "0.5.0.beta1"
5
+ VERSION = "0.5.0.beta2"
6
6
  end
data/mango.gemspec CHANGED
@@ -14,18 +14,18 @@ Gem::Specification.new do |s|
14
14
  s.required_rubygems_version = ">= 1.3.7"
15
15
  s.rubyforge_project = "mango"
16
16
 
17
- s.add_runtime_dependency "bundler", "~> 1.0.0"
17
+ s.add_runtime_dependency "bundler", "~> 1.0.3"
18
18
  s.add_runtime_dependency "rack", "~> 1.2.1"
19
19
  s.add_runtime_dependency "sinatra", "~> 1.0"
20
- s.add_runtime_dependency "haml", "~> 3.0.18"
21
- s.add_runtime_dependency "bluecloth", "~> 2.0.7"
22
- s.add_runtime_dependency "thor", "~> 0.14.0"
20
+ s.add_runtime_dependency "haml", "~> 3.0.22"
21
+ s.add_runtime_dependency "bluecloth", "~> 2.0.9"
22
+ s.add_runtime_dependency "thor", "~> 0.14.3"
23
23
 
24
- s.add_development_dependency "rspec", "~> 1.3.0"
25
- s.add_development_dependency "rack-test", "~> 0.5.4"
24
+ s.add_development_dependency "rspec", "~> 2.0.1"
25
+ s.add_development_dependency "rack-test", "~> 0.5.6"
26
26
  s.add_development_dependency "yard", "~> 0.5.8"
27
- s.add_development_dependency "bluecloth", "~> 2.0.7"
28
- s.add_development_dependency "yard-sinatra", "~> 0.5.0"
27
+ s.add_development_dependency "bluecloth", "~> 2.0.9"
28
+ s.add_development_dependency "yard-sinatra", "~> 0.5.1"
29
29
 
30
30
  s.files = `git ls-files`.split("\n")
31
31
  s.test_files = `git ls-files -- spec/*`.split("\n")
@@ -16,15 +16,15 @@ describe Mango::Application do
16
16
  get ""
17
17
  end
18
18
 
19
- it "should return 200 status code" do
19
+ it "returns 200 status code" do
20
20
  last_response.should be_ok
21
21
  end
22
22
 
23
- it "should send the correct Content-Type header" do
23
+ it "sends the correct Content-Type header" do
24
24
  last_response["Content-Type"] == "text/html"
25
25
  end
26
26
 
27
- it "should send the correct body content" do
27
+ it "sends the correct body content" do
28
28
  last_response.body.should == <<-EXPECTED
29
29
  <!DOCTYPE html>
30
30
  <html>
@@ -50,15 +50,15 @@ describe Mango::Application do
50
50
  get "/"
51
51
  end
52
52
 
53
- it "should return 200 status code" do
53
+ it "returns 200 status code" do
54
54
  last_response.should be_ok
55
55
  end
56
56
 
57
- it "should send the correct Content-Type header" do
57
+ it "sends the correct Content-Type header" do
58
58
  last_response["Content-Type"] == "text/html"
59
59
  end
60
60
 
61
- it "should send the correct body content" do
61
+ it "sends the correct body content" do
62
62
  last_response.body.should == <<-EXPECTED
63
63
  <!DOCTYPE html>
64
64
  <html>
@@ -84,15 +84,15 @@ describe Mango::Application do
84
84
  get "/index"
85
85
  end
86
86
 
87
- it "should return 200 status code" do
87
+ it "returns 200 status code" do
88
88
  last_response.should be_ok
89
89
  end
90
90
 
91
- it "should send the correct Content-Type header" do
91
+ it "sends the correct Content-Type header" do
92
92
  last_response["Content-Type"] == "text/html"
93
93
  end
94
94
 
95
- it "should send the correct body content" do
95
+ it "sends the correct body content" do
96
96
  last_response.body.should == <<-EXPECTED
97
97
  <!DOCTYPE html>
98
98
  <html>
@@ -118,15 +118,15 @@ describe Mango::Application do
118
118
  get "/index?foo=bar"
119
119
  end
120
120
 
121
- it "should return 200 status code" do
121
+ it "returns 200 status code" do
122
122
  last_response.should be_ok
123
123
  end
124
124
 
125
- it "should send the correct Content-Type header" do
125
+ it "sends the correct Content-Type header" do
126
126
  last_response["Content-Type"] == "text/html"
127
127
  end
128
128
 
129
- it "should send the correct body content" do
129
+ it "sends the correct body content" do
130
130
  last_response.body.should == <<-EXPECTED
131
131
  <!DOCTYPE html>
132
132
  <html>
@@ -152,15 +152,15 @@ describe Mango::Application do
152
152
  get "/about/"
153
153
  end
154
154
 
155
- it "should return 200 status code" do
155
+ it "returns 200 status code" do
156
156
  last_response.should be_ok
157
157
  end
158
158
 
159
- it "should send the correct Content-Type header" do
159
+ it "sends the correct Content-Type header" do
160
160
  last_response["Content-Type"] == "text/html"
161
161
  end
162
162
 
163
- it "should send the correct body content" do
163
+ it "sends the correct body content" do
164
164
  last_response.body.should == <<-EXPECTED
165
165
  <!DOCTYPE html>
166
166
  <html>
@@ -186,15 +186,15 @@ describe Mango::Application do
186
186
  get "/about/index"
187
187
  end
188
188
 
189
- it "should return 200 status code" do
189
+ it "returns 200 status code" do
190
190
  last_response.should be_ok
191
191
  end
192
192
 
193
- it "should send the correct Content-Type header" do
193
+ it "sends the correct Content-Type header" do
194
194
  last_response["Content-Type"] == "text/html"
195
195
  end
196
196
 
197
- it "should send the correct body content" do
197
+ it "sends the correct body content" do
198
198
  last_response.body.should == <<-EXPECTED
199
199
  <!DOCTYPE html>
200
200
  <html>
@@ -220,15 +220,15 @@ describe Mango::Application do
220
220
  get "/about/us"
221
221
  end
222
222
 
223
- it "should return 200 status code" do
223
+ it "returns 200 status code" do
224
224
  last_response.should be_ok
225
225
  end
226
226
 
227
- it "should send the correct Content-Type header" do
227
+ it "sends the correct Content-Type header" do
228
228
  last_response["Content-Type"] == "text/html"
229
229
  end
230
230
 
231
- it "should send the correct body content" do
231
+ it "sends the correct body content" do
232
232
  last_response.body.should == <<-EXPECTED
233
233
  <!DOCTYPE html>
234
234
  <html>
@@ -254,15 +254,15 @@ describe Mango::Application do
254
254
  get "/turner%2Bhooch"
255
255
  end
256
256
 
257
- it "should return 200 status code" do
257
+ it "returns 200 status code" do
258
258
  last_response.should be_ok
259
259
  end
260
260
 
261
- it "should send the correct Content-Type header" do
261
+ it "sends the correct Content-Type header" do
262
262
  last_response["Content-Type"] == "text/html"
263
263
  end
264
264
 
265
- it "should send the correct body content" do
265
+ it "sends the correct body content" do
266
266
  last_response.body.should == <<-EXPECTED
267
267
  <!DOCTYPE html>
268
268
  <html>
@@ -288,15 +288,15 @@ describe Mango::Application do
288
288
  get "/page_not_found"
289
289
  end
290
290
 
291
- it "should return 404 status code" do
291
+ it "returns 404 status code" do
292
292
  last_response.should be_not_found
293
293
  end
294
294
 
295
- it "should send the correct Content-Type header" do
295
+ it "sends the correct Content-Type header" do
296
296
  last_response["Content-Type"] == "text/html"
297
297
  end
298
298
 
299
- it "should send the correct body content" do
299
+ it "sends the correct body content" do
300
300
  last_response.body.should == <<-EXPECTED
301
301
  <!DOCTYPE html>
302
302
  <html>
@@ -315,7 +315,7 @@ describe Mango::Application do
315
315
  #################################################################################################
316
316
 
317
317
  describe "GET /page_with_missing_view" do
318
- it "should raise RuntimeError" do
318
+ it "raises RuntimeError" do
319
319
  path = File.join(SPEC_APP_ROOT, "themes", "default", "views", "missing_view_template.haml")
320
320
  lambda {
321
321
  get "/page_with_missing_view"
@@ -330,15 +330,15 @@ describe Mango::Application do
330
330
  get "/../security_hole"
331
331
  end
332
332
 
333
- it "should return 404 status code" do
333
+ it "returns 404 status code" do
334
334
  last_response.should be_not_found
335
335
  end
336
336
 
337
- it "should send the correct Content-Type header" do
337
+ it "sends the correct Content-Type header" do
338
338
  last_response["Content-Type"] == "text/html"
339
339
  end
340
340
 
341
- it "should send the correct body content" do
341
+ it "sends the correct body content" do
342
342
  last_response.body.should == <<-EXPECTED
343
343
  <!DOCTYPE html>
344
344
  <html>