chosen-rails 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81ace370a178f7d64611c6febfbb6bc0c459d408
4
- data.tar.gz: cd61fe46a06ae303bf76d59a2530982b72b6bc6e
3
+ metadata.gz: 53ab8c7f957d30317d0e6081b2c1e2e7fd67846a
4
+ data.tar.gz: dc31f364d75238af5225017fb87bf85d91273930
5
5
  SHA512:
6
- metadata.gz: cd2b6f65bad6ce96f8a6851fad4ad77c8e62f843b3bb7b6b9381efcd39c736d282ab2ad10091d3a681cc390274368b2576bbd54bd6cca2696c39989e853dc009
7
- data.tar.gz: 933f23d297202248eff2159ba16d80cc8a1c370f6ae805bc2e6fb3685cc7e43c3a371b548cc2497ee34e69b2a087209fecfc3adfc3ee9cb01c6e408a52675037
6
+ metadata.gz: 6dee8a53fa50bba34f37ff6888aa8680854d826e1c63623fdf7d2d2d7becab356460d35912194ac5f4db9377b9d65dc1eb56a01a715b36223b93cbb85e6be418
7
+ data.tar.gz: f950fbcf9c474463b712defbd0c28319bc24634631f5cd4612b414d53e6b4371a14347366d21d5dc8f523869154cfaf9457f4be6e5aa2181b0f334ce038ea5a6
data/README.md CHANGED
@@ -19,6 +19,8 @@ Then run `bundle install`
19
19
 
20
20
  You need to add `compass-rails` manually since it is not a dependency from version 1.5.1.
21
21
 
22
+ Please consider [jquery-turbolinks](https://github.com/kossnocorp/jquery.turbolinks) if you have turbolinks issues for Rails 4 +.
23
+
22
24
  ### Include chosen javascript assets
23
25
 
24
26
  Add to your `app/assets/javascripts/application.js` if use with jQuery
data/Rakefile CHANGED
@@ -10,5 +10,6 @@ task 'update-chosen', 'repository_url', 'branch' do |task, args|
10
10
  files.fetch remote, branch
11
11
  files.eject_javascript_class_from_closure
12
12
  files.remove_compass_lines
13
+ files.add_depend_on_asset
13
14
  files.cleanup
14
15
  end
@@ -6,12 +6,10 @@ module Chosen
6
6
  end
7
7
 
8
8
  case ::Rails.version.to_s
9
- when /^4/
9
+ when /^(4|5)/
10
10
  require 'chosen-rails/engine'
11
11
  when /^3\.[12]/
12
12
  require 'chosen-rails/engine3'
13
13
  when /^3\.[0]/
14
14
  require 'chosen-rails/railtie'
15
15
  end
16
-
17
- require 'compass-rails'
@@ -36,7 +36,17 @@ class SourceFile < Thor
36
36
  self.destination_root = 'vendor/assets'
37
37
  gsub_file 'stylesheets/chosen-base.scss', /^\s*\@include.*\n/, ''
38
38
  gsub_file 'stylesheets/chosen-base.scss', /^\@import.*\n/, ''
39
- gsub_file 'stylesheets/chosen-base.scss', /\n(\$chosen-sprite:)/, '\1'
39
+ # gsub_file 'stylesheets/chosen-base.scss', /\n(\$chosen-sprite:)/, '\1'
40
+ end
41
+
42
+ desc 'add depend_on_asset', 'add depend_on_asset'
43
+ def add_depend_on_asset
44
+ self.destination_root = 'vendor/assets'
45
+ scss = <<-SCSS.gsub(/^\s{6}/, '')
46
+ //= depend_on_asset "chosen-sprite.png"
47
+ //= depend_on_asset "chosen-sprite@2x.png"
48
+ SCSS
49
+ prepend_to_file 'stylesheets/chosen-base.scss', scss
40
50
  end
41
51
 
42
52
  desc 'clean up useless files', 'clean up useless files'
@@ -1,6 +1,6 @@
1
1
  module Chosen
2
2
  module Rails
3
- VERSION = '1.5.1'
3
+ VERSION = '1.5.2'
4
4
  CHOSEN_VERSION = '1.5.1'
5
5
  end
6
6
  end
@@ -1,3 +1,6 @@
1
+ //= depend_on_asset "chosen-sprite.png"
2
+ //= depend_on_asset "chosen-sprite@2x.png"
3
+
1
4
  $chosen-sprite: image-url('chosen-sprite.png') !default;
2
5
  $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
3
6
 
@@ -4,6 +4,9 @@
4
4
  @import "compass/css3/images";
5
5
  @import "compass/css3/user-interface";
6
6
 
7
+ //= depend_on_asset "chosen-sprite.png"
8
+ //= depend_on_asset "chosen-sprite@2x.png"
9
+
7
10
  $chosen-sprite: image-url('chosen-sprite.png') !default;
8
11
  $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
9
12
 
@@ -1,5 +1,8 @@
1
1
  @import "chosen-base";
2
2
 
3
+ //= depend_on_asset "chosen-sprite.png"
4
+ //= depend_on_asset "chosen-sprite@2x.png"
5
+
3
6
  $chosen-sprite: image-url('chosen-sprite.png') !default;
4
7
  $chosen-sprite-retina: image-url('chosen-sprite@2x.png') !default;
5
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chosen-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tse-Ching Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties