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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dab5fefa7a72b49738036d140f3d5bbd914ccffe
4
- data.tar.gz: 346bd6cd0f768e845020a660949d40d26eadcf10
3
+ metadata.gz: bc220eb2c5204fcc1bf8531f820dc23fd33a95fc
4
+ data.tar.gz: 7234c1b360d5008c97a656b73fb73864031d6c53
5
5
  SHA512:
6
- metadata.gz: a16bbaa40d6b0868ea6439f60b044d0ef0572ff2887fcc376a181cd3f5e9fbeb5e743658f038d18847943bac8bdfb103ca81a5dd76601b9d249834b75a34d2fb
7
- data.tar.gz: 16adc1f4d6e3894914d08b04c363a9c94403956133b53a759941690e53ec30a2708b4eefc1d3da306598f2bf549eef1e2fc2add86f18c94f23122adbb9db5e4d
6
+ metadata.gz: d62514891de554c8a69c194f20043750a65c65c453cb8af41e235401c3fd42268013d5008a5a8b70811903c8048c389de35d62ee41950803ec9b078126f4c1ab
7
+ data.tar.gz: 1856d20464e078bc22679335ba3984eebeb55b38dce48014f3e981048d8c8a21f008e98a50cff453a5c136ce8b8e0e5bdff4c715118b2b5d74a5e623b465939a
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ test/dummy/log
19
+ test/dummy/tmp
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
- <img src="images/thumb_photo1.jpg" alt="Photo 1">
74
+ <img src="images/thumb_photo1.jpg" alt="Photo 1">
58
75
  </a>
59
76
  <a href="images/photo2.jpg" title="Photo 2">
60
- <img src="images/thumb_photo2.jpg" alt="Photo 2">
77
+ <img src="images/thumb_photo2.jpg" alt="Photo 2">
61
78
  </a>
62
79
  <a href="images/photo3.jpg" title="Photo 3">
63
- <img src="images/thumb_photo3.jpg" alt="Photo 3">
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
- <div class="slides"></div>
105
- <h3 class="title"></h3>
106
- <a class="prev">‹</a>
107
- <a class="next">›</a>
108
- <a class="play-pause"></a>
109
- <ol class="indicator"></ol>
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 "rspec/core/rake_task"
2
+ require "rake/testtask"
3
3
 
4
- RSpec::Core::RakeTask.new
5
-
6
- task default: :spec
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
@@ -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.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rspec"
19
+ spec.add_dependency "railties", ">= 3.1.0"
20
+
21
+ spec.add_development_dependency "sprockets-rails", "~> 2.0.0"
24
22
  end
@@ -1,8 +1,2 @@
1
1
  require "blueimp/gallery/version"
2
- require "blueimp/gallery/engine"
3
-
4
- module Blueimp
5
- module Gallery
6
-
7
- end
8
- end
2
+ require "blueimp/gallery/engine" if defined?(::Rails)
@@ -1,7 +1,6 @@
1
- module StaticAssets
2
- class Engine < ::Rails::Engine
3
- initializer 'blueimp-gallery.load_static_assets' do |app|
4
- app.middleware.use ::ActionDispatch::Static, "#{root}/vendor"
1
+ module Blueimp
2
+ module Gallery
3
+ class Engine < ::Rails::Engine
5
4
  end
6
5
  end
7
6
  end
@@ -1,5 +1,5 @@
1
1
  module Blueimp
2
2
  module Gallery
3
- VERSION = "0.0.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -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
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -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,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -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,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!
@@ -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,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -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,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -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
@@ -0,0 +1,2 @@
1
+ Dummy::Application.routes.draw do
2
+ end
@@ -0,0 +1,9 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+ require "minitest/autorun"
7
+ require "minitest/pride"
8
+
9
+ Rails.backtrace_cleaner.remove_silencers!
@@ -149,7 +149,7 @@
149
149
  bottom: 15px;
150
150
  width: 15px;
151
151
  height: 15px;
152
- background: url(../img/"play-pause.png") 0 0 no-repeat;
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(../img/"play-pause.svg");
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.2
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-10 00:00:00.000000000 Z
11
+ date: 2013-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
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: '0'
34
- type: :development
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: '0'
26
+ version: 3.1.0
41
27
  - !ruby/object:Gem::Dependency
42
- name: rspec
28
+ name: sprockets-rails
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - '>='
31
+ - - ~>
46
32
  - !ruby/object:Gem::Version
47
- version: '0'
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: '0'
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
- - spec/spec_helper.rb
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'