textutils 1.2.0 → 1.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: 3e40ccfbcb833b42ca09205ad659db438c5205c2
4
- data.tar.gz: 2025fd82b7f254c303bc900e59441b571a9cf543
3
+ metadata.gz: 437a5b912f0a3861ec7a45bb66553274985fb80c
4
+ data.tar.gz: 246460ab3b009a6ffa0b5039bb986aa2184a461f
5
5
  SHA512:
6
- metadata.gz: 06e3600e5bb04eb77f5b13f11a9fa757ea0731196f15c327943d8b0b188b4c05e2666684ca97f2369b8526b991f8faf9bd0a23291727a9effa30ca10c99f3ebb
7
- data.tar.gz: 786f1feabf6f40cac7c23122e6052d94ba8011bd3170d9b48529e89e808c2a4a2963132043a145ccd80c96bc4afb91a7297ba7673794828739182e51d00b1087
6
+ metadata.gz: ee28f3fe54026a7bec9947c108e917d6387b34f6afd19215572466b175511f39a5ec8f48593b3b982f9bb9320bc0d76c464ef0e20e6c06e95a122538b3ddaf86
7
+ data.tar.gz: abe8967954604649c73848841274eec8f272c7c80af17a26aa7726a15408bac8502479db0091851442da1fa1ce051a25ca07aded4106700b717bfb7d7c6a362c
@@ -6,11 +6,15 @@ class File
6
6
  file.read
7
7
  end
8
8
 
9
- ## todo/fix:
9
+ ##
10
+ ## todo: make normalize newlines into a filter (for easy (re)use)
11
+
10
12
  ## normalize newlines
11
- ## always use \n
12
- ## convert \n\r (Windows) => \n
13
- ## convert \r (old? Mac) => \n
13
+ ## always use LF \n (Unix):
14
+ ##
15
+ ## convert CR/LF \r\n (Windows) => \n
16
+ ## convert CR \r (old? Mac) => \n -- still in use?
17
+ text = text.gsub( /\r\n|\r/, "\n" )
14
18
 
15
19
  # NB: for convenience: convert fancy unicode dashes/hyphens to plain ascii hyphen-minus
16
20
  text = TextUtils.convert_unicode_dashes_to_plain_ascii( text, path: path )
@@ -4,7 +4,7 @@ module TextUtils
4
4
 
5
5
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
6
6
  MINOR = 2
7
- PATCH = 0
7
+ PATCH = 1
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: props