rails2_asset_pipeline 0.1.14 → 0.1.15

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails2_asset_pipeline (0.1.14)
4
+ rails2_asset_pipeline (0.1.15)
5
5
  sprockets
6
6
 
7
7
  GEM
@@ -1,3 +1,3 @@
1
1
  module Rails2AssetPipeline
2
- VERSION = '0.1.14'
2
+ VERSION = '0.1.15'
3
3
  end
@@ -42,7 +42,8 @@ module Rails2AssetPipeline
42
42
  end
43
43
 
44
44
  def self.warn_user_about_misconfiguration!
45
- return unless Rails2AssetPipeline.static? and not File.exist?(manifest)
45
+ return unless Rails2AssetPipeline.static?
46
+ return if @manifest_exists ||= File.exist?(manifest)
46
47
 
47
48
  config = "config.ru.example"
48
49
  if File.exist?(config) and File.read(config).include?("Rails2AssetPipeline.config_ru")
@@ -101,9 +101,20 @@ describe Rails2AssetPipeline::ViewHelpers do
101
101
  end
102
102
 
103
103
  it "fails" do
104
- expect{
105
- asset_path("yyy.js")
106
- }.to raise_error
104
+ expect{ asset_path("yyy.js") }.to raise_error
105
+ end
106
+
107
+ it "does not recheck the file all the time on success" do
108
+ write manifest, "{}"
109
+ asset_path("yyy.js")
110
+ run "rm #{manifest}"
111
+ asset_path("yyy.js")
112
+ end
113
+
114
+ it "does recheck the file all the time on failure" do
115
+ expect{ asset_path("yyy.js") }.to raise_error /No dynamic assets available/
116
+ write manifest, "Foo"
117
+ expect{ asset_path("yyy.js") }.to raise_error /unexpected token at 'Foo'/ # unhelpful but fast
107
118
  end
108
119
 
109
120
  it "tells me to copy config.ru.example if it is helpful" do
data/spec/spec_helper.rb CHANGED
@@ -8,6 +8,7 @@ RSpec.configure do |config|
8
8
  Rails2AssetPipeline.dynamic_assets_available = false
9
9
  Rails.env = "development"
10
10
  Rails2AssetPipeline::ViewHelpers.ignored_folders = nil
11
+ Rails2AssetPipeline.class_eval{ @manifest_exists = nil }
11
12
  end
12
13
  end
13
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails2_asset_pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -67,7 +67,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
67
67
  version: '0'
68
68
  segments:
69
69
  - 0
70
- hash: -4347355398873400034
70
+ hash: -87837174722734127
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  segments:
78
78
  - 0
79
- hash: -4347355398873400034
79
+ hash: -87837174722734127
80
80
  requirements: []
81
81
  rubyforge_project:
82
82
  rubygems_version: 1.8.24