restfully 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/.document +5 -0
  2. data/.gitignore +5 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +90 -0
  5. data/Rakefile +75 -0
  6. data/TODO.rdoc +3 -0
  7. data/VERSION +1 -0
  8. data/bin/restfully +80 -0
  9. data/examples/grid5000.rb +28 -0
  10. data/lib/restfully.rb +19 -0
  11. data/lib/restfully/collection.rb +63 -0
  12. data/lib/restfully/error.rb +4 -0
  13. data/lib/restfully/extensions.rb +41 -0
  14. data/lib/restfully/http.rb +9 -0
  15. data/lib/restfully/http/adapters/abstract_adapter.rb +30 -0
  16. data/lib/restfully/http/adapters/patron_adapter.rb +16 -0
  17. data/lib/restfully/http/adapters/rest_client_adapter.rb +31 -0
  18. data/lib/restfully/http/error.rb +20 -0
  19. data/lib/restfully/http/headers.rb +20 -0
  20. data/lib/restfully/http/request.rb +24 -0
  21. data/lib/restfully/http/response.rb +19 -0
  22. data/lib/restfully/link.rb +35 -0
  23. data/lib/restfully/parsing.rb +31 -0
  24. data/lib/restfully/resource.rb +117 -0
  25. data/lib/restfully/session.rb +61 -0
  26. data/lib/restfully/special_array.rb +5 -0
  27. data/lib/restfully/special_hash.rb +5 -0
  28. data/restfully.gemspec +99 -0
  29. data/spec/collection_spec.rb +93 -0
  30. data/spec/fixtures/grid5000-sites.json +489 -0
  31. data/spec/http/error_spec.rb +18 -0
  32. data/spec/http/headers_spec.rb +17 -0
  33. data/spec/http/request_spec.rb +45 -0
  34. data/spec/http/response_spec.rb +15 -0
  35. data/spec/http/rest_client_adapter_spec.rb +33 -0
  36. data/spec/link_spec.rb +58 -0
  37. data/spec/parsing_spec.rb +25 -0
  38. data/spec/resource_spec.rb +198 -0
  39. data/spec/restfully_spec.rb +13 -0
  40. data/spec/session_spec.rb +105 -0
  41. data/spec/spec_helper.rb +13 -0
  42. metadata +117 -0
@@ -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