iniparse 1.3.0 → 1.3.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6b464db624dce7fb8e739ef4052ae6731160b5c
4
- data.tar.gz: 34a23d15c017f66eb3c3a8b917de440c9bfcdbe0
3
+ metadata.gz: 6eae364becef17e0a5f913fd94c18434d2bc1d63
4
+ data.tar.gz: 691d86bf55c4d67746c75c8c96eb973694b91cbe
5
5
  SHA512:
6
- metadata.gz: 0b31696c7ba53c6491a52371e34dc9b72c44eb8e4ba78009f3167b67df0a2642308bc7fd8ed5f76bc4ba5fd24fe4477faeb9d27ada8e2d262b340f161d55c40c
7
- data.tar.gz: 90e65a58a1ac00d42bcd096a8542dbf0b32272d786661c827fceefaf66862f9a0eb46e2aa18b91bccdccb1f85987f0707f9ada537a2dd2ff04d9441fe041f4ce
6
+ metadata.gz: 2835bd549ef0821242c427addf1ff6240e8d55a89adca6efd8fc4382b3b1ad1780e7d33392705664aa6473908351e585b6ee70f56ea852a4f37b9740939f1750
7
+ data.tar.gz: 65d8edc3de306fd2102e41c4b962f4e4d57509032dfc6c33f825a10ca25dd98c7a71145bd75c120dfbd54725ea768cc0339b30987f8969f9f37c5a6e57f45153
data/iniparse.gemspec CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
12
12
  ## If your rubyforge_project name is different, then edit it and comment out
13
13
  ## the sub! line in the Rakefile
14
14
  s.name = 'iniparse'
15
- s.version = '1.3.0'
16
- s.date = '2014-04-09'
15
+ s.version = '1.3.1'
16
+ s.date = '2014-04-10'
17
17
  s.rubyforge_project = 'iniparse'
18
18
 
19
19
  s.summary = 'A pure Ruby library for parsing INI documents.'
data/lib/iniparse.rb CHANGED
@@ -7,7 +7,7 @@ require File.join(dir, 'lines')
7
7
  require File.join(dir, 'parser')
8
8
 
9
9
  module IniParse
10
- VERSION = '1.3.0'
10
+ VERSION = '1.3.1'
11
11
 
12
12
  # A base class for IniParse errors.
13
13
  class IniParseError < StandardError; end
@@ -43,7 +43,10 @@ module IniParse
43
43
 
44
44
  # Returns this document as a string suitable for saving to a file.
45
45
  def to_ini
46
- @lines.to_a.map { |line| line.to_ini }.join($/)
46
+ string = @lines.to_a.map { |line| line.to_ini }.join($/)
47
+ string = "#{ string }\n" unless string[-1] == "\n"
48
+
49
+ string
47
50
  end
48
51
 
49
52
  # Returns true if a section with the given +key+ exists in this document.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iniparse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec