https://github.com/faradayio/sniff
Testing for emissions
https://github.com/faradayio/sniff
Last synced: about 1 year ago
JSON representation
Testing for emissions
- Host: GitHub
- URL: https://github.com/faradayio/sniff
- Owner: faradayio
- Created: 2010-06-29T19:57:42.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2012-11-07T13:10:13.000Z (over 13 years ago)
- Last Synced: 2025-02-22T07:17:29.327Z (over 1 year ago)
- Language: Ruby
- Homepage: http://brighterplanet.github.com
- Size: 1.18 MB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# sniff
Development environment for Brighter Planet "emitter" libraries.
## Background
Brighter Planet's impact models, such as [`flight`](http://github.com/brighterplanet/flight), inhabit a complex production runtime environment backing the [CM1 web service](http://carbon.brighterplanet.com). Sniff simulates this environment, including representative data, fixtures, and other supporting code, so that developers can test improvements to the emitters before submitting them back to Brighter Planet.
### Caution
The data and other supporting information in the sniff environment is only representative of production data and in many cases is purely fictional, contrived to return predictable results in tests. Emission estimates and other information gleaned from execution within this environment will undoubtedly be--to put it simply--wrong. For real numbers, always use live queries to [CM1](http://carbon.brighterplanet.com).
## Usage
Sniff is never used directly but rather as a requirement of a specific emitter. Current production emitters include, for example:
* [Automobile](http://github.com/brighterplanet/automobile)
* [Flight](http://github.com/brighterplanet/flight)
* [Residence](http://github.com/brighterplanet/residence)
For a complete list see [CM1's models page](http://carbon.brighterplanet.com/models).
### Rake Task
Sniff comes with a rake task that will load a console with a given earth domain:
require 'sniff'
require 'sniff/rake_task'
Sniff::RakeTask.new do |t|
t.earth_domains = [:air, :locality]
end
At the command prompt, do:
> rake console
irb > ZipCode.first
#=>