carrierwave-picture 0.1.0 → 0.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98e71f0be4ced345296e247099d14591026aa6e1eff3399115d6cc03d261686f
4
- data.tar.gz: cc4db588cae4ba8e28fad273739ce396d0282952d7cf738faef1f4606a4cec28
3
+ metadata.gz: 592b6f4fc1639d3636d45d361ab998f1605394a1ae66babd4e0817e3af6cff06
4
+ data.tar.gz: c6e1bb1f4e0e44fad92930a25de0f34a2ab876fd705c2e4f1548b1f73f8da489
5
5
  SHA512:
6
- metadata.gz: f91a31e20da2a0c234928b3f37e02c6bc64d0c779bc41450821db24201c5a3ce34e1b8fcf559b45a094a8bc5b59c338341e7ab551720566aae34434970bfdaaa
7
- data.tar.gz: 1e37881210c3d454f27e9dff9dd4e6298514ab784be17bb1671e20cd90d59107cf04b9fd1a8654ff82e2a61e9ea1b5fed7e0a5f38bd0ed0b38c55f6ca4a156ba
6
+ metadata.gz: 78a94da435f4aaea0dc4688710efc182f2b50cb79e042f644a905ea31e2b2174a4e83d9b672b6c6c65e80bc954203fcb297dc8aeb3e29b00580021989e374849
7
+ data.tar.gz: 5aa3058482647c18728d500b8300dcc4e77f8ceab1789cbaa08382afb8f69f5f08e844600ba8cbbcf5f0cbc14583df3149c46562c5297dde64b5ed29e72c7ca6
data/README.md CHANGED
@@ -1,24 +1,18 @@
1
1
  # Carrierwave::Picture
2
2
 
3
- Simple gem for converting images to webp and progressive jpeg via imagemagic and add picture_tag to action view.
3
+ Simple gem for converting images to webp and jp2 via imagemagic and add picture_tag to action view.
4
4
 
5
5
  ## Installation
6
6
 
7
- Check that you have installed imagemagick:
8
-
9
- $ convert -version
10
-
11
- If not, type in your OSX console:
7
+ Install dependencies OSX:
12
8
 
13
9
  $ brew install imagemagick
10
+ $ brew install webp
14
11
 
15
12
  Or in your Debian, Ubuntu console:
16
13
 
17
- apt-get -y install imagemagick
18
-
19
- Or in your CentOS, Fedora console:
20
-
21
- yum -y install ImageMagick
14
+ sudo apt-get install imagemagick
15
+ sudo apt-get install webp
22
16
 
23
17
  After ImageMagic installed add this line to your application's Gemfile:
24
18
 
@@ -1,6 +1,6 @@
1
1
  module PictureConverter
2
2
  def self.convert(current_path)
3
3
  system "convert -interlace Plane -quality 80 #{current_path} #{current_path}.webp" unless File.extname(current_path) == "webp"
4
- system "convert -interlace Plane -quality 80 #{current_path} #{current_path}.jpg" unless File.extname(current_path) == "jpg"
4
+ system "convert -interlace Plane -quality 80 #{current_path} #{current_path}.jp2" unless File.extname(current_path) == "jp2"
5
5
  end
6
6
  end
@@ -9,9 +9,9 @@ module PictureHelper
9
9
  style: "height: inherit; width: inherit" if File.exist?(Rails.root.join("public/#{path}.webp"))
10
10
  concat content_tag :source,
11
11
  nil,
12
- srcset: "#{path}.jpg",
13
- type: "image/jpeg",
14
- style: "height: inherit; width: inherit" if File.exist?(Rails.root.join("public/#{path}.jpg"))
12
+ srcset: "#{path}.jp2",
13
+ type: "image/jp2",
14
+ style: "height: inherit; width: inherit" if File.exist?(Rails.root.join("public/#{path}.jp2"))
15
15
  concat image_tag path, style: "height: inherit; width: inherit"
16
16
  end
17
17
 
@@ -1,5 +1,5 @@
1
1
  module Carrierwave
2
2
  module Picture
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-picture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Pavlov