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.
@@ -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 InvalidConig.new("Could not locate theme_dir #{config[:theme_dir]}.\nAre you in your application root?")
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 Exception
12
+ rescue LoadError
9
13
  #pass
10
14
  end
11
15
 
12
16
  require 'sass'
13
- require 'rmagick'
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extjs-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Scott