Dicom_UID 0.0.11 → 0.0.12

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -2
  3. data/lib/dicom_uid.rb +7 -2
  4. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26c0997022b9acc5b117be849ad8841440a22cac6e8b6f7ab08a2a3c2edcd91c
4
- data.tar.gz: db9abdb00c2bcee26c46d801212bef3d784e4ba515eb80e33bd5cff515fd6e1a
3
+ metadata.gz: 0b8d658b1bb90a01d0d402cfec8a9ad88c820eec340b69a434acb9d1265d68be
4
+ data.tar.gz: b6d301aca3d81f5d77ddf50f7abcaba405ee130a81b0a6444c1805db71a3f914
5
5
  SHA512:
6
- metadata.gz: 253a468da568e5418eee5f3749acf95778f2a3e607478a96a8091c5f6678471b5b1fec21c5e9cd8cbf4539f0f078bd506703214bc901246c660a2eee8424b672
7
- data.tar.gz: f3616002f63b5642520b0a410724669f692418a97a2f29dfdd0323bc9772cfd77c98275c91bf2a24562afbcc05108c38620be51936e75076064e4caade5872f1
6
+ metadata.gz: c54aecb1dd2d878a6666445b144931fc9d20e2fd00f29514e29d34ebb9a1dcc8a62c4d99cdd3f60bcdd0b0a716abc0fdd4bd570b60b099aba4b3cebc58e91491
7
+ data.tar.gz: e521b9f1498a141ce3bfce9e5bc46abbaa7cc350799eba17551da5b86bd294caa0598dafbf276f1daee188715683955f732cad2a6fb7c5591d513651cf54c7ef
data/README.md CHANGED
@@ -2,7 +2,10 @@
2
2
 
3
3
  Gem generating DICOM random UID
4
4
 
5
+ ## Examples
5
6
 
6
- ### TODO
7
+ ```ruby
8
+ DicomUID.random_dicom_uid '10.12.6.64', 60
9
+ DicomUID.random_dicom_uid '1.1.3.62', 30, false
10
+ ```
7
11
 
8
- - parser/regex for checking if string is a correct UID
@@ -28,16 +28,21 @@ module DicomUID
28
28
  length_component = rand 0..length
29
29
  end
30
30
 
31
- # randing the component
31
+ # randing the component: length
32
32
  component = '9' * (length - 1)
33
33
  while component.length == length - 1
34
34
  component = (rand ('9' * length_component).to_i).to_s
35
35
  end
36
36
 
37
37
 
38
+
38
39
  if odd_byte_boundary and !odd_byte_rule component# if odd number
39
- component << 'O'
40
+ puts 'a('
41
+ puts component
42
+ component << '0'
40
43
  component = component[1..-1]# removing first int
44
+ puts component
45
+ puts 'b('
41
46
  end
42
47
 
43
48
  component
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Dicom_UID
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Repain Paul
@@ -39,8 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubyforge_project:
43
- rubygems_version: 2.7.9
42
+ rubygems_version: 3.0.1
44
43
  signing_key:
45
44
  specification_version: 4
46
45
  summary: Random DICOM UID generator