midos 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79286b082089c1f7ac2a8cd369752b9dfb06eb4e
4
- data.tar.gz: 7014f16b3fa6e1bd72ef18f8a0cf8982cbaa1f23
3
+ metadata.gz: e904f4d972dc21e686860a439a34cd49449aedb4
4
+ data.tar.gz: 801ee532bf3f6da51cd21c0b2406d2cf8155037f
5
5
  SHA512:
6
- metadata.gz: a0703932d02f3414ea401e6fb0e3873ff240dab5a4287c69e3504d116735a110145f44409abcf49b9f155cacb4243470136026b428a70944c3ac0ee9529a993c
7
- data.tar.gz: 4850fb5181fb670af4615a8b793db0bb96b905d76a5d41700f8d1fa52ce68f57464d05f07d9dbf9da9e86cc3948c2dc2bf9def3c70572bd4923c62b38e605c20
6
+ metadata.gz: 087e8c3da5e037aac01ac9defc7ea63b9112a39e72d9ae8ba107667ed05bff3ef3b96ad78a584c36fbf8878057b388d7b8e0f8e240f310df4e87ac5b3a1818ce
7
+ data.tar.gz: e865a1a1a3c8a7f5952588a06d83f68d44dc1cda1d4e774dbc901f190f3585f331953858bea126f4a778b963368043417b7cc6bd00d7641102be3e8cba0ebc28
data/ChangeLog CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  = Revision history for midos
4
4
 
5
+ == 0.2.1 [2015-12-11]
6
+
7
+ * Changed Midos::Writer to insert key field at beginning of record.
8
+
5
9
  == 0.2.0 [2015-10-02]
6
10
 
7
11
  * Added +sort+ option to Midos::Writer.
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to midos version 0.2.0
5
+ This documentation refers to midos version 0.2.1
6
6
 
7
7
 
8
8
  == DESCRIPTION
@@ -4,7 +4,7 @@ module Midos
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 2
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  class << self
10
10
 
@@ -100,7 +100,9 @@ module Midos
100
100
  def write_i(id, record, io = io())
101
101
  return if record.empty?
102
102
 
103
- record[key] = id || auto_id.call if key && !record.key?(key)
103
+ if key && !record.key?(key)
104
+ record = { key => id || auto_id.call }.update(record)
105
+ end
104
106
 
105
107
  (@sort ? Hash[record.sort] : record).each { |k, v|
106
108
  k ? io << k << fs << transform(v) << le :
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-02 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nuggets
@@ -82,15 +82,13 @@ licenses:
82
82
  metadata: {}
83
83
  post_install_message: |2+
84
84
 
85
- midos-0.2.0 [2015-10-02]:
85
+ midos-0.2.1 [2015-12-11]:
86
86
 
87
- * Added +sort+ option to Midos::Writer.
88
- * Added Midos::Writer#[]= convenience method.
89
- * Fixed Midos::Writer.transform to recognize any combination of CR/LF.
87
+ * Changed Midos::Writer to insert key field at beginning of record.
90
88
 
91
89
  rdoc_options:
92
90
  - "--title"
93
- - midos Application documentation (v0.2.0)
91
+ - midos Application documentation (v0.2.1)
94
92
  - "--charset"
95
93
  - UTF-8
96
94
  - "--line-numbers"
@@ -111,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
109
  version: '0'
112
110
  requirements: []
113
111
  rubyforge_project:
114
- rubygems_version: 2.4.8
112
+ rubygems_version: 2.5.1
115
113
  signing_key:
116
114
  specification_version: 4
117
115
  summary: A Ruby client for MIDOS databases.