rmsmith_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: 7affffa728c18f187c1481dd0a6ccf283f3f3057dc75ddcfad7176057c219ba4
4
+ data.tar.gz: a02b14998459453d257678322c11bd245c8607ab641d83fc6ec91d2498e03f73
5
+ SHA512:
6
+ metadata.gz: fdc514f96cebc9677204f13cbe2db4125c26e172c3961af6ef2c5167f76b17801d1e2b447441a87c3b5fc675ba0fac15e3cd32cc92a8a6ded9bcbfdd9a093de3
7
+ data.tar.gz: 72e51375606ac4cfc8937228099cbac8b237590e10fca2b69492c6a3db1f3b229f5034855d39b110c4a83784caa4abf92057d90e8794099d9b6b5e478312674f
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
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 <username>_palindrome.gemspec
6
+ gemspec
7
+
8
+ gem 'minitest-reporters', '1.2.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rmsmith_palindrome (0.1.0)
5
+ rake (~> 10.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ansi (1.5.0)
11
+ builder (3.2.4)
12
+ minitest (5.14.4)
13
+ minitest-reporters (1.2.0)
14
+ ansi
15
+ builder
16
+ minitest (>= 5.0)
17
+ ruby-progressbar
18
+ rake (10.5.0)
19
+ ruby-progressbar (1.11.0)
20
+
21
+ PLATFORMS
22
+ x86_64-linux
23
+
24
+ DEPENDENCIES
25
+ minitest (~> 5.0)
26
+ minitest-reporters (= 1.2.0)
27
+ rmsmith_palindrome!
28
+
29
+ BUNDLED WITH
30
+ 2.2.21
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # RmsmithPalindrome
2
+
3
+ `rmsmith_palindrome` is a sample Ruby gem created in [*Learn Enough Ruby to Be Dangerous*](https://www.learnenough.com/ruby-tutorial) by Michael Hartl.
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'rmsmith_palindrome'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle install
15
+
16
+ Or install it yourself as:
17
+
18
+ $ gem install rmsmith_palindrome
19
+
20
+ ## Usage
21
+
22
+ `rmsmith_palindrome` adds a `palindrome?` method to the `String` class, and can be used as follows:
23
+
24
+ ```
25
+ $ irb
26
+ >> require 'mhartl_palindrome'
27
+ >> "honey badger".palindrome?
28
+ => false
29
+ >> "deified".palindrome?
30
+ => true
31
+ >> "Able was I, ere I saw Elba.".palindrome?
32
+ => true
33
+ >> phrase = "Madam, I'm Adam."
34
+ >> phrase.palindrome?
35
+ => true
36
+ ```
37
+
38
+ ## Development
39
+
40
+ 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.
41
+
42
+ 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).
43
+
44
+ ## Contributing
45
+
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rmsmith_palindrome.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
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
+ task default: :test
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "rmsmith_palindrome"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rmsmith_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
+ private
13
+
14
+ # Returns content for palindrome testing.
15
+ def processed_content
16
+ scan(/[a-z]/i).join.downcase
17
+ end
18
+
19
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RmsmithPalindrome
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rmsmith_palindrome/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rmsmith_palindrome"
7
+ spec.version = RmsmithPalindrome::VERSION
8
+ spec.authors = ["Rebecca Smith"]
9
+ spec.email = ["beccamichelle@live.com"]
10
+
11
+ spec.summary = %q{Palindrome detector}
12
+ spec.description = %q{Learn Enough Ruby palindrome detector}
13
+ spec.homepage = "https://github.com/rebeccamichelle27/palindrome"
14
+ spec.required_ruby_version = ">= 2.4.0"
15
+
16
+ spec.metadata["allowed_push_host"] = "https://rubygems.org/"
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/rebeccamichelle27/palindrome"
19
+ #spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
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(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ # Uncomment to register a new dependency of your gem
31
+ spec.add_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "minitest", "~> 5.0"
33
+ # For more information and examples about making a new gem, checkout our
34
+ # guide at: https://bundler.io/guides/creating_gem.html
35
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rmsmith_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rebecca Smith
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-07-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '10.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '10.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ description: Learn Enough Ruby palindrome detector
42
+ email:
43
+ - beccamichelle@live.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - Gemfile.lock
51
+ - README.md
52
+ - Rakefile
53
+ - bin/console
54
+ - bin/setup
55
+ - lib/rmsmith_palindrome.rb
56
+ - lib/rmsmith_palindrome/version.rb
57
+ - rmsmith_palindrome.gemspec
58
+ homepage: https://github.com/rebeccamichelle27/palindrome
59
+ licenses: []
60
+ metadata:
61
+ allowed_push_host: https://rubygems.org/
62
+ homepage_uri: https://github.com/rebeccamichelle27/palindrome
63
+ source_code_uri: https://github.com/rebeccamichelle27/palindrome
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 2.4.0
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubygems_version: 3.1.6
80
+ signing_key:
81
+ specification_version: 4
82
+ summary: Palindrome detector
83
+ test_files: []