
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Spud Photos is an engine for creating and managing photo galleries, designed for use with Spud.
In your Gemfile add the following
gem 'spud_photos'
Run bundle install
Copy in database migrations to your new rails project
bundle exec rake railties:install:migrations
rake db:migrate
Run a rails server instance and point your browser to /spud/admin
Spud Photos accepts the following configuration options. Place them in application.rb
or in an initializer.
Spud::Photos.configure do |config|
config.base_layout = 'application'
config.galleries_enabled = false
config.base_path = 'photos'
config.photo_styles = {
:small => '50x50#',
:medium => '200x200#',
:large => '400x400#',
:huge => '600x600'
}
config.paperclip_storage = :filesystem #use :s3 to use s3 storage (aws gem required)
config.s3_credentials = "#{Rails.root}/config/s3.yml"
config.storage_path = ":rails_root/public/system/spud_photos/:id/:style/:basename.:extension"
config.storage_url = "/system/spud_photos/:id/:style/:basename.:extension"
config.s3_host_name = "s3.amazonaws.com" #Defaults to us east zone, change for other regions.
end
The photo_styles
option will be passed to Paperclip, so any valid paperclip styles can be added here.
A Gallery is just an additional layer of organization above the Album layer. For example, a Gallery called "Vacations" might include Albums titled "Europe", "Hawaii", and "Florida". Galleries are turned off by default.
A number of built-in views have been provided to help you get started with the frontend display. Customizing these views will require you to copy them into your local application, which can be accomplished by using the views generator.
rails generate spud:photos:views
NOTE: The built-in views are likely to undergo changes as features are added to the photos engine. If a new version of Spud Photos does not play nicely with your customized views, try backing up your views to an alternate location and running the views generator again to see what has changed.
Spud uses RSpec for testing. Get the tests running with a few short commands:
Create and migrate the databases:
rake db:create
rake db:migrate
Load the schema in to the test database:
rake app:db:test:prepare
Run the tests with RSpec
rspec spec
After the tests have completed the current code coverage stats is available by opening /coverage/index.html
in a browser.
FAQs
Unknown package
We found that spud_photos 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.