string-utility 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/lib/utils.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31a8358a03fd06e93b86cda830d7fd251ab3fcad
4
- data.tar.gz: 6238c0ee73b6139493c9c545cc8a731519fd91dc
3
+ metadata.gz: a636cadcb2265ae0500538f0cf538a0492788268
4
+ data.tar.gz: 0ee615818ba03e59b8896157106a876e109c907a
5
5
  SHA512:
6
- metadata.gz: a2cc24a42e2c84446dcfbfd7c6a9cd662cf9881f05394783c3d582768ac89ba352a89e099f213a0c209e2ca0d0669e22e1325222699b0ce0f0b4c9f9479c8413
7
- data.tar.gz: 94e9cb446ffe73004f88e775effa4baa116cc15b4209f236a1bba9b528c1235d03df628b06ef2d1c60cc7143aff7501f5103fb011ae7327356cdadb695a3216f
6
+ metadata.gz: 34d9fbefafef5b6453d7a51f5f211ec67015676409b4ce55b9b737b17f26b3e6e46a27e32ce24b034ca5f850610f3bfe44d3754ba287ed4304daa6e54d2decce
7
+ data.tar.gz: e1ad8198110d6efbae52a5051e2984a0e90dc6a5958f2a53497ddacc8e3318b41e68f89616b3aea16978156fc6004a126373ba4b87a10d7271b4ea2a6465f1bf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
  ## Version 2
3
+ ### Version 2.4.1
4
+ * random_line properly returns the chomped version.
5
+
3
6
  ### Version 2.4.0
4
7
  * New random_line method for getting a random line in a file.
5
8
 
data/lib/utils.rb CHANGED
@@ -51,6 +51,6 @@ module StringUtility
51
51
  # @return [String] A random line in the file.
52
52
  def self.random_line(path)
53
53
  read = File.readlines(path)
54
- read[rand(read.size)]
54
+ read[rand(read.size)].chomp
55
55
  end
56
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: string-utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Foster