images_gallery 1.0.0.rc → 1.0.0.rc.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -3
- data/Rakefile +1 -30
- data/lib/images_gallery/cli.rb +1 -1
- data/lib/images_gallery/version.rb +1 -1
- data/lib/images_gallery/view.rb +2 -2
- data/lib/images_gallery/views/index.rb +1 -1
- data/lib/images_gallery/views/make.rb +1 -1
- data/lib/images_gallery/views/model.rb +1 -1
- metadata +3 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5dd9417252fbf2a7a319686904b33930a0a7cd5
|
4
|
+
data.tar.gz: 3a5c9e51939fa5ff1179bc111652d1b916882be2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b46e052c1b3d57088703c2340ea26b1103bcc655e9f6c739b561de5e7e78c849bacf99acf02b7ce4688250b6345504617484ec788ffee23e679029237cd1e00
|
7
|
+
data.tar.gz: 459e9fc1b5605778aa99001b6d97c375008b304baed3a7bd33bcf5a184793d5ec8da89076dd947e174381d7ef82c1ad473de9d1aa39cc52b0da2cf10b8203bf4
|
data/README.md
CHANGED
@@ -1,22 +1,37 @@
|
|
1
1
|
Images Gallery Generator Kata
|
2
2
|
=============================
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/gonzalo-bulnes/kata-images_gallery_generator.svg?branch=master)](https://travis-ci.org/gonzalo-bulnes/kata-images_gallery_generator)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/gonzalo-bulnes/kata-images_gallery_generator.svg)](https://codeclimate.com/github/gonzalo-bulnes/kata-images_gallery_generator)
|
6
|
+
[![Inline docs](http://inch-ci.org/github/gonzalo-bulnes/kata-images_gallery_generator.svg?branch=master)](http://inch-ci.org/github/gonzalo-bulnes/kata-images_gallery_generator)
|
7
|
+
|
4
8
|
Generate a set of static HTML files from an XML representation of EXIF data so users can browse large collections of images.
|
5
9
|
|
6
10
|
<img alt="" src="doc/illustration.png"/>
|
7
11
|
|
12
|
+
Installation
|
13
|
+
------------
|
14
|
+
|
15
|
+
Add the gem to your `Gemfile`:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
# Gemfile
|
19
|
+
|
20
|
+
gem 'images_gallery', '~> 1.0' # see semver.org
|
21
|
+
```
|
22
|
+
|
8
23
|
Usage
|
9
24
|
-----
|
10
25
|
|
11
26
|
```bash
|
12
27
|
# Generate a gallery inside spec/tmp from the example source file
|
13
|
-
|
28
|
+
images_gallery generate spec/fixtures/works.xml spec/tmp
|
14
29
|
|
15
30
|
# Read usage intructions:
|
16
|
-
|
31
|
+
images_gallery help
|
17
32
|
|
18
33
|
# Open the images gallery automatically after it was generated
|
19
|
-
firefox $(
|
34
|
+
firefox $(images_gallery generate spec/fixtures/works.xml spec/tmp/)
|
20
35
|
```
|
21
36
|
|
22
37
|
Development
|
data/Rakefile
CHANGED
@@ -7,35 +7,6 @@ RSpec::Core::RakeTask.new(:features) do |config|
|
|
7
7
|
config.pattern = 'spec/features/**/*_spec.rb'
|
8
8
|
end
|
9
9
|
|
10
|
-
desc 'Report code quality'
|
11
|
-
task :rubycritic do
|
12
|
-
|
13
|
-
# check if the rubycritic code quality reporter is available
|
14
|
-
`which rubycritic`
|
15
|
-
if $?.exitstatus != 0
|
16
|
-
abort <<-eos.gsub /^( |\t)+/, ""
|
17
|
-
|
18
|
-
The #{Rainbow('rubycritic').red} code quality reporter is not available.
|
19
|
-
You may want to install it in order to report the code quality.
|
20
|
-
|
21
|
-
See #https://github.com/whitesmith/rubycritic for intallation instructions.
|
22
|
-
|
23
|
-
eos
|
24
|
-
end
|
25
|
-
|
26
|
-
command = "rubycritic"
|
27
|
-
puts <<-eos.gsub /^( |\t)+/, ""
|
28
|
-
|
29
|
-
#{Rainbow('Report the code quality.').blue}
|
30
|
-
#{command}
|
31
|
-
|
32
|
-
eos
|
33
|
-
success = system('rubycritic')
|
34
|
-
exit_status = $?.exitstatus
|
35
|
-
|
36
|
-
abort unless exit_status == 0
|
37
|
-
end
|
38
|
-
|
39
10
|
begin
|
40
11
|
require 'inch/rake'
|
41
12
|
|
@@ -50,4 +21,4 @@ rescue LoadError
|
|
50
21
|
end
|
51
22
|
end
|
52
23
|
|
53
|
-
task default: [:spec, :inch
|
24
|
+
task default: [:spec, :inch]
|
data/lib/images_gallery/cli.rb
CHANGED
data/lib/images_gallery/view.rb
CHANGED
@@ -31,12 +31,12 @@ module ImagesGallery
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def thumbnails(images)
|
34
|
-
template = '
|
34
|
+
template = File.expand_path('../templates/_thumbnails.html.erb', __FILE__)
|
35
35
|
ERB.new(File.new(template).read).result(binding)
|
36
36
|
end
|
37
37
|
|
38
38
|
def navigation(links)
|
39
|
-
template = '
|
39
|
+
template = File.expand_path('../templates/_navigation.html.erb', __FILE__)
|
40
40
|
ERB.new(File.new(template).read).result(binding)
|
41
41
|
end
|
42
42
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: images_gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.rc
|
4
|
+
version: 1.0.0.rc.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Bulnes Guilpain
|
@@ -122,25 +122,12 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubycritic
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '1.0'
|
139
125
|
description: Generate a set of static HTML files from an XML representation of EXIF
|
140
126
|
data so users can browse a collection of images.
|
141
127
|
email:
|
142
128
|
- gon.bulnes@gmail.com
|
143
|
-
executables:
|
129
|
+
executables:
|
130
|
+
- images_gallery
|
144
131
|
extensions: []
|
145
132
|
extra_rdoc_files: []
|
146
133
|
files:
|