jekyll-thumbnail 0.1.18 → 0.2.0.pre.alpha.pre.22

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
- SHA1:
3
- metadata.gz: 163bff733b73f13d3b015bdb0dfb0e692942fdd1
4
- data.tar.gz: fc54b2d9acd1a95c49f6388142fd40be3e38bc2e
2
+ SHA256:
3
+ metadata.gz: 3d9b3507c2dacf8eb0d592a04aa85945abe95989f2a1aeb7a924e1a13f4ea756
4
+ data.tar.gz: cd23a6bb2eadb7d35b69048a7cfa5eaf2879c27b78f09ee16091a89e577f2782
5
5
  SHA512:
6
- metadata.gz: f2cf03cf87d65108a3f44dea2db92e726c4ffbe2c177cf74b7bb7342d4df8300255bc20a3fcb2ab4cc131cee4ebdd34479c930b144d570a6f22fabffa265de13
7
- data.tar.gz: 200a5ae7c4c1047019a0600c9ccb64d3875eef3ea6a9859eb489609d5cfcc392dbe0be09cb1c29c1cc7f3348029dc79e971396d530c155bd03cbe69436d0e0fa
6
+ metadata.gz: f2f1875a0b4871cf443b8cc6b357e5ccc4156622791fa9d72f330da90377e52bebf3ffdacd0529c6c13651f93cad5c93cb5c4fd001fc13e2c7c99f873ebee61b
7
+ data.tar.gz: 04f7b0d5d9510f928351e233c85ec1e9e4750a26731bf4aa0f08c1dc01fda35f71ad9ceead950132fb680f0dc98068d9f4510a6406b7fb29428c6bc652188ade
data/.gitignore CHANGED
@@ -1 +1,4 @@
1
- *.gem
1
+ /Gemfile.lock
2
+ test/thumbs
3
+ pkg/
4
+ coverage/
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3
4
+ deploy:
5
+ provider: rubygems
6
+ api_key: $RUBYGEMS_API_KEY
data/Gemfile CHANGED
@@ -1,4 +1,12 @@
1
1
  source 'https://rubygems.org'
2
+ gemspec
2
3
 
3
- # Specify your gem's dependencies in jekyllcontentful.gemspec
4
- gemspec
4
+ group :test do
5
+ gem 'rails-controller-testing' # If you are using Rails 5.x
6
+ gem 'liquid'
7
+ gem 'mini_magick'
8
+ gem 'minitest'
9
+ gem 'fastimage'
10
+
11
+ gem 'coveralls', require: false
12
+ end
data/LICENSE.txt CHANGED
File without changes
data/Rakefile CHANGED
@@ -1 +1,10 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
2
+ require 'rake/testtask'
3
+
4
+ task :default => :test
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs << 'lib' << 'test'
8
+ t.pattern = 'test/**/test_*.rb'
9
+ t.warning = false
10
+ end
data/docs/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Jekyll Thumbnail
2
+ [![Build Status](https://travis-ci.org/superterran/jekyll-thumbnail.svg?branch=master)](https://travis-ci.org/superterran/jekyll-thumbnail)
3
+ [![Coverage Status](https://coveralls.io/repos/github/superterran/jekyll-thumbnail/badge.svg?branch=master)](https://coveralls.io/github/superterran/jekyll-thumbnail?branch=master)
4
+ [![Gem Version](https://badge.fury.io/rb/jekyll-thumbnail.svg)](https://badge.fury.io/rb/jekyll-thumbnail)
5
+
6
+ Adds a liquid tag that can generate thumbnails, with watermarks, at any size you dictate.
7
+
8
+ # Usage
9
+
10
+ Require the ruby gem in your Gemfile...
11
+
12
+ ```
13
+ gem 'jekyll-thumbnail'
14
+ ```
15
+
16
+ Then, use it in your Liquid templates as follows:
17
+
18
+ ```
19
+ {% thumbnail path/to/image.jpg 50x50 %}
20
+ ```
21
+ This will pass the image through the thumbnailer, and generate a thumbs/ directory where the image is located.
22
+
23
+ # Thumbs directory
24
+
25
+ Images that already exist are not re-generated, so you can save yourself some work by caching these files.
26
+
27
+ # Unit Tests
28
+
29
+ Running Rake will work through all the minitest tests for this feature...
30
+
31
+ ```
32
+ $ rake
33
+ ```
34
+
35
+ # Installation
36
+
37
+ Inside your gemfile...
38
+
39
+ ```
40
+ gem "jekyll-thumbnail"
41
+ ```
42
+
43
+ # Building and Releasing
44
+
45
+ ```
46
+ $ gem build jekyll-thumbnail.gemspec
47
+ $ gem push jekyll-thumbnail-0.1.18.gem
48
+ ```
data/docs/_config.yml ADDED
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-tactile
Binary file
Binary file
Binary file
@@ -7,6 +7,7 @@ require "jekyll-thumbnail/version"
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "jekyll-thumbnail"
9
9
  spec.version = Jekyll::Thumbnail::VERSION
10
+ spec.version = "#{spec.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
10
11
  spec.authors = ["Doug Hatcher"]
11
12
  spec.email = ["superterran@gmail.com"]
12
13
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Thumbnail
3
- VERSION = "0.1.18"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -48,15 +48,6 @@ class JekyllThumbnail < Liquid::Tag
48
48
  if !File.exists?(dest_path) || File.mtime(dest_path) <= File.mtime(source_path)
49
49
  # puts ENV.inspect
50
50
 
51
- # don't generate images in preview mode whenever possible
52
- if ENV['OCTOPRESS_ENV'] == 'preview' && /(?<width>\d+)?x(?<height>\d+)?/ =~ dimensions
53
- html = "<img src='#{source}' style='"
54
- html << "max-width: #{width}px; " unless width.nil? || width.empty?
55
- html << "max-height: #{height}px;" unless height.nil? || height.empty?
56
- html << "' />"
57
- return html
58
- end
59
-
60
51
  puts "Thumbnailing #{source} to #{dest} (#{dimensions})"
61
52
 
62
53
  image = MiniMagick::Image.open(source_path)
@@ -78,7 +69,7 @@ class JekyllThumbnail < Liquid::Tag
78
69
 
79
70
  # TODO support relative paths
80
71
  else
81
- "Could not create thumbnail for #{source}. Usage: thumbnail /path/to/local/image.png 50x50<"
72
+ "Could not create thumbnail for #{source}. Usage: thumbnail /path/to/local/image.png 50x50"
82
73
  end
83
74
  end
84
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-thumbnail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.2.0.pre.alpha.pre.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Hatcher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-24 00:00:00.000000000 Z
11
+ date: 2018-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -60,10 +60,15 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - ".travis.yml"
63
64
  - Gemfile
64
65
  - LICENSE.txt
65
- - README.md
66
66
  - Rakefile
67
+ - docs/README.md
68
+ - docs/_config.yml
69
+ - img/sample_rectangle.jpg
70
+ - img/sample_square.jpg
71
+ - img/watermark-50x50.png
67
72
  - jekyll-thumbnail.gemspec
68
73
  - lib/jekyll-thumbnail.rb
69
74
  - lib/jekyll-thumbnail/version.rb
@@ -82,12 +87,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
87
  version: '0'
83
88
  required_rubygems_version: !ruby/object:Gem::Requirement
84
89
  requirements:
85
- - - ">="
90
+ - - ">"
86
91
  - !ruby/object:Gem::Version
87
- version: '0'
92
+ version: 1.3.1
88
93
  requirements: []
89
94
  rubyforge_project:
90
- rubygems_version: 2.5.2.1
95
+ rubygems_version: 2.7.8
91
96
  signing_key:
92
97
  specification_version: 4
93
98
  summary: Provides an image thumbnailer with watermark support. Adds a liquid tag
data/README.md DELETED
@@ -1,18 +0,0 @@
1
- # Jekyll Thumbnail
2
-
3
- Adds a liquid tag that can generate thumbnails, with watermarks, at any size you dictate.
4
-
5
- # Installation
6
-
7
- Inside your gemfile...
8
-
9
- ```
10
- gem "jekyll-thumbnail"
11
- ```
12
-
13
- # Building and Releasing
14
-
15
- ```
16
- $ gem build jekyll-thumbnail.gemspec
17
- $ gem push jekyll-theme-artsy-0.1.11.gem
18
- ```