carrierwave-jpegtran 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1328d2bf6f86303a00bbb8cbe20e05d60755db51
4
+ data.tar.gz: f02dbf38b144440924c470f9f7e09c40185bf9cd
5
+ SHA512:
6
+ metadata.gz: 4f00594c1952e7df2e0c687b6773625d990d7cc7a638c89f66a654c87a4ee3438453aa5dc72e1ec5f495e6a2d6bc7079259c7199e5a7bbcbae66bceec01e11ce
7
+ data.tar.gz: 22d94945e37a3f8f1a61382305a5b0a3b115dece7c4570efb088d78af8189339ec905107baed23ebaf6d48ec22abefd6f524642ea857949f35aece839ebdcf45
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.ruby-*
3
+ /.yardoc
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --format doc --color --backtrace
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ carrierwave-jpegtran (0.1.0)
5
+ carrierwave (~> 0.8)
6
+ jpegtran-ruby (~> 0.3.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (4.2.5.1)
12
+ activesupport (= 4.2.5.1)
13
+ builder (~> 3.1)
14
+ activesupport (4.2.5.1)
15
+ i18n (~> 0.7)
16
+ json (~> 1.7, >= 1.7.7)
17
+ minitest (~> 5.1)
18
+ thread_safe (~> 0.3, >= 0.3.4)
19
+ tzinfo (~> 1.1)
20
+ builder (3.2.2)
21
+ carrierwave (0.10.0)
22
+ activemodel (>= 3.2.0)
23
+ activesupport (>= 3.2.0)
24
+ json (>= 1.7)
25
+ mime-types (>= 1.16)
26
+ coderay (1.1.0)
27
+ diff-lcs (1.2.5)
28
+ i18n (0.7.0)
29
+ jpegtran-ruby (0.3.1)
30
+ json (1.8.3)
31
+ method_source (0.8.2)
32
+ mime-types (3.0)
33
+ mime-types-data (~> 3.2015)
34
+ mime-types-data (3.2015.1120)
35
+ minitest (5.8.4)
36
+ pry (0.10.3)
37
+ coderay (~> 1.1.0)
38
+ method_source (~> 0.8.1)
39
+ slop (~> 3.4)
40
+ rake (10.5.0)
41
+ rspec (3.4.0)
42
+ rspec-core (~> 3.4.0)
43
+ rspec-expectations (~> 3.4.0)
44
+ rspec-mocks (~> 3.4.0)
45
+ rspec-core (3.4.3)
46
+ rspec-support (~> 3.4.0)
47
+ rspec-expectations (3.4.0)
48
+ diff-lcs (>= 1.2.0, < 2.0)
49
+ rspec-support (~> 3.4.0)
50
+ rspec-mocks (3.4.1)
51
+ diff-lcs (>= 1.2.0, < 2.0)
52
+ rspec-support (~> 3.4.0)
53
+ rspec-support (3.4.1)
54
+ slop (3.6.0)
55
+ thread_safe (0.3.5)
56
+ tzinfo (1.2.2)
57
+ thread_safe (~> 0.1)
58
+
59
+ PLATFORMS
60
+ ruby
61
+
62
+ DEPENDENCIES
63
+ bundler (~> 1.11)
64
+ carrierwave-jpegtran!
65
+ pry
66
+ rake (~> 10.0)
67
+ rspec (~> 3.0)
68
+
69
+ BUNDLED WITH
70
+ 1.11.2
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 DM
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,52 @@
1
+ ## CarrierWave Jpegtran optimizer
2
+
3
+ This gem allows you to optimize your JPEG uploads with [jpegtran](http://linux.die.net/man/1/jpegtran) using the [jpegtran-ruby](https://github.com/dimko/jpegtran-ruby) gem.
4
+
5
+ [![travis](https://travis-ci.org/dimko/carrierwave-jpegtran.svg)](https://travis-ci.org/dimko/carrierwave-jpegtran)
6
+
7
+ ### Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'carrierwave-jpegtran'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install carrierwave-jpegtran
22
+
23
+ ### Usage
24
+
25
+ To add JPEG optimization to your CarrierWave uploader, you need to include the module and apply the optimization:
26
+
27
+ ```ruby
28
+ class ImageUploader < CarrierWave::Uploader::Base
29
+ include CarrierWave::Jpegtran
30
+
31
+ process :optimize # apply to all versions
32
+
33
+ # or
34
+
35
+ version :thumbnail do
36
+ process optimize: { copy: :none } # to a single image version with the option `-copy none`
37
+ end
38
+ end
39
+ ```
40
+
41
+ ### Development
42
+
43
+ After checking out the repo, run `bin/setup` to install dependencies.
44
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
+
46
+ ### Contributing
47
+
48
+ Bug reports and pull requests are welcome.
49
+
50
+ ### License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "carrierwave/jpegtran"
5
+
6
+ require "pry"
7
+ Pry.start
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "carrierwave/jpegtran/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "carrierwave-jpegtran"
8
+ spec.version = CarrierWave::Jpegtran::VERSION
9
+ spec.authors = ["DM"]
10
+ spec.email = ["deemox@gmail.com"]
11
+
12
+ spec.summary = "JPEG optimization with jpegtran"
13
+ spec.description = "Optimize your JPEG uploads with jpegtran"
14
+ spec.homepage = "https://github.com/dimko/carriewave-jpegtran"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "carrierwave", "~> 0.8"
23
+ spec.add_dependency "jpegtran-ruby", "~> 0.3.1"
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.11"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ spec.add_development_dependency "pry"
29
+ end
@@ -0,0 +1,12 @@
1
+ require "jpegtran"
2
+ require "carrierwave"
3
+
4
+ require_relative "jpegtran/version"
5
+
6
+ module CarrierWave
7
+ module Jpegtran
8
+ def optimize(*options)
9
+ ::Jpegtran.optimize(current_path, Hash[options])
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module CarrierWave
2
+ module Jpegtran
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,141 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: carrierwave-jpegtran
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - DM
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-02-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: carrierwave
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jpegtran-ruby
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.11'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.11'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Optimize your JPEG uploads with jpegtran
98
+ email:
99
+ - deemox@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - LICENSE.txt
110
+ - README.md
111
+ - Rakefile
112
+ - bin/console
113
+ - bin/setup
114
+ - carrierwave-jpegtran.gemspec
115
+ - lib/carrierwave/jpegtran.rb
116
+ - lib/carrierwave/jpegtran/version.rb
117
+ homepage: https://github.com/dimko/carriewave-jpegtran
118
+ licenses:
119
+ - MIT
120
+ metadata: {}
121
+ post_install_message:
122
+ rdoc_options: []
123
+ require_paths:
124
+ - lib
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
135
+ requirements: []
136
+ rubyforge_project:
137
+ rubygems_version: 2.4.8
138
+ signing_key:
139
+ specification_version: 4
140
+ summary: JPEG optimization with jpegtran
141
+ test_files: []