black_operation 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/black_operation/version.rb +1 -1
- data/lib/tasks/install.rb +1 -1
- data/lib/tasks/precompile.rb +23 -1
- 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: 4b6fc0115670f6b5c7f21db01f7e19e67afe35d4
|
4
|
+
data.tar.gz: f2d1221515d933cdc79f24b784ac0cf8471e61bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71d63cc394b187657303b4708d627d052eccdae01f3cf0b21bfea93feb68a4c506cd370cd526a3d476230580399bda3312e4245c7eceb6a74cb9f68e27fdc295
|
7
|
+
data.tar.gz: fb44b3558118cabbac49a71757da7d3e2ef8166707b0a4b150f28ebc5d0bee4b9c0df08b73e31f3a6eb95af42173b19532a21f363d02e93ed8cf6e20e150d744
|
data/lib/tasks/install.rb
CHANGED
data/lib/tasks/precompile.rb
CHANGED
@@ -22,8 +22,30 @@ namespace :black_operation do
|
|
22
22
|
f = File.new("./public/javascripts/#{folder}/#{script}","w+")
|
23
23
|
f.write(compiled_contents);
|
24
24
|
f.close
|
25
|
-
puts "Done!"
|
26
25
|
end
|
27
26
|
end
|
27
|
+
puts "Done!"
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "Fix JQuery-UI images in production assuming it's images are found in app/assets/images/images (ie changes all relative images/ paths to absolute /images/ path"
|
31
|
+
task :fix_jquery_ui do
|
32
|
+
#find the compiled css file (cover the .gz too)
|
33
|
+
prefix = Rails.configuration.assets.prefix
|
34
|
+
path = "public"+prefix+"/**/*"
|
35
|
+
Dir.glob(path) do |file|
|
36
|
+
if File.extname(file.to_s) == ".css" || File.extname(file.to_s.chomp(File.extname(file.to_s))) == ".css"
|
37
|
+
puts "Full File: #{file.to_s}"
|
38
|
+
file_handle = File.open("./"+file.to_s,"rb")
|
39
|
+
file_contents = file_handle.read
|
40
|
+
file_contents.gsub!(/images\//,"/images/")
|
41
|
+
#fix double forward-slash
|
42
|
+
file_contents.gsub!(/\/\/images\//,"/images/");
|
43
|
+
file_handle.close
|
44
|
+
file_handle = File.new(file.to_s,"wb")
|
45
|
+
file_handle.write(file_contents)
|
46
|
+
file_handle.close
|
47
|
+
end
|
48
|
+
end
|
49
|
+
puts "Done!"
|
28
50
|
end
|
29
51
|
end
|
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.
|
4
|
+
version: 0.2.1
|
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-06-
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|