eddy 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +103 -37
- data/.solargraph.yml +4 -0
- data/.vscode/settings.json +17 -0
- data/.yardopts +2 -2
- data/CHANGELOG.md +50 -0
- data/Gemfile.lock +21 -7
- data/README.md +32 -3
- data/Rakefile +1 -10
- data/data/004010/code-lists/100.tsv +164 -0
- data/data/004010/code-lists/156.tsv +52 -0
- data/data/004010/code-lists/26.tsv +499 -0
- data/data/004010/code-lists/etc/100-fancy-definitions.tsv +164 -0
- data/data/004010/code-lists/etc/100-with-funds-codes.tsv +180 -0
- data/data/004010/code-lists/etc/26-alpha2.tsv +250 -0
- data/data/004010/code-lists/etc/26-alpha3.tsv +250 -0
- data/data/004010/elements-short.tsv +1405 -0
- data/data/004010/elements.tsv +3 -3
- data/data/004010/segments.tsv +1009 -1003
- data/data/004010/segments/ack.segment.yml +15 -0
- data/data/004010/segments/bak.segment.yml +9 -0
- data/data/004010/segments/beg.segment.yml +17 -0
- data/data/004010/segments/big.segment.yml +10 -0
- data/data/004010/segments/bsn.segment.yml +10 -0
- data/data/004010/segments/cad.segment.yml +14 -0
- data/data/004010/segments/ctp.segment.yml +19 -0
- data/data/004010/segments/ctt.segment.yml +13 -0
- data/data/004010/segments/dtm.segment.yml +7 -0
- data/data/004010/segments/envelope/ge.segment.yml +7 -0
- data/data/004010/segments/envelope/gs.segment.yml +13 -0
- data/data/004010/segments/envelope/iea.segment.yml +8 -0
- data/data/004010/segments/envelope/isa.segment.yml +22 -0
- data/data/004010/segments/envelope/se.segment.yml +7 -0
- data/data/004010/segments/envelope/st.segment.yml +12 -0
- data/data/004010/segments/hl.segment.yml +9 -0
- data/data/004010/segments/it1.segment.yml +20 -0
- data/data/004010/segments/lin.segment.yml +10 -0
- data/data/004010/segments/loop/hl.segment.yml +8 -0
- data/data/004010/segments/man.segment.yml +7 -0
- data/data/004010/segments/n1.segment.yml +9 -0
- data/data/004010/segments/n2.segment.yml +7 -0
- data/data/004010/segments/n3.segment.yml +6 -0
- data/data/004010/segments/n4.segment.yml +9 -0
- data/data/004010/segments/pid.segment.yml +10 -0
- data/data/004010/segments/po1.segment.yml +14 -0
- data/data/004010/segments/prf.segment.yml +9 -0
- data/data/004010/segments/ref.segment.yml +7 -0
- data/data/004010/segments/sac.segment.yml +20 -0
- data/data/004010/segments/sln.segment.yml +12 -0
- data/data/004010/segments/sn1.segment.yml +11 -0
- data/data/004010/segments/td1.segment.yml +13 -0
- data/data/004010/segments/td5.segment.yml +11 -0
- data/data/004010/segments/tds.segment.yml +10 -0
- data/data/schema/element_summary.json +60 -0
- data/data/schema/loop_summary.json +49 -0
- data/data/schema/segment_summary.json +66 -0
- data/data/schema/src/element_summary.schema.yml +73 -0
- data/data/schema/src/loop_summary.schema.yml +50 -0
- data/data/schema/src/segment_summary.schema.yml +59 -0
- data/data/schema/src/transaction_set_summary.schema.yml +27 -0
- data/data/schema/transaction_set_summary.json +33 -0
- data/data/sources.md +114 -145
- data/eddy.gemspec +6 -3
- data/exe/eddy +14 -0
- data/lib/definitions/elements/generated/1005.hierarchical_structure_code.rb +98 -0
- data/lib/definitions/elements/generated/1019.invoice_type_code.rb +40 -0
- data/lib/definitions/elements/generated/103.packaging_code.rb +29 -0
- data/lib/definitions/elements/generated/1166.contract_type_code.rb +87 -0
- data/lib/definitions/elements/generated/1232.purchase_category.rb +53 -0
- data/lib/definitions/elements/generated/127.reference_identification.rb +29 -0
- data/lib/definitions/elements/generated/128.reference_identification_qualifier.rb +1540 -0
- data/lib/definitions/elements/generated/1300.service_promotion_allowance_or_charge_code.rb +1090 -0
- data/lib/definitions/elements/generated/1301.agency_service_promotion_allowance_or_charge_code.rb +29 -0
- data/lib/definitions/elements/generated/133.routing_sequence_code.rb +60 -0
- data/lib/definitions/elements/generated/166.address_information.rb +29 -0
- data/lib/definitions/elements/generated/183.volume.rb +29 -0
- data/lib/definitions/elements/generated/187.weight_qualifier.rb +88 -0
- data/lib/definitions/elements/generated/19.city_name.rb +29 -0
- data/lib/definitions/elements/generated/206.equipment_initial.rb +29 -0
- data/lib/definitions/elements/generated/207.equipment_number.rb +29 -0
- data/lib/definitions/elements/generated/212.unit_price.rb +29 -0
- data/lib/definitions/elements/generated/22.commodity_code.rb +29 -0
- data/lib/definitions/elements/generated/23.commodity_code_qualifier.rb +60 -0
- data/lib/definitions/elements/generated/234.product_service_id.rb +29 -0
- data/lib/definitions/elements/generated/235.product_service_id_qualifier.rb +514 -0
- data/lib/definitions/elements/generated/236.price_identifier_code.rb +201 -0
- data/lib/definitions/elements/generated/248.allowance_or_charge_indicator.rb +44 -0
- data/lib/definitions/elements/generated/26.country_code.rb +535 -0
- data/lib/definitions/elements/generated/284.service_level_code.rb +103 -0
- data/lib/definitions/elements/generated/324.purchase_order_number.rb +29 -0
- data/lib/definitions/elements/generated/326.request_reference_number.rb +29 -0
- data/lib/definitions/elements/generated/327.change_order_sequence_number.rb +29 -0
- data/lib/definitions/elements/generated/328.release_number.rb +29 -0
- data/lib/definitions/elements/generated/330.quantity_ordered.rb +29 -0
- data/lib/definitions/elements/generated/347.hash_total.rb +29 -0
- data/lib/definitions/elements/generated/349.item_description_type.rb +40 -0
- data/lib/definitions/elements/generated/352.description.rb +29 -0
- data/lib/definitions/elements/generated/353.transaction_set_purpose_code.rb +102 -0
- data/lib/definitions/elements/generated/354.number_of_line_items.rb +30 -0
- data/lib/definitions/elements/generated/355.unit_or_basis_for_measurement_code.rb +831 -0
- data/lib/definitions/elements/generated/358.quantity_invoiced.rb +29 -0
- data/lib/definitions/elements/generated/367.contract_number.rb +29 -0
- data/lib/definitions/elements/generated/368.shipment_order_status_code.rb +139 -0
- data/lib/definitions/elements/generated/374.date_time_qualifier.rb +1149 -0
- data/lib/definitions/elements/generated/380.quantity.rb +29 -0
- data/lib/definitions/elements/generated/382.number_of_units_shipped.rb +29 -0
- data/lib/definitions/elements/generated/387.routing.rb +29 -0
- data/lib/definitions/elements/generated/396.shipment_identification.rb +29 -0
- data/lib/definitions/elements/generated/559.agency_qualifier_code.rb +213 -0
- data/lib/definitions/elements/generated/587.acknowledgment_type.rb +52 -0
- data/lib/definitions/elements/generated/610.amount.rb +30 -0
- data/lib/definitions/elements/generated/639.basis_of_unit_price_code.rb +128 -0
- data/lib/definitions/elements/generated/640.transaction_type_code.rb +483 -0
- data/lib/definitions/elements/generated/646.quantity_shipped_to_date.rb +29 -0
- data/lib/definitions/elements/generated/648.price_multiplier_qualifier.rb +43 -0
- data/lib/definitions/elements/generated/649.multiplier.rb +29 -0
- data/lib/definitions/elements/generated/66.identification_code_qualifier.rb +252 -0
- data/lib/definitions/elements/generated/662.relationship_code.rb +42 -0
- data/lib/definitions/elements/generated/668.line_item_status_code.rb +63 -0
- data/lib/definitions/elements/generated/67.identification_code.rb +29 -0
- data/lib/definitions/elements/generated/687.class_of_trade_code.rb +89 -0
- data/lib/definitions/elements/generated/750.product_process_characteristic_code.rb +254 -0
- data/lib/definitions/elements/generated/751.product_description_code.rb +29 -0
- data/lib/definitions/elements/generated/76.invoice_number.rb +29 -0
- data/lib/definitions/elements/generated/782.monetary_amount.rb +29 -0
- data/lib/definitions/elements/generated/786.security_level_code.rb +54 -0
- data/lib/definitions/elements/generated/79.lading_description.rb +29 -0
- data/lib/definitions/elements/generated/80.lading_quantity.rb +30 -0
- data/lib/definitions/elements/generated/87.marks_and_numbers.rb +29 -0
- data/lib/definitions/elements/generated/88.marks_and_numbers_qualifier.rb +57 -0
- data/lib/definitions/elements/generated/91.transportation_method_type_code.rb +108 -0
- data/lib/definitions/elements/generated/92.purchase_order_type_code.rb +106 -0
- data/lib/definitions/elements/generated/98.entity_identifier_code.rb +1349 -0
- data/lib/definitions/elements/manual/116.postal_code.rb +44 -0
- data/lib/definitions/elements/manual/124.application_receivers_code.rb +29 -0
- data/lib/definitions/elements/manual/140.standard_carrier_alpha_code.rb +211 -0
- data/lib/definitions/elements/manual/142.application_senders_code.rb +29 -0
- data/lib/definitions/elements/manual/143.transaction_set_identifier_code.rb +335 -0
- data/lib/definitions/elements/manual/156.state_or_province_code.rb +92 -0
- data/lib/definitions/elements/manual/28.group_control_number.rb +34 -0
- data/lib/definitions/elements/manual/329.transactional_set_control_number.rb +35 -0
- data/lib/definitions/elements/manual/337.time.rb +30 -0
- data/lib/definitions/elements/manual/350.assigned_identification.rb +33 -0
- data/lib/definitions/elements/manual/373.date.rb +30 -0
- data/lib/definitions/elements/manual/455.responsible_agency_code.rb +43 -0
- data/lib/definitions/elements/manual/479.functional_identifier_code.rb +271 -0
- data/lib/definitions/elements/manual/480.version_release_industry_identifier_code.rb +145 -0
- data/lib/definitions/elements/manual/784.length_of_binary_data.rb +30 -0
- data/lib/definitions/elements/manual/785.binary_data.rb +30 -0
- data/lib/definitions/elements/manual/96.number_of_included_segments.rb +30 -0
- data/lib/definitions/elements/manual/97.number_of_transaction_sets_included.rb +30 -0
- data/lib/definitions/elements/manual/hl/628.hierarchical_id_number.rb +29 -0
- data/lib/definitions/elements/manual/hl/734.hierarchical_parent_id_number.rb +29 -0
- data/lib/definitions/elements/manual/hl/735.hierarchical_level_code.rb +207 -0
- data/lib/definitions/elements/manual/hl/736.hierarchical_child_code.rb +39 -0
- data/lib/definitions/elements/manual/i/I01.authorization_information_qualifier.rb +48 -0
- data/lib/definitions/elements/manual/i/I02.authorization_information.rb +33 -0
- data/lib/definitions/elements/manual/i/I03.security_information_qualifier.rb +43 -0
- data/lib/definitions/elements/manual/i/I04.security_information.rb +33 -0
- data/lib/definitions/elements/manual/i/I05.interchange_id_qualifier.rb +75 -0
- data/lib/definitions/elements/manual/i/I06.interchange_sender_id.rb +29 -0
- data/lib/definitions/elements/manual/i/I07.interchange_receiver_id.rb +29 -0
- data/lib/definitions/elements/manual/i/I08.interchange_date.rb +35 -0
- data/lib/definitions/elements/manual/i/I09.interchange_time.rb +36 -0
- data/lib/definitions/elements/manual/i/I10.interchange_control_standards_identifier.rb +42 -0
- data/lib/definitions/elements/manual/i/I11.interchange_control_version_number.rb +55 -0
- data/lib/definitions/elements/manual/i/I12.interchange_control_number.rb +34 -0
- data/lib/definitions/elements/manual/i/I13.acknowledgment_requested.rb +43 -0
- data/lib/definitions/elements/manual/i/I14.usage_indicator.rb +40 -0
- data/lib/definitions/elements/manual/i/I15.component_element_separator.rb +36 -0
- data/lib/definitions/elements/manual/i/I16.number_of_included_functional_groups.rb +30 -0
- data/lib/definitions/elements/manual/misc/81.weight.rb +29 -0
- data/lib/definitions/elements/manual/misc/93.name.rb +29 -0
- data/lib/definitions/segments/generated/ack.rb +192 -0
- data/lib/definitions/segments/generated/bak.rb +90 -0
- data/lib/definitions/segments/generated/beg.rb +226 -0
- data/lib/definitions/segments/generated/big.rb +107 -0
- data/lib/definitions/segments/generated/bsn.rb +107 -0
- data/lib/definitions/segments/generated/cad.rb +175 -0
- data/lib/definitions/segments/generated/ctp.rb +158 -0
- data/lib/definitions/segments/generated/ctt.rb +141 -0
- data/lib/definitions/segments/generated/dtm.rb +56 -0
- data/lib/definitions/segments/generated/it1.rb +277 -0
- data/lib/definitions/segments/generated/lin.rb +107 -0
- data/lib/definitions/segments/generated/man.rb +56 -0
- data/lib/definitions/segments/generated/n1.rb +90 -0
- data/lib/definitions/segments/generated/n3.rb +39 -0
- data/lib/definitions/segments/generated/n4.rb +90 -0
- data/lib/definitions/segments/generated/pid.rb +107 -0
- data/lib/definitions/segments/generated/po1.rb +175 -0
- data/lib/definitions/segments/generated/prf.rb +90 -0
- data/lib/definitions/segments/generated/ref.rb +56 -0
- data/lib/definitions/segments/generated/sac.rb +107 -0
- data/lib/definitions/segments/generated/sln.rb +141 -0
- data/lib/definitions/segments/generated/sn1.rb +124 -0
- data/lib/definitions/segments/generated/td1.rb +158 -0
- data/lib/definitions/segments/generated/td5.rb +107 -0
- data/lib/definitions/segments/generated/tds.rb +39 -0
- data/lib/definitions/segments/manual/envelopes/ge.rb +53 -0
- data/lib/definitions/segments/manual/envelopes/gs.rb +163 -0
- data/lib/definitions/segments/manual/envelopes/iea.rb +53 -0
- data/lib/definitions/segments/manual/envelopes/isa.rb +295 -0
- data/lib/definitions/segments/manual/envelopes/se.rb +52 -0
- data/lib/definitions/segments/manual/envelopes/st.rb +52 -0
- data/lib/definitions/segments/manual/hl.rb +96 -0
- data/lib/definitions/segments/manual/n2.rb +52 -0
- data/lib/definitions/transaction_sets/manual/810/810.rb +143 -0
- data/lib/definitions/transaction_sets/manual/810/loops.rb +109 -0
- data/lib/definitions/transaction_sets/manual/850/850.rb +92 -0
- data/lib/definitions/transaction_sets/manual/850/loops.rb +58 -0
- data/lib/definitions/transaction_sets/manual/855/855.rb +83 -0
- data/lib/definitions/transaction_sets/manual/855/loops.rb +104 -0
- data/lib/definitions/transaction_sets/manual/856/856.rb +83 -0
- data/lib/definitions/transaction_sets/manual/856/loops.rb +155 -0
- data/lib/eddy.rb +29 -7
- data/lib/eddy/build/build.rb +47 -0
- data/lib/eddy/build/elements/element.rb +67 -0
- data/lib/eddy/build/elements/elements.rb +46 -0
- data/lib/eddy/build/elements/id.rb +55 -0
- data/lib/eddy/build/elements/n.rb +48 -0
- data/lib/eddy/build/loop_builder.rb +93 -0
- data/lib/eddy/build/segment_builder.rb +169 -0
- data/lib/eddy/build/transaction_set_builder.rb +218 -0
- data/lib/eddy/cli/cli.rb +39 -0
- data/lib/eddy/config.rb +51 -0
- data/lib/eddy/data.rb +50 -0
- data/lib/eddy/data/persistence/active_record.rb +10 -0
- data/lib/eddy/data/persistence/base.rb +47 -0
- data/lib/eddy/data/persistence/file.rb +50 -0
- data/lib/eddy/data/persistence/memory.rb +65 -0
- data/lib/eddy/data/store.rb +108 -0
- data/lib/eddy/errors.rb +112 -0
- data/lib/eddy/models/element.rb +14 -0
- data/lib/eddy/models/element/an.rb +55 -0
- data/lib/eddy/models/element/b.rb +53 -0
- data/lib/eddy/models/element/base.rb +116 -0
- data/lib/eddy/models/element/composite.rb +6 -0
- data/lib/eddy/models/element/dt.rb +100 -0
- data/lib/eddy/models/element/id.rb +58 -0
- data/lib/eddy/models/element/n.rb +94 -0
- data/lib/eddy/models/element/r.rb +84 -0
- data/lib/eddy/models/element/tm.rb +113 -0
- data/lib/eddy/models/loop.rb +74 -0
- data/lib/eddy/models/segment.rb +35 -0
- data/lib/eddy/models/transaction_set.rb +101 -0
- data/lib/eddy/parse.rb +58 -0
- data/lib/eddy/schema/element_summary.rb +123 -0
- data/lib/eddy/schema/loop_summary.rb +101 -0
- data/lib/eddy/schema/segment_summary.rb +116 -0
- data/lib/eddy/schema/transaction_set_summary.rb +96 -0
- data/lib/eddy/schema/validate.rb +41 -0
- data/lib/eddy/util.rb +16 -0
- data/lib/eddy/util/clean_folder.rb +14 -0
- data/lib/eddy/util/edi_data.rb +153 -0
- data/lib/eddy/util/new_number.rb +24 -0
- data/lib/eddy/util/normalize.rb +51 -0
- data/lib/eddy/util/paths.rb +19 -0
- data/lib/eddy/util/read.rb +38 -0
- data/lib/eddy/util/time.rb +56 -0
- data/lib/eddy/util/timestamp.rb +12 -0
- data/lib/eddy/util/trim.rb +29 -0
- data/lib/eddy/version.rb +1 -1
- data/lib/eddy/write/functional_group.rb +33 -0
- data/lib/eddy/write/interchange.rb +28 -0
- data/lib/eddy/write/simple_interchange.rb +57 -0
- data/lib/generators/eddy/initializer/initializer_generator.rb +17 -0
- data/lib/generators/eddy/initializer/templates/eddy.rb.erb +6 -0
- data/lib/generators/eddy/migration/migration_generator.rb +53 -0
- data/lib/generators/eddy/migration/templates/migration.rb.erb +35 -0
- data/tasks/build.rake +15 -0
- data/tasks/misc/gemspec.rake +12 -0
- data/tasks/misc/missing_lists.rake +240 -0
- data/tasks/misc/yaml2json.rake +20 -0
- data/todo.txt +16 -0
- metadata +297 -42
- data/data/004010/segments/ISA.tsv +0 -17
- data/data/schema.jsonc +0 -67
- data/lib/eddy/build/build_an.rb +0 -31
- data/lib/eddy/build/build_dt.rb +0 -46
- data/lib/eddy/build/build_elements.rb +0 -181
- data/lib/eddy/build/build_id.rb +0 -56
- data/lib/eddy/build/build_r_and_n.rb +0 -69
- data/lib/eddy/build/build_tm.rb +0 -52
- data/lib/eddy/build/segments.rb +0 -25
- data/lib/eddy/definitions/manual/elements/109.dt.pickup_date.rb +0 -20
- data/lib/eddy/definitions/manual/elements/111.tm.pickup_time.rb +0 -20
- data/lib/eddy/definitions/manual/elements/112.an.pier_name.rb +0 -19
- data/lib/eddy/definitions/manual/elements/785.b.binary_data.rb +0 -19
- data/lib/eddy/definitions/manual/elements/81.r.weight.rb +0 -19
- data/lib/eddy/definitions/manual/elements/86.n0.total_equipment.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I02.authorization_information.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I04.security_information.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I08.interchange_date.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I09.interchange_time.rb +0 -20
- data/lib/eddy/definitions/manual/elements/I15.component_element_separator.rb +0 -32
- data/lib/eddy/definitions/manual/segments/n1.rb +0 -14
- data/lib/eddy/element.rb +0 -14
- data/lib/eddy/element/an.rb +0 -36
- data/lib/eddy/element/b.rb +0 -9
- data/lib/eddy/element/base.rb +0 -37
- data/lib/eddy/element/dt.rb +0 -89
- data/lib/eddy/element/id.rb +0 -40
- data/lib/eddy/element/n.rb +0 -43
- data/lib/eddy/element/r.rb +0 -47
- data/lib/eddy/element/tm.rb +0 -108
- data/lib/eddy/error.rb +0 -14
- data/lib/eddy/helpers.rb +0 -31
- data/lib/eddy/segment.rb +0 -12
- data/lib/eddy/transaction_set.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1741275af8926c329cfb842bbcd9e878850d21957d00cd93596d378a7b443a68
|
4
|
+
data.tar.gz: 1c1d5492e1ac989708505890e9d3a2e4db8008b614b7e52bb7554ccbc99f3739
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56a2d2235e1eb3759400567ee7765e0ad647fc579abde3cc6a7a6ef15c5a3c4e2e497796084e5bea4170c7fc0a1bda79f29ac21024ecc6c39960d9656a54c199
|
7
|
+
data.tar.gz: 01274642ed73cd71bf525839f7521b93d848483935641b84e6165f05e6f64497fbef6fb414b19641cbf075d08be6f8c0a96828c34606b1e43ecb455d2c692cca
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.5.0
|
3
|
+
|
4
|
+
Style/SingleLineMethods:
|
5
|
+
Exclude:
|
6
|
+
- 'test/**/*.rb'
|
7
|
+
|
8
|
+
# Don't leave calls to pry lying around.
|
9
|
+
Lint/Debugger:
|
10
|
+
Enabled: true
|
11
|
+
|
12
|
+
# ==============================================================================
|
13
|
+
# Documentation
|
14
|
+
# ==============================================================================
|
3
15
|
|
4
16
|
Style/Documentation:
|
5
17
|
Enabled: true
|
@@ -11,13 +23,26 @@ Style/DocumentationMethod:
|
|
11
23
|
Exclude:
|
12
24
|
- 'test/**/*.rb'
|
13
25
|
|
14
|
-
|
26
|
+
# ==============================================================================
|
27
|
+
# Naming
|
28
|
+
# ==============================================================================
|
29
|
+
|
30
|
+
Naming/MethodParameterName:
|
31
|
+
AllowedNames:
|
32
|
+
- el
|
33
|
+
- id
|
34
|
+
|
35
|
+
Naming/MethodName:
|
36
|
+
Enabled: true
|
15
37
|
Exclude:
|
16
|
-
- '
|
38
|
+
- 'lib/definitions/**/*.rb'
|
39
|
+
- 'build/**/*.rb'
|
17
40
|
|
18
|
-
|
19
|
-
Lint/Debugger:
|
41
|
+
Naming/ClassAndModuleCamelCase:
|
20
42
|
Enabled: true
|
43
|
+
Exclude:
|
44
|
+
- 'lib/definitions/**/*.rb'
|
45
|
+
- 'build/**/*.rb'
|
21
46
|
|
22
47
|
# ==============================================================================
|
23
48
|
# Layout
|
@@ -39,7 +64,7 @@ Layout/EmptyLinesAroundBlockBody:
|
|
39
64
|
Enabled: false
|
40
65
|
|
41
66
|
# https://unix.stackexchange.com/a/18789
|
42
|
-
Layout/
|
67
|
+
Layout/TrailingEmptyLines:
|
43
68
|
EnforcedStyle: final_newline
|
44
69
|
|
45
70
|
# ==============================================================================
|
@@ -55,6 +80,9 @@ Style/FrozenStringLiteralComment:
|
|
55
80
|
Naming/HeredocDelimiterNaming:
|
56
81
|
Enabled: false
|
57
82
|
|
83
|
+
Style/FormatString:
|
84
|
+
EnforcedStyle: sprintf
|
85
|
+
|
58
86
|
# ==============================================================================
|
59
87
|
# Numbers
|
60
88
|
# ==============================================================================
|
@@ -65,11 +93,12 @@ Style/ZeroLengthPredicate:
|
|
65
93
|
Style/NumericPredicate:
|
66
94
|
Enabled: false
|
67
95
|
|
96
|
+
# preferably `EnforcedStyle: snake_case`, but it varies.
|
68
97
|
Naming/VariableNumber:
|
69
|
-
|
98
|
+
Enabled: false
|
70
99
|
|
71
100
|
# ==============================================================================
|
72
|
-
# Braces, Brackets,
|
101
|
+
# Braces, Brackets, and Parentheses
|
73
102
|
# ==============================================================================
|
74
103
|
|
75
104
|
Style/DefWithParentheses:
|
@@ -89,22 +118,9 @@ Style/SymbolArray:
|
|
89
118
|
EnforcedStyle: brackets
|
90
119
|
|
91
120
|
# ==============================================================================
|
92
|
-
#
|
121
|
+
# Trailing Commas
|
93
122
|
# ==============================================================================
|
94
123
|
|
95
|
-
# Default value (special_inside_parentheses) is ridiculous.
|
96
|
-
# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstHashElement
|
97
|
-
Layout/IndentFirstHashElement:
|
98
|
-
EnforcedStyle: consistent
|
99
|
-
|
100
|
-
# Default value (special_inside_parentheses) is ridiculous.
|
101
|
-
# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstArrayElement
|
102
|
-
Layout/IndentFirstArrayElement:
|
103
|
-
EnforcedStyle: consistent
|
104
|
-
|
105
|
-
Layout/AlignHash:
|
106
|
-
Enabled: false
|
107
|
-
|
108
124
|
Style/TrailingCommaInArguments:
|
109
125
|
EnforcedStyleForMultiline: comma
|
110
126
|
|
@@ -114,38 +130,85 @@ Style/TrailingCommaInArrayLiteral:
|
|
114
130
|
Style/TrailingCommaInHashLiteral:
|
115
131
|
EnforcedStyleForMultiline: comma
|
116
132
|
|
117
|
-
#
|
118
|
-
|
133
|
+
# ==============================================================================
|
134
|
+
# Fewer lines doesn't mean better code
|
135
|
+
# ==============================================================================
|
136
|
+
|
137
|
+
Metrics/ModuleLength:
|
119
138
|
Enabled: false
|
120
139
|
|
121
|
-
|
122
|
-
Style/RedundantSelf:
|
140
|
+
Metrics/ClassLength:
|
123
141
|
Enabled: false
|
124
142
|
|
125
|
-
|
126
|
-
# https://stackoverflow.com/questions/34794697/using-with-the-safe-navigation-operator-in-ruby
|
127
|
-
Style/SafeNavigation:
|
143
|
+
Metrics/MethodLength:
|
128
144
|
Enabled: false
|
129
145
|
|
130
|
-
|
131
|
-
Style/ConditionalAssignment:
|
146
|
+
Metrics/BlockLength:
|
132
147
|
Enabled: false
|
133
148
|
|
134
|
-
|
135
|
-
|
149
|
+
# TODO: Look into adding an `EnforcedStyle` to not use guard clauses.
|
150
|
+
Style/GuardClause:
|
151
|
+
Enabled: false
|
136
152
|
|
137
|
-
|
153
|
+
# TODO: Look into adding an `EnforcedStyle` to not use if/unless modifiers.
|
154
|
+
Style/IfUnlessModifier:
|
138
155
|
Enabled: false
|
139
156
|
|
140
|
-
|
157
|
+
Style/Next:
|
141
158
|
Enabled: false
|
142
159
|
|
143
|
-
|
160
|
+
# ==============================================================================
|
161
|
+
# Explicit, not redundant
|
162
|
+
# ==============================================================================
|
163
|
+
|
164
|
+
Style/RedundantReturn:
|
144
165
|
Enabled: false
|
145
166
|
|
146
|
-
|
167
|
+
Style/RedundantSelf:
|
147
168
|
Enabled: false
|
148
169
|
|
170
|
+
# ==============================================================================
|
171
|
+
# Exceptions
|
172
|
+
# ==============================================================================
|
173
|
+
|
174
|
+
Lint/SuppressedException:
|
175
|
+
AllowComments: true
|
176
|
+
|
177
|
+
Style/RaiseArgs:
|
178
|
+
EnforcedStyle: exploded
|
179
|
+
|
180
|
+
# ==============================================================================
|
181
|
+
# Unsorted
|
182
|
+
# ==============================================================================
|
183
|
+
|
184
|
+
# Default value (special_inside_parentheses) is ridiculous.
|
185
|
+
# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstHashElement
|
186
|
+
Layout/FirstHashElementIndentation:
|
187
|
+
EnforcedStyle: consistent
|
188
|
+
|
189
|
+
# Default value (special_inside_parentheses) is ridiculous.
|
190
|
+
# Look for yourself: https://www.rubydoc.info/gems/rubocop/0.69.0/RuboCop/Cop/Layout/IndentFirstArrayElement
|
191
|
+
Layout/FirstArrayElementIndentation:
|
192
|
+
EnforcedStyle: consistent
|
193
|
+
|
194
|
+
Layout/HashAlignment:
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
# `x&.y&.[](:argument)` isn't what I'd call "readable".
|
198
|
+
# https://stackoverflow.com/questions/34794697/using-with-the-safe-navigation-operator-in-ruby
|
199
|
+
Style/SafeNavigation:
|
200
|
+
Enabled: false
|
201
|
+
|
202
|
+
Style/NegatedIf:
|
203
|
+
EnforcedStyle: postfix
|
204
|
+
|
205
|
+
# TODO: File issue to ignore enums when using `EnforcedStyle: assign_inside_condition`.
|
206
|
+
Style/ConditionalAssignment:
|
207
|
+
Enabled: false
|
208
|
+
|
209
|
+
Style/TernaryParentheses:
|
210
|
+
EnforcedStyle: require_parentheses_when_complex
|
211
|
+
|
149
212
|
Metrics/AbcSize:
|
150
213
|
Enabled: false
|
151
214
|
|
@@ -157,3 +220,6 @@ Metrics/PerceivedComplexity:
|
|
157
220
|
|
158
221
|
Style/CommentedKeyword:
|
159
222
|
Enabled: False
|
223
|
+
|
224
|
+
Lint/EmptyWhen:
|
225
|
+
Enabled: false
|
data/.solargraph.yml
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"json.schemas": [
|
3
|
+
{
|
4
|
+
"fileMatch": [
|
5
|
+
"*.edi.json"
|
6
|
+
],
|
7
|
+
"url": "./data/schema/transaction_set_summary.json"
|
8
|
+
}
|
9
|
+
],
|
10
|
+
"yaml.schemas": {
|
11
|
+
"./data/schema/transaction_set_summary.json": "/*.edi.yml",
|
12
|
+
"./data/schema/segment_summary.json": "/*.segment.yml",
|
13
|
+
"./data/schema/loop_summary.json": "/*.loop.yml",
|
14
|
+
"http://json-schema.org/draft-07/schema": "/*.schema.yml",
|
15
|
+
"https://raw.githubusercontent.com/tcd/ginny/master/schema/class.schema.json": "/*.gin.yml",
|
16
|
+
}
|
17
|
+
}
|
data/.yardopts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
--charset
|
2
|
-
--markup
|
1
|
+
--charset=utf-8
|
2
|
+
--markup=markdown
|
data/CHANGELOG.md
CHANGED
@@ -1 +1,51 @@
|
|
1
1
|
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## master (unreleased)
|
9
|
+
|
10
|
+
Versions 0.x.x (0.2.0, 0.3.0) exist to make it easier for me to test Eddy in other projects and figure out how best to move forward with development.
|
11
|
+
|
12
|
+
All code should be considered Work In Progress.
|
13
|
+
|
14
|
+
While the API is still changing, enough code exists that EDI documents can currently be written with Eddy (though I wouldn't recommend use in production environments yet).
|
15
|
+
|
16
|
+
## 0.3.0 (2020-01-04)
|
17
|
+
|
18
|
+
### Added
|
19
|
+
|
20
|
+
- Code for generating Transaction Set classes.
|
21
|
+
- Code for writing the following transaction sets:
|
22
|
+
- 810
|
23
|
+
- 850
|
24
|
+
- 855
|
25
|
+
- 856
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
|
29
|
+
- Improved messages from validation errors.
|
30
|
+
- Improved YARD comments for all EDI classes.
|
31
|
+
- Improved test coverage.
|
32
|
+
|
33
|
+
## 0.2.0 (2019-12-26)
|
34
|
+
|
35
|
+
### Added
|
36
|
+
|
37
|
+
- Top level configuration (`Eddy.config`).
|
38
|
+
- Very basic code for reading EDI documents.
|
39
|
+
- Base code for writing EDI documents.
|
40
|
+
- Ruby classes modeling Data Elements, Segments, Transaction Sets, Functional Groups, & Interchanges.
|
41
|
+
- Loops are still WIP
|
42
|
+
- Schemas for describing & defining EDI Transaction Sets, Segments, and Data Elements.
|
43
|
+
- JSON Schema files for validation using [davishmcclurg/json_schemer](https://github.com/davishmcclurg/json_schemer).
|
44
|
+
- Code for generating Ruby classes from JSON/YAML EDI definition files using [tcd/ginny](https://github.com/tcd/ginny).
|
45
|
+
- A simple CLI to streamline code generation (WIP).
|
46
|
+
- [todo.txt](https://github.com/todotxt/todo.txt) file.
|
47
|
+
- Rails generators for easy integration with Ruby on Rails projects.
|
48
|
+
|
49
|
+
## 0.1.0 (2019-11-26)
|
50
|
+
|
51
|
+
Initial release.
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eddy (0.
|
5
|
-
|
4
|
+
eddy (0.3.0)
|
5
|
+
ginny (~> 0.6.3)
|
6
|
+
json_schemer (~> 0.2.8)
|
7
|
+
thor (~> 1.0.1)
|
6
8
|
|
7
9
|
GEM
|
8
10
|
remote: https://rubygems.org/
|
9
11
|
specs:
|
10
12
|
ansi (1.5.0)
|
11
|
-
builder (3.2.
|
13
|
+
builder (3.2.4)
|
12
14
|
coderay (1.1.2)
|
15
|
+
coolkit (0.2.2)
|
13
16
|
coveralls (0.8.23)
|
14
17
|
json (>= 1.8, < 3)
|
15
18
|
simplecov (~> 0.16.1)
|
@@ -18,9 +21,18 @@ GEM
|
|
18
21
|
tins (~> 1.6)
|
19
22
|
docile (1.3.2)
|
20
23
|
dry-inflector (0.2.0)
|
21
|
-
|
24
|
+
ecma-re-validator (0.2.0)
|
25
|
+
regexp_parser (~> 1.2)
|
26
|
+
ginny (0.6.3)
|
27
|
+
coolkit (~> 0.2.2)
|
22
28
|
dry-inflector (~> 0.2.0)
|
23
|
-
|
29
|
+
hana (1.3.5)
|
30
|
+
json (2.3.0)
|
31
|
+
json_schemer (0.2.8)
|
32
|
+
ecma-re-validator (~> 0.2)
|
33
|
+
hana (~> 1.3)
|
34
|
+
regexp_parser (~> 1.5)
|
35
|
+
uri_template (~> 0.7)
|
24
36
|
method_source (0.9.2)
|
25
37
|
minitest (5.13.0)
|
26
38
|
minitest-focus (1.1.2)
|
@@ -34,6 +46,7 @@ GEM
|
|
34
46
|
coderay (~> 1.1.0)
|
35
47
|
method_source (~> 0.9.0)
|
36
48
|
rake (10.5.0)
|
49
|
+
regexp_parser (1.6.0)
|
37
50
|
ruby-progressbar (1.10.1)
|
38
51
|
simplecov (0.16.1)
|
39
52
|
docile (~> 1.1)
|
@@ -42,16 +55,17 @@ GEM
|
|
42
55
|
simplecov-html (0.10.2)
|
43
56
|
term-ansicolor (1.7.1)
|
44
57
|
tins (~> 1.0)
|
45
|
-
thor (0.
|
58
|
+
thor (1.0.1)
|
46
59
|
tins (1.22.2)
|
60
|
+
uri_template (0.7.0)
|
47
61
|
|
48
62
|
PLATFORMS
|
49
63
|
ruby
|
50
64
|
|
51
65
|
DEPENDENCIES
|
52
66
|
bundler (~> 2.0)
|
53
|
-
eddy!
|
54
67
|
coveralls (~> 0.8.23)
|
68
|
+
eddy!
|
55
69
|
minitest (~> 5.0)
|
56
70
|
minitest-focus (~> 1.1)
|
57
71
|
minitest-reporters (~> 1.4)
|
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
# Eddy
|
2
2
|
|
3
|
+
[![Gem](https://img.shields.io/gem/v/eddy)][rubygems]
|
3
4
|
[![Build Status](https://travis-ci.org/tcd/eddy.svg?branch=master)][travis-ci]
|
4
5
|
[![Coverage Status](https://coveralls.io/repos/github/tcd/eddy/badge.svg?branch=master)][coveralls]
|
5
6
|
[![License](https://img.shields.io/github/license/tcd/eddy)][license]
|
6
7
|
[![Documentation](http://img.shields.io/badge/docs-rubydoc.info-blue.svg)][docs]
|
7
8
|
|
9
|
+
[rubygems]: https://rubygems.org/gems/eddy
|
8
10
|
[travis-ci]: https://travis-ci.org/tcd/eddy
|
9
11
|
[coveralls]: https://coveralls.io/github/tcd/eddy?branch=master
|
10
12
|
[license]: https://github.com/tcd/eddy/blob/master/LICENSE.txt
|
11
|
-
[docs]: https://www.rubydoc.info/gems/eddy/0.
|
13
|
+
[docs]: https://www.rubydoc.info/gems/eddy/0.3.0
|
12
14
|
|
13
15
|
## Installation
|
14
16
|
|
@@ -24,12 +26,23 @@ And then execute:
|
|
24
26
|
bundle
|
25
27
|
```
|
26
28
|
|
27
|
-
|
29
|
+
### With Rails
|
30
|
+
|
31
|
+
Once installed, run
|
28
32
|
|
29
33
|
```sh
|
30
|
-
|
34
|
+
rails g eddy:install eddy:migration
|
35
|
+
rails db:migrate
|
31
36
|
```
|
32
37
|
|
38
|
+
## Validation
|
39
|
+
|
40
|
+
- Ensures mandatory elements have assigned an value.
|
41
|
+
- Ensures values passed to `ID` elements are included in the associated code list.
|
42
|
+
- Accepts `Time#utc` objects for `DT` and `TM` elements.
|
43
|
+
- Makes sure element values aren't set above `max` length.
|
44
|
+
- Pads strings and numbers to ensure `min` length is met.
|
45
|
+
|
33
46
|
## Contributing
|
34
47
|
|
35
48
|
Bug reports and pull requests are welcome on GitHub at https://github.com/tcd/eddy.
|
@@ -38,6 +51,22 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/tcd/ed
|
|
38
51
|
|
39
52
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
40
53
|
|
54
|
+
## Dependencies
|
55
|
+
|
56
|
+
- [tcd/ginny](https://github.com/tcd/ginny)
|
57
|
+
- [tcd/coolkit](https://github.com/tcd/coolkit)
|
58
|
+
- [dry-rb/dry-inflector](https://github.com/dry-rb/dry-inflector)
|
59
|
+
- [davishmcclurg/json_schemer](https://github.com/davishmcclurg/json_schemer)
|
60
|
+
- [gjtorikian/ecma-re-validator](https://github.com/gjtorikian/ecma-re-validator)
|
61
|
+
- [ammar/regexp_parser](https://github.com/ammar/regexp_parser)
|
62
|
+
- [tenderlove/hana](https://github.com/tenderlove/hana)
|
63
|
+
- [hannesg/uri_template](https://github.com/hannesg/uri_template)
|
64
|
+
- [ammar/regexp_parser](https://github.com/ammar/regexp_parser)
|
65
|
+
- [erikhuda/thor](https://github.com/erikhuda/thor)
|
66
|
+
- [piotrmurach/pastel](https://github.com/piotrmurach/pastel)
|
67
|
+
- [piotrmurach/equatable](https://github.com/piotrmurach/equatable)
|
68
|
+
- [piotrmurach/tty-color](https://github.com/piotrmurach/tty-color)
|
69
|
+
|
41
70
|
## Alternatives (in Ruby)
|
42
71
|
|
43
72
|
- [irobayna/stupidedi](https://github.com/irobayna/stupidedi) - Ruby API for parsing and generating ASC X12 EDI transactions
|