bcx 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +17 -1
- data/bcx.gemspec +1 -1
- data/docs/access.html +123 -0
- data/docs/bcx.html +177 -0
- data/docs/configuration.html +9 -27
- data/docs/http.html +134 -0
- data/docs/oauth.html +136 -0
- data/docs/person.html +130 -0
- data/docs/project.html +136 -0
- data/docs/response_error.html +16 -7
- data/docs/todo.html +130 -0
- data/docs/todolist.html +140 -0
- data/docs/version.html +1 -6
- data/lib/bcx.rb +1 -2
- data/lib/bcx/client/http.rb +9 -0
- data/lib/bcx/client/oauth.rb +8 -0
- data/lib/bcx/configuration.rb +10 -9
- data/lib/bcx/resources/access.rb +19 -19
- data/lib/bcx/response_error.rb +20 -0
- data/lib/bcx/version.rb +1 -1
- metadata +51 -37
- data/lib/rapidash/collection.rb +0 -33
data/lib/rapidash/collection.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
module Rapidash
|
2
|
-
module Collection
|
3
|
-
|
4
|
-
def self.included(base)
|
5
|
-
base.extend ClassMethods
|
6
|
-
end
|
7
|
-
|
8
|
-
module ClassMethods
|
9
|
-
def collection(name, attrs = {})
|
10
|
-
path = attrs[:path] || name.to_s
|
11
|
-
path.gsub!(/^\//, '')
|
12
|
-
|
13
|
-
method = attrs[:method] || :get
|
14
|
-
|
15
|
-
define_method("#{name}!") do
|
16
|
-
original_url = @url
|
17
|
-
|
18
|
-
@url += "/#{path}"
|
19
|
-
@options[:method] = method
|
20
|
-
result = call!
|
21
|
-
|
22
|
-
@url = original_url
|
23
|
-
|
24
|
-
result
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
class Rapidash::Base
|
32
|
-
include Rapidash::Collection
|
33
|
-
end
|