-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gemspec, add final
@q
methods, update docs
- Loading branch information
1 parent
0dcae7f
commit d2cd767
Showing
4 changed files
with
91 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,76 @@ | ||
# Aura::Rb | ||
# aura-rb | ||
|
||
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/aura/rb`. To experiment with that code, run `bin/console` for an interactive prompt. | ||
Parsing, conversion, and validation for Urbit date, phonetic name, and number | ||
auras. | ||
|
||
## Installation | ||
|
||
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_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_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG | ||
$ bundle add urbit-aura | ||
|
||
If bundler is not being used to manage dependencies, install the gem by executing: | ||
If bundler is not being used to manage dependencies, install the gem by | ||
executing: | ||
|
||
$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG | ||
$ gem install urbit-aura | ||
|
||
## Usage | ||
|
||
TODO: Write usage instructions here | ||
```ruby | ||
require 'aura' | ||
|
||
Aura.version # => "0.1.0" | ||
|
||
# @p | ||
Aura::P.patp(0) # => "~zod" | ||
Aura::P.patp("0") # => "~zod" | ||
Aura::P.hex2patp("0x12345678") # => "~milbyt-wacmeg" | ||
Aura::P.patp2hex("~zod") # => "00" | ||
Aura::P.patp2dec("~zod") # => 0 | ||
Aura::P.clan("~zod") # => "galaxy" | ||
Aura::P.clan("~mastyr-bottec") # => "planet" | ||
Aura::P.sein("~mastyr-bottec") # => "~wanzod" | ||
Aura::P.valid_pat?("~zod") # => true | ||
Aura::P.valid_patp?("invalid") # => false | ||
Aura::P.pre_sig("zod") # => "~zod" | ||
Aura::P.de_sig("~zod") # => "zod" | ||
Aura::P.cite("~mastyr-bottec") # => "~mastyr-bottec" | ||
|
||
# @q | ||
Aura::Q.patq(123456) # => "~doznec-fitrys" | ||
Aura::Q.patq("123456") # => "~doznec-fitrys" | ||
Aura::Q.hex2patq("1e240") # => "~doznec-fitrys" | ||
Aura::Q.hex2patq("0x1e240") # => "~doznec-fitrys" | ||
Aura::Q.patq2hex("~doznec-fitrys") # => "0001e240" | ||
Aura::Q.patq2dec("~doznec-fitrys") # => 123456 | ||
Aura::Q.valid_patq?("~doznec-fitrys") # => true | ||
Aura::Q.valid_patq?("invalid") # => false | ||
``` | ||
|
||
## Development | ||
|
||
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. | ||
TODO: | ||
|
||
- [ ] Tests | ||
- [ ] Dates (`@da`) | ||
- [ ] More numbers (`@uv`, `@ud`, etc...) | ||
|
||
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. | ||
|
||
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). | ||
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 | ||
|
||
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/aura-rb. | ||
Bug reports and pull requests are welcome on GitHub at | ||
https://github.com/urbit/aura-rb. | ||
|
||
## License | ||
|
||
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). | ||
The gem is available as open source under the terms of the | ||
[MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters