caption_crunch 0.0.1 → 0.0.2

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
  !binary "U0hBMQ==":
3
- metadata.gz: caf3a7a71c735e100811ff9357ba35b07b0facfb
4
- data.tar.gz: 470f3e1ad973f32f94eaf04c59b6b25aedfde7c6
3
+ metadata.gz: 3f7b39bf0e73829d0ac289e14f7c371819d1cef5
4
+ data.tar.gz: 961fb16fb9717f3a90db35a1383ad55fa1b674d5
5
5
  SHA512:
6
- metadata.gz: faa7aaebfb7b28c603edba951aab611446426f926d7dd5410dcb3f2740b817ed9147947205fb35036d9025fb003c8d6b3132a158912165f3030598206dac2652
7
- data.tar.gz: edb3692d122205d637c2a4f64e7a6fe7deb44002aee9dde51556b75c52592536073710f8b576795605715b874a9f85b6f7d69f39daa3e31b3750af0c22ce2e89
6
+ metadata.gz: 737ee451b960b63dfb01dcb1ee6144ff61c89570f9f109e3a78ba7baf3c5c6c8f8bb26124be702279d50112eb55f9689dd95d94e2b3f9f5c5321a7c32ab8a4d0
7
+ data.tar.gz: f07ef986c87562060db84a14b735050c57ff1854c2282872103f5940ab066352689475332dd85eb3a0d593b0997f1311575ac8b09a59bf96d7501b7948cdb789
data/.gitignore CHANGED
@@ -11,4 +11,5 @@
11
11
  *.so
12
12
  *.o
13
13
  *.a
14
+ *.gem
14
15
  mkmf.log
@@ -34,9 +34,10 @@ module CaptionCrunch
34
34
  # Returns a string corresponding to the contents of a File instance.
35
35
  # Alternatively, if the argument is not a File, simply calls `.to_s`.
36
36
  def read_file(file)
37
- case file
38
- when File then file.read
39
- else file.to_s
37
+ if file.respond_to?(:read)
38
+ file.read
39
+ else
40
+ file.to_s
40
41
  end.strip
41
42
  end
42
43
 
@@ -1,3 +1,3 @@
1
1
  module CaptionCrunch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caption_crunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Peter