utopia-tags-gallery 0.12.1 → 1.0.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
2
  SHA1:
3
- metadata.gz: 73bfa9a36889bb27062319942c886cef0019c3b9
4
- data.tar.gz: 22e8e153b031ed475010f3e72bb60cc1a0e9925f
3
+ metadata.gz: fb7258314e14406c04deb76a3fa275727beb7020
4
+ data.tar.gz: 6f2f33c7be89ba917418eceb1b1f433ab616b6aa
5
5
  SHA512:
6
- metadata.gz: fdfdca6e562fc9c2c583752ca3a41e9d74287940c750ca5f1b1f32042b5005dfae86de084341a82cd0239664011dc63e418798c22749803394319098a5ab28eb
7
- data.tar.gz: 723904e53710ff9f992d6d0d17752a330f3dd6a8f0e99fe91af62e5e4b680462e016584a06af8811021462cd1cf9d2b29e9635c0cf09fa9c1b2ed136c8fac8a2
6
+ metadata.gz: 5e04b9d576a2f236e957959f6c439e061c584a302f556551e6234d1094877cb5c1ce857f83a724626c50985a1b0f024a1b2f654cc848057119adb5cbc23e8124
7
+ data.tar.gz: c6cbd6577d8d79ce85359040d769361558b09a51d5c21705ea17b7233c753374b431e146b2121abb930e9cd2e118a7d94ea33d7d9dd377fdd8dcf5b5eb64530c
@@ -18,10 +18,8 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'utopia/tags'
22
-
23
- require 'utopia/tags/gallery/thumbnail'
24
- require 'utopia/tags/gallery/container'
21
+ require_relative 'gallery/thumbnail'
22
+ require_relative 'gallery/container'
25
23
 
26
24
  module Utopia
27
25
  module Tags
@@ -65,7 +63,7 @@ module Utopia
65
63
  if metadata[a.original.basename]["order"] and metadata[b.original.basename]["order"]
66
64
  metadata[a.original.basename]["order"] <=> metadata[b.original.basename]["order"]
67
65
  else
68
- a.original.basename <=> b.original.basename
66
+ a.original.last <=> b.original.last
69
67
  end
70
68
  end
71
69
 
@@ -81,5 +79,3 @@ module Utopia
81
79
  end
82
80
  end
83
81
  end
84
-
85
- Utopia::Tags.register("gallery", Utopia::Tags::Gallery)
@@ -41,20 +41,22 @@ module Utopia
41
41
  end
42
42
 
43
43
  def self.append_suffix(name, suffix, extension = nil)
44
- components = name.split(".")
45
-
46
- components.insert(-2, suffix)
47
-
48
- if (extension)
49
- components[-1] = extension
44
+ offset = name.rindex('.')
45
+
46
+ name = name.dup
47
+
48
+ if extension
49
+ name[offset..-1] = '.' + suffix + '.' + extension
50
+ else
51
+ name.insert(offset, '.' + suffix)
50
52
  end
51
-
52
- return components.join(".")
53
+
54
+ return name
53
55
  end
54
56
 
55
57
  def processed(process = nil)
56
58
  if process
57
- name = @original_path.basename
59
+ name = @original_path.last
58
60
  return cache_root + Path.append_suffix(name, process.to_s, @extensions[process.to_sym])
59
61
  else
60
62
  return @original_path
@@ -40,7 +40,7 @@ module Utopia
40
40
 
41
41
  def default_extension(path)
42
42
  ext = path.original.extension
43
-
43
+
44
44
  case ext
45
45
  when /pdf/i
46
46
  return "png"
@@ -1,7 +1,7 @@
1
1
  module Utopia
2
2
  module Tags
3
3
  module Gallery
4
- VERSION = "0.12.1"
4
+ VERSION = "1.0.0"
5
5
  end
6
6
  end
7
7
  end
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  structure representing the website.
16
16
 
17
17
  This package includes a useful <gallery> tag which can be used for displaying
18
- thumbnails of images, documents and movies.
18
+ thumbnails of images, documents and movies from a directory.
19
19
  EOF
20
20
  spec.summary = %q{A gallery tag for use with the Utopia web framework.}
21
21
  spec.homepage = ""
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "bundler", "~> 1.3"
30
30
  spec.add_development_dependency "rake"
31
31
 
32
- spec.add_dependency "utopia", "~> 0.12.0"
32
+ spec.add_dependency "utopia", "~> 1.0"
33
33
  spec.add_dependency "rmagick"
34
34
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia-tags-gallery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 1.0.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: 2014-01-19 00:00:00.000000000 Z
11
+ date: 2015-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: utopia
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.12.0
47
+ version: '1.0'
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: 0.12.0
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rmagick
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: "\t\tUtopia is a website generation framework which provides a robust
@@ -71,14 +71,14 @@ description: "\t\tUtopia is a website generation framework which provides a robu
71
71
  heavily for\n\t\tcontent and provides frameworks for interacting with files and
72
72
  directories as\n\t\tstructure representing the website.\n\n\t\tThis package includes
73
73
  a useful <gallery> tag which can be used for displaying\n\t\tthumbnails of images,
74
- documents and movies.\n"
74
+ documents and movies from a directory.\n"
75
75
  email:
76
76
  - samuel.williams@oriontransfer.co.nz
77
77
  executables: []
78
78
  extensions: []
79
79
  extra_rdoc_files: []
80
80
  files:
81
- - .gitignore
81
+ - ".gitignore"
82
82
  - Gemfile
83
83
  - README.md
84
84
  - Rakefile
@@ -97,19 +97,18 @@ require_paths:
97
97
  - lib
98
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - '>='
100
+ - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - '>='
105
+ - - ">="
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.0.3
110
+ rubygems_version: 2.2.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: A gallery tag for use with the Utopia web framework.
114
114
  test_files: []
115
- has_rdoc: