repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segment_generator.rb
lib/segment_generator.rb
# frozen_string_literal: true # Class for grouping the messages delimiter class HL7::Message::Delimiter attr_accessor :item, :element, :segment def initialize(element_delim, item_delim, segment_delim) @element = element_delim @item = item_delim @segment = segment_delim end end # Methods for creatin...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/ruby-hl7.rb
lib/ruby-hl7.rb
# frozen_string_literal: true #= ruby-hl7.rb # Ruby HL7 is designed to provide a simple, easy to use library for # parsing and generating HL7 (2.x) messages. # # # Author: Mark Guzman (mailto:segfault@hasno.info) # # Copyright: (c) 2006-2009 Mark Guzman # # License: BSD # # $Id$ # # == License # see the LICENSE...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segment.rb
lib/segment.rb
# frozen_string_literal: true # Ruby Object representation of an hl7 2.x message segment # The segments can be setup to provide aliases to specific fields with # optional validation code that is run when the field is modified # The segment field data is also accessible via the e<number> method. # # == Defining a New S...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/message.rb
lib/message.rb
# frozen_string_literal: true # Ruby Object representation of an hl7 2.x message # the message object is actually a "smart" collection of hl7 segments # == Examples # # ==== Creating a new HL7 message # # # create a message # msg = HL7::Message.new # # # create a MSH segment for our new message # msh = HL7::Messag...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/configuration.rb
lib/configuration.rb
# frozen_string_literal: true module HL7 # This class enables detailed configuration of the HL7 parser services. # # By calling # # HL7.configuration # => instance of HL7::Configuration # # or # HL7.configure do |config| # config # => instance of HL7::Configuration # end # # you are a...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segment_default.rb
lib/segment_default.rb
# frozen_string_literal: true # Provide a catch-all information preserving segment # * nb: aliases are not provided BUT you can use the numeric element accessor # # seg = HL7::Message::Segment::Default.new # seg.e0 = "NK1" # seg.e1 = "SOMETHING ELSE" # seg.e2 = "KIN HERE" # class HL7::Message::Segment::Default < H...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/helpers/time_formatter_helper.rb
lib/helpers/time_formatter_helper.rb
# frozen_string_literal: true module TimeFormatterHelper class ValueTypeNotSupportedError < StandardError; end # Get an HL7 timestamp (type TS) for a Time or DateTime instance. # # fraction_digits:: specifies a number of digits of fractional seconds. # Its default value is 0. # hl7_form...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/test/hl7_messages.rb
lib/test/hl7_messages.rb
# frozen_string_literal: true # Copyright (C) 2007, 2008, 2009, 2010 The Collaborative Software Foundation # # This file is part of TriSano. # # TriSano is free software: you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the # Free Software Foundation, ...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
true
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/core_ext/string.rb
lib/core_ext/string.rb
# frozen_string_literal: true # Adding a helper to the String class for the batch parse. class String def hl7_batch? !!match(/^FHS/) end end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/core_ext/date_time.rb
lib/core_ext/date_time.rb
# frozen_string_literal: true module HL7Time # Get a HL7 timestamp (type TS) for a Time instance. # # fraction_digits:: specifies a number of digits of fractional seconds. # Its default value is 0. # Time.parse('01:23').to_hl7 # => "20091202012300" # Time.now.to_hl7(3) # => "20091...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/evn.rb
lib/segments/evn.rb
# frozen_string_literal: true class HL7::Message::Segment::EVN < HL7::Message::Segment weight 0 # should occur after the MSH segment add_field :type_code add_field :recorded_date do |value| convert_to_ts(value) end add_field :planned_date do |value| convert_to_ts(value) end add_field :reason_code...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/rol.rb
lib/segments/rol.rb
# frozen_string_literal: true class HL7::Message::Segment::ROL < HL7::Message::Segment add_field :role_instance, :idx => 1 add_field :action_code, :idx => 2 add_field :role, :idx => 3 add_field :role_person, :idx => 4 add_field :role_begin_date_time, :idx => 5 do |value| convert_to_ts(value) end add_...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/dg1.rb
lib/segments/dg1.rb
# frozen_string_literal: true module HL7 class Message::Segment::DG1 < HL7::Message::Segment weight 92 add_field :set_id add_field :diagnosis_coding_method add_field :diagnosis_code add_field :diagnosis_description add_field :diagnosis_date_time do |value| convert_to_ts(value) end ...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/nte.rb
lib/segments/nte.rb
# frozen_string_literal: true class HL7::Message::Segment::NTE < HL7::Message::Segment weight 4 add_field :set_id, :idx => 1 add_field :source, :idx => 2 add_field :comment, :idx => 3 add_field :comment_type, :idx => 4 end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/pv1.rb
lib/segments/pv1.rb
# frozen_string_literal: true class HL7::Message::Segment::PV1 < HL7::Message::Segment weight 2 add_field :set_id add_field :patient_class add_field :assigned_location add_field :admission_type add_field :preadmit_number add_field :prior_location add_field :attending_doctor add_field :referring_docto...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/in1.rb
lib/segments/in1.rb
# frozen_string_literal: true # via https://github.com/bbhoss/ruby-hl7/blob/master/lib/segments/in1.rb class HL7::Message::Segment::IN1 < HL7::Message::Segment add_field :set_id add_field :insurance_plan_id add_field :insurance_company_id add_field :insurance_company_name add_field :insurance_company_address...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/obr.rb
lib/segments/obr.rb
# frozen_string_literal: true class HL7::Message::Segment::OBR < HL7::Message::Segment weight 89 # obx.weight-1 has_children %i[NTE OBX SPM] add_field :set_id add_field :placer_order_number add_field :filler_order_number add_field :universal_service_id add_field :priority add_field :requested_date do |...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/mfi.rb
lib/segments/mfi.rb
# frozen_string_literal: true class HL7::Message::Segment::MFI < HL7::Message::Segment weight 0 add_field :master_file_identifier add_field :master_file_application_identifier add_field :file_level_event_code add_field :entered_date_time do |value| convert_to_ts(value) end add_field :effective_date_t...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/spm.rb
lib/segments/spm.rb
# frozen_string_literal: true class HL7::Message::Segment::SPM < HL7::Message::Segment # Weight doesn't really matter, since this always occurs as a child # of an OBR segment. weight 100 # fixme has_children [:OBX] add_field :set_id add_field :specimen_id add_field :specimen_parent_ids add_field :speci...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/ail.rb
lib/segments/ail.rb
# frozen_string_literal: true class HL7::Message::Segment::AIL < HL7::Message::Segment weight 0 add_field :set_id add_field :segment_action_code add_field :location_resource_id add_field :location_type add_field :location_group add_field :start_date_time add_field :start_date_time_offset add_field :s...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/msa.rb
lib/segments/msa.rb
# frozen_string_literal: true class HL7::Message::Segment::MSA < HL7::Message::Segment weight 1 # should occur after the msh segment add_field :ack_code add_field :control_id add_field :text add_field :expected_seq add_field :delayed_ack_type add_field :error_cond end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/orc.rb
lib/segments/orc.rb
# frozen_string_literal: true class HL7::Message::Segment::ORC < HL7::Message::Segment weight 88 # obr.weight-1 has_children [:OBR] add_field :order_control add_field :placer_order_number add_field :filler_order_number add_field :placer_group_number add_field :order_status add_field :response_flag ad...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/mrg.rb
lib/segments/mrg.rb
# frozen_string_literal: true class HL7::Message::Segment::MRG < HL7::Message::Segment weight 4 add_field :prior_patient_identifier_list add_field :prior_alternate_patient_id add_field :prior_patient_account_number add_field :prior_patient_id add_field :prior_visit_number add_field :prior_alternate_visit...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/mfe.rb
lib/segments/mfe.rb
# frozen_string_literal: true class HL7::Message::Segment::MFE < HL7::Message::Segment weight 0 add_field :record_level_event_code add_field :mfn_control_id add_field :effective_date_time do |value| convert_to_ts(value) end add_field :primary_key_value add_field :primary_key_value_type end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/prd.rb
lib/segments/prd.rb
# frozen_string_literal: true class HL7::Message::Segment::PRD < HL7::Message::Segment weight 2 add_field :provider_role add_field :provider_name add_field :provider_address add_field :provider_location add_field :provider_communication_information add_field :preferred_method_of_contact add_field :prov...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/obx.rb
lib/segments/obx.rb
# frozen_string_literal: true class HL7::Message::Segment::OBX < HL7::Message::Segment weight 90 has_children [:NTE] add_field :set_id add_field :value_type add_field :observation_id add_field :observation_sub_id add_field :observation_value add_field :units add_field :references_range add_field :a...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/ft1.rb
lib/segments/ft1.rb
# frozen_string_literal: true module HL7 class Message::Segment::FT1 < HL7::Message::Segment weight 10 add_field :set_id add_field :transaction_id add_field :transaction_batch_id add_field :date_of_service do |value| convert_to_ts(value) end add_field :transaction_posting_date do |v...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/rf1.rb
lib/segments/rf1.rb
# frozen_string_literal: true class HL7::Message::Segment::RF1 < HL7::Message::Segment weight 0 # should occur after the MSH segment add_field :referral_status add_field :referral_priority add_field :referral_type add_field :referral_disposition add_field :referral_category add_field :originating_referra...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/ais.rb
lib/segments/ais.rb
# frozen_string_literal: true class HL7::Message::Segment::AIS < HL7::Message::Segment weight 1 add_field :set_id add_field :segment_action_code add_field :universal_service_identifier add_field :start_time add_field :start_time_offset add_field :start_time_offset_units add_field :duration add_field ...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/sch.rb
lib/segments/sch.rb
# frozen_string_literal: true class HL7::Message::Segment::SCH < HL7::Message::Segment weight 0 add_field :placer_appointment_id add_field :filler_appointment_id add_field :occurance_number add_field :placer_group_number add_field :schedule_id add_field :event_reason add_field :appointment_reason add...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/sft.rb
lib/segments/sft.rb
# frozen_string_literal: true class HL7::Message::Segment::SFT < HL7::Message::Segment weight 0 add_field :software_vendor_organization add_field :software_certified_version_or_release_number # NEW longest method name ever. add_field :software_product_name add_field :software_binary_id add_field :software_...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/oru.rb
lib/segments/oru.rb
# frozen_string_literal: true class HL7::Message::Segment::ORU < HL7::Message::Segment end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/fts.rb
lib/segments/fts.rb
# frozen_string_literal: true class HL7::Message::Segment::FTS < HL7::Message::Segment weight 1001 # at the end add_field :file_batch_count add_field :file_trailer_comment end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/txa.rb
lib/segments/txa.rb
# frozen_string_literal: true class HL7::Message::Segment::TXA < HL7::Message::Segment add_field :set_id add_field :document_type add_field :document_content_presentation add_field :activity_date_time add_field :primary_activity_provider_code add_field :origination_date_time add_field :transcription_date...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/rgs.rb
lib/segments/rgs.rb
# frozen_string_literal: true class HL7::Message::Segment::RGS < HL7::Message::Segment weight 3 add_field :set_id add_field :segment_action_code add_field :resource_group_id end
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/tq1.rb
lib/segments/tq1.rb
# frozen_string_literal: true class HL7::Message::Segment::TQ1 < HL7::Message::Segment weight 2 add_field :set_id add_field :quantity add_field :repeat_pattern add_field :explicit_time add_field :relative_time_and_units add_field :service_duration add_field :start_time add_field :end_time add_field...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/aig.rb
lib/segments/aig.rb
# frozen_string_literal: true class HL7::Message::Segment::AIG < HL7::Message::Segment weight 1 add_field :set_id add_field :segment_action_code add_field :resource_id add_field :resource_type add_field :resource_group add_field :resource_quantity add_field :resource_quantity_units add_field :start_t...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/qrd.rb
lib/segments/qrd.rb
# frozen_string_literal: true class HL7::Message::Segment::QRD < HL7::Message::Segment weight 84 add_field :query_date add_field :query_format_code add_field :query_priority add_field :query_id add_field :deferred_response_type add_field :deferred_response_date add_field :quantity_limited_request add...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/nk1.rb
lib/segments/nk1.rb
# frozen_string_literal: true class HL7::Message::Segment::NK1 < HL7::Message::Segment add_field :set_id, :idx => 1 add_field :name, :idx => 2 add_field :relationship, :idx => 3 add_field :address, :idx => 4 add_field :phone_number, :idx => 5 add_field :business_phone_number, :idx => 6 add_field :contact...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/msh.rb
lib/segments/msh.rb
# frozen_string_literal: true class HL7::Message::Segment::MSH < HL7::Message::Segment weight(-1) # the msh should always start a message add_field :enc_chars add_field :sending_app add_field :sending_facility add_field :recv_app add_field :recv_facility add_field :time do |value| convert_to_ts(value...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/gt1.rb
lib/segments/gt1.rb
# frozen_string_literal: true module HL7 class Message::Segment::GT1 < HL7::Message::Segment add_field :set_id add_field :guarantor_number add_field :guarantor_name add_field :guarantor_spouse_name add_field :guarantor_address add_field :guarantor_home_phone add_field :guarantor_business_...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/err.rb
lib/segments/err.rb
# frozen_string_literal: true class HL7::Message::Segment::ERR < HL7::Message::Segment weight 2 add_field :error_code_and_location add_field :error_location add_field :hl7_error_code add_field :severity add_field :application_error_code add_field :application_error_parameter add_field :diagnostic_infor...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/qrf.rb
lib/segments/qrf.rb
# frozen_string_literal: true class HL7::Message::Segment::QRF < HL7::Message::Segment weight 85 add_field :where_subject_filter add_field :when_start_date add_field :when_end_date add_field :what_user_qualifier add_field :other_qry_subject_filter add_field :which_date_qualifier add_field :which_date_s...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/prt.rb
lib/segments/prt.rb
# frozen_string_literal: true class HL7::Message::Segment::PRT < HL7::Message::Segment add_field :participation_instance_id, :idx => 1 add_field :action_code, :idx => 2 add_field :action_reason, :idx => 3 add_field :participation, :idx => 4 add_field :participation_person, :idx => 5 add_field :participatio...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/aip.rb
lib/segments/aip.rb
# frozen_string_literal: true class HL7::Message::Segment::AIP < HL7::Message::Segment weight 0 add_field :set_id add_field :segment_action_code add_field :personnel_resource_id add_field :resource_role add_field :resource_group add_field :start_date_time add_field :start_date_time_offset add_field :...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/pv2.rb
lib/segments/pv2.rb
# frozen_string_literal: true class HL7::Message::Segment::PV2 < HL7::Message::Segment weight 3 add_field :prior_pending_location, :idx => 1 add_field :accommodation_code, :idx => 2 add_field :admit_reason, :idx => 3 add_field :transfer_reason, :idx => 4 add_field :patient_valuables, :idx => 5 add_field ...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
ruby-hl7/ruby-hl7
https://github.com/ruby-hl7/ruby-hl7/blob/d5c8ee0288d225591c611a8474da5c520e5415f6/lib/segments/pid.rb
lib/segments/pid.rb
# frozen_string_literal: true class HL7::Message::Segment::PID < HL7::Message::Segment weight 1 has_children %i[NK1 NTE PV1 PV2] add_field :set_id add_field :patient_id add_field :patient_id_list add_field :alt_patient_id add_field :patient_name add_field :mother_maiden_name add_field :patient_dob do...
ruby
MIT
d5c8ee0288d225591c611a8474da5c520e5415f6
2026-01-04T17:51:14.403379Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/test/test_chordy.rb
test/test_chordy.rb
require 'helper' class TestChordy < Test::Unit::TestCase def test_chord Chord.new(:M, 6) end def reset_test_chords no_auto clear end should "have methods and constants for all chord flags" do c = test_chord methods = c.methods class_flags = Chord::CHORD_FLAGS consts = Chord.cons...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/test/helper.rb
test/helper.rb
require 'rubygems' require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e $stderr.puts e.message $stderr.puts "Run `bundle install` to install missing gems" exit e.status_code end require 'test/unit' require 'shoulda' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__)...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy_script.rb
lib/chordy_script.rb
require 'chordy' no_auto
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy.rb
lib/chordy.rb
require 'stringio' includes = ['chords', 'util'] include_dirs = includes.map { |dir| "chordy/#{dir}/" } include_dirs.each do |dir| Dir[File.join(File.dirname(__FILE__), dir + '**.rb')].each do |file| require file end end module Chordy extend self, Util, Util::Tuning attr_accessor :chords, :line_length, :...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chord.rb
lib/chordy/chord.rb
module Chordy class Chord CHORD_FLAGS = %w(mute harmonic bend pull hammer_down slide_down slide_up dont_play vibrato) def self.all_flags CHORD_FLAGS.to_a end # gets number of high strings in a tuning by approximation def self.get_num_high_strings length (length / 3.0).ceil end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/util/text.rb
lib/chordy/util/text.rb
module Util class Text < String end end
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/util/section.rb
lib/chordy/util/section.rb
module Util class Section attr_accessor :separator_length def initialize(title="", separator_length=40) @title = title @separator_length = separator_length end def to_s title_str = @title.to_s title_str.rjust(title_str.length + 2, "-").ljust(@separator_length, "-") end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/util/tuning.rb
lib/chordy/util/tuning.rb
module Util module Tuning def is_tuning? tuning Tuning.instance_methods.include? tuning.to_s true end def tuning_6_standard ["e", "a", "d", "g", "b", "e"] end def tuning_6_a ["a", "d", "g", "c", "e", "a"] end def tuning_6_b ["b", "e", "a", "d", "f#", "b"]...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/e.rb
lib/chordy/chords/e.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class E < Chord def play_major [0, 2, 2, 1, 0, 0] end def play_minor [0, 2, 2, 0, 0, 0] end def play_dominant_7 [0, 2, 2, 1, 3, 0] end def play_dominant_7_5 [-1, -1, 2, 3, 3, 4] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/d_sharp.rb
lib/chordy/chords/d_sharp.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class DSharp < Chord def play_major [-1, 1, 1, 3, 4, 3] end def play_minor [-1, 1, 1, 3, 4, 2] end def play_dominant_7 [-1, 1, 1, 3, 2, 3] end def play_dominant_7_5 [-1, 0, 1, 2, 2, 3] e...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/c.rb
lib/chordy/chords/c.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class C < Chord def play_major [3, 3, 2, 0, 1, 0] end def play_minor [-1, 3, 1, 0, 4, 3] end def play_dominant_7 [0, 3, 2, 3, 1, 0] end def play_dominant_7_5 [-1, 1, 2, 3, 1, 2] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/g_sharp.rb
lib/chordy/chords/g_sharp.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class GSharp < Chord def play_major [4, 3, 1, 1, 1, 4] end def play_minor [-1, 2, 1, 4, 4, 4] end def play_dominant_7 [4, 3, 1, 1, 1, 2] end def play_dominant_7_5 [-1, -1, 0, 1, 1, 2] en...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/g.rb
lib/chordy/chords/g.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class G < Chord def play_major [3, 2, 0, 0, 0, 3] end def play_minor [-1, 1, 0, 3, 3, 3] end def play_dominant_7 [3, 2, 0, 0, 0, 1] end def play_dominant_7_5 [-1, -1, 3, 4, 2, 3] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/f_sharp.rb
lib/chordy/chords/f_sharp.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class FSharp < Chord def play_major [2, 4, 4, 3, 2, 2] end def play_minor [2, 4, 4, 2, 2, 2] end def play_dominant_7 [2, 4, 2, 3, 2, 2] end def play_dominant_7_5 [-1, -1, 2, 3, 1, 2] end...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/d.rb
lib/chordy/chords/d.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class D < Chord def play_major [-1, 0, 0, 2, 3, 2] end def play_minor [-1, 0, 0, 2, 3, 1] end def play_dominant_7 [-1, 0, 0, 2, 1, 2] end def play_dominant_7_5 [-1, -1, 0, 1, 1, 2] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/c_sharp.rb
lib/chordy/chords/c_sharp.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class CSharp < Chord def play_major [1, 4, 3, 1, 2, 1] end def play_minor [0, -1, 2, 1, 2, 4] end def play_dominant_7 [1, 2, 3, 1, 2, 1] end def play_dominant_7_5 [-1, 2, 3, 4, 2, 3] end...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/a.rb
lib/chordy/chords/a.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class A < Chord def play_major [0, 0, 2, 2, 2, 0] end def play_minor [0, 0, 2, 2, 1, 0] end def play_dominant_7 [0, 0, 2, 0, 2, 0] end def play_dominant_7_5 [-1, 0, 1, 0, 2, 3] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/a_sharp.rb
lib/chordy/chords/a_sharp.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class ASharp < Chord def play_major [1, 1, 3, 3, 3, 1] end def play_minor [1, 1, 3, 3, 2, 1] end def play_dominant_7 [1, 1, 3, 1, 3, 1] end def play_dominant_7_5 [0, 1, 2, 1, 3, 4] end ...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/f.rb
lib/chordy/chords/f.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class F < Chord def play_major [1, 3, 3, 2, 1, 1] end def play_minor [1, 3, 3, 1, 1, 1] end def play_dominant_7 [1, 3, 1, 2, 1, 1] end def play_dominant_7_5 [1, 0, 1, 2, 0, 1] end d...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
darth10/chordy
https://github.com/darth10/chordy/blob/341faceca396bc956a9609588f5058b7066311fd/lib/chordy/chords/b.rb
lib/chordy/chords/b.rb
require File.join(File.dirname(__FILE__), '..', 'chord') module Chordy class B < Chord def play_major [2, 2, 4, 4, 4, 2] end def play_minor [2, 2, 4, 4, 3, 2] end def play_dominant_7 [2, 2, 4, 2, 4, 2] end def play_dominant_7_5 [-1, 2, 1, 2, 0, 1] end d...
ruby
MIT
341faceca396bc956a9609588f5058b7066311fd
2026-01-04T17:51:15.304937Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/spec/hm_spec.rb
spec/hm_spec.rb
RSpec.describe Hm do subject(:hm) { described_class.new(data) } def result_of(method) ->(*args) { if args.last.is_a?(Proc) hm.public_send(method, *args[0..-2], &args.last).to_h else hm.public_send(method, *args).to_h end } end let(:data) { { order: { ...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/spec/spec_helper.rb
spec/spec_helper.rb
require 'rspec/its' require 'saharspec' require 'hm' require 'time'
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/examples/weather.rb
examples/weather.rb
require 'json' require 'pp' $LOAD_PATH.unshift 'lib' require 'hm' data = JSON.parse(File.read('examples/weather.json')) pp data pp Hm.new(data) .transform_keys(&:to_sym) # symbolize all keys .except(:id, :cod, %i[sys id], %i[weather * id]) # remove some system values .transform( %i...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/examples/benchmark.rb
examples/benchmark.rb
require 'json' require 'benchmark/ips' $LOAD_PATH.unshift 'lib' require 'hm' DATA = JSON.parse(File.read('examples/weather.json')) def hm Hm.new(DATA) .transform_keys(&:to_sym) .except(:id, :cod, %i[sys id], %i[sys message], %i[weather * id]) .transform( %i[main *] => :*, %i[sys *] => :*, ...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/examples/profile.rb
examples/profile.rb
require 'json' require 'ruby-prof' $LOAD_PATH.unshift 'lib' require 'hm' DATA = JSON.parse(File.read('examples/weather.json')) def hm Hm.new(DATA) .transform_keys(&:to_sym) .except(:id, :cod, %i[sys id], %i[sys message], %i[weather * id]) .transform( %i[main *] => :*, %i[sys *] => :*, ...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/lib/hm.rb
lib/hm.rb
# `Hm` is a wrapper for chainable, terse, idiomatic Hash modifications. # # @example # order = { # 'items' => { # '#1' => {'title' => 'Beef', 'price' => '18.00'}, # '#2' => {'title' => 'Potato', 'price' => '8.20'} # } # } # Hm(order) # .transform_keys(&:to_sym) # .transform(%i...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/lib/hm/version.rb
lib/hm/version.rb
class Hm MAJOR = 0 MINOR = 0 PATCH = 4 PRE = nil VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.') end
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/lib/hm/algo.rb
lib/hm/algo.rb
class Hm # @private module Algo module_function def delete(collection, key) collection.is_a?(Array) ? collection.delete_at(key) : collection.delete(key) end # JRuby, I am looking at you NONDUPABLE = [Symbol, Numeric, NilClass, TrueClass, FalseClass].freeze def deep_copy(value) ...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
zverok/hm
https://github.com/zverok/hm/blob/cd0ec27397c465f21a90d193be75538d24c6d8ae/lib/hm/dig.rb
lib/hm/dig.rb
class Hm # @private module Dig # TODO: Struct/OpenStruct are also diggable in Ruby core, can be added for future implementation DIGGABLE_CLASSES = [Hash, Array].freeze NotFound = Object.new.freeze def self.dig(what, key, *keys) # We want to return special value when key is not present, becaus...
ruby
MIT
cd0ec27397c465f21a90d193be75538d24c6d8ae
2026-01-04T17:51:19.419456Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/init.rb
init.rb
# Include hook code here ActiveRecord::Base.send :include, ExpectedBehavior::ActsAsArchivalActiveRecordMethods ActiveRecord::Base.send :include, ExpectedBehavior::ActsAsArchival
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/polymorphic_test.rb
test/polymorphic_test.rb
require_relative "test_helper" class PolymorphicTest < ActiveSupport::TestCase test "archive item with polymorphic association" do archival = Archival.create! poly = archival.polys.create! archival.archive! assert archival.reload.archived? assert poly.reload.archived? end test "does not ar...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/scope_test.rb
test/scope_test.rb
# coding: utf-8 require_relative "test_helper" class ScopeTest < ActiveSupport::TestCase test "simple unarchived scope" do Archival.create! Archival.create! assert_equal 2, Archival.unarchived.count end test "simple archived scope" do Archival.create!.archive! Archival.create!.archive! ...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/application_record_test.rb
test/application_record_test.rb
require_relative "test_helper" # Rails 5 introduced a new base class, and this is gonna test that if defined?(ApplicationRecord) class ApplicationRecordTest < ActiveSupport::TestCase test "archive archives the record" do archival = ApplicationRecordRow.create! archival.archive! assert archival...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/relations_test.rb
test/relations_test.rb
require_relative "test_helper" class RelationsTest < ActiveSupport::TestCase test "archive_all! archives all records in an AR Association" do 3.times { Archival.create! } archivals = Archival.all archivals.archive_all! assert archivals.first.archived? assert archivals.last.archived? end te...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/column_test.rb
test/column_test.rb
require_relative "test_helper" class ColumnTest < ActiveSupport::TestCase test "acts_as_archival raises during create if missing archived_at column" do assert_raises(ExpectedBehavior::ActsAsArchival::MissingArchivalColumnError) do MissingArchivedAt.create!(name: "foo-foo") end end test "acts_as_a...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/responds_test.rb
test/responds_test.rb
require_relative "test_helper" class RespondsTest < ActiveSupport::TestCase test "archival class responds correctly to 'archival?'" do assert Archival.archival? assert_not Plain.archival? end test "archival object responds correctly to 'archival?'" do assert Archival.new.archival? asser...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/basic_test.rb
test/basic_test.rb
require_relative "test_helper" class BasicTest < ActiveSupport::TestCase test "archive archives the record" do archival = Archival.create! archival.archive! assert_equal true, archival.reload.archived? end test "unarchive unarchives archival records" do archival = Archival.create!(archived_at: ...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/deep_nesting_test.rb
test/deep_nesting_test.rb
require_relative "test_helper" class DeepNestingTest < ActiveSupport::TestCase test "archiving deeply nested items" do archival = Archival.create! child = archival.archivals.create! grandchild = child.archivals.create! archival.archive! assert archival.reload.archived? assert child.re...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/transaction_test.rb
test/transaction_test.rb
require_relative "test_helper" require "rr" class TransactionTest < ActiveSupport::TestCase test "archiving is transactional" do archival = Archival.create! exploder = archival.exploders.create! any_instance_of(Exploder) do |canary| stub(canary).archive! { raise "Rollback Imminent" } end a...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/test_helper.rb
test/test_helper.rb
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") require "bundler/setup" require "minitest/autorun" require "minitest/pride" require "active_record" require "assertions" require "database_cleaner" require "acts_as_archival" if ActiveSupport::TestCase.respond_to?(:test_order=) ActiveSupport::TestCase.test_ord...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/associations_test.rb
test/associations_test.rb
require_relative "test_helper" class AssociationsTest < ActiveSupport::TestCase test "archive archives 'has_' associated archival objects that are dependent destroy" do archival = Archival.create! child = archival.archivals.create! archival.archive! assert archival.reload.archived? assert child...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/through_association_test.rb
test/through_association_test.rb
require_relative "test_helper" class ThroughAssociationTest < ActiveSupport::TestCase test "archive a through associated object whose 'bridge' is archival" do archival = Archival.create! bridge = archival.archival_kids.create! through = bridge.archival_grandkids.create! archival.archive! ass...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/readonly_when_archived_test.rb
test/readonly_when_archived_test.rb
require_relative "test_helper" class ReadonlyWhenArchivedTest < ActiveSupport::TestCase test "acts_as_archival objects can normally be altered after archive" do archival = Archival.create!(name: "original") archival.archive! archival.name = "updated" archival.save! assert_equal "updated", archi...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/ambiguous_table_test.rb
test/ambiguous_table_test.rb
require_relative "test_helper" class AmbiguousTableTest < ActiveSupport::TestCase test "no ambiguous table problem" do archival = Archival.create! child = archival.archivals.create! child.archive! # this is a bug fix for a problem wherein table names weren't being # namespaced, so if a table jo...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/schema.rb
test/schema.rb
ActiveRecord::Schema.define(version: 1) do create_table :another_polys_holders, force: true do |t| t.column :name, :string t.column :archival_id, :integer t.column :archive_number, :string t.column :archived_at, :datetime end create_table :archivals, force: true do |t| t.column :name, :string...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/callbacks_test.rb
test/callbacks_test.rb
require_relative "test_helper" class CallbacksTest < ActiveSupport::TestCase test "can set a value as part of archiving" do archival = CallbackArchival.create archival.set_this_value = "a test string" assert_nil archival.settable_field archival.archive! assert_equal "a test string", archival.rel...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/independent_archival.rb
test/fixtures/independent_archival.rb
# name - string # archival_id - integer # archive_number - string # archived_at - datetime class IndependentArchival < ActiveRecord::Base acts_as_archival belongs_to :archival end
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/callback_archival.rb
test/fixtures/callback_archival.rb
class CallbackArchival < ApplicationRecord acts_as_archival attr_accessor :set_this_value, :pass_callback before_archive :set_value, :conditional_callback_passer private def set_value self.settable_field = set_this_value end def conditional_callback_passer # ...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/plain.rb
test/fixtures/plain.rb
# name - string # archival_id - integer class Plain < ActiveRecord::Base belongs_to :archival end
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/application_record_row.rb
test/fixtures/application_record_row.rb
# Rails 5 introduced a new base class, and this is gonna be used in the tests of that if defined?(ApplicationRecord) class ApplicationRecordRow < ApplicationRecord acts_as_archival end end
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/archival.rb
test/fixtures/archival.rb
# name - string # archival_id - integer # archive_number - string # archived_at - datetime class Archival < ActiveRecord::Base acts_as_archival has_many :archivals, dependent: :destroy has_many :archival_kids, dependent: :destroy has_many :archival_grandkids, dependent: :destroy,...
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/archival_grandkid.rb
test/fixtures/archival_grandkid.rb
# archival_kid_id - integer # archive_number - string # archived_at - datetime class ArchivalGrandkid < ActiveRecord::Base acts_as_archival belongs_to :archival_kid end
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false
expectedbehavior/acts_as_archival
https://github.com/expectedbehavior/acts_as_archival/blob/65a6f284884d49cfbf1276602178fdae5982a09f/test/fixtures/readonly_when_archived.rb
test/fixtures/readonly_when_archived.rb
# name - string # archive_number - string # archived_at - datetime class ReadonlyWhenArchived < ActiveRecord::Base acts_as_archival readonly_when_archived: true end
ruby
MIT
65a6f284884d49cfbf1276602178fdae5982a09f
2026-01-04T17:51:12.709644Z
false