classy_assets 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 402eeab6d0e3be6d72373ace2b0ff08917ce6e86
4
- data.tar.gz: fee275b0661ec4cea396e4dda52ce3fcba03ddb4
3
+ metadata.gz: 55b4167e9611dfaacd69733306f940c682bd653e
4
+ data.tar.gz: 15f98735560bd291bfa45f0ed1bbe233b2f61899
5
5
  SHA512:
6
- metadata.gz: 27ae5211d321c8a04fed56bfd7312507969496a451a012d328f794ada6b33fee97d96106029772ebe4eb4a68f4bdea6a1a7722b0b2a3fd6901c347eff014496a
7
- data.tar.gz: 507872447fd978ec3b76fd3158ba980e253e2febf393a0b007fcbb38aeadb280c16f8b79f71bbfbfe7150047fc23f4221c8fcd6e797a1f97fb86bf13901c8623
6
+ metadata.gz: f3c94124064d2c8dae0bd58c9845bbd95639b792b852e5c15d0cce0a8471a71ed3208ed9311b2b894a094c6bac991c84dfe62459b9badb6bb747ad57eeed2b2a
7
+ data.tar.gz: 3a4595dbdf2f740f4d6a14172c8a9f0c33c62e56a50e35e16b7fbb54aacf9ef720599342b8434b14f24eb48901e2636c49edf3e29c09dd3171d17f7c7e7523d1
@@ -1,3 +1,3 @@
1
1
  module ClassyAssets
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/classy_assets.rb CHANGED
@@ -88,7 +88,7 @@ module ClassyAssets
88
88
 
89
89
  def self.sprockets
90
90
  @sprockets ||= Sprockets::Environment.new(root_path)
91
- asset_paths.each { |asset_path| @sprockets.append_path asset_path }
91
+ asset_paths.each { |asset_path| @sprockets.append_path asset_path unless @sprockets.paths.include? asset_path }
92
92
  @sprockets
93
93
  end
94
94
  end
@@ -5,8 +5,11 @@ require 'classy_assets'
5
5
 
6
6
  describe ClassyAssets::Configuration do
7
7
  subject { ClassyAssets::Configuration }
8
+
8
9
  it "returns an array of asset directories" do
9
- subject.asset_dirs.must_equal %w(fonts images javascripts stylesheets)
10
+ paths = %w(fonts images javascripts stylesheets)
11
+ paths.map! { |dir_name| File.join(ClassyAssets::Configuration.root_path, ClassyAssets::Configuration.asset_prefix, dir_name) }
12
+ subject.asset_paths.must_equal paths
10
13
  end
11
14
 
12
15
  it "returns the asset digest setting" do
@@ -34,11 +37,11 @@ describe ClassyAssets::Configuration do
34
37
  end
35
38
 
36
39
  it "returns the path to the public folder" do
37
- subject.public_path.must_equal './public'
40
+ subject.public_path.must_equal File.expand_path('../support/public', __FILE__)
38
41
  end
39
42
 
40
43
  it "returns the path to the root folder" do
41
- subject.root_path.must_equal '.'
44
+ subject.root_path.must_equal File.expand_path('../support', __FILE__)
42
45
  end
43
46
 
44
47
  it "returns the sprockets environment" do
@@ -46,10 +49,7 @@ describe ClassyAssets::Configuration do
46
49
  end
47
50
 
48
51
  it "returns the correct asset paths" do
49
- paths = subject.asset_dirs.map do |dir|
50
- File.join(subject.root_path, subject.asset_prefix, dir)
51
- end
52
- subject.sprockets.paths.must_equal paths
52
+ subject.sprockets.paths.must_equal subject.asset_paths
53
53
  end
54
54
 
55
55
  describe "configure" do
@@ -72,8 +72,8 @@ describe ClassyAssets::Configuration do
72
72
  end
73
73
  end
74
74
 
75
- after do
76
- ClassyAssets::Configuration.root_path = nil
77
- ClassyAssets::Configuration.public_path = nil
78
- end
75
+ #after do
76
+ #ClassyAssets::Configuration.root_path = nil
77
+ #ClassyAssets::Configuration.public_path = nil
78
+ #end
79
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classy_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - StyleSeek Engineering