Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

campy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

campy

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Campy: A Tiny Zero-Dependency Campfire Ruby client

Gem Version Build Status Code Climate Dependency Status

Tiny Campfire Ruby client so you can get on with it. It's implemented on top of Net::HTTP with no external dependencies for Ruby compatibilities.

Installation

Add this line to your application's Gemfile:

gem 'campy'

And then execute:

$ bundle

Or install it yourself as:

$ gem install campy

Usage

First create a campfire.yml file in your home directory:

$ cat <<CAMPFIRE_YAML > $HOME/.campfire.yml
:account: mysubdomain
:token: mytoken123
:room: House of Hubot
CAMPFIRE_YAML

campy Command

Campy comes with the campy command so you can send messages from the command line:

$ campy speak "Campy says yello"
$ campy paste "Long pastes are long"
$ campy play ohmy

Or pipe in your message:

$ echo "Campy tries to honor unix conventions" | campy speak
$ cat ~/stackdump.log | campy paste
$ echo ohmy | campy play

Ruby Library

There's not much to the API; create a Campy::Room and go:

require 'campy'

campy = Campy::Room.new(:account => "mysubdomain",
  :token => "mytoken123", :room => "House of Hubot")
campy.speak "Campy says yello"
campy.paste "Long pastes are long"
campy.play "ohmy"

If you know the room ID and would prefer to use that instead of the name:

require 'campy'

campy = Campy::Room.new(:account => "mysubdomain",
  :token => "mytoken123", :room_id => "12345")
campy.speak "Campy says yello"
campy.paste "Long pastes are long"
campy.play "ohmy"

Why not use the campfire.yml config? Let's do that:

require 'campy'
require 'yaml'

campy = Campy::Room.new(YAML.load_file(
  File.expand_path("~/.campfire.yml")))
campy.speak "Campy says yello"
campy.paste "Long pastes are long"
campy.play "ohmy"

Development

  • Source hosted at GitHub
  • Report issues/questions/feature requests on GitHub Issues

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by Fletcher Nichol (fnichol@nichol.ca)

License

MIT (see LICENSE)

FAQs

Package last updated on 23 May 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc