
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
rails-blueimp-gallery
Advanced tools
= Rails Blueimp Gallery
This is a rails implementation of the blueimp gallery. Available here: https://github.com/blueimp/Gallery
= Upgrading to 1.x.x
Starting with 1.0.0 we do not longer include the blueimp gallery js and css anymore.
You will have to load it from a cdn.
HAML:
# app/layouts/application.html.haml
/ Blueimp Gallery CSS
%link{:crossorigin => "anonymous", :href => "https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/css/blueimp-gallery.min.css", :integrity => "sha256-Xqlh2kNfwlaYIadGK+AV287kAwoqLxYd+MoOvCykFoc=", :rel => "stylesheet"}/
/ Blueimp Gallery JS
%script{:crossorigin => "anonymous", :integrity => "sha256-Iwpd2qB3c+LqT25lxnW2SI84aABYcOxdz8StYme/fx0=", :src => "https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/js/jquery.blueimp-gallery.min.js"}
ERB:
# app/layouts/application.html.erb
<!-- Blueimp Gallery CSS -->
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/css/blueimp-gallery.min.css" integrity="sha256-Xqlh2kNfwlaYIadGK+AV287kAwoqLxYd+MoOvCykFoc=" rel="stylesheet">/</link>
<!-- Blueimp Gallery JS -->
<script crossorigin="anonymous" integrity="sha256-Iwpd2qB3c+LqT25lxnW2SI84aABYcOxdz8StYme/fx0=" src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/js/jquery.blueimp-gallery.min.js"></script>
= Installation
Add it to you Gemfile:
# Gemfile
gem 'rails-blueimp-gallery'
Generate the initializer:
$ rails g blueimp:gallery:install
Add the javascripts to your assets:
# ./app/assets/javascripts/application.js
//= require blueimp-gallery
Add the stylesheets to your assets:
# ./app/assets/stylesheets/application.css
/*
*= require blueimp-gallery
*/
Add the blueimp gallery JS/CSS from CDN:
HAML:
# app/layouts/application.html.haml
/ Blueimp Gallery CSS
%link{:crossorigin => "anonymous", :href => "https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/css/blueimp-gallery.min.css", :integrity => "sha256-Xqlh2kNfwlaYIadGK+AV287kAwoqLxYd+MoOvCykFoc=", :rel => "stylesheet"}/
/ Blueimp Gallery JS
%script{:crossorigin => "anonymous", :integrity => "sha256-Iwpd2qB3c+LqT25lxnW2SI84aABYcOxdz8StYme/fx0=", :src => "https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/js/jquery.blueimp-gallery.min.js"}
ERB:
# app/layouts/application.html.erb
<!-- Blueimp Gallery CSS -->
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/css/blueimp-gallery.min.css" integrity="sha256-Xqlh2kNfwlaYIadGK+AV287kAwoqLxYd+MoOvCykFoc=" rel="stylesheet">/</link>
<!-- Blueimp Gallery JS -->
<script crossorigin="anonymous" integrity="sha256-Iwpd2qB3c+LqT25lxnW2SI84aABYcOxdz8StYme/fx0=" src="https://cdnjs.cloudflare.com/ajax/libs/blueimp-gallery/2.44.0/js/jquery.blueimp-gallery.min.js"></script>
Add the helper to your ApplicationController:
# ./app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
view_helper Blueimp::Gallery::ApplicationViewHelper, as: :blueimp_gallery_helper
end
Add a call to the modal_gallery helper to your layout:
<%= blueimp_gallery_helper(self).prepare_modal %>
= License
This project rocks and uses MIT-LICENSE.
FAQs
Unknown package
We found that rails-blueimp-gallery demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.