patrick_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/.idea/.gitignore +8 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/patrick_palindrome.iml +55 -0
- data/.idea/vcs.xml +6 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +30 -0
- data/README.md +29 -0
- data/Rakefile +12 -0
- data/lib/patrick_palindrome/version.rb +5 -0
- data/lib/patrick_palindrome.rb +25 -0
- data/patrick_palindrome.gemspec +38 -0
- data/sig/patrick_palindrome.rbs +4 -0
- metadata +59 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b263f4b8c281b5dcc034a823b732169a74935fec23088c13da4b42e4853bedc4
|
4
|
+
data.tar.gz: e3477bf6589e1939988f288b624c2aa1b7237f571041269519f8e23a0f504a31
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bb191b4415f7ec29c8bf63752f6a02b828beca085c23dea5879653b83f8b97d1d8701323c6216a8e69d5f268c4ba8b510a5ecf72189c1e0af801fba7ea604c6a
|
7
|
+
data.tar.gz: 0f10bab3068afa04bc552728056c3ad65b3ce700e8b229952e3ecc3e1f03e7a978f6d48f8663be920ebb733e60d33cc4d4054d4944a597cb0e8a70f011a525db
|
data/.idea/.gitignore
ADDED
data/.idea/misc.xml
ADDED
data/.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="ProjectModuleManager">
|
4
|
+
<modules>
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/patrick_palindrome.iml" filepath="$PROJECT_DIR$/.idea/patrick_palindrome.iml" />
|
6
|
+
</modules>
|
7
|
+
</component>
|
8
|
+
</project>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="ModuleRunConfigurationManager">
|
4
|
+
<shared />
|
5
|
+
</component>
|
6
|
+
<component name="NewModuleRootManager">
|
7
|
+
<content url="file://$MODULE_DIR$">
|
8
|
+
<sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
|
9
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
10
|
+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
11
|
+
</content>
|
12
|
+
<orderEntry type="inheritedJdk" />
|
13
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
14
|
+
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, rbenv: 3.1.2) [gem]" level="application" />
|
15
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.1.2) [gem]" level="application" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.14, rbenv: 3.1.2) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.15.0, rbenv: 3.1.2) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest-reporters (v1.5.0, rbenv: 3.1.2) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.1.2) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, rbenv: 3.1.2) [gem]" level="application" />
|
21
|
+
</component>
|
22
|
+
<component name="RakeTasksCache">
|
23
|
+
<option name="myRootTask">
|
24
|
+
<RakeTaskImpl id="rake">
|
25
|
+
<subtasks>
|
26
|
+
<RakeTaskImpl description="Build patrick_palindrome-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
|
27
|
+
<RakeTaskImpl id="build">
|
28
|
+
<subtasks>
|
29
|
+
<RakeTaskImpl description="Generate SHA512 checksum if patrick_palindrome-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
|
30
|
+
</subtasks>
|
31
|
+
</RakeTaskImpl>
|
32
|
+
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
33
|
+
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
34
|
+
<RakeTaskImpl description="Build and install patrick_palindrome-0.1.0.gem into system gems" fullCommand="install" id="install" />
|
35
|
+
<RakeTaskImpl id="install">
|
36
|
+
<subtasks>
|
37
|
+
<RakeTaskImpl description="Build and install patrick_palindrome-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
|
38
|
+
</subtasks>
|
39
|
+
</RakeTaskImpl>
|
40
|
+
<RakeTaskImpl description="Create tag v0.1.0 and build and push patrick_palindrome-0.1.0.gem to TODO: Set to your gem server 'https://example.com'" fullCommand="release[remote]" id="release[remote]" />
|
41
|
+
<RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
|
42
|
+
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
43
|
+
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
44
|
+
<RakeTaskImpl id="release">
|
45
|
+
<subtasks>
|
46
|
+
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
47
|
+
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
48
|
+
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
49
|
+
</subtasks>
|
50
|
+
</RakeTaskImpl>
|
51
|
+
</subtasks>
|
52
|
+
</RakeTaskImpl>
|
53
|
+
</option>
|
54
|
+
</component>
|
55
|
+
</module>
|
data/.idea/vcs.xml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in patrick_palindrome.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 13.0"
|
9
|
+
|
10
|
+
gem "minitest", "~> 5.0"
|
11
|
+
|
12
|
+
# gem below was added during LearnEnough tutorial...
|
13
|
+
gem 'minitest-reporters'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
patrick_palindrome (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ansi (1.5.0)
|
10
|
+
builder (3.2.4)
|
11
|
+
minitest (5.15.0)
|
12
|
+
minitest-reporters (1.5.0)
|
13
|
+
ansi
|
14
|
+
builder
|
15
|
+
minitest (>= 5.0)
|
16
|
+
ruby-progressbar
|
17
|
+
rake (13.0.6)
|
18
|
+
ruby-progressbar (1.11.0)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
x86_64-linux
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
minitest (~> 5.0)
|
25
|
+
minitest-reporters
|
26
|
+
patrick_palindrome!
|
27
|
+
rake (~> 13.0)
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
2.3.14
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# PatrickPalindrome
|
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/patrick_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
|
+
Install the gem and add to the application's Gemfile by executing:
|
10
|
+
|
11
|
+
$ bundle add patrick_palindrome
|
12
|
+
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
|
+
|
15
|
+
$ gem install patrick_palindrome
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
TODO: Write usage instructions here
|
20
|
+
|
21
|
+
## Development
|
22
|
+
|
23
|
+
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.
|
24
|
+
|
25
|
+
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).
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/patrick_palindrome.
|
data/Rakefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "patrick_palindrome/version"
|
4
|
+
|
5
|
+
class String
|
6
|
+
|
7
|
+
# Returns true for a palindrome, false otherwise.
|
8
|
+
def palindrome?
|
9
|
+
processed_content == processed_content.reverse
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
# Returns content for palindrome testing.
|
16
|
+
def processed_content
|
17
|
+
self.scan(/[a-zA-Z]/).join.downcase
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
# module PatrickPalindrome
|
23
|
+
# class Error < StandardError; end
|
24
|
+
# # Your code goes here...
|
25
|
+
# end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/patrick_palindrome/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "patrick_palindrome"
|
7
|
+
spec.version = PatrickPalindrome::VERSION
|
8
|
+
spec.authors = ["prcantwell"]
|
9
|
+
spec.email = ["64695456+prcantwell@users.noreply.github.com"]
|
10
|
+
|
11
|
+
spec.summary = "Palindrome detector"
|
12
|
+
spec.description = "Learn Enough Ruby palindrome detector"
|
13
|
+
spec.homepage = "https://github.com/prcantwell/patrick_palindrome"
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
15
|
+
|
16
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org/"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/prcantwell/patrick_palindrome"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/prcantwell/patrick_palindrome"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(__dir__) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
# For more information and examples about making a new gem, check out our
|
37
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: patrick_palindrome
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- prcantwell
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Learn Enough Ruby palindrome detector
|
14
|
+
email:
|
15
|
+
- 64695456+prcantwell@users.noreply.github.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".idea/.gitignore"
|
21
|
+
- ".idea/misc.xml"
|
22
|
+
- ".idea/modules.xml"
|
23
|
+
- ".idea/patrick_palindrome.iml"
|
24
|
+
- ".idea/vcs.xml"
|
25
|
+
- Gemfile
|
26
|
+
- Gemfile.lock
|
27
|
+
- README.md
|
28
|
+
- Rakefile
|
29
|
+
- lib/patrick_palindrome.rb
|
30
|
+
- lib/patrick_palindrome/version.rb
|
31
|
+
- patrick_palindrome.gemspec
|
32
|
+
- sig/patrick_palindrome.rbs
|
33
|
+
homepage: https://github.com/prcantwell/patrick_palindrome
|
34
|
+
licenses: []
|
35
|
+
metadata:
|
36
|
+
allowed_push_host: https://rubygems.org/
|
37
|
+
homepage_uri: https://github.com/prcantwell/patrick_palindrome
|
38
|
+
source_code_uri: https://github.com/prcantwell/patrick_palindrome
|
39
|
+
changelog_uri: https://github.com/prcantwell/patrick_palindrome
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 2.6.0
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubygems_version: 3.3.14
|
56
|
+
signing_key:
|
57
|
+
specification_version: 4
|
58
|
+
summary: Palindrome detector
|
59
|
+
test_files: []
|