shammelow_palindrome 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: 6c06fa1cba516d7e7b6fd8245777136f4b6218caa6ecf61434fc64ef2ce607e3
4
- data.tar.gz: 2063cb703ef5fe151ab4c35e762f2552e500fc4dd26c41609fdd548494746207
3
+ metadata.gz: 32bb2ab96c52eb0b0bcb4d0ad92c07b502b2f9f8d221a17ad9fd4f183009a5ae
4
+ data.tar.gz: 15303800468afc61b89e493ba74d0f66974c9563419c8fbcf822be9f5659192d
5
5
  SHA512:
6
- metadata.gz: 7fecf8e39cf7a8cbcc7dac0d3c6a3c3bbc2ba1d65c9ade7581f25495bf2a60fadb1059aa8554103ff7fbc02d3f4f040c4f8f705253da057eb55d84b51a3ef658
7
- data.tar.gz: bf821849712b301fc982210143646b29f37a0b67f280d89ca97678fee7b24f23e7ccb4368e14a75c3035c987d5c954a667636120dd7c504142b9b97379fa0132
6
+ metadata.gz: 1a6950a24432f9c761cd0b9edca6a1b42dfccd3bafd41844d2ad465dda030b8f99f83eb83046111c382edc600064f6db11fcbb18f292e3aedc0c14443ad8806c
7
+ data.tar.gz: 262273117622ceaffa9def479b4eb33f66cfbc4e702c3a07b4f0770c7fd3cdf7b83505341b2e84771ae1a2f548882a4e01d53d5a5df8abdc92ef80d817f21218
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shammelow_palindrome (0.2.0)
4
+ shammelow_palindrome (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,15 +2,19 @@ require "shammelow_palindrome/version"
2
2
 
3
3
  module ShammelowPalindrome
4
4
  def palindrome?
5
+ if self.to_s.strip.empty?
6
+ return false
7
+ end
5
8
  processed_content == processed_content.reverse
6
9
  end
7
10
 
8
11
  private
9
-
12
+
10
13
  # Returns content for palindrome testing.
11
14
  def processed_content
12
15
  self.to_s.scan(/[a-z0-9]/i).join.downcase
13
16
  end
17
+
14
18
  end
15
19
 
16
20
  class String
@@ -1,3 +1,3 @@
1
1
  module ShammelowPalindrome
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
data/phrases.txt ADDED
@@ -0,0 +1,32 @@
1
+ A butt tuba
2
+ A bad penny always turns up.
3
+ A fool and his money are soon parted.
4
+ A man, a plan, a canal—Panama!
5
+ A man, a plan, a canoe, pasta, heros, rajahs, a coloratura, maps, snipe, percale, macaroni, a gag, a banana bag, a tan, a tag, a banana bag again (or a camel), a crepe, pins, Spam, a rut, a Rolo, cash, a jar, sore hats, a peon, a canal–Panama!
6
+ A Toyota's a Toyota
7
+ Able was I ere I saw Elba.
8
+ Ah, Satan sees Natasha
9
+ deified
10
+ Dennis sinned.
11
+ Dennis and Edna sinned.
12
+ Dennis, Nell, Edna, Leon, Nedra, Anita, Rolf, Nora, Alice, Carol, Leo, Jane, Reed, Dena, Dale, Basil, Rae, Penny, Lana, Dave, Denny, Lena, Ida, Bernadette, Ben, Ray, Lila, Nina, Jo, Ira, Mara, Sara, Mario, Jan, Ina, Lily, Arne, Bette, Dan, Reba, Diane, Lynn, Ed, Eva, Dana, Lynne, Pearl, Isabel, Ada, Ned, Dee, Rena, Joel, Lora, Cecil, Aaron, Flora, Tina, Arden, Noel, and Ellen sinned.
13
+ Fools rush in where angels fear to tread.
14
+ Gather ye rosebuds while ye may.
15
+ Go hang a salami, I'm a lasagna hog.
16
+ level
17
+ Haste makes waste.
18
+ If the shoe fits, wear it.
19
+ If wishes were fishes then no man would starve.
20
+ Madam, I’m Adam.
21
+ No "x" in "Nixon"
22
+ No devil lived on
23
+ Once bitten, twice shy.
24
+ Race fast, safe car
25
+ racecar
26
+ radar
27
+ Those who cannot remember the past are condemned to repeat it.
28
+ Was it a bar or a bat I saw?
29
+ Was it a car or a cat I saw?
30
+ Was it a cat I saw?
31
+ When in Rome, do as the Romans do.
32
+ Yo, banana boy!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shammelow_palindrome
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
  - Steffen Hammelow-Berg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-11 00:00:00.000000000 Z
11
+ date: 2020-02-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Learn Enough Ruby palindrome detector
14
14
  email:
@@ -27,6 +27,7 @@ files:
27
27
  - bin/setup
28
28
  - lib/shammelow_palindrome.rb
29
29
  - lib/shammelow_palindrome/version.rb
30
+ - phrases.txt
30
31
  - shammelow_palindrome.gemspec
31
32
  homepage: https://gitlab.com/shammelow/palindrome_gem
32
33
  licenses: []