ulisesrivas_palindrome 0.1.0
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 +7 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +30 -0
- data/README.md +31 -0
- data/Rakefile +12 -0
- data/lib/ulisesrivas_palindrome/version.rb +5 -0
- data/lib/ulisesrivas_palindrome.rb +20 -0
- data/sig/ulisesrivas_palindrome.rbs +4 -0
- data/ulisesrivas_palindrome.gemspec +38 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 03cc1a598ef087e3b9996ca4ebefe7a9a7d429a35eb5813aff205c0512f8191c
|
4
|
+
data.tar.gz: f00ac64e4f346ffda6c2aa94cee5a2a39b4e46d6d3a28b4f5dc486e64220bf5c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 16162f3dfcdf10659b76e9df8f0b311922ba56dad5e9a1417b917afc8f86b10ccc68e157e76c2917671fd09bbd841140b609ffac5e4bae1c605891b1f5f65b36
|
7
|
+
data.tar.gz: fddbc90f97a4ede7f71a7f04c1311d56d757977b1f71ef8a09c1a39013f906f619045a99a3340aa6d39bf57112f161738f34d4ac84a35b9ee1eb9b6679b16b9e
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ulisesrivas_palindrome (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ansi (1.5.0)
|
10
|
+
builder (3.2.4)
|
11
|
+
minitest (5.20.0)
|
12
|
+
minitest-reporters (1.2.0)
|
13
|
+
ansi
|
14
|
+
builder
|
15
|
+
minitest (>= 5.0)
|
16
|
+
ruby-progressbar
|
17
|
+
rake (13.0.6)
|
18
|
+
ruby-progressbar (1.13.0)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
x86_64-darwin-21
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
minitest (~> 5.0)
|
25
|
+
minitest-reporters (= 1.2.0)
|
26
|
+
rake (~> 13.0)
|
27
|
+
ulisesrivas_palindrome!
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
2.4.19
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# UlisesrivasPalindrome
|
2
|
+
|
3
|
+
UlisesrivasPalindrome is a sample Ruby gem created in Learn Enough Ruby to Be Dangerous by Michael Hartl.
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ulisesrivas_palindrome`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Install the gem and add to the application's Gemfile by executing:
|
12
|
+
|
13
|
+
$ bundle add ulisesrivas_palindrome
|
14
|
+
|
15
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
|
+
|
17
|
+
$ gem install ulisesrivas_palindrome
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ulisesrivas_palindrome.
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ulisesrivas_palindrome/version"
|
4
|
+
|
5
|
+
class String
|
6
|
+
|
7
|
+
# Returns true for a palindrome, false otherwise.
|
8
|
+
def palindrome?
|
9
|
+
processed_content == processed_content.reverse
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
# Returns content for palindrome testing.
|
15
|
+
def processed_content
|
16
|
+
self.scan(/[a-z]/i).join.downcase
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/ulisesrivas_palindrome/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ulisesrivas_palindrome"
|
7
|
+
spec.version = UlisesrivasPalindrome::VERSION
|
8
|
+
spec.authors = ["ulises rivas"]
|
9
|
+
spec.email = ["urivas23@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Palindrome detector"
|
12
|
+
spec.description = "Learn Enough Ruby palindrome detector"
|
13
|
+
spec.homepage = "https://github.com/ulisesrivas/ulisesrivas_palindrome.git"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/ulisesrivas/ulisesrivas_palindrome.git"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/ulisesrivas/ulisesrivas_palindrome.git"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
# For more information and examples about making a new gem, check out our
|
37
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ulisesrivas_palindrome
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ulises rivas
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Learn Enough Ruby palindrome detector
|
14
|
+
email:
|
15
|
+
- urivas23@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- Gemfile
|
21
|
+
- Gemfile.lock
|
22
|
+
- README.md
|
23
|
+
- Rakefile
|
24
|
+
- lib/ulisesrivas_palindrome.rb
|
25
|
+
- lib/ulisesrivas_palindrome/version.rb
|
26
|
+
- sig/ulisesrivas_palindrome.rbs
|
27
|
+
- ulisesrivas_palindrome.gemspec
|
28
|
+
homepage: https://github.com/ulisesrivas/ulisesrivas_palindrome.git
|
29
|
+
licenses: []
|
30
|
+
metadata:
|
31
|
+
allowed_push_host: https://rubygems.org/
|
32
|
+
homepage_uri: https://github.com/ulisesrivas/ulisesrivas_palindrome.git
|
33
|
+
source_code_uri: https://github.com/ulisesrivas/ulisesrivas_palindrome.git
|
34
|
+
changelog_uri: https://github.com/ulisesrivas/ulisesrivas_palindrome.git
|
35
|
+
post_install_message:
|
36
|
+
rdoc_options: []
|
37
|
+
require_paths:
|
38
|
+
- lib
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.6.0
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubygems_version: 3.4.19
|
51
|
+
signing_key:
|
52
|
+
specification_version: 4
|
53
|
+
summary: Palindrome detector
|
54
|
+
test_files: []
|