mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FEATURE: upgrade image compression gem
This commit is contained in:
parent
e475f8631a
commit
2c3062548b
3 changed files with 17 additions and 19 deletions
8
Gemfile
8
Gemfile
|
@ -63,11 +63,9 @@ gem 'unf', require: false
|
||||||
|
|
||||||
gem 'email_reply_parser'
|
gem 'email_reply_parser'
|
||||||
|
|
||||||
# note: for image_optim to correctly work you need
|
# note: for image_optim to correctly work you need to follow
|
||||||
# sudo apt-get install -y advancecomp gifsicle jpegoptim libjpeg-progs optipng pngcrush
|
# https://github.com/toy/image_optim
|
||||||
#
|
gem 'image_optim'
|
||||||
# Sam: held back, getting weird errors in latest
|
|
||||||
gem 'image_optim', '0.9.1'
|
|
||||||
gem 'multi_json'
|
gem 'multi_json'
|
||||||
gem 'mustache'
|
gem 'mustache'
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
|
|
24
Gemfile.lock
24
Gemfile.lock
|
@ -93,7 +93,7 @@ GEM
|
||||||
eventmachine (1.0.7)
|
eventmachine (1.0.7)
|
||||||
excon (0.45.3)
|
excon (0.45.3)
|
||||||
execjs (2.5.2)
|
execjs (2.5.2)
|
||||||
exifr (1.1.3)
|
exifr (1.2.2)
|
||||||
fabrication (2.9.8)
|
fabrication (2.9.8)
|
||||||
fakeweb (1.3.0)
|
fakeweb (1.3.0)
|
||||||
faraday (0.9.1)
|
faraday (0.9.1)
|
||||||
|
@ -113,7 +113,7 @@ GEM
|
||||||
foreman (0.77.0)
|
foreman (0.77.0)
|
||||||
dotenv (~> 1.0.2)
|
dotenv (~> 1.0.2)
|
||||||
thor (~> 0.19.1)
|
thor (~> 0.19.1)
|
||||||
fspath (2.0.6)
|
fspath (2.1.1)
|
||||||
gctools (0.2.3)
|
gctools (0.2.3)
|
||||||
given_core (3.5.4)
|
given_core (3.5.4)
|
||||||
sorcerer (>= 0.3.7)
|
sorcerer (>= 0.3.7)
|
||||||
|
@ -126,14 +126,14 @@ GEM
|
||||||
hitimes (1.2.2)
|
hitimes (1.2.2)
|
||||||
htmlentities (4.3.3)
|
htmlentities (4.3.3)
|
||||||
i18n (0.7.0)
|
i18n (0.7.0)
|
||||||
image_optim (0.9.1)
|
image_optim (0.20.2)
|
||||||
exifr (~> 1.1.3)
|
exifr (~> 1.1, >= 1.1.3)
|
||||||
fspath (~> 2.0.5)
|
fspath (~> 2.1)
|
||||||
image_size (~> 1.1.2)
|
image_size (~> 1.3)
|
||||||
in_threads (~> 1.2.0)
|
in_threads (~> 1.3)
|
||||||
progress (~> 3.0.0)
|
progress (~> 3.0, >= 3.0.1)
|
||||||
image_size (1.1.5)
|
image_size (1.4.1)
|
||||||
in_threads (1.2.2)
|
in_threads (1.3.1)
|
||||||
jmespath (1.0.2)
|
jmespath (1.0.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
jquery-rails (3.1.2)
|
jquery-rails (3.1.2)
|
||||||
|
@ -218,7 +218,7 @@ GEM
|
||||||
ruby-openid
|
ruby-openid
|
||||||
pg (0.18.1)
|
pg (0.18.1)
|
||||||
polyglot (0.3.5)
|
polyglot (0.3.5)
|
||||||
progress (3.0.2)
|
progress (3.1.0)
|
||||||
pry (0.10.1)
|
pry (0.10.1)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.8.1)
|
method_source (~> 0.8.1)
|
||||||
|
@ -419,7 +419,7 @@ DEPENDENCIES
|
||||||
highline
|
highline
|
||||||
hiredis
|
hiredis
|
||||||
htmlentities
|
htmlentities
|
||||||
image_optim (= 0.9.1)
|
image_optim
|
||||||
librarian (>= 0.0.25)
|
librarian (>= 0.0.25)
|
||||||
listen (= 0.7.3)
|
listen (= 0.7.3)
|
||||||
logster
|
logster
|
||||||
|
|
|
@ -29,7 +29,7 @@ def download_emojis_for(set, url_template, options={})
|
||||||
FileUtils.cd(path) do
|
FileUtils.cd(path) do
|
||||||
emoji["aliases"].each do |name|
|
emoji["aliases"].each do |name|
|
||||||
File.open("#{name}.png", "wb") { |f| f << data }
|
File.open("#{name}.png", "wb") { |f| f << data }
|
||||||
ImageOptim.new.optimize_image("#{name}.png") rescue nil
|
ImageOptim.new.optimize_image!("#{name}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -56,7 +56,7 @@ def download_google_emojis(url_template)
|
||||||
FileUtils.cd(path) do
|
FileUtils.cd(path) do
|
||||||
emoji["aliases"].each do |name|
|
emoji["aliases"].each do |name|
|
||||||
File.open("#{name}.png", "wb") { |f| f << data }
|
File.open("#{name}.png", "wb") { |f| f << data }
|
||||||
ImageOptim.new.optimize_image("#{name}.png") rescue nil
|
ImageOptim.new.optimize_image!("#{name}.png")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue