leap_salesforce 0.2.6 → 0.2.7

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: 6b318944cb5c337f9eb2f43edb361d5e0ca3fdbe79ffbc493f4b98b6b2fcb81b
4
- data.tar.gz: 9f05c958a4c5a359097dfd39eb853fb547350701c3161aa4b1c21ba1e6093fc7
3
+ metadata.gz: bb7154cf99cf12053647574f3638760270b3d0e18cfdcb2f5680561765c49aa9
4
+ data.tar.gz: 66016e3b7e5999e8df24bdef7031bf3b40e9f0662aa6e2fcd76bdbd176390ee4
5
5
  SHA512:
6
- metadata.gz: 386927d34b1f47d6e3fe6295ecc72c62f4644e093431c667e7656b9175224aabdb947338df9bef91edf4d0d22015364e1bd90898be823d4a82c598b3f9fc3fdf
7
- data.tar.gz: 88f5a464645b4d0e5b3cabb23f903bbeb6d4a2c12afa77af9dc7312397f1eb1863af5f39d30cb82b23a24ebccf6ed101f0d0a63bbf57b7d9236f0100e2174b89
6
+ metadata.gz: c9a1048067ba6873d69ce44313e88573be5be000c544ff0d00f036f35dcae4d0e92d2884be69f5486c8da3e09ed8f4ca42670cbab1dfae33a16a351120bf6285
7
+ data.tar.gz: 930e8204a42e3285f2eec5ffdacb94596658e4a4983862b538463c79a8faa00d29c04a3c77f35703f51f000962a3d8010a8cecc7d8f1fb2fd9b975c8343dc841
@@ -20,8 +20,8 @@
20
20
  <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, RVM: ruby-2.6.0) [gem]" level="application" />
21
21
  <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, RVM: ruby-2.6.0) [gem]" level="application" />
22
22
  <orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.20190701, RVM: ruby-2.6.0) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="factory_bot (v5.0.2, RVM: ruby-2.6.0) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="faker (v2.3.0, RVM: ruby-2.6.0) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="factory_bot (v5.1.0, RVM: ruby-2.6.0) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="faker (v2.4.0, RVM: ruby-2.6.0) [gem]" level="application" />
25
25
  <orderEntry type="library" scope="PROVIDED" name="gyoku (v1.3.1, RVM: ruby-2.6.0) [gem]" level="application" />
26
26
  <orderEntry type="library" scope="PROVIDED" name="hashie (v3.6.0, RVM: ruby-2.6.0) [gem]" level="application" />
27
27
  <orderEntry type="library" scope="PROVIDED" name="http-accept (v1.7.0, RVM: ruby-2.6.0) [gem]" level="application" />
@@ -71,7 +71,7 @@
71
71
  <orderEntry type="library" scope="PROVIDED" name="socksify (v1.7.1, RVM: ruby-2.6.0) [gem]" level="application" />
72
72
  <orderEntry type="library" scope="PROVIDED" name="thor (v0.20.3, RVM: ruby-2.6.0) [gem]" level="application" />
73
73
  <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, RVM: ruby-2.6.0) [gem]" level="application" />
74
- <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.9, RVM: ruby-2.6.0) [gem]" level="application" />
74
+ <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.10, RVM: ruby-2.6.0) [gem]" level="application" />
75
75
  <orderEntry type="library" scope="PROVIDED" name="to_regexp (v0.2.1, RVM: ruby-2.6.0) [gem]" level="application" />
76
76
  <orderEntry type="library" scope="PROVIDED" name="topoisomerase (v0.1.5, RVM: ruby-2.6.0) [gem]" level="application" />
77
77
  <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.5, RVM: ruby-2.6.0) [gem]" level="application" />
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ Version 0.2.7
2
+ * Bug Fix
3
+ * New way of handling [] method broke error message's ability to diagnose
4
+ error when it was not thrown.
5
+ * Enhancement
6
+ * 'open_on_ui' method to view object in Salesforce UI
7
+
1
8
  Version 0.2.6
2
9
  * Enhancement
3
10
  * Update on data of an object made automatically if an update is done so
@@ -36,6 +36,7 @@ It reads the Metadata from Salesforce and creates the foundation for API tests.'
36
36
  spec.add_dependency 'factory_bot'
37
37
  spec.add_dependency 'faker', '>= 2.0'
38
38
  spec.add_dependency 'humanize'
39
+ spec.add_dependency 'launchy'
39
40
  spec.add_dependency 'rake'
40
41
  spec.add_dependency 'require_all'
41
42
  spec.add_dependency 'rubocop'
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'launchy'
3
4
  require_relative 'meta_data_handler'
4
5
  require_relative 'soql_handler'
5
6
  require_relative 'soql_global_data'
@@ -121,7 +122,11 @@ class SoqlData < Exchange
121
122
  # @param [Boolean] must_pass Whether to raise exception if call is not successful
122
123
  # @return [Exchange] Exchange object making delete
123
124
  def delete(must_pass: false)
124
- self.class.delete(id, must_pass: must_pass)
125
+ sf_id = id
126
+ self.class.delete(sf_id, must_pass: must_pass)
127
+ rescue NoElementAtPath
128
+ LeapSalesforce.logger.warn "Tried to delete object that doesn't exist"
129
+ self
125
130
  end
126
131
 
127
132
  # Delete current record, switching to Admin before doing so
@@ -205,7 +210,7 @@ class SoqlData < Exchange
205
210
  # @return [String] Error message if present. If not an error is raised
206
211
  def error_message
207
212
  if error_message?
208
- self[:message]
213
+ value_from_path :message
209
214
  else
210
215
  message = "No error message received. Status code is #{status_code}. "
211
216
  message += 'Response is successful when it should not be. ' if status_code.to_s[0] == '2'
@@ -222,6 +227,11 @@ class SoqlData < Exchange
222
227
  true
223
228
  end
224
229
 
230
+ # Open Object on default browser
231
+ def open_on_ui
232
+ Launchy.open("#{SoqlHandler.instance_url}/#{id}")
233
+ end
234
+
225
235
  # Returns descendants of the provided class SoqlData
226
236
  # @return [Class] Classes that inherit from this class
227
237
  def self.descendants
@@ -2,5 +2,5 @@
2
2
 
3
3
  module LeapSalesforce
4
4
  # @return [String] Version of leap salesforce
5
- VERSION = '0.2.6'
5
+ VERSION = '0.2.7'
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.6
4
+ version: 0.2.7
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-09-25 00:00:00.000000000 Z
12
+ date: 2019-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -151,6 +151,20 @@ dependencies:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: launchy
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
154
168
  - !ruby/object:Gem::Dependency
155
169
  name: rake
156
170
  requirement: !ruby/object:Gem::Requirement