DerGuteMoritz-rforce 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.hgignore +3 -0
  2. data/.hgtags +6 -0
  3. data/.specification +115 -0
  4. data/DerGuteMoritz-rforce.gemspec +103 -0
  5. data/History.txt +29 -0
  6. data/LICENSE +20 -0
  7. data/README.rdoc +52 -0
  8. data/Rakefile +56 -0
  9. data/VERSION +1 -0
  10. data/bugs/issue-09d998dc3f9d6e8928598fd5d9c6627102dedd65.yaml +18 -0
  11. data/bugs/issue-1b668248120eb4fd055f0ea6b75ff807f6955936.yaml +22 -0
  12. data/bugs/issue-3ef7a7c5c7e38fb76e1f53e1b67f45559e21b104.yaml +18 -0
  13. data/bugs/issue-a7a87cb98d29943a49d1608adb68475838ad2e65.yaml +22 -0
  14. data/bugs/issue-c92d34e10038ba6b9acfd7e3dfb2b154e463baba.yaml +29 -0
  15. data/bugs/project.yaml +16 -0
  16. data/lib/rforce.rb +88 -0
  17. data/lib/rforce/binding.rb +261 -0
  18. data/lib/rforce/method_keys.rb +14 -0
  19. data/lib/rforce/soap_pullable.rb +93 -0
  20. data/lib/rforce/soap_response.rb +7 -0
  21. data/lib/rforce/soap_response_expat.rb +35 -0
  22. data/lib/rforce/soap_response_hpricot.rb +75 -0
  23. data/lib/rforce/soap_response_nokogiri.rb +64 -0
  24. data/lib/rforce/soap_response_rexml.rb +34 -0
  25. data/lib/rforce/version.rb +3 -0
  26. data/rforce.tmproj +122 -0
  27. data/spec/rforce_spec.rb +105 -0
  28. data/spec/soap-response.xml +5928 -0
  29. data/spec/spec.opts +1 -0
  30. data/spec/spec_helper.rb +66 -0
  31. data/tasks/timing.rake +21 -0
  32. data/test/oauth_tests.rb +42 -0
  33. data/wsdl/README.html +23 -0
  34. data/wsdl/README.txt +22 -0
  35. data/wsdl/ca.pem +36 -0
  36. data/wsdl/default.rb +1627 -0
  37. data/wsdl/defaultDriver.rb +179 -0
  38. data/wsdl/orderedhash.rb +254 -0
  39. data/wsdl/partner.wsdl.xml +3104 -0
  40. data/wsdl/partner.wsdl.xml.old +1858 -0
  41. data/wsdl/sample/create.rb +37 -0
  42. data/wsdl/sample/describeGlobal.rb +28 -0
  43. data/wsdl/sample/describeSObjects.rb +34 -0
  44. data/wsdl/sample/getServerTimestamp.rb +27 -0
  45. data/wsdl/sample/query.rb +31 -0
  46. data/wsdl/sample/queryMore.rb +32 -0
  47. data/wsdl/sample/retrieve.rb +32 -0
  48. data/wsdl/sforceDriver.rb +43 -0
  49. data/wsdl/soap/property +1 -0
  50. data/wsdl/wsdl.rb +121 -0
  51. metadata +182 -0
data/.hgignore ADDED
@@ -0,0 +1,3 @@
1
+ .git
2
+ .gitignore
3
+ .DS_Store
data/.hgtags ADDED
@@ -0,0 +1,6 @@
1
+ 4b26b0c9a210cb557cfe4d7c855151f975042229 v0.1
2
+ 979b498ab4fa95f7a701929102ba70388945b82c v0.2
3
+ 2a88ad826e2f73c8d51d6442b8bdd3c3555f024e v0.2.1
4
+ ab25b84576b8e7e90eadeab1c8dd510aae03e39a v0.3
5
+ 0429e34330ab2fcd4d7544bdaa8c7a57f91fe47d v0.4
6
+ 48da078639c40b5d0e2452bec412b03c6fe1d354 v0.4.1
data/.specification ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rforce
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
+ platform: ruby
6
+ authors:
7
+ - Ian Dees
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-03-12 00:00:00 -08:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: builder
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.0
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: facets
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "2.4"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rspec
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "1.3"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: hoe
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 2.5.0
54
+ version:
55
+ description: RForce is a simple, usable binding to the SalesForce API.
56
+ email:
57
+ - undees@gmail.com
58
+ executables: []
59
+
60
+ extensions: []
61
+
62
+ extra_rdoc_files:
63
+ - History.txt
64
+ - Manifest.txt
65
+ - README.txt
66
+ files:
67
+ - History.txt
68
+ - Manifest.txt
69
+ - README.txt
70
+ - Rakefile
71
+ - lib/rforce.rb
72
+ - lib/rforce/binding.rb
73
+ - lib/rforce/soap_pullable.rb
74
+ - lib/rforce/soap_response.rb
75
+ - lib/rforce/soap_response_expat.rb
76
+ - lib/rforce/soap_response_hpricot.rb
77
+ - lib/rforce/soap_response_rexml.rb
78
+ - lib/rforce/version.rb
79
+ - spec/rforce_spec.rb
80
+ - spec/soap-response.xml
81
+ - spec/spec.opts
82
+ - spec/spec_helper.rb
83
+ - tasks/timing.rake
84
+ has_rdoc: true
85
+ homepage: http://rforce.rubyforge.org
86
+ licenses: []
87
+
88
+ post_install_message:
89
+ rdoc_options:
90
+ - --main
91
+ - README.txt
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: "0"
99
+ version:
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: "0"
105
+ version:
106
+ requirements: []
107
+
108
+ rubyforge_project: rforce
109
+ rubygems_version: 1.3.5
110
+ signing_key:
111
+ specification_version: 3
112
+ summary: RForce is a simple, usable binding to the SalesForce API.
113
+ test_files: []
114
+
115
+
@@ -0,0 +1,103 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{DerGuteMoritz-rforce}
8
+ s.version = "0.4.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ian Dees", "Logan (henriquez)", "Aaron Qian", "Moritz Heidkamp"]
12
+ s.date = %q{2010-12-02}
13
+ s.description = %q{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.}
14
+ s.email = %q{moritz@twoticketsplease.de}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".hgignore",
21
+ ".hgtags",
22
+ ".specification",
23
+ "DerGuteMoritz-rforce.gemspec",
24
+ "History.txt",
25
+ "LICENSE",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bugs/issue-09d998dc3f9d6e8928598fd5d9c6627102dedd65.yaml",
30
+ "bugs/issue-1b668248120eb4fd055f0ea6b75ff807f6955936.yaml",
31
+ "bugs/issue-3ef7a7c5c7e38fb76e1f53e1b67f45559e21b104.yaml",
32
+ "bugs/issue-a7a87cb98d29943a49d1608adb68475838ad2e65.yaml",
33
+ "bugs/issue-c92d34e10038ba6b9acfd7e3dfb2b154e463baba.yaml",
34
+ "bugs/project.yaml",
35
+ "lib/rforce.rb",
36
+ "lib/rforce/binding.rb",
37
+ "lib/rforce/method_keys.rb",
38
+ "lib/rforce/soap_pullable.rb",
39
+ "lib/rforce/soap_response.rb",
40
+ "lib/rforce/soap_response_expat.rb",
41
+ "lib/rforce/soap_response_hpricot.rb",
42
+ "lib/rforce/soap_response_nokogiri.rb",
43
+ "lib/rforce/soap_response_rexml.rb",
44
+ "lib/rforce/version.rb",
45
+ "rforce.tmproj",
46
+ "spec/rforce_spec.rb",
47
+ "spec/soap-response.xml",
48
+ "spec/spec.opts",
49
+ "spec/spec_helper.rb",
50
+ "tasks/timing.rake",
51
+ "test/oauth_tests.rb",
52
+ "wsdl/README.html",
53
+ "wsdl/README.txt",
54
+ "wsdl/ca.pem",
55
+ "wsdl/default.rb",
56
+ "wsdl/defaultDriver.rb",
57
+ "wsdl/orderedhash.rb",
58
+ "wsdl/partner.wsdl.xml",
59
+ "wsdl/partner.wsdl.xml.old",
60
+ "wsdl/sample/create.rb",
61
+ "wsdl/sample/describeGlobal.rb",
62
+ "wsdl/sample/describeSObjects.rb",
63
+ "wsdl/sample/getServerTimestamp.rb",
64
+ "wsdl/sample/query.rb",
65
+ "wsdl/sample/queryMore.rb",
66
+ "wsdl/sample/retrieve.rb",
67
+ "wsdl/sforceDriver.rb",
68
+ "wsdl/soap/property",
69
+ "wsdl/wsdl.rb"
70
+ ]
71
+ s.homepage = %q{http://github.com/DerGuteMoritz/rforce}
72
+ s.require_paths = ["lib"]
73
+ s.rubygems_version = %q{1.3.7}
74
+ s.summary = %q{A simple, usable binding to the SalesForce API.}
75
+ s.test_files = [
76
+ "spec/rforce_spec.rb",
77
+ "spec/spec_helper.rb",
78
+ "test/oauth_tests.rb"
79
+ ]
80
+
81
+ if s.respond_to? :specification_version then
82
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
83
+ s.specification_version = 3
84
+
85
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
86
+ s.add_runtime_dependency(%q<builder>, [">= 2.0.0"])
87
+ s.add_runtime_dependency(%q<nokogiri>, ["~> 1.4.4"])
88
+ s.add_runtime_dependency(%q<oauth>, [">= 0"])
89
+ s.add_development_dependency(%q<rspec>, [">= 1.3"])
90
+ else
91
+ s.add_dependency(%q<builder>, [">= 2.0.0"])
92
+ s.add_dependency(%q<nokogiri>, ["~> 1.4.4"])
93
+ s.add_dependency(%q<oauth>, [">= 0"])
94
+ s.add_dependency(%q<rspec>, [">= 1.3"])
95
+ end
96
+ else
97
+ s.add_dependency(%q<builder>, [">= 2.0.0"])
98
+ s.add_dependency(%q<nokogiri>, ["~> 1.4.4"])
99
+ s.add_dependency(%q<oauth>, [">= 0"])
100
+ s.add_dependency(%q<rspec>, [">= 1.3"])
101
+ end
102
+ end
103
+
data/History.txt ADDED
@@ -0,0 +1,29 @@
1
+ == 0.4 2010-01-21
2
+
3
+ * 1 minor enhancement:
4
+ * Fixed bug in search for XML libraries
5
+
6
+ == 0.4 2010-01-21
7
+
8
+ * 1 minor enhancement:
9
+ * Moved RubyGems dependencies into the gemspec where they belong
10
+
11
+ == 0.3 2009-04-16
12
+
13
+ * 1 minor enhancement:
14
+ * Updated for Ruby 1.9
15
+
16
+ == 0.2.1 2008-07-04
17
+
18
+ * 1 minor enhancement:
19
+ * Updated examples for SalesForce API v10
20
+
21
+ == 0.2.0 2008-07-03
22
+
23
+ * 1 major enhancement:
24
+ * Incorporated fixes from ActiveSalesforce project
25
+
26
+ == 0.1.0 2005-09-02
27
+
28
+ * 1 major enhancement:
29
+ * Initial release
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2005-2010 Ian Dees and contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,52 @@
1
+ = rforce
2
+
3
+ * http://rforce.rubyforge.org
4
+ * http://rubyforge.org/projects/rforce
5
+ * http://bitbucket.org/undees/rforce
6
+ * http://github.com/undees/rforce
7
+
8
+ == DESCRIPTION:
9
+
10
+ RForce is a simple, usable binding to the SalesForce API.
11
+
12
+ == FEATURES/PROBLEMS:
13
+
14
+ 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.
15
+
16
+ == SYNOPSIS:
17
+
18
+ binding = RForce::Binding.new \
19
+ 'https://www.salesforce.com/services/Soap/u/10.0'
20
+
21
+ binding.login \
22
+ 'email', 'password_with_token'
23
+
24
+ answer = binding.search \
25
+ :searchString =>
26
+ 'find {McFakerson Co} in name fields returning account(id)'
27
+
28
+ account = answer.searchResponse.result.searchRecords.record
29
+ account = account.first if account.is_a? Array
30
+
31
+ account_id = account.Id
32
+ account_id = account_id.first if account_id.is_a? Array
33
+
34
+ opportunity = [
35
+ :type, 'Opportunity',
36
+ :accountId, account_id,
37
+ :amount, '10.00',
38
+ :name, 'Fakey McFakerson',
39
+ :closeDate, '2008-07-04',
40
+ :stageName, 'Closed Won'
41
+ ]
42
+
43
+ binding.create :sObject => opportunity
44
+
45
+ == REQUIREMENTS:
46
+
47
+ * Builder gem
48
+ * A SalesForce Enterprise or Developer account
49
+
50
+ == INSTALL:
51
+
52
+ * sudo gem install rforce
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "DerGuteMoritz-rforce"
8
+ gem.summary = %Q{A simple, usable binding to the SalesForce API.}
9
+ gem.description = %Q{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.}
10
+ gem.email = "moritz@twoticketsplease.de"
11
+ gem.homepage = "http://github.com/DerGuteMoritz/rforce"
12
+ gem.authors = ["Ian Dees", "Logan (henriquez)", "Aaron Qian", "Moritz Heidkamp"]
13
+ gem.add_dependency "builder", ">= 2.0.0"
14
+ gem.add_dependency "nokogiri", "~> 1.4.4"
15
+ gem.add_dependency 'oauth'
16
+ gem.add_development_dependency "rspec", ">= 1.3"
17
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
+ end
19
+ Jeweler::GemcutterTasks.new
20
+ rescue LoadError
21
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
+ end
23
+
24
+ require 'rake/testtask'
25
+ Rake::TestTask.new(:test) do |test|
26
+ test.libs << 'lib' << 'test'
27
+ test.pattern = 'test/**/test_*.rb'
28
+ test.verbose = true
29
+ end
30
+
31
+ begin
32
+ require 'rcov/rcovtask'
33
+ Rcov::RcovTask.new do |test|
34
+ test.libs << 'test'
35
+ test.pattern = 'test/**/test_*.rb'
36
+ test.verbose = true
37
+ end
38
+ rescue LoadError
39
+ task :rcov do
40
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
41
+ end
42
+ end
43
+
44
+ task :test => :check_dependencies
45
+
46
+ task :default => :test
47
+
48
+ require 'rake/rdoctask'
49
+ Rake::RDocTask.new do |rdoc|
50
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
+
52
+ rdoc.rdoc_dir = 'rdoc'
53
+ rdoc.title = "rforce #{version}"
54
+ rdoc.rdoc_files.include('README*')
55
+ rdoc.rdoc_files.include('lib/**/*.rb')
56
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.4.2
@@ -0,0 +1,18 @@
1
+ --- !ditz.rubyforge.org,2008-03-06/issue
2
+ title: Investigate libxml
3
+ desc: The libxml-ruby project just released an updated gem, and it's reputed to be fast and stable. We should investigate it as an alternative parser.
4
+ type: :feature
5
+ component: rforce
6
+ release:
7
+ reporter: Luigi Montanez <luigi.montanez@gmail.com>
8
+ status: :unstarted
9
+ disposition:
10
+ creation_time: 2008-07-23 17:15:33.479204 Z
11
+ references: []
12
+
13
+ id: 09d998dc3f9d6e8928598fd5d9c6627102dedd65
14
+ log_events:
15
+ - - 2008-07-23 17:15:36.027132 Z
16
+ - Ian Dees <undees@gmail.com>
17
+ - created
18
+ - ""
@@ -0,0 +1,22 @@
1
+ --- !ditz.rubyforge.org,2008-03-06/issue
2
+ title: Ruby 1.9 compatibility
3
+ desc: Syntax, specs, and functional.
4
+ type: :task
5
+ component: rforce
6
+ release: "0.3"
7
+ reporter: Ian Dees <undees@gmail.com>
8
+ status: :closed
9
+ disposition: :fixed
10
+ creation_time: 2009-04-16 06:27:47.790789 Z
11
+ references: []
12
+
13
+ id: 1b668248120eb4fd055f0ea6b75ff807f6955936
14
+ log_events:
15
+ - - 2009-04-16 06:27:51.734012 Z
16
+ - Ian Dees <undees@gmail.com>
17
+ - created
18
+ - ""
19
+ - - 2009-04-16 19:27:46.187665 Z
20
+ - Ian Dees <undees@gmail.com>
21
+ - closed with disposition fixed
22
+ - Support REXML and Hpricot on 1.9, degrade gracefully.
@@ -0,0 +1,18 @@
1
+ --- !ditz.rubyforge.org,2008-03-06/issue
2
+ title: Do something with expand()
3
+ desc: expand() was just dumped into the RForce namespace as a minimal step in the direction of testability. There's probably a much better home for it.
4
+ type: :task
5
+ component: rforce
6
+ release:
7
+ reporter: Ian Dees <undees@gmail.com>
8
+ status: :unstarted
9
+ disposition:
10
+ creation_time: 2008-07-23 17:16:45.714702 Z
11
+ references: []
12
+
13
+ id: 3ef7a7c5c7e38fb76e1f53e1b67f45559e21b104
14
+ log_events:
15
+ - - 2008-07-23 17:16:47.083713 Z
16
+ - Ian Dees <undees@gmail.com>
17
+ - created
18
+ - ""