restfully 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +90 -0
- data/Rakefile +75 -0
- data/TODO.rdoc +3 -0
- data/VERSION +1 -0
- data/bin/restfully +80 -0
- data/examples/grid5000.rb +28 -0
- data/lib/restfully.rb +19 -0
- data/lib/restfully/collection.rb +63 -0
- data/lib/restfully/error.rb +4 -0
- data/lib/restfully/extensions.rb +41 -0
- data/lib/restfully/http.rb +9 -0
- data/lib/restfully/http/adapters/abstract_adapter.rb +30 -0
- data/lib/restfully/http/adapters/patron_adapter.rb +16 -0
- data/lib/restfully/http/adapters/rest_client_adapter.rb +31 -0
- data/lib/restfully/http/error.rb +20 -0
- data/lib/restfully/http/headers.rb +20 -0
- data/lib/restfully/http/request.rb +24 -0
- data/lib/restfully/http/response.rb +19 -0
- data/lib/restfully/link.rb +35 -0
- data/lib/restfully/parsing.rb +31 -0
- data/lib/restfully/resource.rb +117 -0
- data/lib/restfully/session.rb +61 -0
- data/lib/restfully/special_array.rb +5 -0
- data/lib/restfully/special_hash.rb +5 -0
- data/restfully.gemspec +99 -0
- data/spec/collection_spec.rb +93 -0
- data/spec/fixtures/grid5000-sites.json +489 -0
- data/spec/http/error_spec.rb +18 -0
- data/spec/http/headers_spec.rb +17 -0
- data/spec/http/request_spec.rb +45 -0
- data/spec/http/response_spec.rb +15 -0
- data/spec/http/rest_client_adapter_spec.rb +33 -0
- data/spec/link_spec.rb +58 -0
- data/spec/parsing_spec.rb +25 -0
- data/spec/resource_spec.rb +198 -0
- data/spec/restfully_spec.rb +13 -0
- data/spec/session_spec.rb +105 -0
- data/spec/spec_helper.rb +13 -0
- metadata +117 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'restfully'
|
4
|
+
require 'spec'
|
5
|
+
require 'spec/autorun'
|
6
|
+
|
7
|
+
def fixture(filename)
|
8
|
+
File.read(File.join(File.dirname(__FILE__), "fixtures", filename))
|
9
|
+
end
|
10
|
+
|
11
|
+
Spec::Runner.configure do |config|
|
12
|
+
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: restfully
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Cyril Rohr
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-09-17 00:00:00 +02:00
|
13
|
+
default_executable: restfully
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rest-client
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "1.0"
|
24
|
+
version:
|
25
|
+
description: Experimental code for auto-generation of wrappers on top of RESTful APIs that follow HATEOAS principles and provide OPTIONS methods and/or Allow headers.
|
26
|
+
email: cyril.rohr@gmail.com
|
27
|
+
executables:
|
28
|
+
- restfully
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- LICENSE
|
33
|
+
- README.rdoc
|
34
|
+
files:
|
35
|
+
- .document
|
36
|
+
- .gitignore
|
37
|
+
- LICENSE
|
38
|
+
- README.rdoc
|
39
|
+
- Rakefile
|
40
|
+
- TODO.rdoc
|
41
|
+
- VERSION
|
42
|
+
- bin/restfully
|
43
|
+
- examples/grid5000.rb
|
44
|
+
- lib/restfully.rb
|
45
|
+
- lib/restfully/collection.rb
|
46
|
+
- lib/restfully/error.rb
|
47
|
+
- lib/restfully/extensions.rb
|
48
|
+
- lib/restfully/http.rb
|
49
|
+
- lib/restfully/http/adapters/abstract_adapter.rb
|
50
|
+
- lib/restfully/http/adapters/patron_adapter.rb
|
51
|
+
- lib/restfully/http/adapters/rest_client_adapter.rb
|
52
|
+
- lib/restfully/http/error.rb
|
53
|
+
- lib/restfully/http/headers.rb
|
54
|
+
- lib/restfully/http/request.rb
|
55
|
+
- lib/restfully/http/response.rb
|
56
|
+
- lib/restfully/link.rb
|
57
|
+
- lib/restfully/parsing.rb
|
58
|
+
- lib/restfully/resource.rb
|
59
|
+
- lib/restfully/session.rb
|
60
|
+
- lib/restfully/special_array.rb
|
61
|
+
- lib/restfully/special_hash.rb
|
62
|
+
- restfully.gemspec
|
63
|
+
- spec/collection_spec.rb
|
64
|
+
- spec/fixtures/grid5000-sites.json
|
65
|
+
- spec/http/error_spec.rb
|
66
|
+
- spec/http/headers_spec.rb
|
67
|
+
- spec/http/request_spec.rb
|
68
|
+
- spec/http/response_spec.rb
|
69
|
+
- spec/http/rest_client_adapter_spec.rb
|
70
|
+
- spec/link_spec.rb
|
71
|
+
- spec/parsing_spec.rb
|
72
|
+
- spec/resource_spec.rb
|
73
|
+
- spec/restfully_spec.rb
|
74
|
+
- spec/session_spec.rb
|
75
|
+
- spec/spec_helper.rb
|
76
|
+
has_rdoc: true
|
77
|
+
homepage: http://github.com/crohr/restfully
|
78
|
+
licenses: []
|
79
|
+
|
80
|
+
post_install_message:
|
81
|
+
rdoc_options:
|
82
|
+
- --charset=UTF-8
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: "0"
|
90
|
+
version:
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: "0"
|
96
|
+
version:
|
97
|
+
requirements: []
|
98
|
+
|
99
|
+
rubyforge_project: restfully
|
100
|
+
rubygems_version: 1.3.2
|
101
|
+
signing_key:
|
102
|
+
specification_version: 3
|
103
|
+
summary: Experimental code for auto-generation of wrappers on top of RESTful APIs that follow some specific conventions.
|
104
|
+
test_files:
|
105
|
+
- spec/collection_spec.rb
|
106
|
+
- spec/http/error_spec.rb
|
107
|
+
- spec/http/headers_spec.rb
|
108
|
+
- spec/http/request_spec.rb
|
109
|
+
- spec/http/response_spec.rb
|
110
|
+
- spec/http/rest_client_adapter_spec.rb
|
111
|
+
- spec/link_spec.rb
|
112
|
+
- spec/parsing_spec.rb
|
113
|
+
- spec/resource_spec.rb
|
114
|
+
- spec/restfully_spec.rb
|
115
|
+
- spec/session_spec.rb
|
116
|
+
- spec/spec_helper.rb
|
117
|
+
- examples/grid5000.rb
|