asyroyez_palindrome 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.travis.yml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +41 -0
- data/README.md +35 -0
- data/Rakefile +10 -0
- data/asyroyez_palindrome.gemspec +33 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/asyroyez_palindrome/version.rb +3 -0
- data/lib/asyroyez_palindrome.rb +15 -0
- data/node_modules/.yarn-integrity +10 -0
- data/yarn.lock +4 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46b78463a67c7471e15dd0e35d302d2cb69a8a96dea2446ab2223dd84f5b3af2
|
4
|
+
data.tar.gz: 4d43602120eaf18210e8834176f9c100b3df5033d9b3a46565d0d696ab88949b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f5b44779d2abfef78f74c0ce351e0c4dcc5592bc10928fe3411be31b3cc1a083c1870fdab24d43bfcf65153f96142f5c98f51087a1a04c0686a2df8567a5cb8e
|
7
|
+
data.tar.gz: 61e458fbb1e92b07a0d51bff64a0252782b71c311783cd03a9ba8c54160b8fbc5db041dbcf02af48a1d83ffeb0d24a528d07a62dd352c512a5e4fbafda4c26f9
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in asyroyez_palindrome.gemspec
|
6
|
+
|
7
|
+
gem 'minitest-reporters', '1.2.0'
|
8
|
+
gem 'rake'
|
9
|
+
gem 'rubocop', '~> 0.74.0'
|
10
|
+
gem 'rubocop-minitest', '~> 0.2.1'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
ansi (1.5.0)
|
5
|
+
ast (2.4.0)
|
6
|
+
builder (3.2.3)
|
7
|
+
jaro_winkler (1.5.3)
|
8
|
+
minitest (5.12.2)
|
9
|
+
minitest-reporters (1.2.0)
|
10
|
+
ansi
|
11
|
+
builder
|
12
|
+
minitest (>= 5.0)
|
13
|
+
ruby-progressbar
|
14
|
+
parallel (1.18.0)
|
15
|
+
parser (2.6.5.0)
|
16
|
+
ast (~> 2.4.0)
|
17
|
+
rainbow (3.0.0)
|
18
|
+
rake (13.0.0)
|
19
|
+
rubocop (0.74.0)
|
20
|
+
jaro_winkler (~> 1.5.1)
|
21
|
+
parallel (~> 1.10)
|
22
|
+
parser (>= 2.6)
|
23
|
+
rainbow (>= 2.2.2, < 4.0)
|
24
|
+
ruby-progressbar (~> 1.7)
|
25
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
26
|
+
rubocop-minitest (0.2.1)
|
27
|
+
rubocop (>= 0.74)
|
28
|
+
ruby-progressbar (1.10.1)
|
29
|
+
unicode-display_width (1.6.0)
|
30
|
+
|
31
|
+
PLATFORMS
|
32
|
+
ruby
|
33
|
+
|
34
|
+
DEPENDENCIES
|
35
|
+
minitest-reporters (= 1.2.0)
|
36
|
+
rake
|
37
|
+
rubocop (~> 0.74.0)
|
38
|
+
rubocop-minitest (~> 0.2.1)
|
39
|
+
|
40
|
+
BUNDLED WITH
|
41
|
+
2.0.2
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# AsyroyezPalindrome
|
2
|
+
|
3
|
+
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/asyroyez_palindrome`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'asyroyez_palindrome'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install asyroyez_palindrome
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/asyroyez_palindrome.
|
data/Rakefile
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "asyroyez_palindrome/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "asyroyez_palindrome"
|
7
|
+
spec.version = AsyroyezPalindrome::VERSION
|
8
|
+
spec.authors = ["Andrey Syroyezhkin"]
|
9
|
+
spec.email = ["andreysyroyezhkin@pm.me"]
|
10
|
+
|
11
|
+
spec.summary = %q{Palindrome detector}
|
12
|
+
spec.description = %q{A Ruby palindrome detector that works on strings and numbers}
|
13
|
+
spec.homepage = "https://github.com/asyroyez/palindrome_gem"
|
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/asyroyez/palindrome_gem"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/asyroyez/palindrome_gem/blob/master/README.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(File.expand_path('..', __FILE__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
33
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "asyroyez_palindrome"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "asyroyez_palindrome/version"
|
2
|
+
|
3
|
+
class String
|
4
|
+
# Returns true for a palindrome, false otherwise.
|
5
|
+
def palindrome?
|
6
|
+
processed_content == processed_content.reverse
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
# Returns content for palindrome testing
|
12
|
+
def processed_content
|
13
|
+
scan(/[a-z]/i).join.downcase
|
14
|
+
end
|
15
|
+
end
|
data/yarn.lock
ADDED
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: asyroyez_palindrome
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrey Syroyezhkin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description: A Ruby palindrome detector that works on strings and numbers
|
56
|
+
email:
|
57
|
+
- andreysyroyezhkin@pm.me
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
64
|
+
- Gemfile
|
65
|
+
- Gemfile.lock
|
66
|
+
- README.md
|
67
|
+
- Rakefile
|
68
|
+
- asyroyez_palindrome.gemspec
|
69
|
+
- bin/console
|
70
|
+
- bin/setup
|
71
|
+
- lib/asyroyez_palindrome.rb
|
72
|
+
- lib/asyroyez_palindrome/version.rb
|
73
|
+
- node_modules/.yarn-integrity
|
74
|
+
- yarn.lock
|
75
|
+
homepage: https://github.com/asyroyez/palindrome_gem
|
76
|
+
licenses: []
|
77
|
+
metadata:
|
78
|
+
allowed_push_host: https://rubygems.org/
|
79
|
+
homepage_uri: https://github.com/asyroyez/palindrome_gem
|
80
|
+
source_code_uri: https://github.com/asyroyez/palindrome_gem
|
81
|
+
changelog_uri: https://github.com/asyroyez/palindrome_gem/blob/master/README.md/
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubygems_version: 3.0.6
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Palindrome detector
|
101
|
+
test_files: []
|