From b86349fde74e46968c0a283aaa46acc8d69b6a85 Mon Sep 17 00:00:00 2001 From: Prashant Anantharaman Date: Fri, 9 Sep 2016 10:23:29 -0700 Subject: [PATCH 1/2] Add more documentation for Ruby binding --- src/bindings/ruby/README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/bindings/ruby/README.md b/src/bindings/ruby/README.md index ae29459..480f255 100644 --- a/src/bindings/ruby/README.md +++ b/src/bindings/ruby/README.md @@ -21,12 +21,37 @@ Ruby bindings for [hammer](https://github.com/UpstandingHackers/hammer), a parsi ## Installation -TODO +1. Download the hammer source code, and make it available system wide with the bindings. + + `git clone https://github.com/UpstandingHackers/hammer` + `cd hammer` + + `scons bindings=ruby` + + `sudo scons bindings=ruby install` + +2. On linux, you will have to do + + `sudo ldconfig` + +3. Build the gem + `gem build hammer-parser.gemspec` + +4. Install the gem + `gem install hammer-parser-x.x.x.gem` ## Examples +Add hammer to your Gemfile. + + `gem 'hammer-parser'` + +Use hammer in your project. + + `require 'hammer'` + ### Building a parser ```ruby From 257ba3ff7debb28a97e4ebde1f148697cfabb03e Mon Sep 17 00:00:00 2001 From: Prashant Anantharaman Date: Fri, 9 Sep 2016 10:33:50 -0700 Subject: [PATCH 2/2] Add email, home page and license to gemspec --- src/bindings/ruby/hammer-parser.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bindings/ruby/hammer-parser.gemspec b/src/bindings/ruby/hammer-parser.gemspec index 18b4db7..9a4a616 100644 --- a/src/bindings/ruby/hammer-parser.gemspec +++ b/src/bindings/ruby/hammer-parser.gemspec @@ -5,9 +5,9 @@ Gem::Specification.new do |s| s.summary = 'Ruby bindings to the hammer parsing library.' s.description = s.summary # TODO: longer description? s.authors = ['Meredith L. Patterson', 'TQ Hirsch', 'Jakob Rath'] - # TODO: - # s.email = ... - # s.homepage = ... + s.email = 'hammer@upstandinghackers.com' + s.homepage = 'https://github.com/UpstandingHackers/hammer' + s.license = 'GPL-2.0' files = [] files << 'README.md'