restfully 1.0.0.rc1 → 1.0.0.rc2
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.
- data/README.md +4 -0
- data/bin/restfully +10 -8
- data/lib/restfully/configuration.rb +12 -0
- data/lib/restfully/sandbox.rb +16 -0
- data/lib/restfully/session.rb +32 -25
- data/lib/restfully/version.rb +1 -1
- data/lib/restfully.rb +1 -0
- data/spec/restfully/configuration_spec.rb +16 -15
- data/spec/restfully/session_spec.rb +8 -7
- metadata +234 -145
data/README.md
CHANGED
@@ -90,6 +90,10 @@ add the `--record` flag, and at the end of your session the commands you
|
|
90
90
|
entered will have been written into `SESSION_FILE` (by default:
|
91
91
|
`restfully-tape`).
|
92
92
|
|
93
|
+
Note: depending on your Readline installation, you might see the following
|
94
|
+
message: "Bond has detected EditLine and may not work with it. See the
|
95
|
+
README's Limitations section". You can safely ignore it.
|
96
|
+
|
93
97
|
### Replay
|
94
98
|
|
95
99
|
Restfully can replay a sequence of ruby expressions. Just pass the FILE (local
|
data/bin/restfully
CHANGED
@@ -7,6 +7,7 @@ require 'logger'
|
|
7
7
|
require 'pp'
|
8
8
|
require 'ripl'
|
9
9
|
require 'ripl/multi_line'
|
10
|
+
require 'ripl/short_errors'
|
10
11
|
|
11
12
|
# Behaviour of pp in IRB is different on ruby1.9:
|
12
13
|
# * pp(object) returns object#inspect.
|
@@ -67,7 +68,6 @@ BANNER
|
|
67
68
|
end
|
68
69
|
opts.on("--color", "Color output") do |v|
|
69
70
|
require 'ripl/color_streams'
|
70
|
-
require 'ripl/color_result'
|
71
71
|
end
|
72
72
|
opts.on("--record [SESSION_FILE]", "Record interactive session into SESSION_FILE (default=#{Restfully::DEFAULT_TAPE}), to be replayed later. This option is ignored if FILE is given.") do |v|
|
73
73
|
OPTIONS["record"] = v || Restfully::DEFAULT_TAPE
|
@@ -104,11 +104,9 @@ BANNER
|
|
104
104
|
end
|
105
105
|
end.parse!
|
106
106
|
|
107
|
-
# Declare original Restfully::Session
|
108
|
-
@session = Restfully::Session.new(OPTIONS)
|
109
|
-
|
110
107
|
if $stdin.tty? && !ARGV[0]
|
111
108
|
# Interactive session
|
109
|
+
OPTIONS["shell"] = true
|
112
110
|
puts "Restfully/#{Restfully::VERSION} - The root resource is available in the 'root' variable."
|
113
111
|
if OPTIONS["record"]
|
114
112
|
# Recording requested
|
@@ -117,7 +115,7 @@ if $stdin.tty? && !ARGV[0]
|
|
117
115
|
end
|
118
116
|
else
|
119
117
|
# Replayed session
|
120
|
-
|
118
|
+
logger.warn "--record option valid only with interactive session. Ignoring." if OPTIONS["record"]
|
121
119
|
require 'ripl/play'
|
122
120
|
|
123
121
|
module Ripl::Play
|
@@ -153,6 +151,9 @@ else
|
|
153
151
|
Ripl.config[:play] = ARGV[0].dup if ARGV[0]
|
154
152
|
end
|
155
153
|
|
154
|
+
# Declare original Restfully::Session
|
155
|
+
SESSION = Restfully::Session.new(OPTIONS)
|
156
|
+
|
156
157
|
module Restfully
|
157
158
|
class Session
|
158
159
|
alias :old_initialize :initialize
|
@@ -160,9 +161,10 @@ module Restfully
|
|
160
161
|
# scripts, so that they preferably take the configuration given with the
|
161
162
|
# restfully command-line tool.
|
162
163
|
def initialize(options = {}, &block)
|
164
|
+
options[:overridden] = true
|
163
165
|
old_opts = Configuration.new(options).expand
|
164
|
-
new_opts =
|
165
|
-
old_initialize(
|
166
|
+
new_opts = old_opts.merge(SESSION.config)
|
167
|
+
old_initialize(new_opts, &block)
|
166
168
|
end
|
167
169
|
end
|
168
170
|
end
|
@@ -171,4 +173,4 @@ end
|
|
171
173
|
at_exit{ @log_file && @log_file.close }
|
172
174
|
|
173
175
|
ARGV.clear
|
174
|
-
Ripl.start :binding =>
|
176
|
+
Ripl.start :binding => SESSION.sandbox.instance_eval{ binding }
|
@@ -6,6 +6,17 @@ module Restfully
|
|
6
6
|
|
7
7
|
def initialize(opts = {})
|
8
8
|
@options = opts.symbolize_keys
|
9
|
+
|
10
|
+
@options[:retry_on_error] ||= 5
|
11
|
+
@options[:wait_before_retry] ||= 5
|
12
|
+
end
|
13
|
+
|
14
|
+
def logger
|
15
|
+
@options[:logger] ||= begin
|
16
|
+
l = Logger.new(STDERR)
|
17
|
+
l.level = Logger::WARN
|
18
|
+
l
|
19
|
+
end
|
9
20
|
end
|
10
21
|
|
11
22
|
def merge(config = {})
|
@@ -35,6 +46,7 @@ module Restfully
|
|
35
46
|
if file
|
36
47
|
file = File.expand_path(file)
|
37
48
|
if File.file?(file) && File.readable?(file)
|
49
|
+
logger.info "Loading configuration from #{file}..."
|
38
50
|
@options = self.class.load(file).merge(self).options
|
39
51
|
end
|
40
52
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
3
|
+
module Restfully
|
4
|
+
class Sandbox
|
5
|
+
extend Forwardable
|
6
|
+
|
7
|
+
def_delegators :@session, :head, :get, :post, :put, :delete, :root, :logger
|
8
|
+
|
9
|
+
attr_reader :session
|
10
|
+
|
11
|
+
def initialize(session)
|
12
|
+
@session = session
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/restfully/session.rb
CHANGED
@@ -7,21 +7,17 @@ require 'restclient/components'
|
|
7
7
|
require 'rack/cache'
|
8
8
|
require 'addressable/uri'
|
9
9
|
|
10
|
+
require 'restfully/sandbox'
|
11
|
+
|
10
12
|
module Restfully
|
11
13
|
class Session
|
12
14
|
|
13
|
-
|
14
|
-
attr_writer :logger
|
15
15
|
attr_accessor :uri
|
16
16
|
attr_reader :config
|
17
17
|
attr_writer :default_headers
|
18
18
|
|
19
19
|
def logger
|
20
|
-
@logger
|
21
|
-
l = Logger.new(STDERR)
|
22
|
-
l.level = Logger::INFO
|
23
|
-
l
|
24
|
-
end
|
20
|
+
@config.logger
|
25
21
|
end
|
26
22
|
|
27
23
|
# Builds a new client session.
|
@@ -46,28 +42,40 @@ module Restfully
|
|
46
42
|
# ) {|root, session| p root}
|
47
43
|
#
|
48
44
|
def initialize(options = {})
|
49
|
-
@config =
|
50
|
-
|
45
|
+
@config = if options.kind_of?(Configuration)
|
46
|
+
options
|
47
|
+
else
|
48
|
+
Configuration.new(options).expand
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
@config[:wait_before_retry] ||= 5
|
51
|
+
setup
|
54
52
|
|
53
|
+
yield root, self if block_given?
|
54
|
+
end
|
55
|
+
|
56
|
+
def setup
|
55
57
|
# Compatibility with :base_uri parameter of Restfully <= 0.6
|
56
|
-
@uri =
|
57
|
-
if @uri.nil? || @uri.empty?
|
58
|
-
|
58
|
+
@uri = config[:uri] || config[:base_uri]
|
59
|
+
msg = if @uri.nil? || @uri.empty?
|
60
|
+
@uri = Restfully::DEFAULT_URI
|
61
|
+
"No URI given. Using #{@uri}"
|
59
62
|
else
|
60
|
-
|
63
|
+
"Base URI changed to: #{@uri}"
|
64
|
+
end
|
65
|
+
if config[:overridden] || @uri == Restfully::DEFAULT_URI
|
66
|
+
config[:shell] ? puts(msg) : logger.warn(msg)
|
61
67
|
end
|
62
68
|
|
63
|
-
|
69
|
+
@uri = Addressable::URI.parse(@uri)
|
70
|
+
|
71
|
+
default_headers.merge!(config[:default_headers] || {})
|
64
72
|
|
65
73
|
disable RestClient::Rack::Compatibility
|
66
|
-
authenticate(
|
67
|
-
setup_cache(
|
74
|
+
authenticate(config)
|
75
|
+
setup_cache(config[:cache])
|
68
76
|
|
69
77
|
# Require additional types (e.g.: media-types):
|
70
|
-
(
|
78
|
+
(config[:require] || []).each do |r|
|
71
79
|
logger.info "Requiring #{r}..."
|
72
80
|
if ::File.exist?(file=File.expand_path(r))
|
73
81
|
require file
|
@@ -86,8 +94,6 @@ module Restfully
|
|
86
94
|
require "restfully/media_type/#{r.underscore}"
|
87
95
|
end
|
88
96
|
end
|
89
|
-
|
90
|
-
yield root, self if block_given?
|
91
97
|
end
|
92
98
|
|
93
99
|
# Enable a RestClient Rack component.
|
@@ -136,10 +142,11 @@ module Restfully
|
|
136
142
|
def root
|
137
143
|
get(uri.path).load
|
138
144
|
end
|
139
|
-
|
140
|
-
#
|
141
|
-
|
142
|
-
|
145
|
+
|
146
|
+
# Return a sandbox object, useful to execute code within the current
|
147
|
+
# session context witout polluting the Session object.
|
148
|
+
def sandbox
|
149
|
+
Sandbox.new(self)
|
143
150
|
end
|
144
151
|
|
145
152
|
# Returns an HTTP::Response object or raise a Restfully::HTTP::Error
|
data/lib/restfully/version.rb
CHANGED
data/lib/restfully.rb
CHANGED
@@ -4,37 +4,38 @@ describe Restfully::Configuration do
|
|
4
4
|
|
5
5
|
before do
|
6
6
|
@config_file = File.expand_path("../../fixtures/config.yml", __FILE__)
|
7
|
-
@
|
8
|
-
:
|
9
|
-
|
10
|
-
|
7
|
+
@defaults = {
|
8
|
+
:retry_on_error=>5, :wait_before_retry=>5
|
9
|
+
}
|
10
|
+
@expected_config_from_file = {
|
11
|
+
:require=>["ApplicationVndBonfireXml"],
|
12
|
+
:username=>"someone",
|
11
13
|
:uri=>"https://api.bonfire-project.eu/",
|
12
|
-
:password=>"p4ssw0rd"
|
14
|
+
:password=>"p4ssw0rd",
|
15
|
+
:gateway=>"ssh.bonfire.grid5000.fr"
|
13
16
|
}
|
17
|
+
@expected_merge = @expected_config_from_file.merge(@defaults).merge({
|
18
|
+
:username=>"crohr",
|
19
|
+
:require=>["ApplicationVndBonfireXml", "something"],
|
20
|
+
})
|
14
21
|
end
|
15
22
|
|
16
23
|
it "should take a hash and store it with symbolized keys" do
|
17
24
|
config = Restfully::Configuration.new("a" => 1, :b => "hello", "c" => [1,2,3])
|
18
|
-
config.options.should == {:a=>1, :b=>"hello", :c=>[1, 2, 3]}
|
25
|
+
config.options.should == {:a=>1, :b=>"hello", :c=>[1, 2, 3]}.merge(@defaults)
|
19
26
|
end
|
20
27
|
|
21
28
|
it "should correctly load a configuration file" do
|
22
29
|
config = Restfully::Configuration.load(@config_file)
|
23
|
-
config.options.should ==
|
24
|
-
:require=>["ApplicationVndBonfireXml"],
|
25
|
-
:username=>"someone",
|
26
|
-
:uri=>"https://api.bonfire-project.eu/",
|
27
|
-
:password=>"p4ssw0rd",
|
28
|
-
:gateway=>"ssh.bonfire.grid5000.fr"
|
29
|
-
}
|
30
|
+
config.options.should == @expected_config_from_file.merge(@defaults)
|
30
31
|
end
|
31
32
|
|
32
33
|
it "should correctly overwrite the options defined in the configuration file with other options given on initialization" do
|
33
34
|
config = Restfully::Configuration.new(:username => "crohr", :require => ['something'], :configuration_file => @config_file)
|
34
35
|
config.expand
|
35
|
-
config.options.should
|
36
|
+
config.options.should include(@expected_merge.merge(
|
36
37
|
:configuration_file=>@config_file
|
37
|
-
)
|
38
|
+
))
|
38
39
|
end
|
39
40
|
|
40
41
|
it "should correctly merge two configs" do
|
@@ -16,13 +16,12 @@ describe Restfully::Session do
|
|
16
16
|
session = Restfully::Session.new(@config.merge("key" => "value"))
|
17
17
|
session.logger.should == @logger
|
18
18
|
session.uri.should == Addressable::URI.parse(@uri)
|
19
|
-
session.config.to_hash.should ==
|
19
|
+
session.config.to_hash.values_at(:wait_before_retry, :key, :retry_on_error).should == [5, "value", 5]
|
20
20
|
end
|
21
21
|
|
22
|
-
it "should
|
23
|
-
|
24
|
-
|
25
|
-
}.should raise_error(ArgumentError)
|
22
|
+
it "should set a default URI if no URI given" do
|
23
|
+
session = Restfully::Session.new(@config.merge(:uri => ""))
|
24
|
+
session.uri.to_s.should == Restfully::DEFAULT_URI
|
26
25
|
end
|
27
26
|
|
28
27
|
it "should add or replace additional headers to the default set" do
|
@@ -69,9 +68,11 @@ describe Restfully::Session do
|
|
69
68
|
session.root.should == res
|
70
69
|
end
|
71
70
|
|
72
|
-
it "should return
|
71
|
+
it "should return a sanbox" do
|
73
72
|
session = Restfully::Session.new(@config)
|
74
|
-
|
73
|
+
sandbox = session.sandbox
|
74
|
+
sandbox.session.should == session
|
75
|
+
sandbox.logger.should == session.logger
|
75
76
|
end
|
76
77
|
|
77
78
|
it "should fetch the root path [URI path present]" do
|
metadata
CHANGED
@@ -1,202 +1,279 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: restfully
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15424049
|
5
5
|
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
- rc
|
11
|
+
- 2
|
12
|
+
version: 1.0.0.rc2
|
6
13
|
platform: ruby
|
7
|
-
authors:
|
14
|
+
authors:
|
8
15
|
- Cyril Rohr
|
9
16
|
autorequire:
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
date: 2011-11-04 00:00:00 +01:00
|
21
|
+
default_executable:
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
15
24
|
name: json
|
16
|
-
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
27
|
none: false
|
18
|
-
requirements:
|
28
|
+
requirements:
|
19
29
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 5
|
32
|
+
segments:
|
33
|
+
- 1
|
34
|
+
- 5
|
35
|
+
version: "1.5"
|
22
36
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
26
39
|
name: rest-client
|
27
|
-
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
42
|
none: false
|
29
|
-
requirements:
|
43
|
+
requirements:
|
30
44
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 3
|
47
|
+
segments:
|
48
|
+
- 1
|
49
|
+
- 6
|
50
|
+
version: "1.6"
|
33
51
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
37
54
|
name: rest-client-components
|
38
|
-
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
57
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
44
65
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
48
68
|
name: rack-cache
|
49
|
-
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
71
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
55
79
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
59
82
|
name: backports
|
60
|
-
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
85
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
66
93
|
type: :runtime
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
94
|
+
version_requirements: *id005
|
95
|
+
- !ruby/object:Gem::Dependency
|
70
96
|
name: addressable
|
71
|
-
|
97
|
+
prerelease: false
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
99
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
77
107
|
type: :runtime
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
108
|
+
version_requirements: *id006
|
109
|
+
- !ruby/object:Gem::Dependency
|
81
110
|
name: ripl
|
82
|
-
|
111
|
+
prerelease: false
|
112
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
hash: 3
|
118
|
+
segments:
|
119
|
+
- 0
|
120
|
+
version: "0"
|
88
121
|
type: :runtime
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
122
|
+
version_requirements: *id007
|
123
|
+
- !ruby/object:Gem::Dependency
|
92
124
|
name: ripl-multi_line
|
93
|
-
|
125
|
+
prerelease: false
|
126
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
127
|
none: false
|
95
|
-
requirements:
|
96
|
-
- -
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
version: "0"
|
99
135
|
type: :runtime
|
100
|
-
|
101
|
-
|
102
|
-
- !ruby/object:Gem::Dependency
|
136
|
+
version_requirements: *id008
|
137
|
+
- !ruby/object:Gem::Dependency
|
103
138
|
name: ripl-color_streams
|
104
|
-
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
105
141
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 3
|
146
|
+
segments:
|
147
|
+
- 0
|
148
|
+
version: "0"
|
110
149
|
type: :runtime
|
150
|
+
version_requirements: *id009
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: ripl-short_errors
|
111
153
|
prerelease: false
|
112
|
-
|
113
|
-
|
154
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
hash: 3
|
160
|
+
segments:
|
161
|
+
- 0
|
162
|
+
version: "0"
|
163
|
+
type: :runtime
|
164
|
+
version_requirements: *id010
|
165
|
+
- !ruby/object:Gem::Dependency
|
114
166
|
name: ripl-play
|
115
|
-
|
167
|
+
prerelease: false
|
168
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
116
169
|
none: false
|
117
|
-
requirements:
|
170
|
+
requirements:
|
118
171
|
- - ~>
|
119
|
-
- !ruby/object:Gem::Version
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
hash: 21
|
174
|
+
segments:
|
175
|
+
- 0
|
176
|
+
- 2
|
177
|
+
- 1
|
120
178
|
version: 0.2.1
|
121
179
|
type: :runtime
|
122
|
-
|
123
|
-
|
124
|
-
- !ruby/object:Gem::Dependency
|
180
|
+
version_requirements: *id011
|
181
|
+
- !ruby/object:Gem::Dependency
|
125
182
|
name: rb-readline
|
126
|
-
|
183
|
+
prerelease: false
|
184
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
127
185
|
none: false
|
128
|
-
requirements:
|
129
|
-
- -
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
hash: 3
|
190
|
+
segments:
|
191
|
+
- 0
|
192
|
+
version: "0"
|
132
193
|
type: :runtime
|
133
|
-
|
134
|
-
|
135
|
-
- !ruby/object:Gem::Dependency
|
194
|
+
version_requirements: *id012
|
195
|
+
- !ruby/object:Gem::Dependency
|
136
196
|
name: rake
|
137
|
-
|
197
|
+
prerelease: false
|
198
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
138
199
|
none: false
|
139
|
-
requirements:
|
200
|
+
requirements:
|
140
201
|
- - ~>
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
|
202
|
+
- !ruby/object:Gem::Version
|
203
|
+
hash: 27
|
204
|
+
segments:
|
205
|
+
- 0
|
206
|
+
- 8
|
207
|
+
version: "0.8"
|
143
208
|
type: :development
|
144
|
-
|
145
|
-
|
146
|
-
- !ruby/object:Gem::Dependency
|
209
|
+
version_requirements: *id013
|
210
|
+
- !ruby/object:Gem::Dependency
|
147
211
|
name: rspec
|
148
|
-
|
212
|
+
prerelease: false
|
213
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
149
214
|
none: false
|
150
|
-
requirements:
|
215
|
+
requirements:
|
151
216
|
- - ~>
|
152
|
-
- !ruby/object:Gem::Version
|
153
|
-
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
hash: 7
|
219
|
+
segments:
|
220
|
+
- 2
|
221
|
+
version: "2"
|
154
222
|
type: :development
|
155
|
-
|
156
|
-
|
157
|
-
- !ruby/object:Gem::Dependency
|
223
|
+
version_requirements: *id014
|
224
|
+
- !ruby/object:Gem::Dependency
|
158
225
|
name: webmock
|
159
|
-
|
226
|
+
prerelease: false
|
227
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
160
228
|
none: false
|
161
|
-
requirements:
|
162
|
-
- -
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
|
229
|
+
requirements:
|
230
|
+
- - ">="
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
hash: 3
|
233
|
+
segments:
|
234
|
+
- 0
|
235
|
+
version: "0"
|
165
236
|
type: :development
|
166
|
-
|
167
|
-
|
168
|
-
- !ruby/object:Gem::Dependency
|
237
|
+
version_requirements: *id015
|
238
|
+
- !ruby/object:Gem::Dependency
|
169
239
|
name: autotest
|
170
|
-
|
240
|
+
prerelease: false
|
241
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
171
242
|
none: false
|
172
|
-
requirements:
|
173
|
-
- -
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
|
243
|
+
requirements:
|
244
|
+
- - ">="
|
245
|
+
- !ruby/object:Gem::Version
|
246
|
+
hash: 3
|
247
|
+
segments:
|
248
|
+
- 0
|
249
|
+
version: "0"
|
176
250
|
type: :development
|
177
|
-
|
178
|
-
|
179
|
-
- !ruby/object:Gem::Dependency
|
251
|
+
version_requirements: *id016
|
252
|
+
- !ruby/object:Gem::Dependency
|
180
253
|
name: autotest-growl
|
181
|
-
|
254
|
+
prerelease: false
|
255
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
182
256
|
none: false
|
183
|
-
requirements:
|
184
|
-
- -
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
|
257
|
+
requirements:
|
258
|
+
- - ">="
|
259
|
+
- !ruby/object:Gem::Version
|
260
|
+
hash: 3
|
261
|
+
segments:
|
262
|
+
- 0
|
263
|
+
version: "0"
|
187
264
|
type: :development
|
188
|
-
|
189
|
-
version_requirements: *2152495520
|
265
|
+
version_requirements: *id017
|
190
266
|
description: Consume RESTful APIs effortlessly
|
191
|
-
email:
|
267
|
+
email:
|
192
268
|
- cyril.rohr@gmail.com
|
193
|
-
executables:
|
269
|
+
executables:
|
194
270
|
- restfully
|
195
271
|
extensions: []
|
196
|
-
|
272
|
+
|
273
|
+
extra_rdoc_files:
|
197
274
|
- LICENSE
|
198
275
|
- README.md
|
199
|
-
files:
|
276
|
+
files:
|
200
277
|
- bin/restfully
|
201
278
|
- lib/restfully/collection.rb
|
202
279
|
- lib/restfully/configuration.rb
|
@@ -217,6 +294,7 @@ files:
|
|
217
294
|
- lib/restfully/rack/basic_auth.rb
|
218
295
|
- lib/restfully/rack.rb
|
219
296
|
- lib/restfully/resource.rb
|
297
|
+
- lib/restfully/sandbox.rb
|
220
298
|
- lib/restfully/session.rb
|
221
299
|
- lib/restfully/version.rb
|
222
300
|
- lib/restfully.rb
|
@@ -247,32 +325,43 @@ files:
|
|
247
325
|
- Rakefile
|
248
326
|
- LICENSE
|
249
327
|
- README.md
|
328
|
+
has_rdoc: true
|
250
329
|
homepage: http://github.com/crohr/restfully
|
251
330
|
licenses: []
|
331
|
+
|
252
332
|
post_install_message:
|
253
|
-
rdoc_options:
|
333
|
+
rdoc_options:
|
254
334
|
- --charset=UTF-8
|
255
|
-
require_paths:
|
335
|
+
require_paths:
|
256
336
|
- lib
|
257
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
337
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
258
338
|
none: false
|
259
|
-
requirements:
|
260
|
-
- -
|
261
|
-
- !ruby/object:Gem::Version
|
262
|
-
|
263
|
-
|
339
|
+
requirements:
|
340
|
+
- - ">="
|
341
|
+
- !ruby/object:Gem::Version
|
342
|
+
hash: 31
|
343
|
+
segments:
|
344
|
+
- 1
|
345
|
+
- 8
|
346
|
+
version: "1.8"
|
347
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
348
|
none: false
|
265
|
-
requirements:
|
266
|
-
- -
|
267
|
-
- !ruby/object:Gem::Version
|
268
|
-
|
349
|
+
requirements:
|
350
|
+
- - ">="
|
351
|
+
- !ruby/object:Gem::Version
|
352
|
+
hash: 9
|
353
|
+
segments:
|
354
|
+
- 1
|
355
|
+
- 3
|
356
|
+
version: "1.3"
|
269
357
|
requirements: []
|
358
|
+
|
270
359
|
rubyforge_project:
|
271
|
-
rubygems_version: 1.
|
360
|
+
rubygems_version: 1.6.2
|
272
361
|
signing_key:
|
273
362
|
specification_version: 3
|
274
363
|
summary: Consume RESTful APIs effortlessly
|
275
|
-
test_files:
|
364
|
+
test_files:
|
276
365
|
- spec/fixtures/bonfire-collection-with-fragments.xml
|
277
366
|
- spec/fixtures/bonfire-compute-existing.xml
|
278
367
|
- spec/fixtures/bonfire-empty-collection.xml
|