leap_salesforce 0.2.18 → 0.2.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/leap-salesforce.iml +2 -2
- data/.leap_salesforce.yml +1 -0
- data/ChangeLog +7 -0
- data/lib/leap_salesforce/auth.rb +2 -1
- data/lib/leap_salesforce/ext/string.rb +4 -2
- data/lib/leap_salesforce/{get_scratch_auth.sh → get_scratch_auth_jwt.sh} +1 -0
- data/lib/leap_salesforce/get_scratch_auth_url.sh +4 -0
- data/lib/leap_salesforce/rake.rb +2 -4
- data/lib/leap_salesforce/soql_data/soql.rb +1 -1
- data/lib/leap_salesforce/soql_data/soql_data.rb +8 -0
- data/lib/leap_salesforce/users/users.rb +6 -1
- data/lib/leap_salesforce/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 860e70700f38ef5c8d3d91d818f62133a6c510cc938c08a5d7a88b612b362c52
|
4
|
+
data.tar.gz: 06e4e60b1c79e909cd3664f8130b4d060712e11e9d68a92b9e69f6eff691dc4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edccc57873db055416189cbbad1f68351e861e63d5cb754822b2192591149948a44334d2340f6f70e65b76dfa0a9ffdf7b9abc9ba9ff1f508785aefc1fd04055
|
7
|
+
data.tar.gz: e16efec11ca65a52f3015fe32bad973aa40a102d39ad57068234f0820c6de78047ee3651b440a3a4e2ad1da19be0882e58acb5ac3def8f63c23b49d4465ec34b
|
data/.idea/leap-salesforce.iml
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.7.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
16
16
|
<orderEntry type="library" scope="PROVIDED" name="akami (v1.3.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
17
17
|
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
19
19
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
20
20
|
<orderEntry type="library" scope="PROVIDED" name="coderay (v1.1.2, RVM: ruby-2.6.3) [gem]" level="application" />
|
21
21
|
<orderEntry type="library" scope="PROVIDED" name="colorize (v0.8.1, RVM: ruby-2.6.3) [gem]" level="application" />
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<orderEntry type="library" scope="PROVIDED" name="humanize (v2.4.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
34
34
|
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.7.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
35
35
|
<orderEntry type="library" scope="PROVIDED" name="jaro_winkler (v1.5.4, RVM: ruby-2.6.3) [gem]" level="application" />
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v2.
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v2.3.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
37
37
|
<orderEntry type="library" scope="PROVIDED" name="jsonpath (v1.0.5, RVM: ruby-2.6.3) [gem]" level="application" />
|
38
38
|
<orderEntry type="library" scope="PROVIDED" name="kramdown (v2.1.0, RVM: ruby-2.6.3) [gem]" level="application" />
|
39
39
|
<orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.3, RVM: ruby-2.6.3) [gem]" level="application" />
|
data/.leap_salesforce.yml
CHANGED
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
Version 0.2.19
|
2
|
+
* Enhancement
|
3
|
+
* Where suburl is passed into SoqlData, take part from 'sobjects' onwards to make using a path obtained from
|
4
|
+
a request in a subsequent request easier
|
5
|
+
* Bug fix
|
6
|
+
* Handle 'sequence' keyword in FactoryBot
|
7
|
+
|
1
8
|
Version 0.2.18
|
2
9
|
* Bug fix
|
3
10
|
* Fixes #29 to raise error if value retrieved on object after an update failure
|
data/lib/leap_salesforce/auth.rb
CHANGED
@@ -87,11 +87,12 @@ module LeapSalesforce
|
|
87
87
|
raise SetupError,
|
88
88
|
'Please set SF_USERNAME and SF_CONSUMER_KEY environment variables'
|
89
89
|
end
|
90
|
+
# TODO: These scripts only work in a linux shell
|
90
91
|
script_name = if ENV['SCRATCH_ORG'] && !ENV['SCRATCH_ORG'].empty?
|
91
92
|
raise "Please set SCRATCH_ORG_ALIAS when SCRATCH_ORG(#{ENV['SCRATCH_ORG']}) is set" unless ENV['SCRATCH_ORG_ALIAS']
|
92
93
|
|
93
94
|
puts "Using sandbox #{ENV['SCRATCH_ORG_ALIAS']}"
|
94
|
-
'
|
95
|
+
'get_scratch_auth_jwt'
|
95
96
|
else
|
96
97
|
'get_prod_auth'
|
97
98
|
end
|
@@ -8,7 +8,9 @@ require 'json'
|
|
8
8
|
|
9
9
|
# Override string object to provide convenience methods for Strings
|
10
10
|
class String
|
11
|
-
# @return [Array] List of
|
11
|
+
# @return [Array] List of keywords reserved for FactoryBot
|
12
|
+
FACTORY_WORDS = ['sequence']
|
13
|
+
# @return [Array] List of ruby keywords. Some words are only key to FactoryBot like 'sequence'
|
12
14
|
KEYWORDS = %w[BEGIN END __ENCODING__ __END__ __FILE__ __LINE__ alias and begin break case class def defined?
|
13
15
|
do else elsif end ensure false for if in module next nil not or redo rescue retry return
|
14
16
|
self super then true undef unless until when while yield private].freeze
|
@@ -110,6 +112,6 @@ class String
|
|
110
112
|
|
111
113
|
# @return [Boolean] Whether string is a Ruby keyword
|
112
114
|
def keyword?
|
113
|
-
KEYWORDS.include? self
|
115
|
+
KEYWORDS.include?(self) || FACTORY_WORDS.include?(self)
|
114
116
|
end
|
115
117
|
end
|
data/lib/leap_salesforce/rake.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# Dir.glob('rake/*.rake').each(&method(:import))
|
3
|
+
require 'leap_salesforce'
|
4
|
+
Dir.glob(File.join(__dir__, 'rake', '*.rake')).each(&method(:import))
|
@@ -54,7 +54,7 @@ module LeapSalesforce
|
|
54
54
|
# @param [Hash] lookup Hash representing look up performed
|
55
55
|
# @param [String] url Url to get
|
56
56
|
def data_from_url(url, lookup)
|
57
|
-
soql_table.new("Id at #{url}", method: :get, suburl: url
|
57
|
+
soql_table.new("Id at #{url}", method: :get, suburl: url)
|
58
58
|
rescue NoElementAtPath
|
59
59
|
raise NoElementAtPath, "No result found for #{lookup} under user #{LeapSalesforce.api_user}"
|
60
60
|
end
|
@@ -46,6 +46,14 @@ class SoqlData < Exchange
|
|
46
46
|
# leave this to empty. Otherwise Hash would look like method: :get, suburl: 'URL_AFTER_SOQL_HANDLER_BASE_URL'
|
47
47
|
def initialize(name = nil, http_parameters = {})
|
48
48
|
super
|
49
|
+
if @override_parameters && @override_parameters[:suburl]
|
50
|
+
suburl_passed = @override_parameters[:suburl]
|
51
|
+
@override_parameters[:suburl] = if suburl_passed.include?('sobjects')
|
52
|
+
suburl_passed[suburl_passed.index('sobjects')..-1]
|
53
|
+
else
|
54
|
+
suburl_passed
|
55
|
+
end
|
56
|
+
end
|
49
57
|
|
50
58
|
return unless http_parameters.empty?
|
51
59
|
|
@@ -8,7 +8,12 @@ module LeapSalesforce
|
|
8
8
|
@list = []
|
9
9
|
class << self
|
10
10
|
# @return [Array] List of test users
|
11
|
-
|
11
|
+
attr_writer :list
|
12
|
+
|
13
|
+
# @return [Array] List of test users
|
14
|
+
def list
|
15
|
+
@list.empty? ? [User.new(:admin, ENV['SF_USERNAME'])] : @list
|
16
|
+
end
|
12
17
|
|
13
18
|
# @param [LeapSalesforce::User, Array] user Test user to add to leap salesforce
|
14
19
|
def add(user)
|
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: 0.2.
|
4
|
+
version: 0.2.19
|
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:
|
12
|
+
date: 2020-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -318,7 +318,8 @@ files:
|
|
318
318
|
- lib/leap_salesforce/generator/templates/spec/picklists_spec.rb.erb
|
319
319
|
- lib/leap_salesforce/generator/templates/spec/spec_helper.rb.erb
|
320
320
|
- lib/leap_salesforce/get_prod_auth.sh
|
321
|
-
- lib/leap_salesforce/
|
321
|
+
- lib/leap_salesforce/get_scratch_auth_jwt.sh
|
322
|
+
- lib/leap_salesforce/get_scratch_auth_url.sh
|
322
323
|
- lib/leap_salesforce/leaps.rb
|
323
324
|
- lib/leap_salesforce/limits.rb
|
324
325
|
- lib/leap_salesforce/loader.rb
|