chosen-rails 0.9.5 → 0.9.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,46 +1,8 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
- require "thor"
3
+ require File.expand_path('../lib/chosen-rails/source_file', __FILE__)
4
4
 
5
- class SourceFile < Thor
6
- include Thor::Actions
7
-
8
- desc "fetch source files", "fetch source files from GitHub"
9
- def fetch
10
- self.destination_root = "vendor/assets"
11
- remote = "https://github.com/harvesthq/chosen"
12
- get "#{remote}/raw/master/chosen/chosen-sprite.png", "images/chosen-sprite.png"
13
- get "#{remote}/raw/master/chosen/chosen.css", "stylesheets/chosen.css"
14
- get "#{remote}/raw/master/coffee/lib/abstract-chosen.coffee", "javascripts/lib/abstract-chosen.coffee"
15
- get "#{remote}/raw/master/coffee/lib/select-parser.coffee", "javascripts/lib/select-parser.coffee"
16
- get "#{remote}/raw/master/coffee/chosen.jquery.coffee", "javascripts/chosen.jquery.coffee"
17
- get "#{remote}/raw/master/coffee/chosen.proto.coffee", "javascripts/chosen.proto.coffee"
18
- get "#{remote}/raw/master/VERSION", "VERSION"
19
- inside destination_root do
20
- version = File.read("VERSION").sub("\n", "")
21
- gsub_file "../../lib/chosen-rails/version.rb", /VERSION\s=\s"(\d|\.)+"$/ do |match|
22
- %Q{VERSION = "#{version}"}
23
- end
24
- end
25
- end
26
-
27
- desc "convert css to sass file", "convert css to sass file by sass-convert"
28
- def convert
29
- self.destination_root = "vendor/assets"
30
- inside destination_root do
31
- run("sass-convert -F css -T sass stylesheets/chosen.css stylesheets/chosen.css.sass")
32
- end
33
- end
34
-
35
- desc "clean up useless files", "clean up useless files"
36
- def cleanup
37
- self.destination_root = "vendor/assets"
38
- remove_file "stylesheets/chosen.css"
39
- remove_file "VERSION"
40
- end
41
- end
42
-
43
- desc "Update Harvest's Chosen Library"
5
+ desc "Update with Harvest's Chosen Library"
44
6
  task "update-chosen" do
45
7
  files = SourceFile.new
46
8
  files.fetch
data/chosen-rails.gemspec CHANGED
@@ -19,4 +19,5 @@ Gem::Specification.new do |gem|
19
19
  gem.add_dependency "thor", "~> 0.14"
20
20
  gem.add_development_dependency "bundler", "~> 1.0"
21
21
  gem.add_development_dependency "rails", "~> 3.0"
22
+ gem.add_development_dependency "sass", "~> 3.1"
22
23
  end
@@ -0,0 +1,41 @@
1
+ require "thor"
2
+
3
+ class SourceFile < Thor
4
+ include Thor::Actions
5
+
6
+ desc "fetch source files", "fetch source files from GitHub"
7
+ def fetch
8
+ self.destination_root = "vendor/assets"
9
+ remote = "https://github.com/harvesthq/chosen"
10
+ get "#{remote}/raw/master/chosen/chosen-sprite.png", "images/chosen-sprite.png"
11
+ get "#{remote}/raw/master/chosen/chosen.css", "stylesheets/chosen.css"
12
+ get "#{remote}/raw/master/coffee/lib/abstract-chosen.coffee", "javascripts/lib/abstract-chosen.coffee"
13
+ get "#{remote}/raw/master/coffee/lib/select-parser.coffee", "javascripts/lib/select-parser.coffee"
14
+ get "#{remote}/raw/master/coffee/chosen.jquery.coffee", "javascripts/chosen.jquery.coffee"
15
+ get "#{remote}/raw/master/coffee/chosen.proto.coffee", "javascripts/chosen.proto.coffee"
16
+ get "#{remote}/raw/master/VERSION", "VERSION"
17
+ inside destination_root do
18
+ version = File.read("VERSION").sub("\n", "")
19
+ gsub_file "../../lib/chosen-rails/version.rb", /VERSION\s=\s"(\d|\.)+"$/ do |match|
20
+ %Q{VERSION = "#{version}"}
21
+ end
22
+ end
23
+ end
24
+
25
+ desc "convert css to sass file", "convert css to sass file by sass-convert"
26
+ def convert
27
+ self.destination_root = "vendor/assets"
28
+ inside destination_root do
29
+ run("sass-convert -F css -T sass stylesheets/chosen.css stylesheets/chosen.css.sass")
30
+ gsub_file 'stylesheets/chosen.css.sass', '(chosen-sprite.png)', "('chosen-sprite.png')"
31
+ gsub_file 'stylesheets/chosen.css.sass', ' url', ' image-url'
32
+ end
33
+ end
34
+
35
+ desc "clean up useless files", "clean up useless files"
36
+ def cleanup
37
+ self.destination_root = "vendor/assets"
38
+ remove_file "stylesheets/chosen.css"
39
+ remove_file "VERSION"
40
+ end
41
+ end
@@ -1,5 +1,6 @@
1
1
  module Chosen
2
2
  module Rails
3
- VERSION = "0.9.5"
3
+ VERSION = "0.9.5.1"
4
+ EDITOR_VERSION = "0.9.5"
4
5
  end
5
6
  end
@@ -65,7 +65,7 @@
65
65
  width: 12px
66
66
  height: 13px
67
67
  font-size: 1px
68
- background: url(chosen-sprite.png) right top no-repeat
68
+ background: image-url('chosen-sprite.png') right top no-repeat
69
69
  &:hover
70
70
  background-position: right -11px
71
71
  div
@@ -91,7 +91,7 @@
91
91
  height: 100%
92
92
  width: 18px
93
93
  b
94
- background: url('chosen-sprite.png') no-repeat 0 1px
94
+ background: image-url('chosen-sprite.png') no-repeat 0 1px
95
95
  display: block
96
96
  width: 100%
97
97
  height: 100%
@@ -102,13 +102,13 @@
102
102
  white-space: nowrap
103
103
  z-index: 1010
104
104
  input
105
- background: white url('chosen-sprite.png') no-repeat 100% -22px
106
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
107
- background: url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
108
- background: url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
109
- background: url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
110
- background: url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
111
- background: url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, white 85%, #eeeeee 99%)
105
+ background: white image-url('chosen-sprite.png') no-repeat 100% -22px
106
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
107
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
108
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
109
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
110
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
111
+ background: image-url('chosen-sprite.png') no-repeat 100% -22px, linear-gradient(top, white 85%, #eeeeee 99%)
112
112
  margin: 1px 0
113
113
  padding: 4px 20px 4px 5px
114
114
  outline: 0
@@ -201,7 +201,7 @@
201
201
  width: 12px
202
202
  height: 13px
203
203
  font-size: 1px
204
- background: url(chosen-sprite.png) right top no-repeat
204
+ background: image-url('chosen-sprite.png') right top no-repeat
205
205
  &:hover
206
206
  background-position: right -11px
207
207
  .search-choice-focus .search-choice-close
@@ -328,6 +328,9 @@
328
328
  -webkit-border-radius: 4px 0 0 4px
329
329
  -moz-border-radius: 4px 0 0 4px
330
330
  border-radius: 4px 0 0 4px
331
+ abbr
332
+ left: 26px
333
+ right: auto
331
334
  .chzn-choices
332
335
  li
333
336
  float: right
@@ -349,13 +352,13 @@
349
352
  &.chzn-container-active .chzn-single-with-drop div
350
353
  border-right: none
351
354
  .chzn-search input
352
- background: url('chosen-sprite.png') no-repeat -38px -22px, white
353
- background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
354
- background: url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
355
- background: url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
356
- background: url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
357
- background: url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
358
- background: url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, white 85%, #eeeeee 99%)
355
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, white
356
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee))
357
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%)
358
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%)
359
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%)
360
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, -ms-linear-gradient(top, white 85%, #eeeeee 99%)
361
+ background: image-url('chosen-sprite.png') no-repeat -38px -22px, linear-gradient(top, white 85%, #eeeeee 99%)
359
362
  padding: 4px 5px 4px 20px
360
363
 
361
364
  /* @end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chosen-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
9
  - 5
10
- version: 0.9.5
10
+ - 1
11
+ version: 0.9.5.1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Tse-Ching Ho
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-11-28 00:00:00 +08:00
19
+ date: 2011-12-22 00:00:00 +08:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -78,6 +79,21 @@ dependencies:
78
79
  version: "3.0"
79
80
  type: :development
80
81
  version_requirements: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ name: sass
84
+ prerelease: false
85
+ requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ hash: 5
91
+ segments:
92
+ - 3
93
+ - 1
94
+ version: "3.1"
95
+ type: :development
96
+ version_requirements: *id005
81
97
  description: Chosen is a javascript library of select box enhancer for jQuery and Protoype. This gem integrates Chosen with Rails asset pipeline for easy of use.
82
98
  email:
83
99
  - tsechingho@gmail.com
@@ -97,6 +113,7 @@ files:
97
113
  - lib/chosen-rails.rb
98
114
  - lib/chosen-rails/engine.rb
99
115
  - lib/chosen-rails/railtie.rb
116
+ - lib/chosen-rails/source_file.rb
100
117
  - lib/chosen-rails/version.rb
101
118
  - vendor/assets/images/chosen-sprite.png
102
119
  - vendor/assets/javascripts/chosen-jquery.js