snails 0.0.1 → 0.0.2
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/lib/snails.rb +4 -3
- data/snails.gemspec +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 286f1509b89a45e70f1c4523c6947b875e7f11b6
         | 
| 4 | 
            +
              data.tar.gz: 238f0d6ec150397fe246f9233a8bd473d2cc1efa
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f5d7d89233a44f8f6695e16330c762e5c326c07e1d4cad52c8f7f53a3901d36f6b0bbd7295197c21c60338d4f1c8270473af1fecd03a4429ad8cc35f146a68df
         | 
| 7 | 
            +
              data.tar.gz: 377774fce2d1803f5bb100c800fd310625b3ce8183cc49fee07953676eda44bd89ffb1a1e8406b83473500dcbc644ab4111ff78f677de7c109c40d20eb2bdb2e
         | 
    
        data/lib/snails.rb
    CHANGED
    
    | @@ -173,10 +173,11 @@ module Snails | |
| 173 173 | 
             
                  cwd = Pathname.new(Dir.pwd)
         | 
| 174 174 | 
             
                  app.set :sprockets, Sprockets::Environment.new(cwd)
         | 
| 175 175 | 
             
                  app.set :assets_prefix, '/assets' # URL
         | 
| 176 | 
            -
                  app.set :digest_assets, false
         | 
| 176 | 
            +
                  # app.set :digest_assets, false
         | 
| 177 177 | 
             
                  app.set :assets_public_path, -> { cwd.join('public', 'assets') } # output dir
         | 
| 178 178 | 
             
                  app.set :assets_paths, %w(assets) # source files
         | 
| 179 179 | 
             
                  app.set :assets_precompile, %w(js/main.js css/main.css)
         | 
| 180 | 
            +
                  app.set :remove_digests, false
         | 
| 180 181 |  | 
| 181 182 | 
             
                  app.configure do
         | 
| 182 183 | 
             
                    app.assets_paths.each do |path|
         | 
| @@ -238,11 +239,11 @@ module Snails | |
| 238 239 | 
             
                    manifest    = ::Sprockets::Manifest.new(environment.index, app.assets_public_path)
         | 
| 239 240 | 
             
                    manifest.compile(app.assets_precompile)
         | 
| 240 241 |  | 
| 241 | 
            -
                     | 
| 242 | 
            +
                    if app.remove_digests?
         | 
| 242 243 | 
             
                      # files = Dir[app.assets_public_path.to_s + '/*/*']
         | 
| 243 244 | 
             
                      files = `find #{app.assets_public_path}`.split("\n").select { |f| f[/\.(js|css)/] }
         | 
| 244 245 | 
             
                      remove_digests(files)
         | 
| 245 | 
            -
                     | 
| 246 | 
            +
                    end
         | 
| 246 247 | 
             
                  end
         | 
| 247 248 |  | 
| 248 249 | 
             
                  private
         | 
    
        data/snails.gemspec
    CHANGED