palindrome-slzr 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: 89a27b3aac837513b8c04394a24589f81353962a
4
- data.tar.gz: 3f286abc15f945861d9e26648fb4e113be348a7a
3
+ metadata.gz: 3f477182c25e881640febb56fe7e74ce7d87d0fa
4
+ data.tar.gz: 71f6923c154cc69144ca7e0a3fbcddde883c04c5
5
5
  SHA512:
6
- metadata.gz: 9d9f075ea1ae0b4d8db832d99d8b8153ef318cafac180d2be6cc7b90201f23176332ec3130a55591c6538115016029197becc9dd723ccee783c573b94e05bda1
7
- data.tar.gz: d1ce45458aa5390c48c7b0351fd4b46b820220f3207392a97672c66e1a35d38daf600fd51ff8b58d667e3d7cddb16e9e30cdb5c80315b12af51e0f540141a3c5
6
+ metadata.gz: a1aa28516c3b72da0602edb8c3933d48403f5e12625599bdbc2536e29d33cfa64f507c856ab0e70159895e6dbbb77ff8a4126ef85a5a66196b0caad55cfdb590
7
+ data.tar.gz: a029d2d43d1625d19380b5cc3a076b52c2470010d75ab8e77284ff62953cee0258e179be343e222421857efbc740e0d405c79016a46a9f11a01840771d4c440b
@@ -1,17 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'palindromo'
3
+ require 'Palindromo'
4
4
 
5
5
  class Checker
6
- def self.capture
7
- print "Word: "
8
- word = gets.chomp
9
- if word == word.reverse
10
- puts "Sí es un palíndromo"
11
- else
12
- puts "No es un palíndromo"
13
- end
6
+ def capture(string)
7
+ string == string.reverse
14
8
  end
15
9
  end
16
10
 
17
- Checker.capture
11
+ checker = Checker.new
12
+
13
+ print "Palabra: "
14
+ checker.capture(gets.chomp)
@@ -1,6 +1,7 @@
1
1
  require "palindromo/version"
2
2
 
3
3
  module Palindromo
4
+
4
5
  class Checker
5
6
  def self.capture
6
7
  print "Word: "
@@ -12,4 +13,5 @@ module Palindromo
12
13
  end
13
14
  end
14
15
  end
16
+
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module Palindromo
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -10,12 +10,11 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["h.salazar.olivares@accenture.com"]
11
11
 
12
12
  spec.summary = %q{Determines if a word is or isn't a palindrome}
13
- spec.description = %q{As simple as that.}
13
+ spec.description = %q{Determines if a word is or isn't a palindrome.}
14
14
  spec.homepage = "https://github.com/hslzr"
15
15
  spec.license = "MIT"
16
16
 
17
- # spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.files = `git ls-files`.split($\)
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
18
  spec.executables = ["palindromo"]
20
19
  spec.require_paths = ["lib"]
21
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: palindrome-slzr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Héctor Salazar
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: As simple as that.
55
+ description: Determines if a word is or isn't a palindrome.
56
56
  email:
57
57
  - h.salazar.olivares@accenture.com
58
58
  executables:
@@ -73,8 +73,6 @@ files:
73
73
  - lib/palindromo.rb
74
74
  - lib/palindromo/version.rb
75
75
  - palindromo.gemspec
76
- - spec/palindromo_spec.rb
77
- - spec/spec_helper.rb
78
76
  - tasks/rspec.rake
79
77
  homepage: https://github.com/hslzr
80
78
  licenses:
@@ -1,31 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Palindromo do
4
-
5
- subject { Palindromo.new }
6
-
7
- # it 'has a version number' do
8
- # expect(Palindromo::VERSION).not_to be nil
9
- # end
10
-
11
- describe '#process' do
12
-
13
- let(:ana) { "ana" }
14
- let(:tom) { "tom" }
15
-
16
-
17
- it 'verifies word is a string' do
18
- expect(ana).to be_a String
19
- expect(tom).to be_a String
20
- end
21
-
22
- it 'verifies ana is a palindrome' do
23
- expect(ana.reverse).to eq "ana"
24
- end
25
-
26
- it 'verifies tom is not a palindrome' do
27
- expect(tom.reverse).not_to eq "tom"
28
- end
29
- end
30
-
31
- end
@@ -1,2 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
- require 'palindromo'