rforce 0.12 → 0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/rforce/binding.rb +2 -0
- data/lib/rforce/method_keys.rb +8 -3
- data/lib/rforce/version.rb +1 -1
- data/spec/rforce_spec.rb +8 -0
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f2434cd5545e6f4585b483633e52d0b172ea789
|
4
|
+
data.tar.gz: c75679662a87578245a7f9d6e24187267c0551e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b8a465f2714fc8c0b1a942f9d53d64fa84c0fce4c2dd738aef7bdf43665ec30bb28dad4b4f8f24bf586526e435323c1399600fee2e3e4436203ddeb1d46a58
|
7
|
+
data.tar.gz: 1bc39bd4e0258df4dad7331c59326f7dbee3826320df67423582b4a23ee695b1ed9b2bea5d73211fe92864b6a1b6b175962f5a2faa0fafcf68941c2a5fca715b
|
data/History.txt
CHANGED
data/lib/rforce/binding.rb
CHANGED
@@ -136,6 +136,8 @@ module RForce
|
|
136
136
|
# a hash or (if order is important) an array of alternating
|
137
137
|
# keys and values.
|
138
138
|
def call_remote(method, args)
|
139
|
+
@server ||= create_server(@url)
|
140
|
+
|
139
141
|
# Different URI requirements for regular vs. OAuth. This is
|
140
142
|
# *screaming* for a refactor.
|
141
143
|
fallback_soap_url = @oauth ? @url.to_s : @url.path
|
data/lib/rforce/method_keys.rb
CHANGED
@@ -2,12 +2,17 @@ module RForce
|
|
2
2
|
# Allows indexing hashes like method calls: hash.key
|
3
3
|
# to supplement the traditional way of indexing: hash[key]
|
4
4
|
module MethodKeys
|
5
|
+
def respond_to_missing?(*)
|
6
|
+
return true if respond_to?(:[])
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
5
10
|
def method_missing(method, *args)
|
6
|
-
|
7
|
-
|
11
|
+
return self[method] if respond_to?(:[])
|
12
|
+
super
|
8
13
|
end
|
9
14
|
end
|
10
|
-
|
15
|
+
|
11
16
|
class MethodHash < Hash
|
12
17
|
include MethodKeys
|
13
18
|
end
|
data/lib/rforce/version.rb
CHANGED
data/spec/rforce_spec.rb
CHANGED
@@ -7,6 +7,10 @@ describe MethodKeys do
|
|
7
7
|
|
8
8
|
h.foo.should == :bar
|
9
9
|
h.nonexistent.should be_nil
|
10
|
+
|
11
|
+
[:foo, :nonexistent].each do |method|
|
12
|
+
h.respond_to?(method).should be true
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
it 'provides a Hash-like class' do
|
@@ -17,6 +21,10 @@ describe MethodKeys do
|
|
17
21
|
mh.one.should == 1
|
18
22
|
mh.ten.should == 10
|
19
23
|
mh.nothing.should be_nil
|
24
|
+
|
25
|
+
[:one, :ten, :nothing].each do |method|
|
26
|
+
mh.respond_to?(method).should be true
|
27
|
+
end
|
20
28
|
end
|
21
29
|
end
|
22
30
|
|
metadata
CHANGED
@@ -1,125 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.13'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Dees
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: oauth
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.8'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: hoe-gemspec2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '1.1'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '1.1'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: nokogiri
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.5'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.5'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: xmlparser
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0.7'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.7'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: hoe
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '3.12'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '3.12'
|
125
125
|
description: |-
|
@@ -135,6 +135,7 @@ extra_rdoc_files:
|
|
135
135
|
- Manifest.txt
|
136
136
|
- README.rdoc
|
137
137
|
files:
|
138
|
+
- ".gemtest"
|
138
139
|
- History.txt
|
139
140
|
- Manifest.txt
|
140
141
|
- README.rdoc
|
@@ -156,30 +157,29 @@ files:
|
|
156
157
|
- spec/spec.opts
|
157
158
|
- spec/spec_helper.rb
|
158
159
|
- tasks/timing.rake
|
159
|
-
- .gemtest
|
160
160
|
homepage: http://github.com/undees/rforce
|
161
161
|
licenses:
|
162
162
|
- MIT
|
163
163
|
metadata: {}
|
164
164
|
post_install_message:
|
165
165
|
rdoc_options:
|
166
|
-
- --main
|
166
|
+
- "--main"
|
167
167
|
- README.rdoc
|
168
168
|
require_paths:
|
169
169
|
- lib
|
170
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
182
|
+
rubygems_version: 2.4.5
|
183
183
|
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: RForce is a simple, usable binding to the Salesforce API
|