foaas 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -6
- data/lib/foaas.rb +3 -0
- data/lib/foaas/version.rb +1 -1
- data/lib/fuck/fascinating.rb +22 -0
- data/lib/fuck/flying.rb +22 -0
- data/lib/fuck/outside.rb +22 -0
- data/test/unit/fuck/fascinating_test.rb +28 -0
- data/test/unit/fuck/flying_test.rb +28 -0
- data/test/unit/fuck/outside_test.rb +30 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e60ef550999b8d1f1ece43cb9be4a7cfbb0e167d
|
4
|
+
data.tar.gz: 941b9cf9a422e0631a516da3cf182fc449e23ff3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30064fd791311485e02dc4cf89e8c19f52765dcfb94558c9b83341687379491b23486c2b4fdb8435c92bcabfa5a50a8a0fa952a9d29499571ea750e7b8fe5d0e
|
7
|
+
data.tar.gz: 45edfb224f31076e549b6195cdb8f8d6bc20e6965a318d2042cf0843c127bffaee30c76c5d099f4985f88bb556636c02ffd3bf8044a9da82aced8fb86ec1aa1f
|
data/README.md
CHANGED
@@ -98,18 +98,22 @@ Fuck::Thing.new(thing: "Anything", from: "Me").call
|
|
98
98
|
Fuck::Thanks.new(from: "Me").call
|
99
99
|
```
|
100
100
|
|
101
|
-
|
101
|
+
## /flying/:from
|
102
102
|
|
103
|
-
|
103
|
+
```ruby
|
104
|
+
Fuck::Flying.new(from: "Me").call
|
105
|
+
```
|
106
|
+
|
107
|
+
## /fascinating/:from
|
104
108
|
|
105
|
-
Intended:
|
106
109
|
```ruby
|
107
|
-
Fuck::
|
110
|
+
Fuck::Fascinating.new(from: "Me").call
|
108
111
|
```
|
109
112
|
|
110
|
-
|
113
|
+
## /outside/:name/:from
|
114
|
+
|
111
115
|
```ruby
|
112
|
-
|
116
|
+
Fuck::Outside.new(name: "You", from: "Me").call
|
113
117
|
```
|
114
118
|
|
115
119
|
# Contributing
|
data/lib/foaas.rb
CHANGED
data/lib/foaas/version.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fuck
|
2
|
+
class Fascinating
|
3
|
+
include Salutations
|
4
|
+
|
5
|
+
# @param [Hash] options options to send FOaaS
|
6
|
+
# @option options [String] :name
|
7
|
+
# @option options [String] :from
|
8
|
+
# @example
|
9
|
+
# Fuck::Fascinating.new(from: "Me").call
|
10
|
+
# => <PayDirt::Result:0x9999eb4 @data= {
|
11
|
+
# "message"=>"Fascinating story, in what chapter do you shut the fuck up?",
|
12
|
+
# "subtitle"=>"- Me"
|
13
|
+
# }, @success=true>
|
14
|
+
def initialize(options = {})
|
15
|
+
options = {
|
16
|
+
resource: "fascinating",
|
17
|
+
}.merge(options)
|
18
|
+
|
19
|
+
load_options(:resource, :from, options)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/fuck/flying.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fuck
|
2
|
+
class Flying
|
3
|
+
include Salutations
|
4
|
+
|
5
|
+
# @param [Hash] options options to send FOaaS
|
6
|
+
# @option options [String] :name
|
7
|
+
# @option options [String] :from
|
8
|
+
# @example
|
9
|
+
# Fuck::Flying.new(from: "Me").call
|
10
|
+
# => #<PayDirt::Result:0x99e132c @data= {
|
11
|
+
# "message"=>"I don't give a flying fuck.",
|
12
|
+
# "subtitle"=>"- Me"
|
13
|
+
# }, @success=true>
|
14
|
+
def initialize(options = {})
|
15
|
+
options = {
|
16
|
+
resource: "flying",
|
17
|
+
}.merge(options)
|
18
|
+
|
19
|
+
load_options(:resource, :from, options)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/fuck/outside.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fuck
|
2
|
+
class Outside
|
3
|
+
include Salutations
|
4
|
+
|
5
|
+
# @param [Hash] options options to send FOaaS
|
6
|
+
# @option options [String] :name
|
7
|
+
# @option options [String] :from
|
8
|
+
# @example
|
9
|
+
# Fuck::Off.new(name: "You", from: "Me").call
|
10
|
+
# => #<PayDirt::Result:0x8a544f4 @data= {
|
11
|
+
# "message"=>"You, why don't you go outside and play hide-and-go-fuck-yourself?",
|
12
|
+
# "subtitle"=>"- Me"
|
13
|
+
# }, @success=true>
|
14
|
+
def initialize(options = {})
|
15
|
+
options = {
|
16
|
+
resource: "outside",
|
17
|
+
}.merge(options)
|
18
|
+
|
19
|
+
load_options(:resource, :name, :from, options)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fuck::Fascinating do
|
4
|
+
before do
|
5
|
+
@subject = Fuck::Fascinating
|
6
|
+
@params = {
|
7
|
+
from: SecureRandom.hex,
|
8
|
+
}
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "as a class" do
|
12
|
+
it "initializes properly" do
|
13
|
+
@subject.new(@params).must_respond_to :execute!
|
14
|
+
end
|
15
|
+
|
16
|
+
it "errors when initialized without required dependencies" do
|
17
|
+
-> { @subject.new(@params.reject { |k| k.to_s == 'from' }) }.must_raise RuntimeError
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "as an instance" do
|
22
|
+
it "executes successfully" do
|
23
|
+
result = @subject.new(@params).execute!
|
24
|
+
result.successful?.must_equal true
|
25
|
+
result.must_be_kind_of PayDirt::Result
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fuck::Flying do
|
4
|
+
before do
|
5
|
+
@subject = Fuck::Flying
|
6
|
+
@params = {
|
7
|
+
from: SecureRandom.hex,
|
8
|
+
}
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "as a class" do
|
12
|
+
it "initializes properly" do
|
13
|
+
@subject.new(@params).must_respond_to :execute!
|
14
|
+
end
|
15
|
+
|
16
|
+
it "errors when initialized without required dependencies" do
|
17
|
+
-> { @subject.new(@params.reject { |k| k.to_s == 'from' }) }.must_raise RuntimeError
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "as an instance" do
|
22
|
+
it "executes successfully" do
|
23
|
+
result = @subject.new(@params).execute!
|
24
|
+
result.successful?.must_equal true
|
25
|
+
result.must_be_kind_of PayDirt::Result
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fuck::Outside do
|
4
|
+
before do
|
5
|
+
@subject = Fuck::Outside
|
6
|
+
@params = {
|
7
|
+
name: SecureRandom.hex,
|
8
|
+
from: SecureRandom.hex,
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "as a class" do
|
13
|
+
it "initializes properly" do
|
14
|
+
@subject.new(@params).must_respond_to :execute!
|
15
|
+
end
|
16
|
+
|
17
|
+
it "errors when initialized without required dependencies" do
|
18
|
+
-> { @subject.new(@params.reject { |k| k.to_s == 'name' }) }.must_raise RuntimeError
|
19
|
+
-> { @subject.new(@params.reject { |k| k.to_s == 'from' }) }.must_raise RuntimeError
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "as an instance" do
|
24
|
+
it "executes successfully" do
|
25
|
+
result = @subject.new(@params).execute!
|
26
|
+
result.successful?.must_equal true
|
27
|
+
result.must_be_kind_of PayDirt::Result
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foaas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan T. Hosford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pay_dirt
|
@@ -115,10 +115,13 @@ files:
|
|
115
115
|
- lib/fuck/donut.rb
|
116
116
|
- lib/fuck/everyone.rb
|
117
117
|
- lib/fuck/everything.rb
|
118
|
+
- lib/fuck/fascinating.rb
|
119
|
+
- lib/fuck/flying.rb
|
118
120
|
- lib/fuck/king.rb
|
119
121
|
- lib/fuck/life.rb
|
120
122
|
- lib/fuck/linus.rb
|
121
123
|
- lib/fuck/off.rb
|
124
|
+
- lib/fuck/outside.rb
|
122
125
|
- lib/fuck/pink.rb
|
123
126
|
- lib/fuck/shakespeare.rb
|
124
127
|
- lib/fuck/thanks.rb
|
@@ -133,10 +136,13 @@ files:
|
|
133
136
|
- test/unit/fuck/donut_test.rb
|
134
137
|
- test/unit/fuck/everyone_test.rb
|
135
138
|
- test/unit/fuck/everything_test.rb
|
139
|
+
- test/unit/fuck/fascinating_test.rb
|
140
|
+
- test/unit/fuck/flying_test.rb
|
136
141
|
- test/unit/fuck/king_test.rb
|
137
142
|
- test/unit/fuck/life_test.rb
|
138
143
|
- test/unit/fuck/linus_test.rb
|
139
144
|
- test/unit/fuck/off_test.rb
|
145
|
+
- test/unit/fuck/outside_test.rb
|
140
146
|
- test/unit/fuck/pink_test.rb
|
141
147
|
- test/unit/fuck/shakespeare_test.rb
|
142
148
|
- test/unit/fuck/thanks_test.rb
|
@@ -175,10 +181,13 @@ test_files:
|
|
175
181
|
- test/unit/fuck/donut_test.rb
|
176
182
|
- test/unit/fuck/everyone_test.rb
|
177
183
|
- test/unit/fuck/everything_test.rb
|
184
|
+
- test/unit/fuck/fascinating_test.rb
|
185
|
+
- test/unit/fuck/flying_test.rb
|
178
186
|
- test/unit/fuck/king_test.rb
|
179
187
|
- test/unit/fuck/life_test.rb
|
180
188
|
- test/unit/fuck/linus_test.rb
|
181
189
|
- test/unit/fuck/off_test.rb
|
190
|
+
- test/unit/fuck/outside_test.rb
|
182
191
|
- test/unit/fuck/pink_test.rb
|
183
192
|
- test/unit/fuck/shakespeare_test.rb
|
184
193
|
- test/unit/fuck/thanks_test.rb
|