le_mm_palindrome 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7794fbd2fed73ae24cb30c2c839af954636ff29d69410a039f1e7e98dac38d51
4
+ data.tar.gz: 3f6f97b3ef13f6564aadba55244f127523921eb4fd202d777d652b75ee4bd82d
5
+ SHA512:
6
+ metadata.gz: c07f4832328e9b14e53d385e7c29fc4fc887a7a81bc6637ad93dd4850c1945c4f7bcdbbb3ef335d4b64f03883694b2c874d6eea404a6e6f20a3e99128608e243
7
+ data.tar.gz: c848bb257427524dde5f9a876a3a1c62c6c0a8afde0e1592c4435292817b519cb07478f806e5d368811c4176312de9434618f070afd96b83b928623143284c60
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in le_mm_palindrome.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+ gem "minitest-reporters", '1.6.1'
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ le_mm_palindrome (0.1.1)
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.6.1)
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
+ arm64-darwin-22
22
+
23
+ DEPENDENCIES
24
+ le_mm_palindrome!
25
+ minitest (~> 5.0)
26
+ minitest-reporters (= 1.6.1)
27
+ rake (~> 13.0)
28
+
29
+ BUNDLED WITH
30
+ 2.4.10
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # LeMmPalindrome
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/le_mm_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]/le_mm_palindrome.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
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
+ task default: :test
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LeMmPalindrome
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "le_mm_palindrome/version"
4
+
5
+ module LeMmPalindrome
6
+ def palindrome?
7
+ pc = processed_content
8
+ pc == pc.reverse && !pc.empty?
9
+ end
10
+
11
+ private
12
+
13
+ def processed_content
14
+ self.to_s.scan(/\w/).join.downcase
15
+ end
16
+ end
17
+
18
+ class String
19
+ include LeMmPalindrome
20
+ end
21
+
22
+ class Integer
23
+ include LeMmPalindrome
24
+ end
25
+
26
+ =begin
27
+ module LeMmPalindrome
28
+ class Error < StandardError; end
29
+ # Your code goes here...
30
+ end
31
+ =end
32
+
@@ -0,0 +1,4 @@
1
+ module LeMmPalindrome
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: le_mm_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Marc Groß
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: My version of the Palindrome detector from "Learn enough Ruby" by Michael
14
+ Hartl palindrome detector
15
+ email:
16
+ - marc@marc-gross.de
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - Gemfile
22
+ - Gemfile.lock
23
+ - README.md
24
+ - Rakefile
25
+ - lib/le_mm_palindrome.rb
26
+ - lib/le_mm_palindrome/version.rb
27
+ - sig/le_mm_palindrome.rbs
28
+ homepage: https://github.com/mm-gross/mm_le_palindrome
29
+ licenses: []
30
+ metadata:
31
+ allowed_push_host: https://rubygems.org/
32
+ homepage_uri: https://github.com/mm-gross/mm_le_palindrome
33
+ source_code_uri: https://github.com/mm-gross/mm_le_palindrome
34
+ changelog_uri: https://github.com/mm-gross/mm_le_palindrome
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.10
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: Palindrome detector
54
+ test_files: []