utopia-gallery 2.2.1 → 2.3.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
- SHA1:
3
- metadata.gz: e4970a5551e4f741d8b561be650cd5606bb58dad
4
- data.tar.gz: b2d83b4f61814f759799ff97c2f560259d19eade
2
+ SHA256:
3
+ metadata.gz: e469bc8bc864dde3af55ec533e5c123d344361ce4e786529557f5cfc139dd1ef
4
+ data.tar.gz: 450bcf016d1ca383148f302cb29661cbab6649294ce3ba85b3a35393355a7e2f
5
5
  SHA512:
6
- metadata.gz: 67789b081fc930247ddc4a0addfed7a90cbe16b8e969707a4e5c39623c9c017c3bb0b12b7b2435cea7da4cbc397082fef0e9dde804b8065cecab4e0e4310b947
7
- data.tar.gz: 620b60c88f247083317c7b356a189838a10fb51b29f19b8e7bf4d949da58f54b2447938eca7d40521a1dca5a20c015de644ddae2b1d63441c11facd9fd663c5b
6
+ metadata.gz: 32dc177e212d10c41f7929ff7d775ca5c705c37945b80918e556fd09de75d5ae8680d140672211d1605142545e4ed67ca05c5b9c15f57c0cc6489b63c8a77d5d
7
+ data.tar.gz: d0562253767fde842e39c5b39495054f98b4cde2a7200d1069ef11880a3dff4f0f58faf4a2ce54c318ef9d6b01c7aa65a1b114e3242d0d45a596f9d4496e125e
data/.travis.yml CHANGED
@@ -1,50 +1,23 @@
1
1
  language: ruby
2
- sudo: false
3
- dist: trusty
2
+ dist: xenial
3
+ cache: bundler
4
4
 
5
5
  addons:
6
6
  apt:
7
7
  packages:
8
- - libxml2-dev
9
- - gettext
10
- - python-dev
11
- - liblcms1-dev
12
- - libmagickwand-dev
13
- - libopenexr-dev
14
- - libcfitsio3-dev
15
- - gobject-introspection
16
- - libgirepository1.0-dev
17
- - libgif-dev
18
- - libgs-dev
19
- - libgsf-1-dev
20
- - libmatio-dev
21
- - libopenslide-dev
22
- - liborc-0.4-dev
23
- - libpango1.0-dev
24
- - libpoppler-glib-dev
25
- - libwebp-dev
26
- - libglib2.0-dev
8
+ - libvips
27
9
 
28
- cache:
29
- bundler: true
30
- directories:
31
- - $HOME/vips
32
-
33
- before_install:
34
- - source install-vips.sh
35
-
36
- script:
37
- - bundle exec rake
38
-
39
- rvm:
40
- - 2.2.4
41
- - 2.3.2
42
- - 2.4.0
43
- - jruby-head
44
- - ruby-head
45
- - rbx-3.65
46
10
  matrix:
47
- allow_failures:
48
- - rvm: rbx-3.65
11
+ include:
12
+ - rvm: 2.4
13
+ - rvm: 2.5
14
+ - rvm: 2.6
15
+ - rvm: 2.6
16
+ env: COVERAGE=BriefSummary,Coveralls
17
+ - rvm: jruby-head
18
+ - rvm: truffleruby
49
19
  - rvm: ruby-head
20
+ allow_failures:
50
21
  - rvm: jruby-head
22
+ - rvm: truffleruby
23
+ - rvm: ruby-head
data/Gemfile CHANGED
@@ -8,7 +8,4 @@ end
8
8
 
9
9
  group :test do
10
10
  gem 'rack-test'
11
-
12
- gem 'simplecov'
13
- gem 'coveralls', require: false
14
11
  end
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This extension for [Utopia](https://github.com/ioquatix/utopia) provides tags for generating photo galleries. Works well in conjunction with [jQuery.LiteBox](https://github.com/ioquatix/jquery-litebox).
4
4
 
5
- [![Build Status](https://secure.travis-ci.org/ioquatix/utopia-gallery.svg)](http://travis-ci.org/ioquatix/utopia-gallery)
5
+ [![Build Status](https://secure.travis-ci.com/ioquatix/utopia-gallery.svg)](http://travis-ci.com/ioquatix/utopia-gallery)
6
6
  [![Code Climate](https://codeclimate.com/github/ioquatix/utopia-gallery.svg)](https://codeclimate.com/github/ioquatix/utopia-gallery)
7
7
  [![Coverage Status](https://coveralls.io/repos/ioquatix/utopia-gallery/badge.svg)](https://coveralls.io/r/ioquatix/utopia-gallery)
8
8
 
@@ -35,10 +35,11 @@ Require the tag in your `config/environment.rb`:
35
35
 
36
36
  In your `config.ru` add the `gallery` namespace:
37
37
 
38
- use Utopia::Content,
39
- namespaces: {
40
- 'gallery' => Utopia::Gallery::Tags.new
41
- }
38
+ ```ruby
39
+ use Utopia::Content, namespaces: {
40
+ 'gallery' => Utopia::Gallery::Tags.new
41
+ }
42
+ ```
42
43
 
43
44
  In your `xnode`:
44
45
 
@@ -20,6 +20,8 @@
20
20
 
21
21
  require_relative 'media'
22
22
 
23
+ require 'yaml'
24
+
23
25
  module Utopia
24
26
  module Gallery
25
27
  class Container
@@ -77,7 +77,7 @@ module Utopia
77
77
  def relative_path(media)
78
78
  path = super
79
79
 
80
- if path.end_with?(".pdf")
80
+ if path.match?(/\.(pdf|svg)$/)
81
81
  path += ".png"
82
82
  end
83
83
 
@@ -1,5 +1,25 @@
1
+ # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
1
21
  module Utopia
2
22
  module Gallery
3
- VERSION = "2.2.1"
23
+ VERSION = "2.3.0"
4
24
  end
5
25
  end
data/spec/spec_helper.rb CHANGED
@@ -1,23 +1,6 @@
1
1
 
2
- if ENV['COVERAGE'] || ENV['TRAVIS']
3
- begin
4
- require 'simplecov'
5
-
6
- SimpleCov.start do
7
- add_filter "/spec/"
8
- end
9
-
10
- if ENV['TRAVIS']
11
- require 'coveralls'
12
- Coveralls.wear!
13
- end
14
- rescue LoadError
15
- warn "Could not load simplecov: #{$!}"
16
- end
17
- end
18
-
19
- require "bundler/setup"
20
- require "utopia/gallery"
2
+ require 'covered/rspec'
3
+ require 'bundler/setup'
21
4
 
22
5
  RSpec.configure do |config|
23
6
  # Enable flags like --only-failures and --next-failure
@@ -1,3 +1,26 @@
1
+ # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'utopia/gallery/cache'
22
+ require 'utopia/gallery/container'
23
+ require 'utopia/gallery/process'
1
24
 
2
25
  RSpec.describe Utopia::Gallery::Cache do
3
26
  let(:pages_root) {File.join(__dir__, 'site/pages')}
@@ -1,3 +1,24 @@
1
+ # Copyright, 2019, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require 'utopia/gallery/container'
1
22
 
2
23
  RSpec.describe Utopia::Gallery::Container do
3
24
  let(:pages_root) {File.join(__dir__, 'site/pages')}
@@ -1,5 +1,6 @@
1
1
 
2
2
  require 'utopia/content'
3
+ require 'utopia/gallery/tags'
3
4
 
4
5
  pages_root = File.expand_path('site/pages', __dir__)
5
6
  gallery_root = File.expand_path('site/public/_gallery', __dir__)
@@ -20,7 +20,8 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency "trenni", "~> 3.1"
21
21
  spec.add_dependency "vips-thumbnail", "~> 1.1"
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.4"
23
+ spec.add_development_dependency "covered"
24
+ spec.add_development_dependency "bundler"
24
25
  spec.add_development_dependency "rake", "~> 10.5"
25
26
  spec.add_development_dependency "rspec", "~> 3.5"
26
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-07 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: utopia
@@ -52,20 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: covered
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: '1.4'
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: '1.4'
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rake
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +121,6 @@ files:
107
121
  - Gemfile
108
122
  - README.md
109
123
  - Rakefile
110
- - install-vips.sh
111
124
  - lib/utopia/gallery.rb
112
125
  - lib/utopia/gallery/cache.rb
113
126
  - lib/utopia/gallery/container.rb
@@ -148,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
161
  - !ruby/object:Gem::Version
149
162
  version: '0'
150
163
  requirements: []
151
- rubyforge_project:
152
- rubygems_version: 2.6.12
164
+ rubygems_version: 3.0.6
153
165
  signing_key:
154
166
  specification_version: 4
155
167
  summary: A gallery tag for use with the Utopia web framework.
data/install-vips.sh DELETED
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- export NOKOGIRI_USE_SYSTEM_LIBRARIES=true
4
- export VIPS_SITE=http://www.vips.ecs.soton.ac.uk/supported
5
- export VIPS_VERSION_MAJOR=8
6
- export VIPS_VERSION_MINOR=4
7
- export VIPS_VERSION_MICRO=5
8
- export VIPS_VERSION=$VIPS_VERSION_MAJOR.$VIPS_VERSION_MINOR
9
- export VIPS_VERSION_FULL=$VIPS_VERSION.$VIPS_VERSION_MICRO
10
- export PATH=$HOME/vips/bin:$PATH
11
- export LD_LIBRARY_PATH=$HOME/vips/lib:$LD_LIBRARY_PATH
12
- export PKG_CONFIG_PATH=$HOME/vips/lib/pkgconfig:$PKG_CONFIG_PATH
13
- export PYTHONPATH=$HOME/vips/lib/python2.7/site-packages:$PYTHONPATH
14
- export GI_TYPELIB_PATH=$HOME/vips/lib/girepository-1.0:$GI_TYPELIB_PATH
15
-
16
- set -e
17
-
18
- # do we already have the correct vips built? early exit if yes
19
- # we could check the configure params as well I guess
20
- if [ -d "$HOME/vips/bin" ]; then
21
- version=$($HOME/vips/bin/vips --version)
22
- escaped_version="$VIPS_VERSION_MAJOR\.$VIPS_VERSION_MINOR\.$VIPS_VERSION_MICRO"
23
- echo "Need vips-$VIPS_VERSION_FULL"
24
- echo "Found $version"
25
- if [[ "$version" =~ ^vips-$escaped_version ]]; then
26
- echo "Using cached directory"
27
- exit 0
28
- fi
29
- fi
30
-
31
- rm -rf $HOME/vips
32
- wget $VIPS_SITE/$VIPS_VERSION/vips-$VIPS_VERSION_FULL.tar.gz
33
- tar xf vips-$VIPS_VERSION_FULL.tar.gz
34
- cd vips-$VIPS_VERSION_FULL
35
- CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 ./configure --prefix=$HOME/vips $*
36
- make && make install