rail 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +5 -2
 - data/README.md +67 -16
 - data/lib/rail/pipeline.rb +1 -4
 - data/lib/rail/version.rb +1 -1
 - data/rail.gemspec +6 -2
 - metadata +6 -5
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 02eb6dbfd8c85d56bbcfd4fd1d720f91fca3927b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 4b4f5ff91ad233c8cde3c0701d93bb0e8bcc49d5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 62666f4b30c517c22b77375450319a0443562311c51da8915c7d5dad1d9c214b7ab9b1e2395d60ac51d90bf37e99e59676236d5613459e174a7d9307f373bc39
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a562c2cb986d81259b69e8fb5fba49d988073d18ece6ff879680c949000f588884203a4bce374c1d087532114a60281bb5a54c603888b26b37bc3dd67c1c2e07
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,9 +1,12 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            ##  
     | 
| 
      
 1 
     | 
    
         
            +
            ## Rail 0.0.3 (June 24, 2014)
         
     | 
| 
      
 2 
     | 
    
         
            +
            * Set proper response headers when pipelining assets.
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            ## Rail 0.0.2 (June 21, 2014)
         
     | 
| 
       2 
5 
     | 
    
         
             
            * The first actual release. A happy union of
         
     | 
| 
       3 
6 
     | 
    
         
             
              [CoffeeScript](http://coffeescript.org/),
         
     | 
| 
       4 
7 
     | 
    
         
             
              [Haml](http://haml.info/),
         
     | 
| 
       5 
8 
     | 
    
         
             
              [Sass](http://sass-lang.com/), and
         
     | 
| 
       6 
9 
     | 
    
         
             
              [Uglifier](https://github.com/lautis/uglifier).
         
     | 
| 
       7 
10 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            ##  
     | 
| 
      
 11 
     | 
    
         
            +
            ## Rail 0.0.1 (June 20, 2014)
         
     | 
| 
       9 
12 
     | 
    
         
             
            * Less is more. A dummy release.
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -13,7 +13,7 @@ First of all, include the gem in your `Gemfile`. Here is an example: 
     | 
|
| 
       13 
13 
     | 
    
         
             
            ```ruby
         
     | 
| 
       14 
14 
     | 
    
         
             
            source 'https://rubygems.org'
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
            gem 'rail', '~> 0.0. 
     | 
| 
      
 16 
     | 
    
         
            +
            gem 'rail', '~> 0.0.3'
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
            # The rest is optional
         
     | 
| 
       19 
19 
     | 
    
         
             
            gem 'redcarpet', '~> 3.1.2' # your favorit complement to Haml
         
     | 
| 
         @@ -25,7 +25,18 @@ Then run [Bundler](http://bundler.io/): 
     | 
|
| 
       25 
25 
     | 
    
         
             
            $ bundle
         
     | 
| 
       26 
26 
     | 
    
         
             
            ```
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
       28 
     | 
    
         
            -
            Now we need to create  
     | 
| 
      
 28 
     | 
    
         
            +
            Now we need to create three files: `config/application.rb`, `config.ru`, and
         
     | 
| 
      
 29 
     | 
    
         
            +
            `Rakefile`. In `config/application.rb`:
         
     | 
| 
      
 30 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 31 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 32 
     | 
    
         
            +
            Bundler.require(:default)
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            module MyProject
         
     | 
| 
      
 35 
     | 
    
         
            +
              class Application < Rail::Application
         
     | 
| 
      
 36 
     | 
    
         
            +
              end
         
     | 
| 
      
 37 
     | 
    
         
            +
            end
         
     | 
| 
      
 38 
     | 
    
         
            +
            ```
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
       29 
40 
     | 
    
         
             
            In `config.ru`:
         
     | 
| 
       30 
41 
     | 
    
         
             
            ```ruby
         
     | 
| 
       31 
42 
     | 
    
         
             
            require_relative 'config/application'
         
     | 
| 
         @@ -33,31 +44,71 @@ require_relative 'config/application' 
     | 
|
| 
       33 
44 
     | 
    
         
             
            run MyProject::Application.new
         
     | 
| 
       34 
45 
     | 
    
         
             
            ```
         
     | 
| 
       35 
46 
     | 
    
         | 
| 
       36 
     | 
    
         
            -
            In ` 
     | 
| 
      
 47 
     | 
    
         
            +
            In `Rakefile`:
         
     | 
| 
       37 
48 
     | 
    
         
             
            ```ruby
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            Bundler.require(:default)
         
     | 
| 
      
 49 
     | 
    
         
            +
            require_relative 'config/application'
         
     | 
| 
       40 
50 
     | 
    
         | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
              class Application < Rail::Application
         
     | 
| 
       43 
     | 
    
         
            -
              end
         
     | 
| 
       44 
     | 
    
         
            -
            end
         
     | 
| 
      
 51 
     | 
    
         
            +
            MyProject::Application.load_tasks
         
     | 
| 
       45 
52 
     | 
    
         
             
            ```
         
     | 
| 
       46 
53 
     | 
    
         | 
| 
       47 
54 
     | 
    
         
             
            Feel free to replace `MyProject` with the name of your project. That’s it.
         
     | 
| 
       48 
55 
     | 
    
         | 
| 
       49 
56 
     | 
    
         
             
            ## Usage
         
     | 
| 
       50 
     | 
    
         
            -
            Rail closely follows Rails. If you know Rails, you already know  
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
            *  
     | 
| 
       55 
     | 
    
         
            -
            *  
     | 
| 
      
 57 
     | 
    
         
            +
            Rail closely follows Rails. If you know Rails, you already know Rail.
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            ### Structure
         
     | 
| 
      
 60 
     | 
    
         
            +
            Organize your code according to the following convention:
         
     | 
| 
      
 61 
     | 
    
         
            +
            * `app/assets/javascripts` for scripts,
         
     | 
| 
      
 62 
     | 
    
         
            +
            * `app/assets/stylesheets` for styles,
         
     | 
| 
      
 63 
     | 
    
         
            +
            * `app/views` for templates,
         
     | 
| 
      
 64 
     | 
    
         
            +
            * `app/helpers` for helper modules, and
         
     | 
| 
      
 65 
     | 
    
         
            +
            * `public` for other static content.
         
     | 
| 
       56 
66 
     | 
    
         | 
| 
       57 
67 
     | 
    
         
             
            In addition, `app/views/layouts/application.html.haml` will be used for
         
     | 
| 
       58 
68 
     | 
    
         
             
            rendering the root of your application (both `/` and `/index.html`).
         
     | 
| 
       59 
69 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
      
 70 
     | 
    
         
            +
            ### Configuration
         
     | 
| 
      
 71 
     | 
    
         
            +
            As with Rails, Rail is configured inside `config/application.rb`:
         
     | 
| 
      
 72 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 73 
     | 
    
         
            +
            module MyProject
         
     | 
| 
      
 74 
     | 
    
         
            +
              class Application < Rail::Application
         
     | 
| 
      
 75 
     | 
    
         
            +
                # Import assets from other gems:
         
     | 
| 
      
 76 
     | 
    
         
            +
                config.gems << 'turbolinks'
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
                # Precompile assets using `rake assets`:
         
     | 
| 
      
 79 
     | 
    
         
            +
                config.precompile << 'application.css'
         
     | 
| 
      
 80 
     | 
    
         
            +
                config.precompile << 'application.js'
         
     | 
| 
      
 81 
     | 
    
         
            +
                config.precompile << 'index.html'
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                # Compress assets:
         
     | 
| 
      
 84 
     | 
    
         
            +
                config.compress = true
         
     | 
| 
      
 85 
     | 
    
         
            +
              end
         
     | 
| 
      
 86 
     | 
    
         
            +
            end
         
     | 
| 
      
 87 
     | 
    
         
            +
            ```
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
            If `config.compress` is not specified, it is implicitly set to
         
     | 
| 
      
 90 
     | 
    
         
            +
            `ENV['RAIL_ENV'] == 'production'`.
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            ### Commands
         
     | 
| 
      
 93 
     | 
    
         
            +
            Run [Rake](https://github.com/jimweirich/rake) to see the available tasks:
         
     | 
| 
      
 94 
     | 
    
         
            +
            ```bash
         
     | 
| 
      
 95 
     | 
    
         
            +
            $ rake -T
         
     | 
| 
      
 96 
     | 
    
         
            +
            rake assets  # Precompile assets
         
     | 
| 
      
 97 
     | 
    
         
            +
            rake server  # Start server
         
     | 
| 
      
 98 
     | 
    
         
            +
            ```
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            `rake server` starts up a Web server; if none is specified in `Gemfile`,
         
     | 
| 
      
 101 
     | 
    
         
            +
            [WEBrick](http://ruby-doc.org/stdlib-2.1.2/libdoc/webrick/rdoc/WEBrick.html)
         
     | 
| 
      
 102 
     | 
    
         
            +
            will be fired up.
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
            `rake assets` compiles your assets and stores them in `public`. You should
         
     | 
| 
      
 105 
     | 
    
         
            +
            explicitly tell Rail what to compile as it was shown in the previous section.
         
     | 
| 
      
 106 
     | 
    
         
            +
            Note that the server will try to serve from `public` first, so make sure you
         
     | 
| 
      
 107 
     | 
    
         
            +
            delete the precompiled files when you change your code in `app`.
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
            ### Examples
         
     | 
| 
      
 110 
     | 
    
         
            +
            Additional usage examples can be found
         
     | 
| 
      
 111 
     | 
    
         
            +
            [here](https://github.com/IvanUkhov/type-works),
         
     | 
| 
       61 
112 
     | 
    
         
             
            [here](https://github.com/IvanUkhov/photography), and
         
     | 
| 
       62 
113 
     | 
    
         
             
            [here](https://github.com/IvanUkhov/liu-profile).
         
     | 
| 
       63 
114 
     | 
    
         | 
    
        data/lib/rail/pipeline.rb
    CHANGED
    
    
    
        data/lib/rail/version.rb
    CHANGED
    
    
    
        data/rail.gemspec
    CHANGED
    
    | 
         @@ -8,8 +8,10 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       8 
8 
     | 
    
         
             
              spec.version       = Rail::VERSION
         
     | 
| 
       9 
9 
     | 
    
         
             
              spec.authors       = [ 'Ivan Ukhov' ]
         
     | 
| 
       10 
10 
     | 
    
         
             
              spec.email         = [ 'ivan.ukhov@gmail.com' ]
         
     | 
| 
       11 
     | 
    
         
            -
              spec.summary       = 'A light framework for front-end development'
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
      
 11 
     | 
    
         
            +
              spec.summary       = 'A light framework for front-end development ' \
         
     | 
| 
      
 12 
     | 
    
         
            +
                                   'inspired by Rails'
         
     | 
| 
      
 13 
     | 
    
         
            +
              spec.description   = 'A light framework for front-end development ' \
         
     | 
| 
      
 14 
     | 
    
         
            +
                                   'closely following the conventions of Ruby on Rails.'
         
     | 
| 
       13 
15 
     | 
    
         
             
              spec.homepage      = 'https://github.com/IvanUkhov/rail'
         
     | 
| 
       14 
16 
     | 
    
         
             
              spec.license       = 'MIT'
         
     | 
| 
       15 
17 
     | 
    
         | 
| 
         @@ -18,6 +20,8 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       18 
20 
     | 
    
         
             
              spec.test_files    = spec.files.grep(%r{^spec/})
         
     | 
| 
       19 
21 
     | 
    
         
             
              spec.require_paths = [ 'lib' ]
         
     | 
| 
       20 
22 
     | 
    
         | 
| 
      
 23 
     | 
    
         
            +
              spec.required_ruby_version = '>= 1.9.3'
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
       21 
25 
     | 
    
         
             
              spec.add_dependency 'rake'
         
     | 
| 
       22 
26 
     | 
    
         | 
| 
       23 
27 
     | 
    
         
             
              spec.add_dependency 'sprockets', '~> 2.12'
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: rail
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ivan Ukhov
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-06- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-06-24 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rake
         
     | 
| 
         @@ -108,7 +108,8 @@ dependencies: 
     | 
|
| 
       108 
108 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       109 
109 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       110 
110 
     | 
    
         
             
                    version: '1.6'
         
     | 
| 
       111 
     | 
    
         
            -
            description: A light framework for front-end development
         
     | 
| 
      
 111 
     | 
    
         
            +
            description: A light framework for front-end development closely following the conventions
         
     | 
| 
      
 112 
     | 
    
         
            +
              of Ruby on Rails.
         
     | 
| 
       112 
113 
     | 
    
         
             
            email:
         
     | 
| 
       113 
114 
     | 
    
         
             
            - ivan.ukhov@gmail.com
         
     | 
| 
       114 
115 
     | 
    
         
             
            executables: []
         
     | 
| 
         @@ -155,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       155 
156 
     | 
    
         
             
              requirements:
         
     | 
| 
       156 
157 
     | 
    
         
             
              - - ">="
         
     | 
| 
       157 
158 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       158 
     | 
    
         
            -
                  version:  
     | 
| 
      
 159 
     | 
    
         
            +
                  version: 1.9.3
         
     | 
| 
       159 
160 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       160 
161 
     | 
    
         
             
              requirements:
         
     | 
| 
       161 
162 
     | 
    
         
             
              - - ">="
         
     | 
| 
         @@ -166,7 +167,7 @@ rubyforge_project: 
     | 
|
| 
       166 
167 
     | 
    
         
             
            rubygems_version: 2.2.2
         
     | 
| 
       167 
168 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       168 
169 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       169 
     | 
    
         
            -
            summary: A light framework for front-end development
         
     | 
| 
      
 170 
     | 
    
         
            +
            summary: A light framework for front-end development inspired by Rails
         
     | 
| 
       170 
171 
     | 
    
         
             
            test_files:
         
     | 
| 
       171 
172 
     | 
    
         
             
            - spec/coffee_spec.rb
         
     | 
| 
       172 
173 
     | 
    
         
             
            - spec/haml_spec.rb
         
     |