snoseeds_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: 4caafeb5e3ca4bdfb1ec94f37d06a6fb1e9ac2dbc7a4387b177749ef647bb955
4
+ data.tar.gz: 1fed81cd8d87e0f962b8b1f5691105d1f0540053ecc659067d090a9afcef1def
5
+ SHA512:
6
+ metadata.gz: 8170361514c541cba0f3c7ef438301c457793cc6cb61c1028575f864f1cfcd45fa3f446cb14de9a3400f86ded6c99e890981b23528a4210c034fdb48e2d6ed48
7
+ data.tar.gz: a5f307cf350f97a9d6d22386fd556e00390f87430659aba07a22e21d9ca727b378a28a48a07586d0bbc3f3aae2e6fede03ad52080f3daf160de374982f754dba
data/.rubocop.yml ADDED
@@ -0,0 +1,12 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
9
+
10
+ # # 37signals house style
11
+ # inherit_gem:
12
+ # rubocop-37signals: rubocop-ruby.yml
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-01-12
4
+
5
+ - Initial release
data/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # Palindrome detector
2
+
3
+ `snoseeds-palindrome` is a sample Ruy gem created in [Learn Enough Ruby to Be Dangerous](https://www.learnenough.com/course/ruby/) by Micaheal Hartl
4
+
5
+ ## Installation
6
+
7
+ To install `snoseeds_palindrome`, add this line to your application's `Gemfile`:
8
+
9
+ `gem 'snoseeds_palindrome'`
10
+
11
+ Then install as folows:
12
+
13
+ `$ bundle install`
14
+
15
+ Or install it directly using `gem`:
16
+
17
+ `$ gem install snoseeds_palindrome`
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "minitest/test_task"
5
+
6
+ Minitest::TestTask.create
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[test rubocop]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SnoseedsPalindrome
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "snoseeds_palindrome/version"
4
+
5
+ # module SnoseedsPalindrome
6
+ # class Error < StandardError; end
7
+ # # Your code goes here...
8
+ # end
9
+
10
+ class String
11
+
12
+ # Returns true for a palindrome, false otherwise.
13
+ def palindrome?
14
+ processed_content == processed_content.reverse
15
+ end
16
+
17
+ private
18
+
19
+ # Returns content for palindrome testing.
20
+ def processed_content
21
+ scan(/[a-z]/i).join.downcase
22
+ end
23
+ end
@@ -0,0 +1,4 @@
1
+ module SnoseedsPalindrome
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: snoseeds_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Nurudeen Soremekun
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-01-15 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Learn Enough Ruby Palindrome Detector
14
+ email:
15
+ - nurudeen.soremekun@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rubocop.yml"
21
+ - CHANGELOG.md
22
+ - README.md
23
+ - Rakefile
24
+ - lib/snoseeds_palindrome.rb
25
+ - lib/snoseeds_palindrome/version.rb
26
+ - sig/snoseeds_palindrome.rbs
27
+ homepage: https://github.com/snsoeeds/snoseeds_palindrome
28
+ licenses: []
29
+ metadata:
30
+ allowed_push_host: https://rubygems.org
31
+ homepage_uri: https://github.com/snsoeeds/snoseeds_palindrome
32
+ source_code_uri: https://github.com/snsoeeds/snoseeds_palindrome
33
+ changelog_uri: https://github.com/snsoeeds/snoseeds_palindrome
34
+ post_install_message:
35
+ rdoc_options: []
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 3.0.0
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirements: []
49
+ rubygems_version: 3.5.9
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: Palindrome detector
53
+ test_files: []