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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2c0ca47804ac6b8569d9a025d57650cfd749000abcf51a32833734fe82aabc3
4
- data.tar.gz: bfdbffd73951d36c605e51250d7db353d50408b1435f95a8a7bb2e296f923e29
3
+ metadata.gz: 860e70700f38ef5c8d3d91d818f62133a6c510cc938c08a5d7a88b612b362c52
4
+ data.tar.gz: 06e4e60b1c79e909cd3664f8130b4d060712e11e9d68a92b9e69f6eff691dc4a
5
5
  SHA512:
6
- metadata.gz: fe62e4cc025ebb9b51432d295ff377f672127c07cc95d9f0691a3898339baee22beac1f01e8c0da5074bc6194fefde2465513e875e27b4d620dc285c45ef1b49
7
- data.tar.gz: aa0431124e5a9e1b0e6664c175a8818af2283b73215c4a5f4cc34f2b3f45e09904560e1bff5c1c69b44e6964c774ce204028e35b619bea5e4c2ca98e1129a9d2
6
+ metadata.gz: edccc57873db055416189cbbad1f68351e861e63d5cb754822b2192591149948a44334d2340f6f70e65b76dfa0a9ffdf7b9abc9ba9ff1f508785aefc1fd04055
7
+ data.tar.gz: e16efec11ca65a52f3015fe32bad973aa40a102d39ad57068234f0820c6de78047ee3651b440a3a4e2ad1da19be0882e58acb5ac3def8f63c23b49d4465ec34b
@@ -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.3, RVM: ruby-2.6.3) [gem]" level="application" />
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.2.0, RVM: ruby-2.6.3) [gem]" level="application" />
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
@@ -11,3 +11,4 @@ soql_objects:
11
11
  - Broker: Broker__c
12
12
  - Account
13
13
  - Attachment
14
+ - EventLogFile
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
@@ -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
- 'get_scratch_auth'
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 ruby keywords
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
@@ -1,2 +1,3 @@
1
+ # Get scratch ORG logging in via jwtkeyfile
1
2
  sfdx force:auth:jwt:grant --clientid "$SF_CONSUMER_KEY" --jwtkeyfile "$JWT_FOLDER"/server.key --username "$SF_USERNAME" --setdefaultdevhubusername --setalias HubOrg
2
3
  sfdx force:org:display --targetusername "$SCRATCH_ORG_ALIAS"
@@ -0,0 +1,4 @@
1
+ # Get scratch ORG logging in via Auth url
2
+ #echo $org_auth_url > $file
3
+ sfdx force:auth:sfdxurl:store --sfdxurlfile "$file" --setalias HubOrg --json
4
+ sfdx force:org:display --targetusername "$SCRATCH_ORG_ALIAS"
@@ -1,6 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- import File.join(__dir__, 'rake', 'setup.rake')
4
- import File.join(__dir__, 'rake', 'sfdx.rake')
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.split("v#{SoqlHandler.api_version}/").last)
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
- attr_accessor :list
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)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module LeapSalesforce
4
4
  # @return [String] Version of leap salesforce
5
- VERSION = '0.2.18'
5
+ VERSION = '0.2.19'
6
6
  end
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.18
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: 2019-12-18 00:00:00.000000000 Z
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/get_scratch_auth.sh
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