rally_rest_api 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +6 -0
- data/lib/rally_rest_api/query.rb +3 -1
- data/lib/rally_rest_api/rest_builder.rb +0 -1
- data/lib/rally_rest_api/rest_object.rb +1 -6
- data/lib/rally_rest_api/version.rb +1 -1
- data/tasks/svn.rake +0 -3
- metadata +6 -4
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
2010-01-07 Alan Brockett <abrockett@rallydev.com>
|
2
|
+
* Removed puts from rest_builder.rb
|
3
|
+
* Rewrote underscore method in rest_object.rb to correctly handle strings like CQDefectID
|
4
|
+
* Added check in query.rb to raise exception if fetch is anything but true or false
|
5
|
+
* Added query_validation_spec.rb to test query.rb changes
|
6
|
+
|
1
7
|
2009-08-11 Alan Brockett <abrockett@rallydev.com>
|
2
8
|
|
3
9
|
* lib/rally_rest_api/rest_builder.rb: Added :tags to COLLECTION_TYPES
|
data/lib/rally_rest_api/query.rb
CHANGED
@@ -103,9 +103,11 @@ class RestQuery
|
|
103
103
|
when :order
|
104
104
|
# this is a hack, we need a better way to express descending
|
105
105
|
v = [v].flatten.map { |e| e.to_s.to_camel }.join(", ").gsub(", Desc", " desc")
|
106
|
+
when :fetch
|
107
|
+
raise "value for fetch must be either true or false" unless v.to_q == "true" || v.to_q == "false"
|
106
108
|
end
|
107
109
|
key = de_underscore(k)
|
108
|
-
query_string << "&#{key}=#{URI.escape(v.to_q)}"
|
110
|
+
query_string << "&#{key}=#{URI.escape(v.to_q)}"
|
109
111
|
end
|
110
112
|
query_string
|
111
113
|
end
|
@@ -139,14 +139,9 @@ class RestObject
|
|
139
139
|
public
|
140
140
|
|
141
141
|
def underscore(camel_cased_word)
|
142
|
-
camel_cased_word.
|
143
|
-
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
144
|
-
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
145
|
-
tr("-", "_").
|
146
|
-
downcase.gsub(/_id$/,'_i_d')
|
142
|
+
camel_cased_word.split(/(?=[A-Z])/).join('_').downcase
|
147
143
|
end
|
148
144
|
|
149
|
-
|
150
145
|
# return the XML of the resource
|
151
146
|
def body
|
152
147
|
@document.to_s
|
data/tasks/svn.rake
CHANGED
@@ -6,11 +6,8 @@ unless PROJ.svn.root
|
|
6
6
|
info = %x/svn info ./
|
7
7
|
m = %r/^Repository Root:\s+(.*)$/.match(info)
|
8
8
|
PROJ.svn.root = (m.nil? ? '' : m[1])
|
9
|
-
puts PROJ.svn.root
|
10
9
|
end
|
11
|
-
PROJ.svn.path = 'rally_rest_api'
|
12
10
|
PROJ.svn.root = File.join(PROJ.svn.root, PROJ.svn.path) unless PROJ.svn.path.empty?
|
13
|
-
puts PROJ.svn.root
|
14
11
|
|
15
12
|
namespace :svn do
|
16
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rally_rest_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Cotton
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -64,6 +64,8 @@ files:
|
|
64
64
|
- tasks/test.rake
|
65
65
|
has_rdoc: true
|
66
66
|
homepage: http://rally-rest-api.rubyforge.org/rally_rest_api
|
67
|
+
licenses: []
|
68
|
+
|
67
69
|
post_install_message:
|
68
70
|
rdoc_options:
|
69
71
|
- --main
|
@@ -85,9 +87,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
87
|
requirements: []
|
86
88
|
|
87
89
|
rubyforge_project: rally-rest-api
|
88
|
-
rubygems_version: 1.3.
|
90
|
+
rubygems_version: 1.3.5
|
89
91
|
signing_key:
|
90
|
-
specification_version:
|
92
|
+
specification_version: 3
|
91
93
|
summary: A Ruby interface to the Rally REST API
|
92
94
|
test_files: []
|
93
95
|
|