mango 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # CHANGES
2
2
 
3
+ ## v0.6.3 / 2013-11-28
4
+
5
+ [Full changes](https://github.com/ryansobol/mango/compare/v0.6.2...v0.6.3)
6
+
7
+ ## Documentation
8
+
9
+ * Improve Features section of the README.md [GH#71](https://github.com/ryansobol/mango/issues/71)
10
+ * Update the WRITING section of the README.md [GH#2](https://github.com/ryansobol/mango/issues/2)
11
+ * insolation v. isolation [GH#74](https://github.com/ryansobol/mango/issues/74) (TrevorBramble)
12
+
3
13
  ## v0.6.2 / 2011-06-06
4
14
 
5
15
  [Full changes](https://github.com/ryansobol/mango/compare/v0.6.1...v0.6.2)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mango (0.6.2)
4
+ mango (0.6.3)
5
5
  bluecloth (~> 2.1.0)
6
6
  bundler (~> 1.0.7)
7
7
  coffee-script (~> 2.2.0)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Ryan Sobol
1
+ Copyright (c) 2013 Ryan Sobol
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
- Mango release 0.6.2 (June 6, 2011)
2
- ==================================
1
+ Mango release 0.6.3 (November 28, 2013)
2
+ =======================================
3
3
 
4
- Copyright (c) 2011 Ryan Sobol. Licensed under the MIT license. Please see the {file:LICENSE} for more information.
4
+ Copyright (c) 2013 Ryan Sobol. Licensed under the MIT license. Please see the {file:LICENSE} for more information.
5
5
 
6
6
  * **Demo Application** : [http://mango-fireworks.heroku.com/](http://mango-fireworks.heroku.com/)
7
7
  * **Source Code**: [https://github.com/ryansobol/mango](https://github.com/ryansobol/mango)
@@ -12,33 +12,31 @@ Copyright (c) 2011 Ryan Sobol. Licensed under the MIT license. Please see the {
12
12
  SYNOPSIS
13
13
  --------
14
14
 
15
- **Mango is a dynamic, database-free, and open source website framework that is designed to make life easier for small teams of designers, developers, and content writers.**
15
+ **Mango is a dynamic, database-free, and open source website framework that is designed to make life easier for small teams of developers, designers, and writers.**
16
16
 
17
17
  FEATURES
18
18
  --------
19
19
 
20
- ### Easy to install
21
-
22
- Mango installs as a [RubyGem](https://rubygems.org/gems/mango) and contains all the necessary components to get a basic website up-and-running in seconds.
20
+ Mango eliminates the barriers to collaboration by decoupling from one another the activities of writing, theming, publishing, extending, and maintaining a website. Mango websites are also decoupled from a database, and instead utilize file-based storage and "convention over configuration".
23
21
 
24
22
  ### Easy to write
25
23
 
26
- Mango integrates with the writing tools you're already familiar with -- the file system and your favorite text editor.
24
+ Writing and revising copy using the clunky administrator interface of a CMS is painful. Which is why it's common for people to work in a text editor and then copy-and-paste their changes back into the CMS.
27
25
 
28
- Working with a text editor you already know *saves time*. And writing and revising content in a file *is often easier* then using the clunky administrator interface of a CMS (e.g. WordPress). Plus, files *match perfectly* with version control systems, like [Git](http://git-scm.com/), for powerful revision history. Bonus!
26
+ Mango leverages the writing tools you're already familiar with -- the file system and your favorite text editor. As a bonus, files match perfectly with version control systems, like [Git](http://git-scm.com/), making for powerful revision history.
29
27
 
30
- Mango supports the following *easy to write* content formats:
28
+ Mango supports the following content formats:
31
29
 
32
30
  * [Markdown](http://daringfireball.net/projects/markdown/basics)
33
31
  * [Haml](http://haml-lang.com/tutorial.html)
34
32
  * [ERB](http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html)
35
33
  * [Liquid](https://github.com/tobi/liquid/wiki)
36
34
 
37
- Don't see your favorite content format? [Patches are welcomed](https://github.com/ryansobol/mango/issues)
35
+ Don't see your favorite content format? [Patches are welcome](https://github.com/ryansobol/mango/issues)
38
36
 
39
37
  ### Easy to theme
40
38
 
41
- Mango separates a website's theme from it's content. This makes it *easy to change* the look-and-feel of a single page or an entire website. Mango also supports powerful template languages that make it *easy to have uniformity* with major sections (i.e. headers, footers, navigation, sidebars, etc.) across multiple pages. In addition to the standard browser formats -- HTML, CSS, and JavaScript -- Mango also supports the following template engines:
39
+ Mango separates a website's theme from it's content. Using a powerful and flexible template system, Mango facilitates both uniformity of major sections and individuality of content presentation. In addition to the standard browser formats -- HTML, CSS, and JavaScript -- Mango also supports the following template formats:
42
40
 
43
41
  * [Haml](http://haml-lang.com/)
44
42
  * [ERB](http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html)
@@ -46,31 +44,36 @@ Mango separates a website's theme from it's content. This makes it *easy to cha
46
44
  * [Scss](http://sass-lang.com/) and [Sass](http://sass-lang.com/)
47
45
  * [CoffeeScript](http://jashkenas.github.com/coffee-script/)
48
46
 
49
- Don't see your favorite template engine? [Patches are welcomed](https://github.com/ryansobol/mango/issues)
47
+ Don't see your favorite template formats? [Patches are welcome](https://github.com/ryansobol/mango/issues)
50
48
 
51
49
  ### Easy to publish
52
50
 
53
- Mango applications are dead-simple to publish. Mango was designed to support a wide variety of publishing tools like:
51
+ Mango websites are dead-simple to publish. Mango supports a wide variety of publishing tools like:
54
52
 
53
+ * Cutting-edge cloud deploying with [Git](http://git-scm.com/) and [Heroku](http://heroku.com/)
55
54
  * Single target, drag-and-drop secure FTP uploading
56
55
  * Multiple target, automated deploying with [Capistrano](https://github.com/capistrano/capistrano)
57
- * Cutting-edge cloud deploying with [Git](http://git-scm.com/) and [Heroku](http://heroku.com/)
58
56
 
59
- ### Easy to collaborate
57
+ ### Easy to extend
60
58
 
61
- With a strong separation of writing, theming and publishing, Mango applications are *designed to be shared* with content writers, web designers, and web developers. But the beauty of Mango is that its simple, file-based approach *appeals to both veterans and newcomers*. In addition, Mango has an emphasis on *accurate documentation*. Mango understands that getting up and running quickly is critical for domain-specific experts.
59
+ Mango is related to a family of tools called static website generators. One killer feature missing from Mango's cousins is the ability to dynamically process HTTP requests on the server.
62
60
 
63
- ### Easy to maintain
61
+ Mango websites leverage the [Sinatra](http://www.sinatrarb.com/) framework to connect web requests to content pages on-the-fly. Additionally, developers can enhance a Mango website to intercept specific web requests and dynamically customize the HTTP response, communicate with other Internet services, or serve unique content.
64
62
 
65
- Mango is a database-less web framework. With no database to install, configure, or manage, the maintenance needed to keep your website in working order is *drastically reduced*. And because Mango is distributed as a RubyGem and respects [Semantic Versioning](http://semver.org/), *upgrading is painless and backwards-compatible* between patch releases.
63
+ With Mango and server-side processing you can:
66
64
 
67
- ### Easy to scale
65
+ * Redirect the browser
66
+ * Cache static assets in the browser
67
+ * Connect with browser frameworks, like [Backbone.js](http://documentcloud.github.com/backbone/), over AJAX
68
+ * Send e-mails via a contact form
69
+ * Subscribe customers to a newsletter
70
+ * Detect mobile devices
71
+ * Detect geographic locations
72
+ * Translate content to native languages
68
73
 
69
- Mango application's are *built for speed*. With minimal server side scripting and zero database queries, Mango is *lightening fast* and the user experience is snappy.
70
-
71
- ### Easy on the wallet
74
+ ### Easy to maintain
72
75
 
73
- Mango is *free* and open source software.
76
+ Mango is distributed as a RubyGem and respects [Semantic Versioning](http://semver.org/). In concert with Bundler, upgrading a Mango website is painless and backwards-compatible between patch releases.
74
77
 
75
78
  REQUIREMENTS
76
79
  ------------
@@ -117,33 +120,33 @@ Mango, and all its necessary components, are packaged as RubyGems for easy distr
117
120
 
118
121
  $ gem install mango
119
122
 
120
- **TIP:** If you're not using [RVM](http://rvm.beginrescueend.com/), you *may* want to prepend the `gem` command with `sudo`.
123
+ **TIP:** If you're not using [RVM](http://rvm.beginrescueend.com/), you may want to prepend the `gem` command with `sudo`.
121
124
 
122
- ### Upgrading a Mango application
125
+ ### Upgrading a Mango website
123
126
 
124
- Simply edit the gem version in your application's `Gemfile` and re-install with [Bundler](http://gembundler.com/).
127
+ Simply edit the gem version in your website's `Gemfile` and re-install with [Bundler](http://gembundler.com/).
125
128
 
126
129
  $ cd /path/to/your/app
127
130
  $ cat Gemfile
128
131
  # encoding: UTF-8
129
132
  source "http://rubygems.org"
130
- gem "mango", "~> 0.6.2"
133
+ gem "mango", "~> 0.6.3"
131
134
  $ bundle install
132
135
 
133
- **TIP:** If you're working in the insolation of an [RVM gemset](http://rvm.beginrescueend.com/gemsets/basics/), type `gem clean` to uninstall outdated gems.
136
+ **TIP:** If you're working in the isolation of an [RVM gemset](http://rvm.beginrescueend.com/gemsets/basics/), type `gem clean` to uninstall outdated gems.
134
137
 
135
138
  GETTING STARTED
136
139
  ---------------
137
140
 
138
- ### Generating a Mango application
141
+ ### Generating a Mango website
139
142
 
140
- With Mango installed, the `mango` command will generate a new application.
143
+ With Mango installed, the `mango` command will generate a new website.
141
144
 
142
145
  $ mango create /path/to/your/app
143
146
 
144
- ### Starting the application
147
+ ### Starting the web-server
145
148
 
146
- Mango applications are compatible with any [Rack supported web-server](http://rack.rubyforge.org/doc/). The `rackup` command will start a web-server (default: WEBrick) listening at `http://0.0.0.0:9292`.
149
+ Mango websites are compatible with any [Rack supported web-server](http://rack.rubyforge.org/doc/). The `rackup` command will start a web-server (default: WEBrick) listening at `http://0.0.0.0:9292`.
147
150
 
148
151
  $ cd /path/to/your/app
149
152
  $ rackup
@@ -166,9 +169,9 @@ If you prefer an alternative web-server (e.g. `thin`), simply install the gem an
166
169
 
167
170
  **TIP:** To see a list of all the `rackup` command-line options, use the `--help` option.
168
171
 
169
- ### Generated application structure
172
+ ### Generated website structure
170
173
 
171
- Now that the newly generated Mango application is running, here's how the application is structured.
174
+ Now that the newly generated Mango website is running, here's how the website is structured.
172
175
 
173
176
  $ tree /path/to/your/app
174
177
  /path/to/your/app
@@ -213,29 +216,103 @@ Now that the newly generated Mango application is running, here's how the applic
213
216
  WRITING
214
217
  -------
215
218
 
216
- Coming soon. [Patches are welcomed](https://github.com/ryansobol/mango/issues#issue/2).
219
+ Authors write and revise copy in text file called a content page. A content page contains two optional components -- a body and a header. Though optional, the majority of authors will utilize both components.
217
220
 
218
- THEMING
219
- -------
221
+ For example, the Mango website generator produces the following content page:
220
222
 
221
- Coming soon. [Patches are welcomed](https://github.com/ryansobol/mango/issues#issue/3).
223
+ $ cat content/index.erb
224
+ ---
225
+ title: Congratulations!
226
+ ---
227
+ <h1><%= page.title %></h1>
222
228
 
223
- PUBLISHING
224
- ----------
229
+ <h2>You did it!</h2>
225
230
 
226
- ### Deploying to a single target with secure FTP uploads
231
+ The above example highlights the key facets of writing a content page.
227
232
 
228
- Coming soon. [Patches are welcomed](https://github.com/ryansobol/mango/issues#issue/4).
233
+ 1. A content page is stored as a file in the `content` directory. Here, the file name is `index.erb`.
234
+ 2. The header, if defined, comes first and is embedded within triple-dashed `---` dividers.
235
+ 3. The body comes second, nestled comfortably below the header.
236
+ 4. The header is composed of key-value attribute pairs in [YAML](http://www.yaml.org/) format.
237
+ 5. The file's extension signals that the body should be treated as ERB.
229
238
 
230
- ### Deploying to multiple targets with Capistrano
239
+ ### The Header
240
+
241
+ The header is composed of key-value attribute pairs in [YAML](http://www.yaml.org/) format. Utilizing the `page` local variable, attribute data is available within the content page's body and view template.
242
+
243
+ In the previous example, the message `Congratulations!` is substituted for `<%= page.title %>` whenever the content page is rendered.
244
+
245
+ ### The Body
246
+
247
+ The body of a content page supports many writer and designer friendly formats. The content page's file extension determines the body's format. Rendering a content page converts the body to HTML.
248
+
249
+ Mango supports the following body formats:
250
+
251
+ * [Markdown](http://daringfireball.net/projects/markdown/basics)
252
+ * [Haml](http://haml-lang.com/tutorial.html)
253
+ * [ERB](http://ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html)
254
+ * [Liquid](https://github.com/tobi/liquid/wiki)
255
+
256
+ ### The Data and Body Attributes
257
+
258
+ A handful of attributes are automatically inserted into every content page and **cannot** be altered in the header. Two such attributes are `data` and `body` which contain a content page's data and pre-rendered body respectively.
259
+
260
+ For example, given the following content page:
261
+
262
+ ---
263
+ title: Congratulations!
264
+ ---
265
+ <h1><%= page.title %></h1>
266
+
267
+ <h2>You did it!</h2>
268
+
269
+ Calling `<%= page.data %>` would yield:
231
270
 
232
- Coming soon. [Patches are welcomed](https://github.com/ryansobol/mango/issues#issue/5).
271
+ ---
272
+ title: Congratulations!
273
+ ---
274
+ <h1><%= page.title %></h1>
275
+
276
+ <h2>You did it!</h2>
277
+
278
+ and calling `<%= page.body %>` would yield:
279
+
280
+ <h1><%= page.title %></h1>
281
+
282
+ <h2>You did it!</h2>
283
+
284
+ ### The Content Attribute
285
+
286
+ The `content` attribute contains the rendered body of a content page. Like the `data` and `body` attributes, the `content` attribute is automatically inserted into every content page and **cannot** be altered in the header. The rendered body contained within the `content` attribute is **only** available inside a view template.
287
+
288
+ For example, given the following content page:
289
+
290
+ ---
291
+ title: Congratulations!
292
+ ---
293
+ <h1><%= page.title %></h1>
294
+
295
+ <h2>You did it!</h2>
296
+
297
+ Calling `<%= page.content %>` in a view template would yield:
298
+
299
+ <h1>Congratulations!</h1>
300
+
301
+ <h2>You did it!</h2>
302
+
303
+ THEMING
304
+ -------
305
+
306
+ Coming soon. [Patches are welcome](https://github.com/ryansobol/mango/issues#issue/3).
307
+
308
+ PUBLISHING
309
+ ----------
233
310
 
234
311
  ### Deploying to the cloud with Heroku
235
312
 
236
- Heroku (pronounced her-OH-koo) is a cloud platform for Ruby-powered web applications. Heroku lets app developers spend 100% of their time on their application code, not managing servers, deployment, ongoing operations, or scaling. And best of all, Mango applications can leverage this power with their *free* [Blossom tier](http://heroku.com/pricing).
313
+ Heroku (pronounced her-OH-koo) is a cloud platform for Ruby-powered web applications. Heroku lets app developers spend 100% of their time on their application code, not managing servers, deployment, ongoing operations, or scaling. And best of all, Mango websites can leverage this power with their free [Blossom tier](http://heroku.com/pricing).
237
314
 
238
- If you haven't done so already, prepare your Mango application with Git. Just initialize a new Git repository, add the project directory, and commit.
315
+ If you haven't done so already, prepare your Mango website with Git. Just initialize a new Git repository, add the project directory, and commit.
239
316
 
240
317
  $ cd /path/to/your/app
241
318
  $ git init
@@ -255,12 +332,25 @@ Finally, [deploy](http://docs.heroku.com/git) the heroku app. If you've followe
255
332
 
256
333
  $ git push heroku master
257
334
 
258
- Now, bask in the glory of your *live application* in the cloud.
335
+ Now, bask in the glory of your live website in the cloud.
259
336
 
260
337
  $ heroku open
261
338
 
262
339
  **TIP:** Like the entire the platform, the `heroku` command-line tool has [great documentation](http://docs.heroku.com/heroku-command).
263
340
 
341
+ ### Deploying to a single target with secure FTP uploads
342
+
343
+ Coming soon. [Patches are welcome](https://github.com/ryansobol/mango/issues#issue/4).
344
+
345
+ ### Deploying to multiple targets with Capistrano
346
+
347
+ Coming soon. [Patches are welcome](https://github.com/ryansobol/mango/issues#issue/5).
348
+
349
+ EXTENDING
350
+ ---------
351
+
352
+ Coming soon. [Patches are welcome](https://github.com/ryansobol/mango/issues#issue/73).
353
+
264
354
  PHILOSOPHY
265
355
  ----------
266
356
 
@@ -285,7 +375,7 @@ Is Mango not behaving like you expect it should? Please forgive me. Submit a r
285
375
 
286
376
  ### Submitting Patches
287
377
 
288
- Is Mango not behaving like you need? Patches are always welcomed and appreciated. [Report your issue](https://github.com/ryansobol/mango/issues) to make sure we're not duplicating any work and go to town. Alternatively, you can lend a hand on [existing issues](https://github.com/ryansobol/mango/issues).
378
+ Is Mango not behaving like you need? Patches are always welcome and appreciated. [Report your issue](https://github.com/ryansobol/mango/issues) to make sure we're not duplicating any work and go to town. Alternatively, you can lend a hand on [existing issues](https://github.com/ryansobol/mango/issues).
289
379
 
290
380
  Once you've been assigned an issue, the process for contributing your work back to the source is straight-forward.
291
381
 
@@ -8,7 +8,7 @@ module Mango
8
8
  # user-generated data into markup like HTML. It accomplishes this task by utilizing a variety of
9
9
  # content engines.
10
10
  #
11
- # A `ContentPage` file contains **a body** and possibly **a header**.
11
+ # A `ContentPage` file contains two optional components -- a body and a header.
12
12
  #
13
13
  # ### Example content file
14
14
  #
@@ -24,14 +24,14 @@ module Mango
24
24
  # until there is no Mango left.
25
25
  # Not even for Mango!
26
26
  #
27
- # Mangos aside, let's bring attention to a few important facets of this example and content files
28
- # in general.
27
+ # Mangos aside, the above example highlights the key facets of writing a content page.
29
28
  #
30
- # 1. A content page is stored as file on disk. Here, the file name is `mango_poem.markdown`.
31
- # 2. The header is defined first, embedded within triple-dashed ("---") dividers.
29
+ # 1. A content page is stored as a file in the `content` directory Here, the file name is
30
+ # `mango_poem.markdown`.
31
+ # 2. The header, if defined, comes first and is embedded within triple-dashed `---` dividers.
32
32
  # 3. The body comes second, nestled comfortably below the header.
33
33
  # 4. The header is composed of key-value attribute pairs in [YAML](http://www.yaml.org/) format.
34
- # 5. The file's extension signals that the body should treated as Markdown.
34
+ # 5. The file's extension signals that the body should be treated as Markdown.
35
35
  #
36
36
  # ### The Header
37
37
  #
@@ -45,14 +45,14 @@ module Mango
45
45
  #
46
46
  # ### The Body
47
47
  #
48
- # The body of a content file can be written in many human and designer friendly formats. It's the
49
- # content file's extension that determines the format, and therefore, the template engine used to
48
+ # The body of a content file supports many writer and designer friendly formats. The content
49
+ # file's extension determines the body's format, and therefore, the template engine used to
50
50
  # convert the body into markup like HTML. For a list of supported content page template engines,
51
51
  # and their formats, see `Mango::ContentPage::TEMPLATE_ENGINES`.
52
52
  #
53
53
  # Each `ContentPage` instance is passed into their body and view templates as the `page` local
54
- # variable. For example, this is how to access the raw data, unrendered body, and rendered
55
- # content of a content page inside an ERB template:
54
+ # variable. For example, this is how to access the complete data, pre-rendered body, and
55
+ # rendered content of a content page inside an ERB template:
56
56
  #
57
57
  # <p><%= page.data %></p>
58
58
  # <p><%= page.body %></p>
@@ -1,3 +1,3 @@
1
1
  # encoding: UTF-8
2
2
  source "http://rubygems.org"
3
- gem "mango", "~> 0.6.2"
3
+ gem "mango", "~> 0.6.3"
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mango
4
4
  # Current stable released version
5
- VERSION = "0.6.2"
5
+ VERSION = "0.6.3"
6
6
  end
@@ -81,7 +81,7 @@ run Mango::Application
81
81
  File.read(expected).should == <<-EOS
82
82
  # encoding: UTF-8
83
83
  source "http://rubygems.org"
84
- gem "mango", "~> 0.6.2"
84
+ gem "mango", "~> 0.6.3"
85
85
  EOS
86
86
  end
87
87
 
@@ -379,4 +379,4 @@ h2
379
379
  end
380
380
 
381
381
  end
382
- end
382
+ end
@@ -4,7 +4,7 @@ require "spec_helper"
4
4
  describe Mango do
5
5
  describe "version synchronizing" do
6
6
  before(:all) do
7
- @expected = "0.6.2"
7
+ @expected = "0.6.3"
8
8
  end
9
9
 
10
10
  it "is correct for Mango::VERSION" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 2
9
- version: 0.6.2
8
+ - 3
9
+ version: 0.6.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Sobol
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-06-06 00:00:00 -04:00
17
+ date: 2013-11-28 00:00:00 +08:00
18
18
  default_executable: mango
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -375,7 +375,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
375
375
  requirements: []
376
376
 
377
377
  rubyforge_project: mango
378
- rubygems_version: 1.3.7
378
+ rubygems_version: 1.3.7.1
379
379
  signing_key:
380
380
  specification_version: 3
381
381
  summary: Mango is a dynamic, database-free, and open source website framework.