jquery-minicolors-rails 2.1.4.0 → 2.2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +18 -16
- data/app/inputs/minicolors_input.rb +2 -0
- data/lib/jquery-minicolors-rails/version.rb +1 -1
- data/lib/jquery-minicolors-rails.rb +0 -23
- data/vendor/assets/javascripts/jquery.minicolors.js +1108 -842
- data/vendor/assets/javascripts/jquery.minicolors.simple_form.js +1 -1
- data/vendor/assets/stylesheets/jquery.minicolors.css +319 -0
- metadata +27 -35
- data/vendor/assets/images/jquery.minicolors.grid +0 -1
- data/vendor/assets/images/jquery.minicolors.grid.png +0 -0
- data/vendor/assets/images/jquery.minicolors.png +0 -0
- data/vendor/assets/images/jquery.minicolors.slider +0 -1
- data/vendor/assets/images/jquery.minicolors.slider.png +0 -0
- data/vendor/assets/images/jquery.minicolors.swatch +0 -1
- data/vendor/assets/images/jquery.minicolors.swatch.png +0 -0
- data/vendor/assets/stylesheets/jquery.minicolors.css.erb +0 -293
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YjA2NDU1ZjkxODA2MmI1YjQ0NjZlYTgxYjM4MzY3NDczMGQ3Y2E3MQ==
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2c450478ebe0642c8b1fcb91a37390d2e1cd35f3af460819160c37afde0f4f5c
|
4
|
+
data.tar.gz: c610702e688b8ce49fe620cc0044ec97c7fe09a5c6a815dca2bab40d17f0a0d8
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
YjNiYTljNTM1ZGZlMWU2YjAzNTdkNjY2ZDg0NmI5OThhYjczZTIzMmM5MjFk
|
11
|
-
ZWQ5YjdiMDJmNTZmMWQyMjgzYzBkMzRmOTg1YTZhYWJjNTg3MDQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
YzQyNGFjNjNmYzgwOTdjYjdmOTFhODkxMTA2OTgxN2MyNTExNzBiODAxOGI5
|
14
|
-
ZDkxNjkwODBjNTg0MTQ3NzRmZDVmZGI4ZDI2OGFiZmZmYmE1ZDQzOTJiMzBj
|
15
|
-
ZGYyNGExNzAxY2NlYzNmYWQ1MjlkMTI3NTUwYTRjNTA1ZjMzOGU=
|
6
|
+
metadata.gz: 9ef32c8f7f4d5d9d852a9bf0665650ab6cd913df7edd0dd48d7a111825a350cf515a7ce21756c2142fa8404430a9f0fd667cb2c11788e61969d1ab4ac8a8eb31
|
7
|
+
data.tar.gz: 8f7b6e5f35955aaa8baa382f7e588d9ca27cd3a81d8b38debb52ca7a9d853598b29790d784fbd8672788917de72f2a09aac6386938ebd5c05df93487b2ddce56
|
data/README.md
CHANGED
@@ -73,26 +73,28 @@ See https://github.com/plataformatec/simple_form
|
|
73
73
|
<% end %>
|
74
74
|
```
|
75
75
|
|
76
|
-
##
|
76
|
+
## Testing
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
This results in a slightly bigger compiled CSS (~50k bigger), but avoids unnecessary image request to the server and headache on deployment.
|
81
|
-
You can still instruct `JqueryMinicolorsRails` to use the original image instead of the data URLs:
|
82
|
-
|
83
|
-
```ruby
|
84
|
-
# config/initializers/jquery_minicolors_rails.rb
|
85
|
-
JqueryMinicolorsRails.use_data_urls = false
|
78
|
+
```bash
|
79
|
+
bundle exec rspec
|
86
80
|
```
|
87
81
|
|
88
|
-
|
82
|
+
Since this gem uses a lot of different frameworks, anything is possible. So despite the specs are
|
83
|
+
"green", please verify manually:
|
89
84
|
|
90
|
-
```
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
85
|
+
```bash
|
86
|
+
cd test_app
|
87
|
+
bundle
|
88
|
+
rails s
|
89
|
+
open http://localhost:3000/ # Assert everything looks & works good.
|
90
|
+
```
|
91
|
+
|
92
|
+
```bash
|
93
|
+
rm -rf tmp/cache
|
94
|
+
rm -rf public/assets
|
95
|
+
RAILS_ENV=production bundle exec rake assets:precompile
|
96
|
+
rails s -eproduction
|
97
|
+
open http://localhost:3000/ # Assert everything looks & works good.
|
96
98
|
```
|
97
99
|
|
98
100
|
## Versioning
|
@@ -1,27 +1,4 @@
|
|
1
1
|
require 'jquery-minicolors-rails/engine'
|
2
2
|
|
3
3
|
module JqueryMinicolorsRails
|
4
|
-
class << self
|
5
|
-
attr_writer :use_data_urls
|
6
|
-
|
7
|
-
def use_data_urls?
|
8
|
-
defined?(@use_data_urls) ? !!@use_data_urls : true
|
9
|
-
end
|
10
|
-
|
11
|
-
def image_data_url(name)
|
12
|
-
image_data_url_cache.fetch(name) do
|
13
|
-
image_data_url_cache[:name] = load_image_data_url(name)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
def image_data_url_cache
|
20
|
-
@image_data_url_cache ||= {}
|
21
|
-
end
|
22
|
-
|
23
|
-
def load_image_data_url(name)
|
24
|
-
File.read(File.expand_path("../../vendor/assets/images/jquery.minicolors.#{name}", __FILE__))
|
25
|
-
end
|
26
|
-
end
|
27
4
|
end
|