Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Who needs Wordpress when you can use CLOUDPRESS!
Cloudpress is a blogging engine that publishes metadown files from Dropbox. It's designed as a fire and forget blogging solution, if you can write a metadown/markdown file then you can publish it without doing anything more than just placing it in a directory on Dropbox.
It's designed to be included within a Rails 3.1+ application, and provides a multitude of hooks for you to build your own templates around it.
Add this line to your application's Gemfile:
gem 'cloudpress'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cloudpress
After that, you will want to copy the migrations into the application
$ rake cloudpress:install:migrations
And then run the initializer generator, which will ask you to fill in the application ID, log in to dropbox and authorize the application, and then enter the token you're provided with and then write them all in to config/initializers/cloudpress.rb
you may want to replace them with ENV variables instead of hardcoding them.
$ rails g cloudpress:initializer
The application ID is 7i1ku4x291czftv
which points to a dropbox application that I've made. If you'd like to create your own, just go ahead and replace that ID with your own applications.
After you've done that you can run your initial import.
$ rake cloudpress:update
config.app_key # The application ID, as explained above
config.app_secret # The app secret, populated by the installer
config.app_token # The token you pasted in from the installtion
config.base_path # The path in your dropbox that's considered root
config.live_path # Where your live files will live under the base_path
config.draft_path # Draft file location, under the base_path
config.draft_user # Username for draft HTTP auth, leave as nil for no auth
config.draft_password # Password for draft HTTP auth, leave as nil for no auth
Cloudpress provides the majority of it's functionality through view helper renderers that you can move around and change to fit with your HTML structure.
You can see examples of these within the views/cloudpress/*
folder, again all of these partial templates can be overriden within your application by adding a views/cloudpress/*
directory.
Cloudpress, by default will look in a cloudpress
directory in the root of your Dropbox. Inside it will create two folders on the first update, live
and draft
folders. Cloudpress will search these directories recursivly, so you can use whatever organisational structure suits. I tend just to stick with years, since I don't write enough blog posts!
You then just create a metadown
file with a md
extension, that reads like this:
---
title: The Rails renderer pattern
publish_date: 24/04/2015 10:30AM
tags:
- Ruby
- Ruby on rails
- Renderers
- Views
---
## Development
So this is the content...
The first part of the file contains metadata about the post, the second the actual content, all markdown is supported, and uses pygments for code block highighting
I've got this deployed on Heroku, with a scheduled job to run every 10 mins using the provided rake task, or you can do it programatically by booting a console and typing Cloudpress.update!
After checking out the repo, run bin/setup
to install dependencies. Then, run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
to create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that cloudpress 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.