Sha256: 2225200e667358051f3e8677f22e32d017c071117498472bc19947ff61941e01
Contents?: true
Size: 1.91 KB
Versions: 3
Compression:
Stored size: 1.91 KB
Contents
== AMEE-Ruby A gem to provide a Ruby interface to the AMEE carbon calculator (http://amee.cc) Licensed under the MIT license (See COPYING file for details) Author: James Smith (james@floppy.org.uk / http://www.floppy.org.uk) Homepage: http://github.com/Floppy/amee-ruby == INSTALLATION 1) Enable gems from github, if you haven't already done so (rubygems >= 1.2): > sudo gem sources -a http://gems.github.com 2) Install gem > sudo gem install Floppy-amee == USAGE Currently, you can read DataCategories, DataItems and DataItemValues. See examples/view_data_*.rb for simple usage examples. You can also get the list of available Profiles and create new ones. See examples/list_profiles.rb and examples/create_profile.rb for details. You can also load ProfileCategories. The gem will use the AMEE JSON API if the JSON gem is installed on the local system. Otherwise the XML API will be used. == INTERACTIVE SHELL You can use the 'ameesh' app to interactively explore the AMEE data area. Run 'ameesh -u USERNAME -p PASSWORD -s SERVER' to try it out. Source code for this tool is in bin/ameesh and lib/amee/shell.rb. Profiles are not accessible through this interface yet. == RAILS This gem can also be used as a Rails plugin. You can either extract it into vendor/plugins, or use the new-style config.gem command in environment.rb. For example: config.gem "Floppy-amee", :lib => "amee", :source => "http://gems.github.com", :version => '>= 0.3.0' The first time you run your app after installing the gem, a config/amee.yml file will be created. You should edit this file and add your AMEE username and password to it, as well as the server you want to connect to. Once that is all set up, you can use AMEE objects within Rails anywhere you like. There is a persistent AMEE connection available called $amee, which you can pass into the other objects to fetch data. For instance: data = AMEE::Data::Category.root($amee)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
Floppy-amee-0.4.0 | README |
Floppy-amee-0.4.1 | README |
Floppy-amee-0.4.2 | README |