fixture_fox 0.2.2 → 0.2.3

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: 930b2bc2ba104e716c961e57ab69898bd771396a225f83e3d68b3376af69a3d5
4
- data.tar.gz: b2fa496f38f6c1fe35cb2271e2cd0edbb688365f462455ab64e8e0f5e4166963
3
+ metadata.gz: 2df98a0f3709e924fc29ae7f8d155191bc5e6e49338e5f6673376f36bf3d0a1f
4
+ data.tar.gz: b578b8fbaeec78c200bc387de6d3cbbfa0a8d468131fea552329bb5088234085
5
5
  SHA512:
6
- metadata.gz: 1571659aaed4a9b891923b3f4b6a5fc5d0bb8acba9b09430ca1ac1edf757d7cc00507d4129562d05fce380e6724bc9d42ca2aa4557276b20223de7af32743eff
7
- data.tar.gz: 65e7b3a509158b4f626bcb688d067f18b8d7e28832654f0e2e16d10a97aacb8ea0e44099dd1a3edfad3f40150ffd5858bb2630da66735263a0d397c68f5ae918
6
+ metadata.gz: 7fbb05bacc4362fc47fee303969b9b0e621da953f8b8f9f21e62441121ce89f5ce4784d1242fa38a061d905bf865b1fb3db7b33bb76309eb1ddb2a424076f6ef
7
+ data.tar.gz: 9a7ff187e819d3f7f9ced5755df25382b7da9bb350fb1d9ac788ec8951d19b446b33eaf3cac6bf3883e44eabaff84b9b2b9fbd110e0fda43c479449e1593a24c
@@ -196,7 +196,7 @@ module FixtureFox
196
196
  ast_ref.reference.error("Can't find anchor for reference '#{ast_ref.reference.litt}'")
197
197
  anchor_types =
198
198
  [anchor.type] +
199
- (anchor.type.table.subtable? ? [anchor.type.table.supertable.record_type] : [])
199
+ (anchor.type.table.sub_table? ? [anchor.type.table.super_table.record_type] : [])
200
200
  anchor_types.any? { |anchor_type| ast_ref.type == anchor_type } or
201
201
  ast_ref.reference.error(
202
202
  "Data type mismatch - expected a reference to a " \
@@ -213,23 +213,23 @@ module FixtureFox
213
213
  def generate_record_ids
214
214
  # puts "generate_record_ids"
215
215
  # puts " ids: #{@ids}"
216
- @supertable_records = [] # Array of pairs of supertable/id
216
+ @super_table_records = [] # Array of pairs of super_table/id
217
217
  records.each { |ast_record|
218
218
  table = ast_record.type.table
219
- table_uid = table.subtable? ? table.supertable.uid : table.uid
219
+ table_uid = table.sub_table? ? table.super_table.uid : table.uid
220
220
 
221
- # If enclosing record/table is the supertable, then take the ID from there
222
- if table.subtable?
221
+ # If enclosing record/table is the super_table, then take the ID from there
222
+ if table.sub_table?
223
223
  parent_table = ast_record.parent.type.table
224
- if table.supertable == parent_table # works for both Record and Table objects
224
+ if table.super_table == parent_table # works for both Record and Table objects
225
225
  id = @ids[table.uid] = @ids[parent_table.uid]
226
226
 
227
- # Enclosing record/table is not the supertable so generate a new ID
228
- # based on the current supertable ID and prepare a new supertable
227
+ # Enclosing record/table is not the super_table so generate a new ID
228
+ # based on the current super_table ID and prepare a new super_table
229
229
  # record
230
230
  else
231
- id = @ids[table.uid] = @ids[table.supertable.uid] += 1
232
- @supertable_records << [table.supertable, id]
231
+ id = @ids[table.uid] = @ids[table.super_table.uid] += 1
232
+ @super_table_records << [table.super_table, id]
233
233
  end
234
234
  ast_record.id = id
235
235
 
@@ -261,8 +261,8 @@ module FixtureFox
261
261
  # Build all root tables. This makes sure empty tables are registered
262
262
  ast.tables.each { |t| idr.put(t.schema, t.type.table.name) }
263
263
 
264
- # Create implicit supertable records
265
- @supertable_records.each { |table, id|
264
+ # Create implicit super_table records
265
+ @super_table_records.each { |table, id|
266
266
  idr.put(table.schema.name, table.name, id)
267
267
  }
268
268
 
@@ -1,3 +1,3 @@
1
1
  module FixtureFox
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixture_fox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-16 00:00:00.000000000 Z
11
+ date: 2023-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.3.7
251
+ rubygems_version: 3.3.18
252
252
  signing_key:
253
253
  specification_version: 4
254
254
  summary: fixture_fox gem