my-padrino-sprockets 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 616adbdba63fc2b0559582943b1ab0d7fba2e3bd
4
- data.tar.gz: 9ba5f2aa8cd7d631f8cfe7bb15d9a30c529c1898
3
+ metadata.gz: f7b04a5374d52ae2fe90ac0b5b44ecd1c33f7ed9
4
+ data.tar.gz: b24faa36e539bc43bcc6e71e1b129bf6cc3734da
5
5
  SHA512:
6
- metadata.gz: 2af24233e896ba617f206a084f913d9d5a9170b79dbf8bd76fe64d762d2365646dc6026d8510976ac3da29446c031cb39d1e92f7bae7a6d9bcfbac430d150ca8
7
- data.tar.gz: 9e82c908612653359ec0fc2a0bfc762788358ccad57e6f9ae0d48c49f1b6e17592488bd9a430eb58c41f28bfc7e283b6e36887967e15bca181b8578c190a2587
6
+ metadata.gz: f15f6809bc68a11667958e53c0a018154254587612fe5ff03ad5c57ab923461ac32fe16919f2bf840d40568b4980898bf9af5014267beb0a97bf1d0c6f8bf9ad
7
+ data.tar.gz: 658ce8c7831f974470fc7017eda822c2c8696e4cbd9cc66d6f70df843b5acb3dad49c44fb207c2bac7fa9c8d367b7595493e2e0826f19ef32afe09abf7a28fea
@@ -1,5 +1,5 @@
1
1
  module Padrino
2
2
  module Sprockets
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ module Padrino
23
23
  # Change the folders to /assets/
24
24
  def asset_folder_name(kind)
25
25
  case kind
26
- when :css,:js,:images then 'assets'
26
+ when :css,:js then 'assets'
27
27
  else kind.to_s
28
28
  end
29
29
  end
@@ -63,10 +63,11 @@ module Padrino
63
63
  end
64
64
 
65
65
  def precompile(bundles)
66
- output_dir = Pathname("#{@output}/assets")
66
+ output_dir = Pathname(@output)
67
67
  bundles.each do |file|
68
68
  tmp = file.to_s.split('/')
69
- prefix, basename = tmp[0...-1].join("/"), tmp[-1]
69
+ kind = {"css"=>"stylesheets", "js"=>"javascripts"}[file.to_s.split(".").last]
70
+ prefix, basename = tmp[0...-1].unshift(kind || 'assets').join("/"), tmp[-1]
70
71
  path, dir = output_dir.join(prefix, basename), output_dir.join(prefix)
71
72
  FileUtils.mkpath(dir) unless Dir.exist?(dir)
72
73
  # clean up first
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my-padrino-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Night Sailer, Matthias Günther
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets