egbulsoni_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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d57c8bb86825f8c5bd3c1487dfb888d2afec9cd8f575e12423ac2342244047fe
4
+ data.tar.gz: 645b9f15201637462d29ea09d8a6590c24d6301e0d427a495352113668c2a52f
5
+ SHA512:
6
+ metadata.gz: aef65e40122e3b56c5e47d7224c5bfc596d7777abea697e98a11a2afc551c138c430c79075dedcfb78cdd028e081a72a47600c26a667d3f2a933b3ea6bfe4969
7
+ data.tar.gz: b002c224849bf477d058e8c6382f2a5957760e80dc33079355f82fae5cf023d954e7c648de6c2ed45163dbc13648955492b1a3888015f2a451cd87aff64bf944
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in egbulsoni_palindrome.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/Gemfile.lock ADDED
@@ -0,0 +1,49 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ egbulsoni_palindrome (0.1.0)
5
+ minitest (~> 5.18)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ json (2.6.3)
12
+ language_server-protocol (3.17.0.3)
13
+ minitest (5.18.1)
14
+ parallel (1.23.0)
15
+ parser (3.2.2.3)
16
+ ast (~> 2.4.1)
17
+ racc
18
+ racc (1.6.2)
19
+ rainbow (3.1.1)
20
+ rake (13.0.6)
21
+ regexp_parser (2.8.1)
22
+ rexml (3.2.5)
23
+ rubocop (1.53.1)
24
+ json (~> 2.3)
25
+ language_server-protocol (>= 3.17.0)
26
+ parallel (~> 1.10)
27
+ parser (>= 3.2.2.3)
28
+ rainbow (>= 2.2.2, < 4.0)
29
+ regexp_parser (>= 1.8, < 3.0)
30
+ rexml (>= 3.2.5, < 4.0)
31
+ rubocop-ast (>= 1.28.0, < 2.0)
32
+ ruby-progressbar (~> 1.7)
33
+ unicode-display_width (>= 2.4.0, < 3.0)
34
+ rubocop-ast (1.29.0)
35
+ parser (>= 3.2.1.0)
36
+ ruby-progressbar (1.13.0)
37
+ unicode-display_width (2.4.2)
38
+
39
+ PLATFORMS
40
+ x86_64-linux
41
+
42
+ DEPENDENCIES
43
+ egbulsoni_palindrome!
44
+ minitest (~> 5.0)
45
+ rake (~> 13.0)
46
+ rubocop (~> 1.21)
47
+
48
+ BUNDLED WITH
49
+ 2.4.15
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # EgbulsoniPalindrome
2
+
3
+ TODO: Delete this and the text below, and describe your gem
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/egbulsoni_palindrome`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
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]/egbulsoni_palindrome.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i[test rubocop]
data/changelog.md ADDED
File without changes
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/egbulsoni_palindrome/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "egbulsoni_palindrome"
7
+ spec.version = EgbulsoniPalindrome::VERSION
8
+ spec.authors = ["Eduardo Bulsoni"]
9
+ spec.email = ["egbulsoni@gmail.com"]
10
+
11
+ spec.summary = %q{palindrome gem, checks if a word is palindrome}
12
+ spec.homepage = "https://github.com/egbulsoni/egbulsoni_palindrome"
13
+ spec.required_ruby_version = ">= 2.6.0"
14
+
15
+ # spec.metadata["allowed_push_host"] = "https://rubygems.org/"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/egbulsoni/egbulsoni_palindrome"
19
+ spec.metadata["changelog_uri"] = "https://github.com/egbulsoni/egbulsoni_palindrome/changelog.md"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(__dir__) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ spec.add_dependency "minitest", "~> 5.18"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
@@ -0,0 +1,19 @@
1
+ require "test_helper"
2
+
3
+ class EgbulsoniPalindromeTest < Minitest::Test
4
+ def test_that_it_has_a_version_number
5
+ refute_nil :: EgbulsoniPalindrome::VERSION
6
+ end
7
+
8
+ def test_it_does_something_useful
9
+ assert false
10
+ end
11
+
12
+ def test_non_palindrome
13
+ assert !"apple".palindrome?
14
+ end
15
+
16
+ def test_literal_palindrome
17
+ assert "racecar".palindrome?
18
+ end
19
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EgbulsoniPalindrome
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "egbulsoni_palindrome/version"
4
+
5
+ # Returns true for a palindrome, false otherwise
6
+ class String
7
+
8
+ def palindrome?
9
+ processed_content == processed_content.reverse
10
+ end
11
+
12
+ # Returns content for palindrome testing.
13
+
14
+ private
15
+
16
+ def processed_content
17
+ scan(/[a-z]/i).join.downcase
18
+ end
19
+
20
+ end
@@ -0,0 +1,4 @@
1
+ module EgbulsoniPalindrome
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: egbulsoni_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Eduardo Bulsoni
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-06-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.18'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.18'
27
+ description:
28
+ email:
29
+ - egbulsoni@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rubocop.yml"
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - README.md
38
+ - Rakefile
39
+ - changelog.md
40
+ - egbulsoni_palindrome.gemspec
41
+ - egbulsoni_palindrome_test.rb
42
+ - lib/egbulsoni_palindrome.rb
43
+ - lib/egbulsoni_palindrome/version.rb
44
+ - sig/egbulsoni_palindrome.rbs
45
+ homepage: https://github.com/egbulsoni/egbulsoni_palindrome
46
+ licenses: []
47
+ metadata:
48
+ homepage_uri: https://github.com/egbulsoni/egbulsoni_palindrome
49
+ source_code_uri: https://github.com/egbulsoni/egbulsoni_palindrome
50
+ changelog_uri: https://github.com/egbulsoni/egbulsoni_palindrome/changelog.md
51
+ post_install_message:
52
+ rdoc_options: []
53
+ require_paths:
54
+ - lib
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 2.6.0
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ requirements: []
66
+ rubygems_version: 3.4.15
67
+ signing_key:
68
+ specification_version: 4
69
+ summary: palindrome gem, checks if a word is palindrome
70
+ test_files: []