select2-rails 3.4.9 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,7 @@ Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
95
95
  text-decoration: none;
96
96
 
97
97
  border: 0;
98
- background: image-url('select2.png') right top no-repeat;
98
+ background: url(<%= asset_path('select2.png') %>) right top no-repeat;
99
99
  cursor: pointer;
100
100
  outline: 0;
101
101
  }
@@ -199,7 +199,7 @@ Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
199
199
  display: block;
200
200
  width: 100%;
201
201
  height: 100%;
202
- background: image-url('select2.png') no-repeat 0 1px;
202
+ background: url(<%= asset_path('select2.png') %>) no-repeat 0 1px;
203
203
  }
204
204
 
205
205
  .select2-search {
@@ -233,11 +233,11 @@ Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
233
233
  -webkit-box-shadow: none;
234
234
  box-shadow: none;
235
235
 
236
- background: #fff image-url('select2.png') no-repeat 100% -22px;
237
- background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
238
- background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
239
- background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
240
- background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
236
+ background: #fff url(<%= asset_path('select2.png') %>) no-repeat 100% -22px;
237
+ background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
238
+ background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
239
+ background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
240
+ background: url(<%= asset_path('select2.png') %>) no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
241
241
  }
242
242
 
243
243
  .select2-drop.select2-drop-above .select2-search input {
@@ -245,11 +245,11 @@ Version: 3.4.3 Timestamp: Tue Sep 17 06:47:14 PDT 2013
245
245
  }
246
246
 
247
247
  .select2-search input.select2-active {
248
- background: #fff image-url('select2-spinner.gif') no-repeat 100%;
249
- background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
250
- background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
251
- background: image-url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
252
- background: image-url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
248
+ background: #fff url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%;
249
+ background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
250
+ background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
251
+ background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
252
+ background: url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
253
253
  }
254
254
 
255
255
  .select2-container-active .select2-choice,
@@ -393,7 +393,7 @@ disabled look for disabled choices in the results dropdown
393
393
  }
394
394
 
395
395
  .select2-more-results.select2-active {
396
- background: #f4f4f4 image-url('select2-spinner.gif') no-repeat 100%;
396
+ background: #f4f4f4 url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100%;
397
397
  }
398
398
 
399
399
  .select2-more-results {
@@ -481,7 +481,7 @@ disabled look for disabled choices in the results dropdown
481
481
  }
482
482
 
483
483
  .select2-container-multi .select2-choices .select2-search-field input.select2-active {
484
- background: #fff image-url('select2-spinner.gif') no-repeat 100% !important;
484
+ background: #fff url(<%= asset_path('select2-spinner.gif') %>) no-repeat 100% !important;
485
485
  }
486
486
 
487
487
  .select2-default {
@@ -535,7 +535,7 @@ disabled look for disabled choices in the results dropdown
535
535
 
536
536
  font-size: 1px;
537
537
  outline: none;
538
- background: image-url('select2.png') right top no-repeat;
538
+ background: url(<%= asset_path('select2.png') %>) right top no-repeat;
539
539
  }
540
540
 
541
541
  .select2-container-multi .select2-search-choice-close {
@@ -605,7 +605,7 @@ disabled look for disabled choices in the results dropdown
605
605
 
606
606
  @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
607
607
  .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice .select2-arrow b {
608
- background-image: image-url('select2x2.png') !important;
608
+ background-image: url(<%= asset_path('select2x2.png') %>) !important;
609
609
  background-repeat: no-repeat !important;
610
610
  background-size: 60px 40px !important;
611
611
  }
data/lib/select2-rails.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "select2-rails/version"
2
- require 'sass-rails'
3
2
 
4
3
  module Select2
5
4
  module Rails
@@ -21,15 +21,12 @@ class SourceFile < Thor
21
21
  end
22
22
  end
23
23
 
24
- desc "convert css to scss file", "convert css to scss file"
24
+ desc "convert css to css.erb file", "make css preprocess with erb"
25
25
  def convert
26
26
  self.destination_root = "app/assets"
27
27
  inside destination_root do
28
- run("cp stylesheets/select2.css stylesheets/select2.css.scss")
29
- gsub_file 'stylesheets/select2.css.scss', '(select2-spinner.gif)', "('select2-spinner.gif')"
30
- gsub_file 'stylesheets/select2.css.scss', '(select2.png)', "('select2.png')"
31
- gsub_file 'stylesheets/select2.css.scss', '(select2x2.png)', "('select2x2.png')"
32
- gsub_file 'stylesheets/select2.css.scss', ' url', ' image-url'
28
+ run("cp stylesheets/select2.css stylesheets/select2.css.erb")
29
+ gsub_file 'stylesheets/select2.css.erb', %r/url\(([^\)]*)\)/, 'url(<%= asset_path(\1) %>)'
33
30
  end
34
31
  end
35
32
 
@@ -1,5 +1,5 @@
1
1
  module Select2
2
2
  module Rails
3
- VERSION = "3.4.9"
3
+ VERSION = "3.5.0"
4
4
  end
5
5
  end
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.require_paths = ["lib"]
17
17
 
18
18
  s.add_dependency "thor", "~> 0.14"
19
- s.add_runtime_dependency "sass-rails"
20
19
  s.add_development_dependency "bundler", "~> 1.0"
21
20
  s.add_development_dependency "rails", ">= 3.0"
22
21
  s.add_development_dependency "httpclient", "~> 2.2"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: select2-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.9
4
+ version: 3.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-19 00:00:00.000000000 Z
13
+ date: 2013-09-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -28,22 +28,6 @@ dependencies:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
30
  version: '0.14'
31
- - !ruby/object:Gem::Dependency
32
- name: sass-rails
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: '0'
39
- type: :runtime
40
- prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
31
  - !ruby/object:Gem::Dependency
48
32
  name: bundler
49
33
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +135,7 @@ files:
151
135
  - app/assets/javascripts/select2_locale_vi.js
152
136
  - app/assets/javascripts/select2_locale_zh-CN.js
153
137
  - app/assets/javascripts/select2_locale_zh-TW.js
154
- - app/assets/stylesheets/select2.css.scss
138
+ - app/assets/stylesheets/select2.css.erb
155
139
  - lib/select2-rails.rb
156
140
  - lib/select2-rails/engine.rb
157
141
  - lib/select2-rails/source_file.rb