leap_salesforce 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +3 -0
- data/Rakefile +1 -0
- data/lib/leap_salesforce/session.rb +38 -0
- data/lib/leap_salesforce/version.rb +1 -1
- data/lib/leap_salesforce.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8805308060f18da64cded4e1136a905bea7956eec9d80b251ef573a5afc45641
|
4
|
+
data.tar.gz: 6cdc409d63208ce8bbae6aaf909007e4c80ac53cabce2326fff5a84fb2c46e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03e189dfbc7c732dbe2e9e8a0e2ea8373e688ee38fd39fbf84e953807c0be1c0e22829e00c6282e2c8cb8774215f0d2fcf79dd208e929865d1ab61fde5a0e40
|
7
|
+
data.tar.gz: 45789647e1f9263722875fee80e016551a237df6603c7faecfd28a396934651caf99b8b21a0503642df47b8b0612916c8082ca8b29effcfa5285afc25da15197
|
data/ChangeLog
CHANGED
data/Rakefile
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
require_relative 'auth'
|
2
|
+
require 'savon'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module LeapSalesforce
|
6
|
+
# Holds information about a login session
|
7
|
+
class Session
|
8
|
+
# @return [String] Session id returned from SOAP API
|
9
|
+
attr_accessor :session_id
|
10
|
+
# @return [String] User id returned from SOAP API
|
11
|
+
attr_accessor :user_id
|
12
|
+
|
13
|
+
def initialize(username, password)
|
14
|
+
login_body = LeapSalesforce::Session.soap_login username, password
|
15
|
+
|
16
|
+
self.session_id = login_body[:login_response][:result][:session_id]
|
17
|
+
self.user_id = login_body[:login_response][:result][:session_id]
|
18
|
+
end
|
19
|
+
|
20
|
+
class << self
|
21
|
+
|
22
|
+
# Login via SOAP API
|
23
|
+
def soap_login(username, password)
|
24
|
+
client = Savon.client do
|
25
|
+
endpoint "#{SoqlHandler.instance_url}/services/Soap/u/51.0"
|
26
|
+
namespace "urn:partner.soap.sforce.com"
|
27
|
+
end
|
28
|
+
|
29
|
+
response = client.call(:login, message:
|
30
|
+
{
|
31
|
+
username: username,
|
32
|
+
password: password
|
33
|
+
})
|
34
|
+
response.body
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/leap_salesforce.rb
CHANGED
@@ -19,6 +19,7 @@ require 'factory_bot' # For mass production of data
|
|
19
19
|
require 'faker' # For fake data
|
20
20
|
require 'leap_salesforce/error'
|
21
21
|
require 'leap_salesforce/loader'
|
22
|
+
require 'leap_salesforce/session'
|
22
23
|
|
23
24
|
# If variable is present within LeapSalesforce set it
|
24
25
|
def load_variables_from(file)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leap_salesforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IQA
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-01
|
12
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -333,6 +333,7 @@ files:
|
|
333
333
|
- lib/leap_salesforce/rake.rb
|
334
334
|
- lib/leap_salesforce/rake/setup.rake
|
335
335
|
- lib/leap_salesforce/rake/sfdx.rake
|
336
|
+
- lib/leap_salesforce/session.rb
|
336
337
|
- lib/leap_salesforce/soql_data/common_enum_methods.rb
|
337
338
|
- lib/leap_salesforce/soql_data/data_relationships.rb
|
338
339
|
- lib/leap_salesforce/soql_data/meta_data_handler.rb
|