activesalesforce 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rforce.rb +12 -5
- metadata +2 -2
data/lib/rforce.rb
CHANGED
@@ -147,25 +147,32 @@ module RForce
|
|
147
147
|
|
148
148
|
#Connect to the server securely.
|
149
149
|
def initialize(url)
|
150
|
+
init_server(url)
|
151
|
+
|
152
|
+
@session_id = ''
|
153
|
+
@batch_size = DEFAULT_BATCH_SIZE
|
154
|
+
end
|
155
|
+
|
156
|
+
def init_server(url)
|
150
157
|
@url = URI.parse(url)
|
151
158
|
@server = Net::HTTP.new(@url.host, @url.port)
|
152
159
|
@server.use_ssl = @url.scheme == 'https'
|
153
160
|
|
154
161
|
# run ruby with -d to see SOAP wiredumps.
|
155
162
|
@server.set_debug_output $stderr if $DEBUG
|
156
|
-
|
157
|
-
@session_id = ''
|
158
|
-
@batch_size = DEFAULT_BATCH_SIZE
|
159
163
|
end
|
160
164
|
|
161
|
-
|
162
165
|
#Log in to the server and remember the session ID
|
163
166
|
#returned to us by SalesForce.
|
164
167
|
def login(user, pass)
|
165
168
|
response = call_remote(:login, [:username, user, :password, pass])
|
166
169
|
|
167
170
|
raise "Incorrect user name / password [#{response.fault}]" unless response.loginResponse
|
168
|
-
|
171
|
+
|
172
|
+
result = response.loginResponse.result
|
173
|
+
@session_id = result.sessionId
|
174
|
+
|
175
|
+
init_server(result.serverUrl)
|
169
176
|
|
170
177
|
response
|
171
178
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: activesalesforce
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2006-01-
|
6
|
+
version: 0.0.7
|
7
|
+
date: 2006-01-25 00:00:00 -05:00
|
8
8
|
summary: ActiveSalesforce is an extension to the Rails Framework that allows for the dynamic creation and management of ActiveRecord objects through the use of Salesforce meta-data and uses a Salesforce.com organization as the backing store.
|
9
9
|
require_paths:
|
10
10
|
- lib
|