rforce 0.10 → 0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ == 0.11.0 2013-06-08
2
+ * 1 minor enhancement
3
+ * Give the README an .rdoc extension for easy Github viewing
4
+ (Brad Dunn)
5
+ * 1 bug fix
6
+ * Fixed malformed request (Jeff Jolma)
7
+
1
8
  == 0.10.0 2012-09-12
2
9
  * 1 bug fix
3
10
  * Integer auto-parsing mangles ZIP codes (reported by Jason
@@ -1,6 +1,6 @@
1
1
  History.txt
2
2
  Manifest.txt
3
- README.txt
3
+ README.rdoc
4
4
  Rakefile
5
5
  lib/rforce.rb
6
6
  lib/rforce/binding.rb
@@ -9,6 +9,8 @@
9
9
 
10
10
  RForce is a simple, usable binding to the Salesforce API.
11
11
 
12
+ {<img src="https://travis-ci.org/undees/rforce.png" />}[https://travis-ci.org/undees/rforce]
13
+
12
14
  == FEATURES:
13
15
 
14
16
  Rather than enforcing adherence to the sforce.com schema, RForce assumes you are familiar with the API. Ruby method names become SOAP method names. Nested Ruby hashes become nested XML elements.
@@ -73,7 +75,7 @@ Rather than enforcing adherence to the sforce.com schema, RForce assumes you are
73
75
 
74
76
  == LICENSE:
75
77
 
76
- Copyright (c) 2005-2012 Ian Dees and contributors
78
+ Copyright (c) 2005-2013 Ian Dees and contributors
77
79
 
78
80
  Permission is hereby granted, free of charge, to any person obtaining
79
81
  a copy of this software and associated documentation files (the
@@ -53,8 +53,8 @@ module RForce
53
53
  # Expand Ruby data structures into XML.
54
54
  def expand(builder, args, xmlns = nil)
55
55
  # Nest arrays: [:a, 1, :b, 2] => [[:a, 1], [:b, 2]]
56
- if (args.class == Array)
57
- args.each_index{|i| args[i, 2] = [args[i, 2]]}
56
+ if args.is_a?(Array)
57
+ args = args.each_slice(2).to_a
58
58
  end
59
59
 
60
60
  args.each do |key, value|
@@ -157,12 +157,12 @@ module RForce
157
157
  expand(@builder, {method => args}, urn)
158
158
 
159
159
  extra_headers = ""
160
-
160
+
161
161
  # QueryOptions is not valid when making an Apex Webservice SOAP call
162
162
  if !block_given?
163
163
  extra_headers << (QueryOptions % @batch_size)
164
164
  end
165
-
165
+
166
166
  extra_headers << (AssignmentRuleHeaderUsingRuleId % assignment_rule_id) if assignment_rule_id
167
167
  extra_headers << AssignmentRuleHeaderUsingDefaultRule if use_default_rule
168
168
  extra_headers << MruHeader if update_mru
@@ -211,7 +211,7 @@ module RForce
211
211
  login(@user, @password)
212
212
 
213
213
  # repackage and rencode request with the new session id
214
- request = (Envelope % [@session_id, @batch_size, extra_headers, expanded])
214
+ request = (Envelope % [@session_id, extra_headers, expanded])
215
215
  request = encode(request)
216
216
 
217
217
  # Send the request to the server and read the response.
@@ -1,3 +1,3 @@
1
1
  module RForce
2
- VERSION = '0.10'
2
+ VERSION = '0.11'
3
3
  end
@@ -42,6 +42,17 @@ describe 'expand' do
42
42
 
43
43
  expanded.should == CreateXml
44
44
  end
45
+
46
+ it 'handles duplicate objects without complaint' do
47
+ expanded = ''
48
+ builder = Builder::XmlMarkup.new(:target => expanded)
49
+ account = [:type, 'Account', :name, 'ALPHA']
50
+ args = {:create=> [:sObjects, account, :sObjects, account]}
51
+ urn = 'urn:partner.soap.sforce.com'
52
+
53
+ # should not raise
54
+ expand builder, args, urn
55
+ end
45
56
  end
46
57
 
47
58
  describe 'a SoapResponse implementation' do
@@ -69,7 +80,9 @@ describe 'a SoapResponse implementation' do
69
80
  @rexml_recs.first.keys.size.should == 99
70
81
  end
71
82
 
83
+ # Special-case expat tests for CI
72
84
  it 'returns the same results with expat' do
85
+ pending 'expat not installed' unless @expat_recs
73
86
  @expat_recs.should == @rexml_recs
74
87
  end
75
88
 
@@ -81,7 +94,10 @@ describe 'a SoapResponse implementation' do
81
94
  expected = "Bee's knees"
82
95
  @rexml_recs.first.Description.should == expected
83
96
 
84
- @expat_recs.first.Description.should == expected
97
+ # Special-case expat tests for CI
98
+ if @expat_recs
99
+ @expat_recs.first.Description.should == expected
100
+ end
85
101
 
86
102
  @hpricot_recs.first.Description.should == expected
87
103
  end
@@ -203,9 +219,12 @@ describe 'SoapResponseNokogiri' do
203
219
  end
204
220
  end
205
221
 
206
- describe 'SoapResponseExpat' do
207
- it_behaves_like 'a SOAP response' do
208
- let(:klass) { SoapResponseExpat }
222
+ # Special-case expat tests for CI
223
+ if RForce.const_defined? :SoapResponseExpat
224
+ describe 'SoapResponseExpat' do
225
+ it_behaves_like 'a SOAP response' do
226
+ let(:klass) { SoapResponseExpat }
227
+ end
209
228
  end
210
229
  end
211
230
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rforce
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.10'
4
+ version: '0.11'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-12 00:00:00.000000000 Z
12
+ date: 2013-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -155,7 +155,10 @@ dependencies:
155
155
  - - ~>
156
156
  - !ruby/object:Gem::Version
157
157
  version: '2.13'
158
- description: RForce is a simple, usable binding to the Salesforce API.
158
+ description: ! 'RForce is a simple, usable binding to the Salesforce API.
159
+
160
+
161
+ {<img src="https://travis-ci.org/undees/rforce.png" />}[https://travis-ci.org/undees/rforce]'
159
162
  email:
160
163
  - undees@gmail.com
161
164
  executables: []
@@ -163,11 +166,10 @@ extensions: []
163
166
  extra_rdoc_files:
164
167
  - History.txt
165
168
  - Manifest.txt
166
- - README.txt
167
169
  files:
168
170
  - History.txt
169
171
  - Manifest.txt
170
- - README.txt
172
+ - README.rdoc
171
173
  - Rakefile
172
174
  - lib/rforce.rb
173
175
  - lib/rforce/binding.rb
@@ -207,8 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
209
  version: '0'
208
210
  requirements: []
209
211
  rubyforge_project: rforce
210
- rubygems_version: 1.8.23
212
+ rubygems_version: 1.8.21
211
213
  signing_key:
212
214
  specification_version: 3
213
- summary: RForce is a simple, usable binding to the Salesforce API.
215
+ summary: RForce is a simple, usable binding to the Salesforce API
214
216
  test_files: []