restfully 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -9,7 +9,7 @@ Alpha work.
9
9
 
10
10
  == Usage
11
11
  === Command line
12
- $ resfully api_base_uri relative_root_uri [-u username] [-p password]
12
+ $ resfully base_uri [root_path] [-u username] [-p password]
13
13
 
14
14
  e.g., for the Grid5000 API:
15
15
  $ restfully https://api.grid5000.fr/sid /grid5000 -u username -p password
@@ -28,8 +28,10 @@ e.g.:
28
28
  @versions: Restfully::Collection
29
29
  ------------ PROPERTIES ------------
30
30
  "version" => "ee1f8111c8835496a9e4a6f7c9491c0238ee9827">
31
+
31
32
  irb(main):006:0> root.uri
32
33
  => "/grid5000"
34
+
33
35
  irb(main):007:0> root.sites
34
36
  => #<Restfully::Collection:0x8faaf2
35
37
  ------------ META ------------
@@ -46,6 +48,7 @@ e.g.:
46
48
  "orsay" => Restfully::Resource>
47
49
  irb(main):008:0> root['version']
48
50
  => "ee1f8111c8835496a9e4a6f7c9491c0238ee9827"
51
+
49
52
  irb(main):009:0> root.version
50
53
  => #<Restfully::Resource:0x8facf0
51
54
  ------------ META ------------
@@ -61,7 +64,7 @@ e.g.:
61
64
  You may also prefer to use a configuration file to avoid entering the command line options:
62
65
  $ echo '
63
66
  base_uri: https://api.grid5000.fr/sid
64
- relative_root_uri: /grid5000
67
+ root_path: /grid5000
65
68
  username: MYLOGIN
66
69
  password: MYPASSWORD
67
70
  ' > ~/somewhere/api.grid5000.fr.yml
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/bin/restfully CHANGED
@@ -7,6 +7,7 @@ require 'restfully'
7
7
  require 'optparse'
8
8
  require 'logger'
9
9
  require 'pp'
10
+ require 'yaml'
10
11
 
11
12
  @options = {}
12
13
  option_parser = OptionParser.new do |opts|
@@ -6,7 +6,7 @@ module Restfully
6
6
 
7
7
  class Resource < DelegateClass(Hash)
8
8
 
9
- undef :type
9
+ undef :type if self.respond_to? :type
10
10
  attr_reader :uri, :session, :state, :raw, :uid, :associations, :type
11
11
 
12
12
  def initialize(uri, session, options = {})
data/restfully.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{restfully}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Cyril Rohr"]
12
- s.date = %q{2009-09-17}
12
+ s.date = %q{2009-10-05}
13
13
  s.default_executable = %q{restfully}
14
14
  s.description = %q{Experimental code for auto-generation of wrappers on top of RESTful APIs that follow HATEOAS principles and provide OPTIONS methods and/or Allow headers.}
15
15
  s.email = %q{cyril.rohr@gmail.com}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restfully
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Rohr
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-17 00:00:00 +02:00
12
+ date: 2009-10-05 00:00:00 +02:00
13
13
  default_executable: restfully
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency