bugeater_palindrome 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c5ca7e85030f9a4797d5f32160b4c349a2cf34d6acf5cada7bd38d65ba4e3eb5
4
+ data.tar.gz: dd0675c2528a6f4dd5dd9f350bda04aacae3b3cae0aad4c0750b36f9fba3728a
5
+ SHA512:
6
+ metadata.gz: 20c4ce0b7848c25680a413fbda61b0f515d33d633dcd109eee2f57374793af4ee04e69c4abc063cb55095d00b2963c042b2512f63a9e927aeabf4b51916773f7
7
+ data.tar.gz: 5e020c6403dd473f9f7690a74abd108d4eb6893c35325a6e362557ae11abdf19f6ebea5e2c5b0bff6cc40636b569575e258165c2904207b8381be343c3ed924b
@@ -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
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in bugeater_palindrome.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
@@ -0,0 +1,30 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bugeater_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.14.3)
12
+ minitest-reporters (1.2.0)
13
+ ansi
14
+ builder
15
+ minitest (>= 5.0)
16
+ ruby-progressbar
17
+ rake (13.0.3)
18
+ ruby-progressbar (1.11.0)
19
+
20
+ PLATFORMS
21
+ x86_64-linux
22
+
23
+ DEPENDENCIES
24
+ bugeater_palindrome!
25
+ minitest (~> 5.0)
26
+ minitest-reporters (~> 1.2.0)
27
+ rake (~> 13.0)
28
+
29
+ BUNDLED WITH
30
+ 2.2.5
@@ -0,0 +1,37 @@
1
+ # BugeaterPalindrome
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/bugeater_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 'bugeater_palindrome'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install bugeater_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 the created tag, 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]/bugeater_palindrome.
36
+ =======
37
+ # bugeater_palindrome
@@ -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,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "bugeater_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__)
@@ -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,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bugeater_palindrome/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bugeater_palindrome"
7
+ spec.version = BugeaterPalindrome::VERSION
8
+ spec.authors = ["Jason Steele"]
9
+ spec.email = ["jason@bugeaterdev.com"]
10
+
11
+ spec.summary = "Palindrome gem"
12
+ spec.description = "Example gem."
13
+ spec.homepage = "https://github.com/jasondsteele/bugeater_palindrome.git"
14
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.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/jasondsteele/bugeater_palindrome.git"
20
+ spec.metadata["changelog_uri"] = "https://github.com/jasondsteele/bugeater_palindrome.git"
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(File.expand_path(__dir__)) do
25
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ spec.add_development_dependency "minitest", "~> 5.0"
33
+ spec.add_development_dependency "minitest-reporters", "~> 1.2.0"
34
+
35
+
36
+ # For more information and examples about making a new gem, checkout our
37
+ # guide at: https://bundler.io/guides/creating_gem.html
38
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "bugeater_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
+ def letters
13
+ self.scan(/[a-z]/i).join
14
+ end
15
+
16
+ private
17
+
18
+ # Returns content for palindrome testing.
19
+ def processed_content
20
+ self.letters.downcase
21
+ end
22
+
23
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module BugeaterPalindrome
4
+ VERSION = "0.1.0"
5
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bugeater_palindrome
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jason Steele
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest-reporters
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.2.0
41
+ description: Example gem.
42
+ email:
43
+ - jason@bugeaterdev.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
+ - bugeater_palindrome.gemspec
56
+ - lib/bugeater_palindrome.rb
57
+ - lib/bugeater_palindrome/version.rb
58
+ homepage: https://github.com/jasondsteele/bugeater_palindrome.git
59
+ licenses: []
60
+ metadata:
61
+ allowed_push_host: https://rubygems.org
62
+ homepage_uri: https://github.com/jasondsteele/bugeater_palindrome.git
63
+ source_code_uri: https://github.com/jasondsteele/bugeater_palindrome.git
64
+ changelog_uri: https://github.com/jasondsteele/bugeater_palindrome.git
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 2.4.0
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubygems_version: 3.0.8
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Palindrome gem
84
+ test_files: []