
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
refinerycms-vimeo-videos
Advanced tools
This gem makes it easy for refinerycms sites to add vimeo videos to models. It is still in a very experimental phase of development, but already used in production. Use only if you are sure about what the code does.
Add the gem to your Gemfile and bundle install it
gem 'refinerycms-vimeo-videos'
Run the generator and migrate your database
rails generate refinerycms_vimeo_videos
rake db:migrate
Create an api-application for your vimeo account under http://vimeo.com/api/applications with a callback url of
http://yourapp.com/refinery/vimeo_videos/callback
Copy/paste the consumer_key and consumer_secret of your vimeo api-application to the related Refinery Settings (:vimeo_consumer_key and :vimeo_consumer_secret). Then access the following url:
http://yourapp.com/refinery/vimeo_videos/authorization
After this, your app should be setup to use your vimeo account.
Add a field to the table:
add_column :projects, :test_video_id, :string
Call vimeo_video in your model with the corresponding field as attribute:
vimeo_video :test_video
In your _form.html.erb insert this:
<div class='field'>
<%= f.label "Test Video" -%>
<%= render :partial => "/refinery/admin/vimeo_picker", :locals => {
:f => f,
:field => :test_video_id,
:vimeo_video => @project.test_video
} %>
</div>
Now embed the video (with a width of 750px):
<%= @project.test_video.embed '750' -%>
If you need to invalidate the whole cache, simply call delete_all on VimeoEmbedCache and VimeoMetaCache.
In case you want to just pull in changes, you can do:
VimeoEmbedCache.update_cache
VimeoMetaCache.update_cache
Alot!
FAQs
Unknown package
We found that refinerycms-vimeo-videos 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.