Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
le0n committed Jun 26, 2023
1 parent 78a1115 commit fa3b955
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ gemspec
gem "rake", "~> 13.0"

gem "minitest", "~> 5.0"
gem 'minitest-reporters', '1.6.0'
56 changes: 31 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,45 @@
# Lz196Palindrome
# Palindrome detector

TODO: Delete this and the text below, and describe your gem

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/lz196_palindrome`. To experiment with that code, run `bin/console` for an interactive prompt.
`Lz196Palindrome` is a sample Ruby gem created in [*Learn Enough Ruby to Be Dangerous*](https://www.learnenough.com/ruby-tutorial) by Leon.

## Installation

TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.

Install the gem and add to the application's Gemfile by executing:

$ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
To install `Lz196Palindrome`, add this line to your application's `Gemfile`:

If bundler is not being used to manage dependencies, install the gem by executing:
```
gem 'mhartl_palindrome'
```

$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG

## Usage
Then install as follows:

TODO: Write usage instructions here
```
$ bundle install
```

## Development
Or install it directly using `gem`:

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.
```
$ gem install Lz196Palindrome
```

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).

## Contributing
## Usage

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lz196_palindrome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lz196_palindrome/blob/master/CODE_OF_CONDUCT.md).
`Lz196Palindrome` adds a `palindrome?` method to the `String` class, and can be used as follows:

```
$ irb
>> require 'Lz196Palindrome'
>> "honey badger".palindrome?
=> false
>> "deified".palindrome?
=> true
>> "Able was I, ere I saw Elba.".palindrome?
=> true
>> phrase = "Madam, I'm Adam."
>> phrase.palindrome?
=> true
```

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Lz196Palindrome project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lz196_palindrome/blob/master/CODE_OF_CONDUCT.md).
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
9 changes: 4 additions & 5 deletions lz196_palindrome.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ Gem::Specification.new do |spec|
spec.authors = ["Leon Zheng"]
spec.email = ["[email protected]"]

spec.summary = "TODO: Write a short summary, because RubyGems requires one."
spec.description = "TODO: Write a longer description or delete this line."
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.summary = "Palindrome detector"
spec.description = "Learn Enough Ruby palindrome detector"
spec.homepage = "https://github.com/le0n"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.6.0"

spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand All @@ -30,6 +28,7 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]


# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"
Expand Down
2 changes: 2 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
require "lz196_palindrome"

require "minitest/autorun"
require "minitest/reporters"
Minitest::Reporters.use!

0 comments on commit fa3b955

Please sign in to comment.