README.md in rail-0.0.8 vs README.md in rail-0.1.0

- old
+ new

@@ -1,50 +1,49 @@ -# Rail [![Gem Version](https://badge.fury.io/rb/rail.svg)](http://badge.fury.io/rb/rail) [![Dependency Status](https://gemnasium.com/IvanUkhov/rail.svg)](https://gemnasium.com/IvanUkhov/rail) [![Build Status](https://travis-ci.org/IvanUkhov/rail.svg?branch=master)](https://travis-ci.org/IvanUkhov/rail) +# Rail [![Version][version-img]][version-url] [![Dependency Status][depend-img]][depend-url] [![Build Status][build-img]][build-url] -A light framework for front-end development inspired by -[Rails](http://rubyonrails.org/). The sole purpose of Rail is to compile -assets, and it includes the following components: +A light framework for front-end development inspired by [Rails][rails]. The sole +purpose of Rail is to compile assets, and it includes the following components: -* [CoffeeScript](http://coffeescript.org/) for JavaScript, -* [Haml](http://haml.info/) for HTML, and -* [Sass](http://sass-lang.com/) for CSS. +* [CoffeeScript][coffeescript] for JavaScript, +* [Haml][haml] for HTML, and +* [Sass][sass] for CSS. ## Installation ### Straightforward Install the gem: ```bash -$ gem install rail +gem install rail ``` Create a new project: ```bash -$ rail new my_project +rail new my_project ``` -Run [Bundler](http://bundler.io/): +Run [Bundler][bundler]: ```bash -$ cd ./my_project -$ bundle +cd ./my_project +bundle ``` Run the server: ```bash -$ rake server +rake server ``` Open `http://localhost:3000` in your browser, see “My Project,” and enjoy. Under the hood, the `rail new my_project` command creates a new folder in the current directory called `my_project` and initializes a basic Rail project -inside that folder. In this case, `MyProject` is used as the class name of -the project. Feel free to replace `my_project` with the name of your project. +inside that folder. In this case, `MyProject` is used as the class name of the +project. Feel free to replace `my_project` with the name of your project. ### Manual Create a `Gemfile`: @@ -52,18 +51,18 @@ source 'https://rubygems.org' gem 'rail' ``` -Run [Bundler](http://bundler.io/): +Run [Bundler][bundler]: ```bash -$ bundle +bundle ``` -Create three files: `config/application.rb`, `config.ru`, and `Rakefile`. -In `config/application.rb`: +Create three files: `config/application.rb`, `config.ru`, and `Rakefile`. In +`config/application.rb`: ```ruby require 'bundler' Bundler.require(:default) @@ -104,16 +103,16 @@ * `app/views` for templates, * `app/helpers` for helper modules, and * `public` for other static content. The templates in `app/views/layouts` have a special purpose. First, -`application.html.haml` is used for rendering the root of your application -(both `/` and `/index.html`). Second, any template in `layouts` is used as -a layout for the templates in the subfolder of `views` that has the same name -as the layout. For example, `articles/what-is-the-meaning-of-life.html.haml` -will be rendered in the context of `layouts/articles.html.haml` provided -that the latter has a placeholder for the former via the `yield` keyword. +`application.html.haml` is used for rendering the root of your application (both +`/` and `/index.html`). Second, any template in `layouts` is used as a layout +for the templates in the subfolder of `views` that has the same name as the +layout. For example, `articles/what-is-the-meaning-of-life.html.haml` will be +rendered in the context of `layouts/articles.html.haml` provided that the latter +has a placeholder for the former via the `yield` keyword. ### Configuration As with Rails, Rail is configured inside `config/application.rb`: @@ -132,43 +131,53 @@ config.compress = true end end ``` -If `config.compress` is not specified, it is implicitly set to -`ENV['RAIL_ENV'] == 'production'`. +If `config.compress` is not specified, it is implicitly set to `ENV['RAIL_ENV'] +== 'production'`. ### Commands -Run [Rake](https://github.com/jimweirich/rake) to see the available tasks: +Run [Rake][rake] to see the available tasks: ```bash -$ rake -T +rake -T rake assets # Precompile assets rake server # Start server ``` `rake server` starts up a Web server; if none is specified in `Gemfile`, -[WEBrick](http://ruby-doc.org/stdlib-2.1.2/libdoc/webrick/rdoc/WEBrick.html) -will be fired up. +[WEBrick][webrick] will be fired up. `rake assets` compiles your assets and stores them in `public`. You should explicitly tell Rail what to compile as it was shown in the previous section. Note that the server will try to serve from `public` first, so make sure you delete the precompiled files when you change your code in `app`. ### Examples Additional usage examples can be found -[here](https://github.com/IvanUkhov/opentype-works), +[here](https://github.com/IvanUkhov/opentype), [here](https://github.com/IvanUkhov/photography), and -[here](https://github.com/IvanUkhov/liu-profile). +[here](https://github.com/IvanUkhov/research). -## Contributing +## Contribution -1. [Fork](https://help.github.com/articles/fork-a-repo) the project. -2. Create a branch for your feature (`git checkout -b awesome-feature`). -3. Implement your feature (`vim`). -4. Commit your changes (`git commit -am 'Implemented an awesome feature'`). -5. Push to the branch (`git push origin awesome-feature`). -6. [Create](https://help.github.com/articles/creating-a-pull-request) - a new Pull Request. +1. Fork the project. +2. Implement your idea. +3. Open a pull request. + +[build-img]: https://travis-ci.org/IvanUkhov/rail.svg?branch=master +[build-url]: https://travis-ci.org/IvanUkhov/rail +[depend-img]: https://gemnasium.com/IvanUkhov/rail.svg +[depend-url]: https://gemnasium.com/IvanUkhov/rail +[version-img]: https://badge.fury.io/rb/rail.svg +[version-url]: https://badge.fury.io/rb/rail + +[bundler]: http://bundler.io +[coffeescript]: http://coffeescript.org +[haml]: http://haml.info +[rails]: http://rubyonrails.org +[rake]: https://github.com/ruby/rake +[sass]: http://sass-lang.com +[webrick]: http://ruby-doc.org/stdlib-2.1.2/libdoc/webrick/rdoc/WEBrick.html