actionpack 3.2.8 → 3.2.9.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of actionpack might be problematic. Click here for more details.

@@ -147,7 +147,9 @@ module Sprockets
147
147
  if source[0] == ?/
148
148
  source
149
149
  else
150
- source = digest_for(source) unless options[:digest] == false
150
+ if digest_assets && options[:digest] != false
151
+ source = digest_for(source)
152
+ end
151
153
  source = File.join(dir, source)
152
154
  source = "/#{source}" unless source =~ /^\//
153
155
  source
@@ -15,13 +15,11 @@ module Sprockets
15
15
 
16
16
  def compile
17
17
  manifest = {}
18
- env.each_logical_path do |logical_path|
19
- if File.basename(logical_path)[/[^\.]+/, 0] == 'index'
20
- logical_path.sub!(/\/index\./, '.')
21
- end
22
- next unless compile_path?(logical_path)
18
+ env.each_logical_path(paths) do |logical_path|
23
19
  if asset = env.find_asset(logical_path)
24
- manifest[logical_path] = write_asset(asset)
20
+ digest_path = write_asset(asset)
21
+ manifest[asset.logical_path] = digest_path
22
+ manifest[aliased_path_for(asset.logical_path)] = digest_path
25
23
  end
26
24
  end
27
25
  write_manifest(manifest) if @manifest
@@ -43,22 +41,16 @@ module Sprockets
43
41
  end
44
42
  end
45
43
 
46
- def compile_path?(logical_path)
47
- paths.each do |path|
48
- case path
49
- when Regexp
50
- return true if path.match(logical_path)
51
- when Proc
52
- return true if path.call(logical_path)
53
- else
54
- return true if File.fnmatch(path.to_s, logical_path)
55
- end
56
- end
57
- false
58
- end
59
-
60
44
  def path_for(asset)
61
45
  @digest ? asset.digest_path : asset.logical_path
62
46
  end
47
+
48
+ def aliased_path_for(logical_path)
49
+ if File.basename(logical_path).start_with?('index')
50
+ logical_path.sub(/\/index([^\/]+)$/, '\1')
51
+ else
52
+ logical_path.sub(/\.([^\/]+)$/, '/index.\1')
53
+ end
54
+ end
63
55
  end
64
56
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.8
5
- prerelease:
4
+ version: 3.2.9.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Heinemeier Hansson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-09 00:00:00.000000000 Z
12
+ date: 2012-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.8
21
+ version: 3.2.9.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 3.2.8
29
+ version: 3.2.9.rc1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: activemodel
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 3.2.8
37
+ version: 3.2.9.rc1
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 3.2.8
45
+ version: 3.2.9.rc1
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rack-cache
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -130,7 +130,7 @@ dependencies:
130
130
  requirements:
131
131
  - - ~>
132
132
  - !ruby/object:Gem::Version
133
- version: 2.1.3
133
+ version: '2.2'
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ dependencies:
138
138
  requirements:
139
139
  - - ~>
140
140
  - !ruby/object:Gem::Version
141
- version: 2.1.3
141
+ version: '2.2'
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: erubis
144
144
  requirement: !ruby/object:Gem::Requirement
@@ -384,12 +384,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
384
384
  required_rubygems_version: !ruby/object:Gem::Requirement
385
385
  none: false
386
386
  requirements:
387
- - - ! '>='
387
+ - - ! '>'
388
388
  - !ruby/object:Gem::Version
389
- version: '0'
390
- segments:
391
- - 0
392
- hash: 4400436490322718554
389
+ version: 1.3.1
393
390
  requirements:
394
391
  - none
395
392
  rubyforge_project: