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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a2d59fa533f638635afa0e8654fae4f77540310fba228ae697e05eaaf965525
4
- data.tar.gz: 0570306ac71f575994b07aace62ad9579d0103f812eceb59aaa83b1a6ddc1911
3
+ metadata.gz: c581e80e87411581ea34984582fae46fb088791e5d35a2227b31c983d4331b5f
4
+ data.tar.gz: 66b5a50080eafd5d2aecfdd0cd5262b0a1142c96f9cf324840242816f7dd9c71
5
5
  SHA512:
6
- metadata.gz: ceccbbfb84f6f80190d11ae8722ba8fbbe423cc4164b0567df2fd912f7e45150ddfb4092da3af528d431f03527676dd897e5565f6d5b18fdf70492d489667896
7
- data.tar.gz: 91962473ab612ca13f755f7b94b891d8c6f849677999ef0333a98924b9f6a001566cd602fc3ee3c9c8e1b6cdcef039fbfeb13e4f1a8f2e284877e5d771a84e3c
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveForce
4
- VERSION = '0.21.1'
4
+ VERSION = '0.22.0'
5
5
  end
@@ -16,7 +16,7 @@ module ActiveForce
16
16
  }
17
17
 
18
18
  def create_model_file
19
- @table_name = file_name.capitalize
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.21.1
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-05-17 00:00:00.000000000 Z
14
+ date: 2024-07-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activemodel