extjs-theme 0.1.1 → 0.1.2
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/lib/extjs-theme/command.rb +1 -1
- data/lib/extjs-theme/dependencies.rb +7 -5
- data/lib/extjs-theme/generator.rb +0 -18
- metadata +1 -1
data/lib/extjs-theme/command.rb
CHANGED
@@ -39,7 +39,7 @@ module ExtJS::Theme
|
|
39
39
|
raise InvalidConfig.new("Could not locate ext_dir #{config[:ext_dir]}.\nAre you in your application root?")
|
40
40
|
end
|
41
41
|
unless config && File.exists?(config[:theme_dir])
|
42
|
-
raise
|
42
|
+
raise InvalidConfig.new("Could not locate theme_dir #{config[:theme_dir]}.\nAre you in your application root?")
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -1,16 +1,18 @@
|
|
1
1
|
begin
|
2
2
|
gem 'haml-edge', '>= 2.3.0'
|
3
3
|
$stderr.puts "Loading haml-edge gem."
|
4
|
-
|
4
|
+
rescue LoadError
|
5
|
+
#pass
|
6
|
+
end
|
7
|
+
|
8
|
+
begin
|
5
9
|
gem 'rmagick'
|
6
10
|
$stderr.puts "Loading rmagick gem."
|
7
11
|
|
8
|
-
rescue
|
12
|
+
rescue LoadError
|
9
13
|
#pass
|
10
14
|
end
|
11
15
|
|
12
16
|
require 'sass'
|
13
|
-
require '
|
14
|
-
|
15
|
-
|
17
|
+
require 'RMagick'
|
16
18
|
|
@@ -43,24 +43,6 @@ module ExtJS
|
|
43
43
|
FileUtils.cp_r("#{ext_dir}/resources/images/default", "#{theme_path}/images")
|
44
44
|
end
|
45
45
|
|
46
|
-
##
|
47
|
-
# performs hsv transformation on Ext theme images and save to Sass theme dir.
|
48
|
-
# @param {String} name Theme name
|
49
|
-
# @param {String} ext_dir path to Ext directory relative to public/javascripts
|
50
|
-
# @param {Float} hue
|
51
|
-
# @param {Float} saturation
|
52
|
-
# @param {Float} lightneess
|
53
|
-
#
|
54
|
-
def self.hsv_transform(name, ext_dir, theme_dir, hue=1.0, saturation=1.0, lightness=1.0)
|
55
|
-
theme_path = "#{theme_dir}/#{name}"
|
56
|
-
|
57
|
-
each_image(ext_path) {|img|
|
58
|
-
write_image(img.modulate(lightness, saturation, hue), theme_path(name))
|
59
|
-
}
|
60
|
-
# update hue in defines.sass
|
61
|
-
defines = File.read("#{theme_path}/defines.sass")
|
62
|
-
File.open("#{theme_path}/defines.sass", "w+") {|f| f << defines.gsub(/hue\s?=.*/, "hue = #{(hue-1)*180}") }
|
63
|
-
end
|
64
46
|
|
65
47
|
private
|
66
48
|
|