bubu_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: 2c8c7fa2659155c87ef9c92b7c80a193ba872b8c9e29f3397fbee2eb55dfb3d1
4
+ data.tar.gz: 4f6a9e4f5566d2ddf5ca43745852eeef743ba477490f1fb9097c473ea304bb78
5
+ SHA512:
6
+ metadata.gz: cbd792574c9147eadeda27b9944de401704a27780be106ac120091d40157842e325574ce06efab0a8f5abf94b53775175310b0cb39d302019b52991301ded6e6
7
+ data.tar.gz: 32f9213aa31c69353d29e24f68e3306f995f88a9d69034b6e2f87426a798ac958edd1e9b9e405de6d236f5d8957f3af4bc76fa12daf3c1397deadb6a25dc1c39
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5
+
6
+ # Specify your gem's dependencies in bubu_palindrome.gemspec
7
+ gemspec
8
+
9
+ gem 'minitest-reporters', '1.2.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,31 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bubu_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.16.0)
12
+ minitest-reporters (1.2.0)
13
+ ansi
14
+ builder
15
+ minitest (>= 5.0)
16
+ ruby-progressbar
17
+ rake (10.5.0)
18
+ ruby-progressbar (1.11.0)
19
+
20
+ PLATFORMS
21
+ x86_64-linux
22
+
23
+ DEPENDENCIES
24
+ bubu_palindrome!
25
+ bundler (~> 2.3.10)
26
+ minitest (~> 5.0)
27
+ minitest-reporters (= 1.2.0)
28
+ rake (~> 10.0)
29
+
30
+ BUNDLED WITH
31
+ 2.3.10
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # BubuPalindrome
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/bubu_palindrome`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ Ruby Palindrome Checker
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add bubu_palindrome
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install bubu_palindrome
16
+
17
+ ## Usage
18
+
19
+ $ "apple.palindrome?"
20
+ ## Development
21
+
22
+ 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.
23
+
24
+ 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).
25
+
26
+ ## Contributing
27
+
28
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bubu_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
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bubu_palindrome/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bubu_palindrome"
7
+ spec.version = BubuPalindrome::VERSION
8
+ spec.authors = ["Tony"]
9
+ spec.email = ["tony.fusco.85@gmail.com"]
10
+
11
+ spec.summary = "check palindromes"
12
+ spec.description = "palindrome detector for websites"
13
+ spec.required_ruby_version = ">= 2.6.0"
14
+ spec.homepage = "https://github.com/kaos-fm/bubu_palindrome"
15
+ spec.license = "MIT"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
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 do |f|
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_development_dependency "bundler", "~> 2.3.10"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "minitest", "~> 5.0"
35
+
36
+ # Uncomment to register a new dependency of your gem
37
+ # spec.add_dependency "example-gem", "~> 1.0"
38
+
39
+ # For more information and examples about making a new gem, check out our
40
+ # guide at: https://bundler.io/guides/creating_gem.html
41
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BubuPalindrome
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "bubu_palindrome/version"
4
+ module BubuPalindrome
5
+
6
+ def palindrome?
7
+ processed_content == processed_content.reverse
8
+ end
9
+ private
10
+
11
+ def processed_content
12
+ self.to_s #turn everything to string
13
+ .downcase #handle upcase letters
14
+ .split(/[^\w]/) #handle spaces and punctuation
15
+ .join #rebuil the string
16
+ end
17
+ end
18
+
19
+
20
+ class String
21
+ include BubuPalindrome
22
+ end
23
+ class Integer
24
+ include BubuPalindrome
25
+ end
@@ -0,0 +1,4 @@
1
+ module BubuPalindrome
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bubu_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tony
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-06-16 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.3.10
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.3.10
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: palindrome detector for websites
56
+ email:
57
+ - tony.fusco.85@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - Gemfile
63
+ - Gemfile.lock
64
+ - README.md
65
+ - Rakefile
66
+ - bubu_palindrome.gemspec
67
+ - lib/bubu_palindrome.rb
68
+ - lib/bubu_palindrome/version.rb
69
+ - sig/bubu_palindrome.rbs
70
+ homepage: https://github.com/kaos-fm/bubu_palindrome
71
+ licenses:
72
+ - MIT
73
+ metadata:
74
+ allowed_push_host: https://rubygems.org
75
+ homepage_uri: https://github.com/kaos-fm/bubu_palindrome
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: 2.6.0
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubygems_version: 3.3.3
92
+ signing_key:
93
+ specification_version: 4
94
+ summary: check palindromes
95
+ test_files: []