wadl 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to wadl version 0.2.4
5
+ This documentation refers to wadl version 0.2.5
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -132,8 +132,11 @@ module WADL
132
132
 
133
133
  # Bind header variables to header parameters
134
134
  header_var_values.each { |name, value|
135
- param = header_params.delete(name.to_s)
136
- headers[name] = param % value if param
135
+ if param = header_params.delete(name.to_s)
136
+ headers[name] = param % value
137
+ else
138
+ warn %Q{Ignoring unknown header parameter "#{name}"!}
139
+ end
137
140
  }
138
141
 
139
142
  self
@@ -64,7 +64,7 @@ module WADL
64
64
 
65
65
  end
66
66
 
67
- attr_reader :resource_path, :opts
67
+ attr_reader :resource_path, :query
68
68
 
69
69
  def run(arguments)
70
70
  if options.delete(:dump_config)
@@ -85,7 +85,7 @@ module WADL
85
85
  stderr.puts api if debug >= 2
86
86
  end
87
87
 
88
- response = auth_resource.send(options[:method].downcase, :query => opts)
88
+ response = auth_resource.send(options[:method].downcase, :query => query)
89
89
 
90
90
  stderr.puts response.code.join(' ')
91
91
  stdout.puts response.representation unless response.code.first =~ /\A[45]/
@@ -122,8 +122,8 @@ module WADL
122
122
  end
123
123
 
124
124
  def parse_arguments(arguments)
125
- @resource_path, @opts, skip_next = [], {}, false
126
- @opts.update(options[:query]) if options[:query]
125
+ @resource_path, query, skip_next = [], {}, false
126
+ query.update(options[:query]) if options[:query]
127
127
 
128
128
  arguments.each_with_index { |arg, index|
129
129
  if skip_next
@@ -134,7 +134,7 @@ module WADL
134
134
  if arg =~ OPTION_RE
135
135
  key, value, next_arg = $1, $2, arguments[index + 1]
136
136
 
137
- add_param(opts, key, value || if next_arg =~ OPTION_RE
137
+ add_param(query, key, value || if next_arg =~ OPTION_RE
138
138
  '1' # "true"
139
139
  else
140
140
  skip_next = true
@@ -146,10 +146,10 @@ module WADL
146
146
  }
147
147
  end
148
148
 
149
- def parse_query(query)
149
+ def parse_query(query_string)
150
150
  params = {}
151
151
 
152
- query.split(QUERY_SEPARATOR_RE).each { |pair|
152
+ query_string.split(QUERY_SEPARATOR_RE).each { |pair|
153
153
  add_param(params, *pair.split('=', 2).map { |v| CGI.unescape(v) })
154
154
  }
155
155
 
@@ -4,7 +4,7 @@ module WADL
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 2
7
- TINY = 4
7
+ TINY = 5
8
8
 
9
9
  class << self
10
10
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wadl
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Leonard Richardson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-14 00:00:00 Z
19
+ date: 2011-08-02 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rest-open-uri
@@ -123,14 +123,14 @@ licenses: []
123
123
 
124
124
  post_install_message:
125
125
  rdoc_options:
126
- - --charset
127
- - UTF-8
126
+ - --line-numbers
127
+ - --all
128
128
  - --main
129
129
  - README
130
+ - --charset
131
+ - UTF-8
130
132
  - --title
131
- - wadl Application documentation (v0.2.4)
132
- - --line-numbers
133
- - --all
133
+ - wadl Application documentation (v0.2.5)
134
134
  require_paths:
135
135
  - lib
136
136
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements: []
155
155
 
156
156
  rubyforge_project:
157
- rubygems_version: 1.8.5
157
+ rubygems_version: 1.8.6
158
158
  signing_key:
159
159
  specification_version: 3
160
160
  summary: Ruby client for the Web Application Description Language.