foaas 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddadf3c4cdf543790d6758a5cedd06ab8b3ec274
4
- data.tar.gz: 729cacede3ccab75dbde47eef40db7297aa729f0
3
+ metadata.gz: 7ba8463279aabbe667e77fcbb72e3a8c2a10a207
4
+ data.tar.gz: ad4492b3300f7f744faee8c43cf171bf5377e925
5
5
  SHA512:
6
- metadata.gz: 2eba6dcb40fae006b85b690749506aba37c86ca9e661e7f2960191d1444ffec955be527dcc397a839a35308e13475385ae054936335768cf2c4488f30c5a3b6d
7
- data.tar.gz: b0d3dd03fb981a266240bbe74ad2e9bf23b3a398ab50c39eb57abc579d9fe585d75af13c388c41fffa6f487a69612cb7e76343257af849ef28c054e7f00fcd5b
6
+ metadata.gz: 4210ec96ef0f6ba4ba91b7c44935cbe077c4e3ae1f4d24f39bde754216405e77cf8211b04b12fffe02f7fc372661ba4451389cb6bcc09fc9b83697e9da69dbb6
7
+ data.tar.gz: ae1e89fb91590d044e2efdf272e478a6e8e0043329e85411bdddf58ef7db573a1cce6205256f5da43f87e8b7cc412eccd43ea7774131cfbf382ec7503a730c37
data/README.md CHANGED
@@ -11,97 +11,97 @@ RESTful, scalable solution to the common problem of telling people to fuck off.
11
11
  ## /off/:name/:from
12
12
 
13
13
  ```ruby
14
- Fuck::Off.new(name: "You", from: "Me").execute!
14
+ Fuck::Off.new(name: "You", from: "Me").call
15
15
  ```
16
16
 
17
17
  ## /you/:name/:from
18
18
 
19
19
  ```ruby
20
- Fuck::You.new(name: "You", from: "Me").execute!
20
+ Fuck::You.new(name: "You", from: "Me").call
21
21
  ```
22
22
 
23
23
  ## /this/:from
24
24
 
25
25
  ```ruby
26
- Fuck::This.new(from: "Me").execute!
26
+ Fuck::This.new(from: "Me").call
27
27
  ```
28
28
 
29
29
  ## /that/:from
30
30
 
31
31
  ```ruby
32
- Fuck::That.new(from: "Me").execute!
32
+ Fuck::That.new(from: "Me").call
33
33
  ```
34
34
 
35
35
  ## /everything/:from
36
36
 
37
37
  ```ruby
38
- Fuck::Everything.new(from: "Me").execute!
38
+ Fuck::Everything.new(from: "Me").call
39
39
  ```
40
40
 
41
41
  ## /everyone/:from
42
42
 
43
43
  ```ruby
44
- Fuck::Everyone.new(from: "Me").execute!
44
+ Fuck::Everyone.new(from: "Me").call
45
45
  ```
46
46
 
47
47
  ## /donut/:name/:from
48
48
 
49
49
  ```ruby
50
- Fuck::Donut.new(name: "You", from: "Me").execute!
50
+ Fuck::Donut.new(name: "You", from: "Me").call
51
51
  ```
52
52
 
53
53
  ## /shakespeare/:name/:from
54
54
 
55
55
  ```ruby
56
- Fuck::Shakespeare.new(name: "You", from: "Me").execute!
56
+ Fuck::Shakespeare.new(name: "You", from: "Me").call
57
57
  ```
58
58
 
59
59
  ## /linus/:name/:from
60
60
 
61
61
  ```ruby
62
- Fuck::Linus.new(name: "You", from: "Me").execute!
62
+ Fuck::Linus.new(name: "You", from: "Me").call
63
63
  ```
64
64
 
65
65
  ## /king/:name/:from
66
66
 
67
67
  ```ruby
68
- Fuck::King.new(name: "You", from: "Me").execute!
68
+ Fuck::King.new(name: "You", from: "Me").call
69
69
  ```
70
70
 
71
71
  ## /pink/:from
72
72
 
73
73
  ```ruby
74
- Fuck::Pink.new(from: "Me").execute!
74
+ Fuck::Pink.new(from: "Me").call
75
75
  ```
76
76
 
77
77
  ## /life/:from
78
78
 
79
79
  ```ruby
80
- Fuck::Life.new(from: "Me").execute!
80
+ Fuck::Life.new(from: "Me").call
81
81
  ```
82
82
 
83
83
  ## /chainsaw/:name/:from
84
84
 
85
85
  ```ruby
86
- Fuck::Chainsaw.new(name: "You", from: "Me").execute!
86
+ Fuck::Chainsaw.new(name: "You", from: "Me").call
87
87
  ```
88
88
 
89
89
  ## /outside/:name/:from
90
90
 
91
91
  ```ruby
92
- Fuck::Outside.new(name: "You", from: "Me").execute!
92
+ Fuck::Outside.new(name: "You", from: "Me").call
93
93
  ```
94
94
 
95
95
  ## /:thing/:from
96
96
 
97
97
  ```ruby
98
- Fuck::Thing.new(resource: "thing", from: "Me").execute!
98
+ Fuck::Thing.new(resource: "thing", from: "Me").call
99
99
  ```
100
100
 
101
101
  ## /thanks/:from
102
102
 
103
103
  ```ruby
104
- Fuck::Thanks.new(from: "Me").execute!
104
+ Fuck::Thanks.new(from: "Me").call
105
105
  ```
106
106
 
107
107
  # Contributing
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
8
8
  spec.version = FOaaS::VERSION
9
9
  spec.authors = ["Ryan T. Hosford"]
10
10
  spec.email = ["tad.hosford@gmail.com"]
11
- spec.description = %q{ Ruby interface to FOASS (http://foass.com)}
12
- spec.summary = %q{ Fun stuff }
13
- spec.homepage = ""
11
+ spec.description = %q{ Ruby interface to FOaaS - http://foaas.com }
12
+ spec.summary = %q{ Fun stuff. }
13
+ spec.homepage = "http://github.com/rthbound/foaas"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -21,9 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "pay_dirt", "~> 1.0.7"
22
22
  spec.add_development_dependency "bundler", "~> 1.3"
23
23
  spec.add_development_dependency "pry"
24
- spec.add_development_dependency "simplecov"
25
24
  spec.add_development_dependency "coveralls"
25
+ #spec.add_development_dependency "simplecov"
26
26
  spec.add_development_dependency "minitest"
27
-
28
27
  spec.add_development_dependency "rake"
29
28
  end
@@ -2,23 +2,23 @@ require 'pay_dirt'
2
2
  require 'open-uri'
3
3
  require 'json'
4
4
 
5
+
5
6
  require_relative 'foaas/version'
6
7
  require_relative 'foaas/f_o'
7
8
 
8
9
  require_relative 'salutations'
9
- require_relative 'fuck/thanks'
10
- require_relative 'fuck/thing'
11
10
  require_relative 'fuck/chainsaw'
12
- require_relative 'fuck/life'
13
- require_relative 'fuck/pink'
14
- require_relative 'fuck/king'
15
- require_relative 'fuck/linus'
16
- require_relative 'fuck/shakespeare'
17
11
  require_relative 'fuck/donut'
18
12
  require_relative 'fuck/everyone'
19
13
  require_relative 'fuck/everything'
14
+ require_relative 'fuck/king'
15
+ require_relative 'fuck/life'
16
+ require_relative 'fuck/linus'
17
+ require_relative 'fuck/off'
18
+ require_relative 'fuck/pink'
19
+ require_relative 'fuck/shakespeare'
20
+ require_relative 'fuck/thanks'
20
21
  require_relative 'fuck/that'
22
+ require_relative 'fuck/thing'
21
23
  require_relative 'fuck/this'
22
24
  require_relative 'fuck/you'
23
- require_relative 'fuck/off'
24
-
@@ -1,3 +1,3 @@
1
1
  module FOaaS
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class Chainsaw < PayDirt::Base
2
+ class Chainsaw
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::Chainsaw.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "chainsaw",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class Donut < PayDirt::Base
2
+ class Donut
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::Donut.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "donut",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class Everyone < PayDirt::Base
2
+ class Everyone
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::Everyone.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "everyone",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class Everything < PayDirt::Base
2
+ class Everything
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::Everything.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "everything",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class King < PayDirt::Base
2
+ class King
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::King.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "king",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class Life < PayDirt::Base
2
+ class Life
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::Life.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "life",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class Linus < PayDirt::Base
2
+ class Linus
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::Linus.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "linus",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class Off < PayDirt::Base
2
+ class Off
3
3
  include Salutations
4
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
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "off",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class Pink < PayDirt::Base
2
+ class Pink
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::Pink.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "pink",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class Shakespeare < PayDirt::Base
2
+ class Shakespeare
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::Shakespeare.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "shakespeare",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class Thanks < PayDirt::Base
2
+ class Thanks
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::Thanks.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "thanks",
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class That < PayDirt::Base
2
+ class That
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::That.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "that",
@@ -1,13 +1,18 @@
1
1
  module Fuck
2
- class Thing < PayDirt::Base
2
+ class Thing
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :thing
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::Thing.new(thing: "Cassowaries", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
- resource: "thing",
12
+ resource: options[:thing],
8
13
  }.merge(options)
9
14
 
10
- load_options(:resource, :from, options)
15
+ load_options(:thing, :from, options)
11
16
  end
12
17
  end
13
18
  end
@@ -1,7 +1,11 @@
1
1
  module Fuck
2
- class This < PayDirt::Base
2
+ class This
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :from
7
+ # @example
8
+ # Fuck::This.new(from: "Me").call
5
9
  def initialize(options = {})
6
10
  options = {
7
11
  resource: "this",
@@ -1,7 +1,12 @@
1
1
  module Fuck
2
- class You < PayDirt::Base
2
+ class You
3
3
  include Salutations
4
4
 
5
+ # @param [Hash] options options to send FOaaS
6
+ # @option options [String] :name
7
+ # @option options [String] :from
8
+ # @example
9
+ # Fuck::You.new(name: "You", from: "Me").call
5
10
  def initialize(options = {})
6
11
  options = {
7
12
  resource: "you",
@@ -1,7 +1,11 @@
1
1
  module Salutations
2
+ include PayDirt::UseCase
3
+
2
4
  def self.included(base)
3
- def execute!
5
+ def call
4
6
  FOaaS::FO.new(resource: @resource, from: @from, name: @name).execute!
5
7
  end
8
+
9
+ alias_method :execute!, :call
6
10
  end
7
11
  end
@@ -4,8 +4,8 @@ describe Fuck::Thing do
4
4
  before do
5
5
  @subject = Fuck::Thing
6
6
  @params = {
7
- from: SecureRandom.hex,
8
- resource: "Something"
7
+ from: SecureRandom.hex,
8
+ thing: SecureRandom.hex
9
9
  }
10
10
  end
11
11
 
@@ -16,6 +16,7 @@ describe Fuck::Thing do
16
16
 
17
17
  it "errors when initialized without required dependencies" do
18
18
  -> { @subject.new(@params.reject { |k| k.to_s == 'from' }) }.must_raise RuntimeError
19
+ -> { @subject.new(@params.reject { |k| k.to_s == 'thing' }) }.must_raise RuntimeError
19
20
  end
20
21
  end
21
22
 
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.0.3
4
+ version: 0.1.0
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-07-23 00:00:00.000000000 Z
11
+ date: 2013-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pay_dirt
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: simplecov
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: coveralls
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +94,7 @@ dependencies:
108
94
  - - '>='
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0'
111
- description: ' Ruby interface to FOASS (http://foass.com)'
97
+ description: ' Ruby interface to FOaaS - http://foaas.com '
112
98
  email:
113
99
  - tad.hosford@gmail.com
114
100
  executables: []
@@ -158,7 +144,7 @@ files:
158
144
  - test/unit/fuck/thing_test.rb
159
145
  - test/unit/fuck/this_test.rb
160
146
  - test/unit/fuck/you_test.rb
161
- homepage: ''
147
+ homepage: http://github.com/rthbound/foaas
162
148
  licenses:
163
149
  - MIT
164
150
  metadata: {}
@@ -181,7 +167,7 @@ rubyforge_project:
181
167
  rubygems_version: 2.0.3
182
168
  signing_key:
183
169
  specification_version: 4
184
- summary: Fun stuff
170
+ summary: Fun stuff.
185
171
  test_files:
186
172
  - test/foaas/f_o_test.rb
187
173
  - test/minitest_helper.rb