leap_salesforce 0.2.1 → 0.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69e8213e3c549f071e45176cfc12a1afbe0b9e8ce33f762cf7afc29100f92e50
|
4
|
+
data.tar.gz: 5429ba30864fa6c0627ca2ee93def140f563edf9f74575434dddc244b80e1aa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e595bfdf19c9c9deff83ef5c705c692922d83448fa1816e3b4da3541e3ec00ae0251269297f99a665f9a4a4d5dc44b658d86865c26f5b5cc90b779018abe5b77
|
7
|
+
data.tar.gz: f7e3d35252748f0f4e8763a9087fe3e5dca91ed27da54d25d33147b61fba91bade06fbe9cb9fb98a9efe28095dd63cc1b151ce8421e73b8274f4e4bf947cdc84
|
data/.idea/leap-salesforce.iml
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<orderEntry type="library" scope="PROVIDED" name="activemodel (v6.0.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
11
11
|
<orderEntry type="library" scope="PROVIDED" name="activerecord (v6.0.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
12
12
|
<orderEntry type="library" scope="PROVIDED" name="activesupport (v6.0.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.
|
13
|
+
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.7.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
14
14
|
<orderEntry type="library" scope="PROVIDED" name="akami (v1.3.1, RVM: ruby-2.6.0) [gem]" level="application" />
|
15
15
|
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
16
16
|
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
@@ -27,15 +27,15 @@
|
|
27
27
|
<orderEntry type="library" scope="PROVIDED" name="http-accept (v1.7.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
28
28
|
<orderEntry type="library" scope="PROVIDED" name="http-cookie (v1.0.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
29
29
|
<orderEntry type="library" scope="PROVIDED" name="httpi (v2.4.4, RVM: ruby-2.6.0) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="humanize (v2.1.
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="humanize (v2.1.2, RVM: ruby-2.6.0) [gem]" level="application" />
|
31
31
|
<orderEntry type="library" scope="PROVIDED" name="i18n (v1.6.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
32
32
|
<orderEntry type="library" scope="PROVIDED" name="jaro_winkler (v1.5.2, RVM: ruby-2.6.0) [gem]" level="application" />
|
33
33
|
<orderEntry type="library" scope="PROVIDED" name="jsonpath (v1.0.4, RVM: ruby-2.6.0) [gem]" level="application" />
|
34
34
|
<orderEntry type="library" scope="PROVIDED" name="kramdown (v2.1.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
35
35
|
<orderEntry type="library" scope="PROVIDED" name="launchy (v2.4.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
36
36
|
<orderEntry type="library" scope="PROVIDED" name="method_source (v0.9.2, RVM: ruby-2.6.0) [gem]" level="application" />
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.
|
38
|
-
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2019.
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2019.0904, RVM: ruby-2.6.0) [gem]" level="application" />
|
39
39
|
<orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.4.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
40
40
|
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
41
41
|
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.13.1, RVM: ruby-2.6.0) [gem]" level="application" />
|
@@ -46,12 +46,12 @@
|
|
46
46
|
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.17.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
47
47
|
<orderEntry type="library" scope="PROVIDED" name="parser (v2.6.3.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
48
48
|
<orderEntry type="library" scope="PROVIDED" name="pry (v0.12.2, RVM: ruby-2.6.0) [gem]" level="application" />
|
49
|
-
<orderEntry type="library" scope="PROVIDED" name="public_suffix (
|
49
|
+
<orderEntry type="library" scope="PROVIDED" name="public_suffix (v4.0.1, RVM: ruby-2.6.0) [gem]" level="application" />
|
50
50
|
<orderEntry type="library" scope="PROVIDED" name="rack (v2.0.7, RVM: ruby-2.6.0) [gem]" level="application" />
|
51
51
|
<orderEntry type="library" scope="PROVIDED" name="rack-protection (v2.0.4, RVM: ruby-2.6.0) [gem]" level="application" />
|
52
52
|
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.0.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
53
53
|
<orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, RVM: ruby-2.6.0) [gem]" level="application" />
|
54
|
-
<orderEntry type="library" scope="PROVIDED" name="random-port (v0.4.
|
54
|
+
<orderEntry type="library" scope="PROVIDED" name="random-port (v0.4.2, RVM: ruby-2.6.0) [gem]" level="application" />
|
55
55
|
<orderEntry type="library" scope="PROVIDED" name="require_all (v2.0.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
56
56
|
<orderEntry type="library" scope="PROVIDED" name="rest-client (v2.1.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
57
57
|
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.8.0, RVM: ruby-2.6.0) [gem]" level="application" />
|
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
Version 0.2.2
|
2
|
+
* Bug fix
|
3
|
+
* Ids were being interpreted as DateTimes by `type_of_time?`. Made check
|
4
|
+
more strict based on 'Y-M-D' format
|
5
|
+
* Enhancement
|
6
|
+
* Make aliases using 'where' instead of 'each with' and 'any?' instead of 'any_where?'
|
7
|
+
|
1
8
|
Version 0.2.1
|
2
9
|
* Bug fix
|
3
10
|
* Handle where value in filter is an exact date which was failing
|
@@ -4,6 +4,7 @@ require 'nori/core_ext'
|
|
4
4
|
require 'rubykeyword'
|
5
5
|
require 'humanize'
|
6
6
|
require 'active_support/core_ext/string'
|
7
|
+
require 'date'
|
7
8
|
|
8
9
|
# Override string object to provide convenience methods for Strings
|
9
10
|
class String
|
@@ -84,7 +85,7 @@ class String
|
|
84
85
|
|
85
86
|
# @return [Boolean] Whether string can be parsed into a time
|
86
87
|
def type_of_time?
|
87
|
-
|
88
|
+
Date.strptime(self, '%Y-%m-%d')
|
88
89
|
rescue ArgumentError
|
89
90
|
false
|
90
91
|
else
|
@@ -119,16 +119,18 @@ module SoqlGlobalObjectData
|
|
119
119
|
end
|
120
120
|
|
121
121
|
# @return [Boolean] Whether any result for lookup
|
122
|
-
def
|
122
|
+
def any?(lookup)
|
123
123
|
lookup_id(lookup)[:totalSize] != 0
|
124
124
|
end
|
125
125
|
|
126
|
+
alias any_where? any?
|
127
|
+
|
126
128
|
# Perform the code in the block for all the ids matching a query.
|
127
129
|
# If no block, return a list of objects
|
128
130
|
# @param [Hash] lookup Key value pair unique to Salesforce to query for
|
129
131
|
# @yield [id] Perform block for each id returned. The 'id' parameter in a block represents an id matching the query
|
130
132
|
# @return [Array] List of ids matching criteria. Only used if no block given
|
131
|
-
def
|
133
|
+
def ids_where(lookup)
|
132
134
|
lookup[:limit] ||= nil # Don't limit results returned
|
133
135
|
SoqlHandler.new("Each Id where #{self}").use
|
134
136
|
results = query "SELECT Id FROM #{soql_object_name} #{soql_lookup_filter(lookup)}", wait: false
|
@@ -140,13 +142,17 @@ module SoqlGlobalObjectData
|
|
140
142
|
end
|
141
143
|
end
|
142
144
|
|
145
|
+
alias each_id_with ids_where
|
146
|
+
|
143
147
|
# @param [Hash] lookup Key value pair unique to Salesforce to query for
|
144
148
|
# @return [Array] List of Soql objects matching criteria
|
145
|
-
def
|
149
|
+
def where(lookup)
|
146
150
|
ids = each_id_with lookup
|
147
151
|
ids.collect { |id| find(Id: id) }
|
148
152
|
end
|
149
153
|
|
154
|
+
alias each_with where
|
155
|
+
|
150
156
|
# Remove all ids from table that match lookup criteria
|
151
157
|
# @param [Hash] lookup Key value pair unique to Salesforce to query for
|
152
158
|
def delete_ids_with(lookup)
|
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.2
|
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-
|
12
|
+
date: 2019-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|