utopia-tags-gallery 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utopia/tags/gallery.rb +13 -8
- data/lib/utopia/tags/gallery/version.rb +1 -1
- data/utopia-tags-gallery.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba472840b075177537db8ee9bf2f8bf07818f74b
|
4
|
+
data.tar.gz: 229f3eb65c1ce56bd69b888c9c04a0b084376362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03cfd9b64c7a2fdbe8b133cfcb10c6cb8787e7e5419705bb627d468d13c88e223dadaa19aed1b4b6892944738ff74e927dd180486cc00148b18930a1a783a47f
|
7
|
+
data.tar.gz: 4bd0ef9a9c6dbc232c10b6daedaf6803c706fdd00ca157498a0331696ef831e7b9e0132c78f8e8a10b501cc0d995c46e4ed285b34eda953e266878d3d149c411
|
data/lib/utopia/tags/gallery.rb
CHANGED
@@ -45,20 +45,25 @@ module Utopia
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.call(transaction, state)
|
48
|
-
container = Container.new(transaction.end_tags[-2].node, Utopia::Path.create(state[
|
48
|
+
container = Container.new(transaction.end_tags[-2].node, Utopia::Path.create(state[:path] || "./"))
|
49
49
|
metadata = container.metadata
|
50
50
|
metadata.default = {}
|
51
51
|
|
52
|
-
tag_name = state[
|
53
|
-
container_class = state[
|
52
|
+
tag_name = state[:tag] || "img"
|
53
|
+
container_class = state[:class] || "gallery"
|
54
54
|
|
55
55
|
options = {}
|
56
|
-
options[:process] = state[
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
options[:process] = state[:process]
|
57
|
+
|
58
|
+
if filetypes = state[:filetypes]
|
59
|
+
options[:filter] = Regexp.new("(#{filetypes})$", "i")
|
60
|
+
end
|
61
|
+
|
62
|
+
if filter = state[:filter]
|
63
|
+
filter = Regexp.new(filter, Regexp::IGNORECASE)
|
64
|
+
end
|
60
65
|
|
61
|
-
transaction.tag("div",
|
66
|
+
transaction.tag("div", class: container_class) do |node|
|
62
67
|
items = container.each(options).sort do |a, b|
|
63
68
|
if metadata[a.original.last]["order"] and metadata[b.original.last]["order"]
|
64
69
|
metadata[a.original.last]["order"] <=> metadata[b.original.last]["order"]
|
data/utopia-tags-gallery.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia-tags-gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.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:
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.6'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rmagick
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.5.1
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A gallery tag for use with the Utopia web framework.
|