TormenTeDx_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: aa8f61a6c941892274d41df59ead7a5bf38309fc65a11be144ea776336b05341
4
+ data.tar.gz: bbe6962af68918af1a4881b6e977e381311981bda5969cd644cd8ebdee677aa0
5
+ SHA512:
6
+ metadata.gz: 2ea354bab4f58f449975159074013be7cf473b1916e9ac506e7826e65931602694b49f1f0b8c4d5f48f8557c036637900d2fde7cef0c5d367fa5481ff2793955
7
+ data.tar.gz: 8b7c7d31987dd54c6c7494b39376fa855b2adde66a3143744959e8ceef12ffd4154614f5104b67a24a71ff0e973dd3bfbf43b141230e56da825ac69558a9c03b
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/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # TormenTeDxPalindrome
2
+
3
+ ## Version 0.01
4
+
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in TormenTeDx_palindrome.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+
14
+ gem "minitest-reporters", "~> 1.6"
data/Gemfile.lock ADDED
@@ -0,0 +1,52 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ TormenTeDx_palindrome (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ansi (1.5.0)
10
+ ast (2.4.2)
11
+ builder (3.2.4)
12
+ json (2.6.3)
13
+ minitest (5.17.0)
14
+ minitest-reporters (1.6.0)
15
+ ansi
16
+ builder
17
+ minitest (>= 5.0)
18
+ ruby-progressbar
19
+ parallel (1.22.1)
20
+ parser (3.2.1.0)
21
+ ast (~> 2.4.1)
22
+ rainbow (3.1.1)
23
+ rake (13.0.6)
24
+ regexp_parser (2.7.0)
25
+ rexml (3.2.5)
26
+ rubocop (1.46.0)
27
+ json (~> 2.3)
28
+ parallel (~> 1.10)
29
+ parser (>= 3.2.0.0)
30
+ rainbow (>= 2.2.2, < 4.0)
31
+ regexp_parser (>= 1.8, < 3.0)
32
+ rexml (>= 3.2.5, < 4.0)
33
+ rubocop-ast (>= 1.26.0, < 2.0)
34
+ ruby-progressbar (~> 1.7)
35
+ unicode-display_width (>= 2.4.0, < 3.0)
36
+ rubocop-ast (1.26.0)
37
+ parser (>= 3.2.1.0)
38
+ ruby-progressbar (1.11.0)
39
+ unicode-display_width (2.4.2)
40
+
41
+ PLATFORMS
42
+ x86_64-linux
43
+
44
+ DEPENDENCIES
45
+ TormenTeDx_palindrome!
46
+ minitest (~> 5.0)
47
+ minitest-reporters (~> 1.6)
48
+ rake (~> 13.0)
49
+ rubocop (~> 1.21)
50
+
51
+ BUNDLED WITH
52
+ 2.4.7
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Palindrome detector
2
+
3
+ `TormenTeDxPalindrome` is a sample Ruby gem created in [*Learn Enough Ruby to Be Dangerous*](https://www.learnenough.com/ruby-tutorial) by Michael Hartl.
4
+
5
+ ## Installation
6
+
7
+ To install `TormenTeDxPalindrome`, add this line to your application's `Gemfile`:
8
+
9
+ ```
10
+ gem 'TormenTeDxPalindrome'
11
+ ```
12
+
13
+ Then install as follows:
14
+
15
+ ```
16
+ $ bundle install
17
+ ```
18
+
19
+ Or install it directly using `gem`:
20
+
21
+ ```
22
+ $ gem install TormenTeDxPalindrome
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ `TormenTeDxPalindrome` adds a `palindrome?` method to the `String` class, and can be used as follows:
28
+
29
+ ```
30
+ $ irb
31
+ >> require 'TormenTeDxPalindrome'
32
+ >> "honey badger".palindrome?
33
+ => false
34
+ >> "deified".palindrome?
35
+ => true
36
+ >> "Able was I, ere I saw Elba.".palindrome?
37
+ => true
38
+ >> phrase = "Madam, I'm Adam."
39
+ >> phrase.palindrome?
40
+ => true
41
+ ```
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]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TormenTeDxPalindrome
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "TormenTeDx_palindrome/version"
4
+
5
+ class String
6
+ # Returns true for a palindrome, false otherwise.
7
+ def palindrome?
8
+ processed_content == processed_content.reverse
9
+ end
10
+
11
+ private
12
+
13
+ # Returns content for palindrome testing.
14
+ def processed_content
15
+ scan(/[a-z]/i).join.downcase
16
+ end
17
+ end
@@ -0,0 +1,4 @@
1
+ module TormenTeDxPalindrome
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: TormenTeDx_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - TormenTeDx
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-02-25 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Learn Enough Ruby palindrome detector
14
+ email:
15
+ - pipilek@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rubocop.yml"
21
+ - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - README.md
25
+ - Rakefile
26
+ - lib/TormenTeDx_palindrome.rb
27
+ - lib/TormenTeDx_palindrome/version.rb
28
+ - sig/TormenTeDx_palindrome.rbs
29
+ homepage: https://github.com/TormenTeDx/TormenTeDx_palindrome
30
+ licenses: []
31
+ metadata:
32
+ allowed_push_host: https://rubygems.org/
33
+ homepage_uri: https://github.com/TormenTeDx/TormenTeDx_palindrome
34
+ source_code_uri: https://github.com/TormenTeDx/TormenTeDx_palindrome
35
+ changelog_uri: https://github.com/TormenTeDx/TormenTeDx_palindrome/blob/main/CHANGELOG.md
36
+ post_install_message:
37
+ rdoc_options: []
38
+ require_paths:
39
+ - lib
40
+ required_ruby_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 2.6.0
45
+ required_rubygems_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ requirements: []
51
+ rubygems_version: 3.2.3
52
+ signing_key:
53
+ specification_version: 4
54
+ summary: Palindrome detector
55
+ test_files: []