fixture_fox 0.2.2 → 0.2.4

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: 930b2bc2ba104e716c961e57ab69898bd771396a225f83e3d68b3376af69a3d5
4
- data.tar.gz: b2fa496f38f6c1fe35cb2271e2cd0edbb688365f462455ab64e8e0f5e4166963
3
+ metadata.gz: 7581c59d3d7efa1d8f559da1031eefa8cbefdf86bf248a752010d654fbaf25de
4
+ data.tar.gz: a70b6e9af1d19d61f694a038dd75551e460f801b2b5a5c26bbc075e5ee8cdbe9
5
5
  SHA512:
6
- metadata.gz: 1571659aaed4a9b891923b3f4b6a5fc5d0bb8acba9b09430ca1ac1edf757d7cc00507d4129562d05fce380e6724bc9d42ca2aa4557276b20223de7af32743eff
7
- data.tar.gz: 65e7b3a509158b4f626bcb688d067f18b8d7e28832654f0e2e16d10a97aacb8ea0e44099dd1a3edfad3f40150ffd5858bb2630da66735263a0d397c68f5ae918
6
+ metadata.gz: ea176e378870d9e6d4870273de052711ee9a32e832c34ca9d7405650bc3bf8b671ef960cee325e26aff62202fe145ccd498dd9726a5949778387621295a67484
7
+ data.tar.gz: 488630dcc4b7e5fe656fe3b23a5015002e38b8a3b84d653fcfe30b903f12bbdca3da05cebcaee2fa21975d0e07e3cf93b653538294505bf87429730a607103ae
data/fixture_fox.gemspec CHANGED
@@ -28,7 +28,8 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "developer_exceptions"
29
29
  spec.add_dependency "constrain"
30
30
 
31
- spec.add_dependency "shellopts", '=2.1.3'
31
+ # spec.add_dependency "shellopts", '=2.1.3'
32
+ spec.add_dependency "shellopts"
32
33
  spec.add_dependency "pg_graph"
33
34
 
34
35
  spec.add_development_dependency "rake"
@@ -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.4"
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.4
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: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: shellopts
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 2.1.3
103
+ version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 2.1.3
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pg_graph
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -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