SgNodeMapper
Lightweight ruby wrapper around the Social Graph Node Mapper javascript library.
Installation
Add this line to your application's Gemfile:
gem 'sg_node_mapper'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sg_node_mapper
Usage
This library simply delegates to the javascript library, so you can call
any methods defined in there (see vendor/sg_node_mapper/nodemapper.js
for more details.
SgNodeMapper.url_to_graph_node('http://twitter.com/hecticjeff')
# => "sgn://twitter.com/?ident=hecticjeff"
SgNodeMapper.parse_sgn_url('sgn://twitter.com/?ident=hecticjeff')
# => {"domain"=>"twitter.com", "keyName"=>"ident", "value"=>"hecticjeff"}
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request