dastich_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/.rubocop.yml +13 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +52 -0
- data/README.md +24 -0
- data/Rakefile +16 -0
- data/lib/dastich_palindrome/version.rb +5 -0
- data/lib/dastich_palindrome.rb +15 -0
- data/sig/dastich_palindrome.rbs +4 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 607b12745b9e718d3c6b0a8a0a67b7f643ea966e07f140e02e9a00ff4c70c036
|
4
|
+
data.tar.gz: b9e3a20f65b3103bbcda6d3cbe981cdb7a83cc6a0233e5042534c3f95c422851
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c3bea2a398df195416d799a8e619744f4d504e934a5f2f0b3add9c90458c335e5ad7678ba020909047e688199dbc469b53e785c02672ec6f5d980506ddb3187
|
7
|
+
data.tar.gz: 743e208c3dadd0cad4fa2e5a3a8d1ce407b9eeda152eab88ba163800b20f7870423562fb43803ad08d48b4e608406c31bbb70d86f73587ace3fc7685524c67b5
|
data/.rubocop.yml
ADDED
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 dastich_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.2.0'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dastich_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.18.0)
|
14
|
+
minitest-reporters (1.2.0)
|
15
|
+
ansi
|
16
|
+
builder
|
17
|
+
minitest (>= 5.0)
|
18
|
+
ruby-progressbar
|
19
|
+
parallel (1.23.0)
|
20
|
+
parser (3.2.2.1)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
rainbow (3.1.1)
|
23
|
+
rake (13.0.6)
|
24
|
+
regexp_parser (2.8.0)
|
25
|
+
rexml (3.2.5)
|
26
|
+
rubocop (1.52.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.28.0, < 2.0)
|
34
|
+
ruby-progressbar (~> 1.7)
|
35
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
36
|
+
rubocop-ast (1.29.0)
|
37
|
+
parser (>= 3.2.1.0)
|
38
|
+
ruby-progressbar (1.13.0)
|
39
|
+
unicode-display_width (2.4.2)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
arm64-darwin-22
|
43
|
+
|
44
|
+
DEPENDENCIES
|
45
|
+
dastich_palindrome!
|
46
|
+
minitest (~> 5.0)
|
47
|
+
minitest-reporters (= 1.2.0)
|
48
|
+
rake (~> 13.0)
|
49
|
+
rubocop (~> 1.21)
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
2.3.10
|
data/README.md
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# DastichPalindrome
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Install the gem and add to the application's Gemfile by executing:
|
6
|
+
|
7
|
+
$ bundle add dastich_palindrome
|
8
|
+
|
9
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
10
|
+
|
11
|
+
$ gem install dastich_palindrome
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
Use this gem for testing your palindrome ))
|
15
|
+
|
16
|
+
## Development
|
17
|
+
|
18
|
+
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.
|
19
|
+
|
20
|
+
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).
|
21
|
+
|
22
|
+
## Contributing
|
23
|
+
|
24
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dastan-vertex/dastich_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]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "dastich_palindrome/version"
|
4
|
+
|
5
|
+
class String
|
6
|
+
def palindrome?
|
7
|
+
processed_content == processed_content.reverse
|
8
|
+
end
|
9
|
+
|
10
|
+
private def processed_content
|
11
|
+
# we can do even shorter by DELETING 'self',
|
12
|
+
# because ruby knows that we are doing scan method to self
|
13
|
+
self.scan(/[a-z]/i).join.downcase
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dastich_palindrome
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- dastan-vertex
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Learn Enough Ruby palindrome detector
|
14
|
+
email:
|
15
|
+
- dastan@vertex.kg
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".rubocop.yml"
|
21
|
+
- Gemfile
|
22
|
+
- Gemfile.lock
|
23
|
+
- README.md
|
24
|
+
- Rakefile
|
25
|
+
- lib/dastich_palindrome.rb
|
26
|
+
- lib/dastich_palindrome/version.rb
|
27
|
+
- sig/dastich_palindrome.rbs
|
28
|
+
homepage: https://github.com/dastan-vertex/dastich_palindrome
|
29
|
+
licenses: []
|
30
|
+
metadata:
|
31
|
+
allowed_push_host: https://rubygems.org/
|
32
|
+
homepage_uri: https://github.com/dastan-vertex/dastich_palindrome
|
33
|
+
source_code_uri: https://github.com/dastan-vertex/dastich_palindrome
|
34
|
+
changelog_uri: https://github.com/dastan-vertex/dastich_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.3.7
|
51
|
+
signing_key:
|
52
|
+
specification_version: 4
|
53
|
+
summary: Palindrome detector
|
54
|
+
test_files: []
|