Skip to content

Commit

Permalink
Merge 5dd2fea into d2b8abf
Browse files Browse the repository at this point in the history
  • Loading branch information
rthbound committed Jul 21, 2013
2 parents d2b8abf + 5dd2fea commit 613606e
Show file tree
Hide file tree
Showing 37 changed files with 789 additions and 30 deletions.
114 changes: 94 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,113 @@
# Foaas [![Build Status](https://travis-ci.org/rthbound/foaas.png?branch=master)](https://travis-ci.org/rthbound/foaas) [![Coverage Status](https://coveralls.io/repos/rthbound/foaas/badge.png)](https://coveralls.io/r/rthbound/foaas) [![Code Climate](https://codeclimate.com/github/rthbound/foaas.png)](https://codeclimate.com/github/rthbound/foaas)
# FOaaS [![Build Status](https://travis-ci.org/rthbound/foaas.png?branch=master)](https://travis-ci.org/rthbound/foaas) [![Coverage Status](https://coveralls.io/repos/rthbound/foaas/badge.png)](https://coveralls.io/r/rthbound/foaas) [![Code Climate](https://codeclimate.com/github/rthbound/foaas.png)](https://codeclimate.com/github/rthbound/foaas)
Ruby Interface to FOAAS ([http://foaas.herokuapp.com/](http://foaas.herokuapp.com/))

## Installation
## What is FOAAS?

Add this line to your application's Gemfile:
[FOAAS](http://foaas.herokuapp.com/)(Fuck Off As A Service) provides a modern,
RESTful, scalable solution to the common problem of telling people to fuck off.

gem 'foaas'
# Usage

And then execute:
## /off/:name/:from

$ bundle
```ruby
FOaaS::Off.new(name: "You", from: "Me").execute!
```

## /you/:name/:from

```ruby
FOaaS::You.new(name: "You", from: "Me").execute!
```

## /this/:from

```ruby
FOaaS::This.new(name: "You", from: "Me").execute!
```

## /that/:from

```ruby
FOaaS::That.new(name: "You", from: "Me").execute!
```

## /everything/:from

```ruby
FOaaS::Everything.new(name: "You", from: "Me").execute!
```

## /everyone/:from

```ruby
FOaaS::Everyone.new(name: "You", from: "Me").execute!
```

## /donut/:name/:from

```ruby
FOaaS::Donut.new(name: "You", from: "Me").execute!
```

## /shakespeare/:name/:from

Or install it yourself as:
```ruby
FOaaS::Shakespeare.new(name: "You", from: "Me").execute!
```

## /linus/:name/:from

```ruby
FOaaS::Linus.new(name: "You", from: "Me").execute!
```

## /king/:name/:from

$ gem install foaas
```ruby
FOaaS::King.new(name: "You", from: "Me").execute!
```

## Usage
## /pink/:from

```ruby
require "foaas"
FOaaS::Pink.new(name: "You", from: "Me").execute!
```

# 'Eff this
Foaas::FO.new(resource: "this", from: "slash_nick").execute!
# => #<PayDirt::Result:0x933c10c @data={"message"=>"Fuck this.", "subtitle"=>"- slash_nick"}, @success=true>
## /life/:from

# 'Eff that
Foaas::FO.new(resource: "that", from: "slash_nick").execute!
# => #<PayDirt::Result:0x937c388 @data={"message"=>"Fuck that.", "subtitle"=>"- slash_nick"}, @success=true>
```ruby
FOaaS::Life.new(name: "You", from: "Me").execute!
```

## /chainsaw/:name/:from

# 'Eff off, cruel world
Foaas::FO.new(name: "cruel%20world", from: "slash_nick").execute!
# => #<PayDirt::Result:0x843debc @data={"message"=>"Fuck off, cruel world.", "subtitle"=>"- slash_nick"}, @success=true>
```ruby
FOaaS::Chainsaw.new(name: "You", from: "Me").execute!
```

## Contributing
## /outside/:name/:from

```ruby
FOaaS::Outside.new(name: "You", from: "Me").execute!
```

## /:thing/:from

```ruby
FOaaS::Thing.new(name: "You", from: "Me").execute!
```

## /thanks/:from

```ruby
FOaaS::Thanks.new(from: "Me").execute!
```

# Contributing

FOAAS may add some new, fun features. Taking advantage of those new features may
require updates. Please feel free to contribute. Caveat: tests or 'eff off ;)

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
Expand Down
2 changes: 1 addition & 1 deletion foaas.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require 'foaas/version'

Gem::Specification.new do |spec|
spec.name = "foaas"
spec.version = Foaas::VERSION
spec.version = FOaaS::VERSION
spec.authors = ["Ryan T. Hosford"]
spec.email = ["tad.hosford@gmail.com"]
spec.description = %q{brb}
Expand Down
29 changes: 24 additions & 5 deletions lib/foaas.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
require "pay_dirt"
require "open-uri"
require "json"
require "foaas/f_o"
require "foaas/version"
require 'pay_dirt'
require 'open-uri'
require 'json'

require_relative 'foaas/version'
require_relative 'foaas/f_o'

require_relative 'salutations'
require_relative 'foaas/thanks'
require_relative 'foaas/thing'
require_relative 'foaas/chainsaw'
require_relative 'foaas/life'
require_relative 'foaas/pink'
require_relative 'foaas/king'
require_relative 'foaas/linus'
require_relative 'foaas/shakespeare'
require_relative 'foaas/donut'
require_relative 'foaas/everyone'
require_relative 'foaas/everything'
require_relative 'foaas/that'
require_relative 'foaas/this'
require_relative 'foaas/you'
require_relative 'foaas/off'

15 changes: 15 additions & 0 deletions lib/foaas/chainsaw.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Chainsaw < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "chainsaw",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/donut.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Donut < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "donut",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/everyone.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Everyone < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "everyone",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/everything.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Everything < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "everything",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
2 changes: 1 addition & 1 deletion lib/foaas/f_o.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Foaas
module FOaaS
class FO < PayDirt::Base
def initialize(options = {})
options = {
Expand Down
15 changes: 15 additions & 0 deletions lib/foaas/king.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class King < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "king",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/life.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Life < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "life",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/linus.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Linus < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "linus",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/off.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Off < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "off",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/pink.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Pink < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "pink",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/shakespeare.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Shakespeare < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "shakespeare",
}.merge(options)

load_options(:resource, :name, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/thanks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Thanks < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "thanks",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/that.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class That < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "that",
}.merge(options)

load_options(:resource, :from, options)
end
end
end
15 changes: 15 additions & 0 deletions lib/foaas/thing.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'pay_dirt'

module FOaaS
class Thing < PayDirt::Base
include Salutations

def initialize(options = {})
options = {
resource: "thing",
}.merge(options)

load_options(:resource, :from, options)
end
end
end

0 comments on commit 613606e

Please sign in to comment.