Skip to content

Commit

Permalink
in pure ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Jan 5, 2017
1 parent b28ae58 commit 7e814f6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
# RustExample

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/rust_example`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem
A hello-world Ruby gem, written in Rust.

## Installation

Add this line to your application's Gemfile:
Add this to your Gemfile:

```ruby
gem 'rust_example'
gem "rust_example"
```

And then execute:

$ bundle

Or install it yourself as:
## Usage

$ gem install rust_example
Do this:

## Usage
```ruby
require "rust_example"

TODO: Write usage instructions here
puts RustExample.hello
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
Send PRs to the master branch. Don't worry about specifics; we can do code
review in the PR. I am happy to review any PRs, of any "quality", so don't
worry about it being "good enough" or something, just hit send. :)

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rust_example.
Bug reports and pull requests are welcome on GitHub at
https://github.com/steveklabnik/rust_example.

4 changes: 3 additions & 1 deletion lib/rust_example.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "rust_example/version"

module RustExample
# Your code goes here...
def self.hello
"Hello, world"
end
end
2 changes: 1 addition & 1 deletion lib/rust_example/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RustExample
VERSION = "1.0.0"
VERSION = "0.3.0"
end
6 changes: 3 additions & 3 deletions rust_example.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Gem::Specification.new do |spec|
spec.authors = ["Steve Klabnik"]
spec.email = ["steve@steveklabnik.com"]

spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
spec.description = %q{TODO: Write a longer description or delete this line.}
spec.homepage = "TODO: Put your gem's website or public repo URL here."
spec.summary = %q{A Ruby gem, in Rust.}
spec.description = %q{A Ruby gem, in Rust. Check out its README to learn how to make one of your own.}
spec.homepage = "http://github.com/steveklabnik/rust_example"

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
Expand Down

0 comments on commit 7e814f6

Please sign in to comment.