![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
= ActiveGist! {}[http://travis-ci.org/sinisterchipmunk/active-gist] {
}[https://codeclimate.com/github/sinisterchipmunk/active-gist] {
}[https://coveralls.io/r/sinisterchipmunk/active-gist]
I needed a Ruby library to perform basic create, read, update and delete operations on Gists. I looked, I saw basically nothing (except hacky, test-less tools), and I decided to roll my own. Here's the result.
ActiveGist is so named because it wraps GitHub's Gist API with a class implementing the ActiveModel modules. So, it should be pretty familiar to anyone who's ever used models in Ruby on Rails.
== Installation
The obligatory installation steps...
gem install activegist
== Usage
require 'activegist'
ActiveGist::API.username = "gist owner's github username" ActiveGist::API.password = "gist owner's github password"
gist = ActiveGist.new gist.description = "gist description" gist.files #=> {} gist.files['test.txt'] = { :content => 'file content' } gist.save #=> true or false gist.save! #=> raise an error on validation error
gist = ActiveGist.new :public => true, :description => "optional", :files => { 'test.txt' => { :content => 'file content' } }) gist.save
gist = ActiveGist.create!(:files => { 'test.txt' => { :content => 'file content' } })
gist = ActiveGist.new gist.valid? #=> false gist.errors.full_messages #=> ["Files can't be blank"] gist.errors[:files] #=> ["can't be blank"]
gist = ActiveGist.find id gist.public? #=> true if the gist is public, false otherwise gist.files #=>
gist = ActiveGist.find id forked_gist = gist.fork
gist = ActiveGist.find id gist.starred? #=> boolean gist.star! gist.unstar!
ActiveGist.all ActiveGist.all :public # returns only public gists ActiveGist.all :starred # returns only starred gists
ActiveGist.first ActiveGist.last
ActiveGist.count ActiveGist.count :public ActiveGist.count :starred
gist = ActiveGist.first gist.files['test.txt'][:content] = "Updated content" gist.changed? #=> true gist.save #=> true if saved, false if validation failed gist.save! #=> true if saved, raise error if validation failed
gist.destroy
== Good Lovin'
Released under the MIT license. Copyright (c) 2012, Colin MacKenzie IV
FAQs
Unknown package
We found that activegist 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.