ruby-hl7-zcf 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 52daeff55389f9aa18f5fa50667b28b9b5f40bee02ebd74ee2b3637785787c35
4
+ data.tar.gz: 3b85288f6f6741e5955c67bb98d58d33370645245c331165cce4e53d288abe84
5
+ SHA512:
6
+ metadata.gz: 2d1f7a0f061b44f303f5f4931dccf59992691bf3d342099b71a187744b745a082b64c97947eb051645f18e337cdc28123fcc78375a23e536ec344af8480cb704
7
+ data.tar.gz: 733313af5b4e2a974e95eda449bf31ca67aad29f813c3e7f428b6f28b7e87e0c6686fe871bac47ebabc73d81078b55fcaf247a19d8de63b31e13d73a93029f6b
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ .ruby-version
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ before_install: gem install bundler
3
+ matrix:
4
+ allow_failures:
5
+ - rvm: ruby-head
6
+ rvm:
7
+ - 2.2.0
8
+ - 2.1.0
9
+ - 2.0.0
10
+ - 1.9.3
11
+ - ruby-head
12
+ - jruby-19mode # JRuby in 1.9 mode
13
+ - rbx
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in ruby-hl7-zcf.gemspec
4
+ gemspec
5
+
6
+ group :test, :development do
7
+ gem 'rspec', '~> 2.99.0'
8
+ end
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Ruby HL7 Library
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,40 @@
1
+ [![Build Status](https://travis-ci.org/ruby-hl7/ruby-hl7-zcf.svg)](https://travis-ci.org/ruby-hl7/ruby-hl7-zcf)
2
+
3
+ # HL7::ZCF
4
+
5
+ Adds support for the ZCF segment to [`ruby-hl7`](https://github.com/ruby-hl7/ruby-hl7)
6
+ This segment was present in `ruby-hl7` gem but segments starting by a `Z` are supposed to be custom,
7
+ and should not be in a standard gem. This gem is here for retro-compatibility.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'ruby-hl7-zcf'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install ruby-hl7-zcf
24
+
25
+ ## Usage
26
+
27
+ ```ruby
28
+ msg = HL7::Message.parse(hl7_with_zcf)
29
+ Array(msg[:ZCF]).each do |zcf|
30
+ puts "Custom field 1: #{zcf.custom_field_1}"
31
+ end
32
+ ```
33
+
34
+ ## Contributing
35
+
36
+ 1. Fork it ( https://github.com/[my-github-username]/ruby-hl7-zcf/fork )
37
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
38
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
39
+ 4. Push to the branch (`git push origin my-new-feature`)
40
+ 5. Create a new Pull Request
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rspec/core/rake_task"
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,22 @@
1
+ class HL7::Message::Segment::ZCF < HL7::Message::Segment
2
+ add_field :custom_field_1, idx: 1
3
+ add_field :custom_field_2, idx: 2
4
+ add_field :custom_field_3, idx: 3
5
+ add_field :custom_field_4, idx: 4
6
+ add_field :custom_field_5, idx: 5
7
+ add_field :custom_field_6, idx: 6
8
+ add_field :custom_field_7, idx: 7
9
+ add_field :custom_field_8, idx: 8
10
+ add_field :custom_field_9, idx: 9
11
+ add_field :custom_field_10, idx: 10
12
+ add_field :custom_field_11, idx: 11
13
+ add_field :custom_field_12, idx: 12
14
+ add_field :custom_field_13, idx: 13
15
+ add_field :custom_field_14, idx: 14
16
+ add_field :custom_field_15, idx: 15
17
+ add_field :custom_field_16, idx: 16
18
+ add_field :custom_field_17, idx: 17
19
+ add_field :custom_field_18, idx: 18
20
+ add_field :custom_field_19, idx: 19
21
+ add_field :custom_field_20, idx: 20
22
+ end
@@ -0,0 +1,5 @@
1
+ module HL7
2
+ module ZCF
3
+ VERSION = "1.0.0"
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ require "ruby-hl7"
2
+ require "hl7/zcf"
3
+ require "hl7/zcf/version"
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'hl7/zcf/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ruby-hl7-zcf"
8
+ spec.version = HL7::ZCF::VERSION
9
+ spec.authors = ["Romain CLAVEL"]
10
+ spec.email = ["romain@clavel.io"]
11
+ spec.summary = %q{Provides a custom ZCF segment to the ruby-hl7 gem.}
12
+ spec.description = %q{ZCF is a custom segment commonly used to define custom fields}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
17
+ spec.test_files = spec.files.grep(%r{^spec/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "ruby-hl7", "~> 1.1"
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-hl7-zcf
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Romain CLAVEL
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruby-hl7
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: ZCF is a custom segment commonly used to define custom fields
56
+ email:
57
+ - romain@clavel.io
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".travis.yml"
64
+ - Gemfile
65
+ - LICENSE
66
+ - README.md
67
+ - Rakefile
68
+ - lib/hl7/zcf.rb
69
+ - lib/hl7/zcf/version.rb
70
+ - lib/ruby-hl7-zcf.rb
71
+ - ruby-hl7-zcf.gemspec
72
+ homepage: ''
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.7.3
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Provides a custom ZCF segment to the ruby-hl7 gem.
96
+ test_files: []