blueimp-gallery 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +34 -9
- data/Rakefile +8 -4
- data/blueimp-gallery.gemspec +3 -5
- data/lib/blueimp/gallery.rb +1 -7
- data/lib/blueimp/gallery/engine.rb +3 -4
- data/lib/blueimp/gallery/version.rb +1 -1
- data/test/assets_test.rb +63 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +27 -0
- data/test/dummy/config/boot.rb +4 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/test_helper.rb +9 -0
- data/vendor/assets/stylesheets/blueimp-gallery.css +2 -2
- metadata +28 -28
- data/spec/spec_helper.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc220eb2c5204fcc1bf8531f820dc23fd33a95fc
|
4
|
+
data.tar.gz: 7234c1b360d5008c97a656b73fb73864031d6c53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d62514891de554c8a69c194f20043750a65c65c453cb8af41e235401c3fd42268013d5008a5a8b70811903c8048c389de35d62ee41950803ec9b078126f4c1ab
|
7
|
+
data.tar.gz: 1856d20464e078bc22679335ba3984eebeb55b38dce48014f3e981048d8c8a21f008e98a50cff453a5c136ce8b8e0e5bdff4c715118b2b5d74a5e623b465939a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
blueimp Gallery is an image and video gallery featuring carousel and lightbox gallery with mouse and keyboard navigation, transition effects and more. This amazing plugin was created by [Sebastian Tschan](https://github.com/blueimp).
|
4
4
|
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/blueimp-gallery.png)](http://badge.fury.io/rb/blueimp-gallery)
|
6
|
+
[![Build Status](https://travis-ci.org/Phifo/blueimp-gallery.png?branch=master)](https://travis-ci.org/Phifo/blueimp-gallery)
|
7
|
+
|
5
8
|
* blueimp Gallery version 2.7.3
|
6
9
|
* Official Website: http://blueimp.github.io/Gallery/
|
7
10
|
|
@@ -24,10 +27,24 @@ Add this line to your `app/assets/javascripts/application.js`
|
|
24
27
|
|
25
28
|
//= require blueimp-gallery-all
|
26
29
|
|
30
|
+
In case you want a minimal version and you already understand how the plugin works, you can add the necessary assets.
|
31
|
+
|
32
|
+
//= require blueimp-gallery
|
33
|
+
//= require blueimp-gallery-fullscreen
|
34
|
+
//= require blueimp-gallery-indicator
|
35
|
+
//= require blueimp-gallery-video
|
36
|
+
//= require jquery.blueimp-gallery
|
37
|
+
|
27
38
|
Add this line to your `app/assets/stylesheets/application.css`
|
28
39
|
|
29
40
|
*= require blueimp-gallery-all
|
30
41
|
|
42
|
+
In case you want a minimal version and you already understand how the plugin works, you can add the necessary assets.
|
43
|
+
|
44
|
+
*= require blueimp-gallery.css
|
45
|
+
*= require blueimp-gallery-indicator
|
46
|
+
*= require blueimp-gallery-video
|
47
|
+
|
31
48
|
## Usage
|
32
49
|
|
33
50
|
### Lightbox
|
@@ -54,13 +71,13 @@ Add a list of image links you want to show into your gallery:
|
|
54
71
|
```html
|
55
72
|
<div id="links">
|
56
73
|
<a href="images/photo1.jpg" title="Photo 1">
|
57
|
-
|
74
|
+
<img src="images/thumb_photo1.jpg" alt="Photo 1">
|
58
75
|
</a>
|
59
76
|
<a href="images/photo2.jpg" title="Photo 2">
|
60
|
-
|
77
|
+
<img src="images/thumb_photo2.jpg" alt="Photo 2">
|
61
78
|
</a>
|
62
79
|
<a href="images/photo3.jpg" title="Photo 3">
|
63
|
-
|
80
|
+
<img src="images/thumb_photo3.jpg" alt="Photo 3">
|
64
81
|
</a>
|
65
82
|
</div>
|
66
83
|
```
|
@@ -101,12 +118,12 @@ If you want a Carousel gallery, replace the html snippet with:
|
|
101
118
|
|
102
119
|
```html
|
103
120
|
<div id="blueimp-gallery-carousel" class="blueimp-gallery blueimp-gallery-carousel">
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
121
|
+
<div class="slides"></div>
|
122
|
+
<h3 class="title"></h3>
|
123
|
+
<a class="prev">‹</a>
|
124
|
+
<a class="next">›</a>
|
125
|
+
<a class="play-pause"></a>
|
126
|
+
<ol class="indicator"></ol>
|
110
127
|
</div>
|
111
128
|
```
|
112
129
|
|
@@ -124,6 +141,14 @@ blueimp.Gallery(
|
|
124
141
|
</script>
|
125
142
|
```
|
126
143
|
|
144
|
+
or CoffeeScript if you want to add the script as an asset:
|
145
|
+
|
146
|
+
```coffeescript
|
147
|
+
blueimp.Gallery document.getElementById("links").getElementsByTagName("a"),
|
148
|
+
container: "#blueimp-gallery-carousel"
|
149
|
+
carousel: true
|
150
|
+
``
|
151
|
+
|
127
152
|
## More Features
|
128
153
|
|
129
154
|
blueimp Gallery has a lot more features and options as adding control keys, fullscreen, slide interval, etc. The complete documentation is on the [blueimp Gallery site](https://github.com/blueimp/Gallery).
|
data/Rakefile
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require "
|
2
|
+
require "rake/testtask"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
|
+
t.libs << 'lib'
|
6
|
+
t.libs << 'test'
|
7
|
+
t.pattern = 'test/**/*_test.rb'
|
8
|
+
t.verbose = false
|
9
|
+
end
|
7
10
|
|
11
|
+
task :default => :test
|
data/blueimp-gallery.gemspec
CHANGED
@@ -14,11 +14,9 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
17
|
spec.require_paths = ["lib"]
|
20
18
|
|
21
|
-
spec.
|
22
|
-
|
23
|
-
spec.add_development_dependency "
|
19
|
+
spec.add_dependency "railties", ">= 3.1.0"
|
20
|
+
|
21
|
+
spec.add_development_dependency "sprockets-rails", "~> 2.0.0"
|
24
22
|
end
|
data/lib/blueimp/gallery.rb
CHANGED
data/test/assets_test.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AssetsTest < ActionDispatch::IntegrationTest
|
4
|
+
test "engine is loaded" do
|
5
|
+
assert_equal ::Rails::Engine, Blueimp::Gallery::Engine.superclass
|
6
|
+
end
|
7
|
+
|
8
|
+
test 'has javascripts assets' do
|
9
|
+
get 'assets/blueimp-gallery-all.js'
|
10
|
+
assert_response :success
|
11
|
+
get 'assets/blueimp-gallery-fullscreen.js'
|
12
|
+
assert_response :success
|
13
|
+
get 'assets/blueimp-gallery-indicator.js'
|
14
|
+
assert_response :success
|
15
|
+
get 'assets/blueimp-gallery-video.js'
|
16
|
+
assert_response :success
|
17
|
+
get 'assets/blueimp-gallery.js'
|
18
|
+
assert_response :success
|
19
|
+
get 'assets/blueimp-helper.js'
|
20
|
+
assert_response :success
|
21
|
+
get 'assets/jquery.blueimp-gallery.js'
|
22
|
+
assert_response :success
|
23
|
+
end
|
24
|
+
|
25
|
+
test 'has stylesheets assets' do
|
26
|
+
get 'assets/blueimp-gallery-all.css'
|
27
|
+
assert_response :success
|
28
|
+
get 'assets/blueimp-gallery-indicator.css'
|
29
|
+
assert_response :success
|
30
|
+
get 'assets/blueimp-gallery-video.css'
|
31
|
+
assert_response :success
|
32
|
+
get 'assets/blueimp-gallery.css'
|
33
|
+
assert_response :success
|
34
|
+
end
|
35
|
+
|
36
|
+
test 'has images assets' do
|
37
|
+
get 'assets/error.png'
|
38
|
+
assert_response :success
|
39
|
+
get 'assets/error.svg'
|
40
|
+
assert_response :success
|
41
|
+
get 'assets/loading.gif'
|
42
|
+
assert_response :success
|
43
|
+
get 'assets/play-pause.png'
|
44
|
+
assert_response :success
|
45
|
+
get 'assets/play-pause.svg'
|
46
|
+
assert_response :success
|
47
|
+
get 'assets/video-play.png'
|
48
|
+
assert_response :success
|
49
|
+
get 'assets/video-play.svg'
|
50
|
+
assert_response :success
|
51
|
+
end
|
52
|
+
|
53
|
+
test 'stylesheets have the correct paths' do
|
54
|
+
get "/assets/blueimp-gallery.css"
|
55
|
+
assert_no_match "../img/", response.body
|
56
|
+
|
57
|
+
get "/assets/blueimp-gallery-indicator.css"
|
58
|
+
assert_no_match "../img/", response.body
|
59
|
+
|
60
|
+
get "/assets/blueimp-gallery-video.css"
|
61
|
+
assert_no_match "../img/", response.body
|
62
|
+
end
|
63
|
+
end
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require "sprockets/railtie"
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(:default, Rails.env)
|
8
|
+
|
9
|
+
module Dummy
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
16
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
17
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
18
|
+
|
19
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
20
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
21
|
+
# config.i18n.default_locale = :de
|
22
|
+
config.encoding = "utf-8"
|
23
|
+
config.eager_load = false
|
24
|
+
config.assets.enabled = true
|
25
|
+
config.assets.version = '1.0'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
development:
|
7
|
+
adapter: sqlite3
|
8
|
+
database: db/development.sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
13
|
+
# re-generated from your development database when you run "rake".
|
14
|
+
# Do not set this db to the same as development or production.
|
15
|
+
test:
|
16
|
+
adapter: sqlite3
|
17
|
+
database: db/test.sqlite3
|
18
|
+
pool: 5
|
19
|
+
timeout: 5000
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: sqlite3
|
23
|
+
database: db/production.sqlite3
|
24
|
+
pool: 5
|
25
|
+
timeout: 5000
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
Dummy::Application.config.secret_key_base = 'a8003cccfb2aaf5791c87a2ec35577cbce141840c384c78748f36dd91aa01318a41a602880e6e2a7838dd4fae6ddb4cf07320d270d70378086c8e824087b9175'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
data/test/test_helper.rb
ADDED
@@ -149,7 +149,7 @@
|
|
149
149
|
bottom: 15px;
|
150
150
|
width: 15px;
|
151
151
|
height: 15px;
|
152
|
-
background: url(
|
152
|
+
background: url("play-pause.png") 0 0 no-repeat;
|
153
153
|
cursor: pointer;
|
154
154
|
opacity: 0.5;
|
155
155
|
display: none;
|
@@ -197,7 +197,7 @@ body:last-child .blueimp-gallery > .play-pause {
|
|
197
197
|
width: 20px;
|
198
198
|
height: 20px;
|
199
199
|
background-size: 40px 20px;
|
200
|
-
background-image: url(
|
200
|
+
background-image: url("play-pause.svg");
|
201
201
|
}
|
202
202
|
body:last-child .blueimp-gallery-playing > .play-pause {
|
203
203
|
background-position: -20px 0;
|
metadata
CHANGED
@@ -1,57 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blueimp-gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Fernández
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.3'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.3'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
14
|
+
name: railties
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - '>='
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
type: :
|
19
|
+
version: 3.1.0
|
20
|
+
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - '>='
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
26
|
+
version: 3.1.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
28
|
+
name: sprockets-rails
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- -
|
31
|
+
- - ~>
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
33
|
+
version: 2.0.0
|
48
34
|
type: :development
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- -
|
38
|
+
- - ~>
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
40
|
+
version: 2.0.0
|
55
41
|
description: blueimp Gallery for Rails
|
56
42
|
email:
|
57
43
|
- fernandez.chl@gmail.com
|
@@ -69,7 +55,22 @@ files:
|
|
69
55
|
- lib/blueimp/gallery.rb
|
70
56
|
- lib/blueimp/gallery/engine.rb
|
71
57
|
- lib/blueimp/gallery/version.rb
|
72
|
-
-
|
58
|
+
- test/assets_test.rb
|
59
|
+
- test/dummy/Rakefile
|
60
|
+
- test/dummy/config.ru
|
61
|
+
- test/dummy/config/application.rb
|
62
|
+
- test/dummy/config/boot.rb
|
63
|
+
- test/dummy/config/database.yml
|
64
|
+
- test/dummy/config/environment.rb
|
65
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
66
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
67
|
+
- test/dummy/config/initializers/inflections.rb
|
68
|
+
- test/dummy/config/initializers/mime_types.rb
|
69
|
+
- test/dummy/config/initializers/secret_token.rb
|
70
|
+
- test/dummy/config/initializers/session_store.rb
|
71
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
72
|
+
- test/dummy/config/routes.rb
|
73
|
+
- test/test_helper.rb
|
73
74
|
- vendor/assets/images/error.png
|
74
75
|
- vendor/assets/images/error.svg
|
75
76
|
- vendor/assets/images/loading.gif
|
@@ -112,5 +113,4 @@ rubygems_version: 2.0.5
|
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: blueimp Gallery for Rails
|
115
|
-
test_files:
|
116
|
-
- spec/spec_helper.rb
|
116
|
+
test_files: []
|
data/spec/spec_helper.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'blueimp-gallery'
|