black_operation 0.2.2 → 0.2.3
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/black_operation/version.rb +1 -1
- data/lib/tasks/precompile.rb +16 -11
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0117de24f433f0e343e6ca5c9cd82ee1fb9fde28
|
|
4
|
+
data.tar.gz: f09186ace61946d6e35b8d35bd8c7dbb93a96a12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c4ea99e3d941fa26abb2fc6da8a673167d31cfaaa56041a2293fa95037fe376b4e32d73e25fbdf0e53eafbe74c48784a4ecc37c54dc4671fdf41be1701b55e1
|
|
7
|
+
data.tar.gz: 2ea8a8badc506a1177b0811278f139dd8ab1010d96aa12b7f297bff6fac15455cdc1fe86902f68142db8baa556251bbeb92b2c83a1a25fdf54818eeeaa53e716
|
data/lib/tasks/precompile.rb
CHANGED
|
@@ -33,17 +33,22 @@ namespace :black_operation do
|
|
|
33
33
|
prefix = Rails.configuration.assets.prefix
|
|
34
34
|
path = "public"+prefix+"/**/*"
|
|
35
35
|
Dir.glob(path) do |file|
|
|
36
|
-
if File.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
if File.readable?(file.to_s) && File.writable?(file.to_s)
|
|
37
|
+
if File.extname(file.to_s) == ".css" || File.extname(file.to_s.chomp(File.extname(file.to_s))) == ".css"
|
|
38
|
+
puts "Full File: #{file.to_s}"
|
|
39
|
+
file_handle = File.open("./"+file.to_s,"rb")
|
|
40
|
+
file_contents = file_handle.read
|
|
41
|
+
file_contents.gsub!(/images\//,"/images/")
|
|
42
|
+
#fix double forward-slash
|
|
43
|
+
file_contents.gsub!(/\/\/images\//,"/images/");
|
|
44
|
+
file_handle.close
|
|
45
|
+
file_handle = File.new(file.to_s,"wb")
|
|
46
|
+
file_handle.write(file_contents)
|
|
47
|
+
file_handle.close
|
|
48
|
+
end
|
|
49
|
+
else
|
|
50
|
+
puts "File: #{file.to_s}"
|
|
51
|
+
puts "Skipping...file not readable or writable.\n"
|
|
47
52
|
end
|
|
48
53
|
end
|
|
49
54
|
#Move the images over
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: black_operation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Travis Pessetto
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|