active_force 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/active_force/active_query.rb +4 -0
- data/lib/active_force/standard_types.rb +3 -2
- data/lib/active_force/version.rb +1 -1
- data/lib/generators/active_force/model/model_generator.rb +1 -1
- data/spec/active_force/active_query_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c581e80e87411581ea34984582fae46fb088791e5d35a2227b31c983d4331b5f
|
4
|
+
data.tar.gz: 66b5a50080eafd5d2aecfdd0cd5262b0a1142c96f9cf324840242816f7dd9c71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55c1344f425f080433b1f00e2c2227c15b1990b20395406ef8d9fb2c8aa2817d2b0f4aac2d173380f93b7e646cc6f30436946915f4b706d237373816b6b0e412
|
7
|
+
data.tar.gz: 1ec278a796ecdb97c4b8629f671331e49fd21301e06bc6a3b29207ca77498d1e3b2ac8c2cd65ad458f7e250955fe3ace931840a20e7d60738622266a74dd1fe6
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## Not released
|
4
4
|
|
5
|
+
|
6
|
+
## 0.22.0
|
7
|
+
- Add `ids` method to ActiveQuery interface (https://github.com/Beyond-Finance/active_force/pull/94)
|
8
|
+
- Add missing standard type for ContentNote and fix the way the model generator handles the name input so it acts a bit more predictably. (https://github.com/Beyond-Finance/active_force/pull/95)
|
9
|
+
|
5
10
|
## 0.21.1
|
6
11
|
- Fixes #91. Applies scopes to eager-loaded associations when they are nested. (https://github.com/Beyond-Finance/active_force/pull/92)
|
7
12
|
|
@@ -83,6 +83,10 @@ module ActiveForce
|
|
83
83
|
super *selected_fields
|
84
84
|
end
|
85
85
|
|
86
|
+
def ids
|
87
|
+
clone_and_set_instance_variables(query_fields: ["Id"])
|
88
|
+
end
|
89
|
+
|
86
90
|
def find!(id)
|
87
91
|
result = find(id)
|
88
92
|
raise RecordNotFound.new("Couldn't find #{table_name} with id #{id}", table_name, id: id) if result.nil?
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module StandardTypes
|
2
|
-
STANDARD_TYPES = %w[
|
2
|
+
STANDARD_TYPES = %w[
|
3
3
|
Account
|
4
4
|
Asset
|
5
5
|
AssetFeed
|
@@ -67,6 +67,7 @@ module StandardTypes
|
|
67
67
|
ContentDocumentFeed
|
68
68
|
ContentDocumentHistory
|
69
69
|
ContentDocumentLink
|
70
|
+
ContentNote
|
70
71
|
ContentVersion
|
71
72
|
ContentVersionHistory
|
72
73
|
ContentWorkspace
|
@@ -352,6 +353,6 @@ module StandardTypes
|
|
352
353
|
WorkRewardHistory
|
353
354
|
WorkRewardShare
|
354
355
|
WorkThanks
|
355
|
-
WorkThanksShare
|
356
|
+
WorkThanksShare
|
356
357
|
]
|
357
358
|
end
|
data/lib/active_force/version.rb
CHANGED
@@ -16,7 +16,7 @@ module ActiveForce
|
|
16
16
|
}
|
17
17
|
|
18
18
|
def create_model_file
|
19
|
-
@table_name =
|
19
|
+
@table_name = name
|
20
20
|
@class_name = prepare_namespace + @table_name.gsub('__c', '')
|
21
21
|
template "model.rb.erb", "app/models/#{@class_name.underscore}.rb" if table_exists?
|
22
22
|
end
|
@@ -117,6 +117,12 @@ describe ActiveForce::ActiveQuery do
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
describe '#ids' do
|
121
|
+
it 'returns a query that selects only the Id field' do
|
122
|
+
expect(active_query.where(field: 123).ids.to_s).to eq "SELECT Id FROM table_name WHERE (Field__c = 123)"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
120
126
|
describe "condition mapping" do
|
121
127
|
it "maps conditions for a .where" do
|
122
128
|
new_query = active_query.where(field: 123)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_force
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Espinaco
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-
|
14
|
+
date: 2024-07-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activemodel
|