carbon 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
22
+ Gemfile.lock
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Brighter Planet, Inc.
1
+ Copyright (c) 2011 Brighter Planet, Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.rdoc CHANGED
@@ -133,6 +133,27 @@ You should get an API key from http://keys.brighterplanet.com and set it globall
133
133
 
134
134
  Now all of your queries will use that key.
135
135
 
136
+ == Timeframes and 0.0kg results
137
+
138
+ You submit this query about a flight in 2009, but the result is 0.0 kilograms. Why?
139
+
140
+ $ carbon
141
+ carbon-> flight
142
+ [...]
143
+ flight*> date '2009-05-03'
144
+ => 0.0 kg CO2e
145
+ flight*> url
146
+ => http://carbon.brighterplanet.com/flights.json?date=2009-05-03
147
+
148
+ It's telling you that a flight in 2009 did not result in any 2011 emissions (the default timeframe is the current year).
149
+
150
+ flight*> timeframe '2009'
151
+ => 847.542137647608 kg CO2e
152
+ flight*> url
153
+ => http://carbon.brighterplanet.com/flights.json?date=2009-05-03&timeframe=2009-01-01/2010-01-01
154
+
155
+ So, 850 kilograms emitted in 2009.
156
+
136
157
  == Attribute serialization
137
158
 
138
159
  Your objects' attributes are serialized via <tt>#to_characteristic</tt> or <tt>#to_param</tt> (in that order of preference) before being submitted to the web service.
@@ -232,4 +253,4 @@ This library includes a special console for performing calculations interactivel
232
253
 
233
254
  == Copyright
234
255
 
235
- Copyright (c) 2010 Brighter Planet.
256
+ Copyright (c) 2011 Brighter Planet.
data/Rakefile CHANGED
@@ -1,64 +1,28 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gemspec|
7
- gemspec.name = 'carbon'
8
- gemspec.summary = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com).}
9
- gemspec.description = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com). By querying the web service, it can estimate the carbon emissions of many real-life objects, such as cars and houses, based on particular attributes that they may have.}
10
- gemspec.email = 'derek.kastner@brighterplanet.com'
11
- gemspec.homepage = 'http://carbon.brighterplanet.com/libraries'
12
- gemspec.authors = ['Derek Kastner', 'Seamus Abshere', 'Andy Rossmeissl']
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
13
3
 
14
- gemspec.add_dependency 'activesupport', '>=2.3.5'
15
- gemspec.add_dependency 'nap', '>=0.4'
16
- gemspec.add_dependency 'timeframe', '>=0.0.7'
17
- # This is still only on Rubyforge
18
- gemspec.add_dependency 'blockenspiel', '>=0.3.2'
19
- gemspec.add_dependency 'conversions', '~>1'
4
+ require 'rspec/core/rake_task'
20
5
 
21
- gemspec.add_development_dependency 'fakeweb', '>=1.2.8'
22
- # sabshere 7/16/10 if you're having trouble running specs, try "rspec spec" and/or "sudo gem install rspec --pre"
23
- # sabshere 7/20/10 this might not work with activesupport 2
24
- gemspec.add_development_dependency 'rspec', '>=2.0.0.beta.17'
25
- end
26
- Jeweler::GemcutterTasks.new
27
- rescue LoadError
28
- puts "Jeweler not available. Install it with: gem install jeweler"
6
+ desc "Run all examples"
7
+ RSpec::Core::RakeTask.new('examples') do |c|
8
+ c.rspec_opts = '-Ispec'
29
9
  end
30
10
 
31
- require 'rake/testtask'
32
- Rake::TestTask.new(:test) do |test|
33
- test.libs << 'lib' << 'test'
34
- test.pattern = 'test/**/test_*.rb'
35
- test.verbose = true
36
- end
11
+ task :default => :examples
37
12
 
38
- begin
39
- require 'rcov/rcovtask'
40
- Rcov::RcovTask.new do |test|
41
- test.libs << 'test'
42
- test.pattern = 'test/**/test_*.rb'
43
- test.verbose = true
44
- end
45
- rescue LoadError
46
- task :rcov do
47
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
48
- end
13
+ desc "Run specs with RCov"
14
+ RSpec::Core::RakeTask.new(:examples_with_coverage) do |t|
15
+ t.rcov = true
16
+ t.rcov_opts = ['--exclude', 'spec']
17
+ t.rspec_opts = '-Ispec'
49
18
  end
50
19
 
51
- task :test => :check_dependencies
52
-
53
- task :default => :test
54
-
20
+ require 'rake'
55
21
  require 'rake/rdoctask'
56
22
  Rake::RDocTask.new do |rdoc|
57
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
58
-
59
23
  rdoc.rdoc_dir = 'rdoc'
60
- rdoc.title = "carbon #{version}"
61
- rdoc.rdoc_files.include('README.rdoc')
62
- rdoc.rdoc_files.include('doc/*.rdoc')
24
+ rdoc.title = 'carbon'
25
+ rdoc.options << '--line-numbers' << '--inline-source'
26
+ rdoc.rdoc_files.include('README*')
63
27
  rdoc.rdoc_files.include('lib/**/*.rb')
64
28
  end
data/carbon.gemspec CHANGED
@@ -1,118 +1,30 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "carbon/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{carbon}
8
- s.version = "1.0.3"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Derek Kastner", "Seamus Abshere", "Andy Rossmeissl"]
12
- s.date = %q{2010-11-19}
13
- s.default_executable = %q{carbon}
6
+ s.name = "carbon"
7
+ s.version = Carbon::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['Derek Kastner', 'Seamus Abshere', 'Andy Rossmeissl']
10
+ s.email = ['derek.kastner@brighterplanet.com']
11
+ s.homepage = 'https://github.com/brighterplanet/carbon'
12
+ s.summary = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com).}
14
13
  s.description = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com). By querying the web service, it can estimate the carbon emissions of many real-life objects, such as cars and houses, based on particular attributes that they may have.}
15
- s.email = %q{derek.kastner@brighterplanet.com}
16
- s.executables = ["carbon"]
17
- s.extra_rdoc_files = [
18
- "README.rdoc"
19
- ]
20
- s.files = [
21
- "Gemfile",
22
- "Gemfile.lock",
23
- "MIT-LICENSE.txt",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "bin/carbon",
28
- "carbon.gemspec",
29
- "doc/INTEGRATION_GUIDE.rdoc",
30
- "doc/examining-response-with-jsonview.png",
31
- "doc/shell_example",
32
- "doc/timeout-error.png",
33
- "doc/with-committee-reports.png",
34
- "doc/without-committee-reports.png",
35
- "lib/carbon.rb",
36
- "lib/carbon/base.rb",
37
- "lib/carbon/cli.rb",
38
- "lib/carbon/cli/emitter.rb",
39
- "lib/carbon/cli/environment.rb",
40
- "lib/carbon/cli/irb.rb",
41
- "lib/carbon/cli/shell.rb",
42
- "lib/carbon/emission_estimate.rb",
43
- "lib/carbon/emission_estimate/request.rb",
44
- "lib/carbon/emission_estimate/response.rb",
45
- "lib/carbon/emission_estimate/storage.rb",
46
- "spec/lib/carbon/cli/shell_spec.rb",
47
- "spec/lib/carbon/emission_estimate/response_spec.rb",
48
- "spec/lib/carbon_spec.rb",
49
- "spec/spec_helper.rb",
50
- "spec/specwatchr"
51
- ]
52
- s.homepage = %q{http://carbon.brighterplanet.com/libraries}
53
- s.require_paths = ["lib"]
54
- s.rubygems_version = %q{1.3.7}
55
- s.summary = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com).}
56
- s.test_files = [
57
- "spec/lib/carbon/cli/shell_spec.rb",
58
- "spec/lib/carbon/emission_estimate/response_spec.rb",
59
- "spec/lib/carbon_spec.rb",
60
- "spec/spec_helper.rb"
61
- ]
62
14
 
63
- if s.respond_to? :specification_version then
64
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
65
- s.specification_version = 3
15
+ s.rubyforge_project = "carbon"
66
16
 
67
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
68
- s.add_runtime_dependency(%q<carbon>, [">= 0"])
69
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
70
- s.add_runtime_dependency(%q<nap>, [">= 0.4"])
71
- s.add_runtime_dependency(%q<timeframe>, [">= 0.0.7"])
72
- s.add_runtime_dependency(%q<blockenspiel>, [">= 0.3.2"])
73
- s.add_runtime_dependency(%q<conversions>, ["~> 1"])
74
- s.add_development_dependency(%q<fakeweb>, [">= 1.2.8"])
75
- s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
76
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
77
- s.add_runtime_dependency(%q<nap>, [">= 0.4"])
78
- s.add_runtime_dependency(%q<timeframe>, [">= 0.0.7"])
79
- s.add_runtime_dependency(%q<blockenspiel>, [">= 0.3.2"])
80
- s.add_runtime_dependency(%q<conversions>, ["~> 1"])
81
- s.add_development_dependency(%q<fakeweb>, [">= 1.2.8"])
82
- s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
83
- else
84
- s.add_dependency(%q<carbon>, [">= 0"])
85
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
86
- s.add_dependency(%q<nap>, [">= 0.4"])
87
- s.add_dependency(%q<timeframe>, [">= 0.0.7"])
88
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
89
- s.add_dependency(%q<conversions>, ["~> 1"])
90
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
91
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
92
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
93
- s.add_dependency(%q<nap>, [">= 0.4"])
94
- s.add_dependency(%q<timeframe>, [">= 0.0.7"])
95
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
96
- s.add_dependency(%q<conversions>, ["~> 1"])
97
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
98
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
99
- end
100
- else
101
- s.add_dependency(%q<carbon>, [">= 0"])
102
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
103
- s.add_dependency(%q<nap>, [">= 0.4"])
104
- s.add_dependency(%q<timeframe>, [">= 0.0.7"])
105
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
106
- s.add_dependency(%q<conversions>, ["~> 1"])
107
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
108
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
109
- s.add_dependency(%q<activesupport>, [">= 2.3.5"])
110
- s.add_dependency(%q<nap>, [">= 0.4"])
111
- s.add_dependency(%q<timeframe>, [">= 0.0.7"])
112
- s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
113
- s.add_dependency(%q<conversions>, ["~> 1"])
114
- s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
115
- s.add_dependency(%q<rspec>, [">= 2.0.0.beta.17"])
116
- end
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency 'activesupport', '>=2.3.5'
23
+ s.add_dependency 'i18n' # activesupport?
24
+ s.add_dependency 'nap'
25
+ s.add_dependency 'timeframe'
26
+ s.add_dependency 'blockenspiel'
27
+ s.add_dependency 'conversions'
28
+ s.add_development_dependency 'fakeweb'
29
+ s.add_development_dependency 'rspec'
117
30
  end
118
-
data/lib/carbon/cli.rb CHANGED
@@ -16,7 +16,7 @@ require 'carbon/cli/irb'
16
16
  require 'conversions'
17
17
 
18
18
  if File.exist?(dotfile = File.join(ENV['HOME'], '.carbon_middleware'))
19
- if (key = IO.read(dotfile).strip).present?
19
+ if (key = File.read(dotfile).strip).present?
20
20
  ::Carbon.key = key
21
21
  end
22
22
  end
@@ -8,7 +8,7 @@ module Carbon
8
8
  characteristics_url = "http://carbon.brighterplanet.com/#{@emitter.to_s.pluralize}/options.json"
9
9
  response = REST.get(characteristics_url)
10
10
  if response.ok?
11
- @characteristics = JSON.parse(response.body)
11
+ @characteristics = ActiveSupport::JSON.decode response.body
12
12
  @characteristics.keys.each do |characteristic|
13
13
  instance_eval <<-meth
14
14
  def #{characteristic}(arg = nil)
@@ -34,12 +34,21 @@ module Carbon
34
34
  end
35
35
  end
36
36
 
37
+ def timeframe(t = nil)
38
+ if t
39
+ @timeframe = t
40
+ emission
41
+ else
42
+ @timeframe
43
+ end
44
+ end
45
+
37
46
  def emission
38
47
  puts " => #{emission_in_kilograms} kg CO2e"
39
48
  end
40
49
 
41
50
  def emission_in_kilograms
42
- ::Carbon::EmissionEstimate.new(self).to_f
51
+ ::Carbon::EmissionEstimate.new(self, :timeframe => @timeframe).to_f
43
52
  end
44
53
 
45
54
  def lbs
@@ -68,7 +77,7 @@ module Carbon
68
77
  end
69
78
 
70
79
  def url
71
- request = ::Carbon::EmissionEstimate.new(self).request
80
+ request = ::Carbon::EmissionEstimate.new(self, :timeframe => @timeframe).request
72
81
  url = request.url
73
82
  if request.body.present?
74
83
  url << '?'
@@ -79,7 +88,7 @@ module Carbon
79
88
 
80
89
  def methodology
81
90
  first = true
82
- ::Carbon::EmissionEstimate.new(self).reports.each do |report|
91
+ ::Carbon::EmissionEstimate.new(self, :timeframe => @timeframe).reports.each do |report|
83
92
  if first
84
93
  w = ' => '
85
94
  first = false
@@ -92,7 +101,7 @@ module Carbon
92
101
 
93
102
  def reports
94
103
  first = true
95
- ::Carbon::EmissionEstimate.new(self).reports.each do |report|
104
+ ::Carbon::EmissionEstimate.new(self, @timeframe => :timeframe).reports.each do |report|
96
105
  if first
97
106
  w = ' => '
98
107
  first = false
@@ -9,7 +9,7 @@ module Carbon
9
9
  emitters_url = "http://carbon.brighterplanet.com/models.json"
10
10
  response = REST.get(emitters_url)
11
11
  if true || response.ok?
12
- self.emitters = JSON.parse(response.body)
12
+ self.emitters = ActiveSupport::JSON.decode response.body
13
13
  emitters.map(&:underscore).each do |e|
14
14
  define_method e.to_sym do |*args|
15
15
  if args.any? and num = args.first and saved = $emitters[e.to_sym][num]
@@ -27,8 +27,9 @@ module Carbon
27
27
  attr_accessor :guid
28
28
  attr_reader :emitter
29
29
 
30
- def initialize(emitter)
30
+ def initialize(emitter, options = {})
31
31
  @emitter = emitter
32
+ take_options options unless options.empty?
32
33
  end
33
34
 
34
35
  VALID_OPTIONS = [:callback_content_type, :key, :callback, :timeframe, :guid, :timeout, :defer]
@@ -0,0 +1,3 @@
1
+ module Carbon
2
+ VERSION = '1.0.4'
3
+ end
@@ -16,7 +16,7 @@ describe Carbon::Cli::Shell do
16
16
  describe '.init' do
17
17
  it 'should create methods for each model' do
18
18
  Carbon::Cli::Shell.init
19
- Carbon::Cli::Shell.instance_methods.should include(:automobile)
19
+ Carbon::Cli::Shell.instance_methods.should include('automobile')
20
20
  end
21
21
  it 'should exit if the models cannot be fetched' do
22
22
  pending
@@ -1,6 +1,4 @@
1
1
  require 'spec_helper'
2
- require 'active_support/json/encoding'
3
- require 'fakeweb'
4
2
 
5
3
  CALLBACK_URL = 'http://www.postbin.org/1dj0146'
6
4
  KEY = 'valid'
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.setup
2
4
  require 'rspec'
3
- #begin
4
- # require 'ruby-debug'
5
- #rescue
6
- #end
7
-
5
+ require 'active_support/json/encoding'
6
+ require 'fakeweb'
7
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
8
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
9
  require 'carbon'
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 31
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 0
8
- - 3
9
- version: 1.0.3
9
+ - 4
10
+ version: 1.0.4
10
11
  platform: ruby
11
12
  authors:
12
13
  - Derek Kastner
@@ -16,245 +17,138 @@ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
19
 
19
- date: 2010-11-19 00:00:00 -05:00
20
- default_executable: carbon
20
+ date: 2011-02-03 00:00:00 -06:00
21
+ default_executable:
21
22
  dependencies:
22
23
  - !ruby/object:Gem::Dependency
23
- name: carbon
24
+ name: activesupport
25
+ prerelease: false
24
26
  requirement: &id001 !ruby/object:Gem::Requirement
25
27
  none: false
26
28
  requirements:
27
29
  - - ">="
28
30
  - !ruby/object:Gem::Version
31
+ hash: 9
29
32
  segments:
30
- - 0
31
- version: "0"
33
+ - 2
34
+ - 3
35
+ - 5
36
+ version: 2.3.5
32
37
  type: :runtime
33
- prerelease: false
34
38
  version_requirements: *id001
35
39
  - !ruby/object:Gem::Dependency
36
- name: activesupport
40
+ name: i18n
41
+ prerelease: false
37
42
  requirement: &id002 !ruby/object:Gem::Requirement
38
43
  none: false
39
44
  requirements:
40
45
  - - ">="
41
46
  - !ruby/object:Gem::Version
47
+ hash: 3
42
48
  segments:
43
- - 2
44
- - 3
45
- - 5
46
- version: 2.3.5
49
+ - 0
50
+ version: "0"
47
51
  type: :runtime
48
- prerelease: false
49
52
  version_requirements: *id002
50
53
  - !ruby/object:Gem::Dependency
51
54
  name: nap
55
+ prerelease: false
52
56
  requirement: &id003 !ruby/object:Gem::Requirement
53
57
  none: false
54
58
  requirements:
55
59
  - - ">="
56
60
  - !ruby/object:Gem::Version
61
+ hash: 3
57
62
  segments:
58
63
  - 0
59
- - 4
60
- version: "0.4"
64
+ version: "0"
61
65
  type: :runtime
62
- prerelease: false
63
66
  version_requirements: *id003
64
67
  - !ruby/object:Gem::Dependency
65
68
  name: timeframe
69
+ prerelease: false
66
70
  requirement: &id004 !ruby/object:Gem::Requirement
67
71
  none: false
68
72
  requirements:
69
73
  - - ">="
70
74
  - !ruby/object:Gem::Version
75
+ hash: 3
71
76
  segments:
72
77
  - 0
73
- - 0
74
- - 7
75
- version: 0.0.7
78
+ version: "0"
76
79
  type: :runtime
77
- prerelease: false
78
80
  version_requirements: *id004
79
81
  - !ruby/object:Gem::Dependency
80
82
  name: blockenspiel
83
+ prerelease: false
81
84
  requirement: &id005 !ruby/object:Gem::Requirement
82
85
  none: false
83
86
  requirements:
84
87
  - - ">="
85
88
  - !ruby/object:Gem::Version
89
+ hash: 3
86
90
  segments:
87
91
  - 0
88
- - 3
89
- - 2
90
- version: 0.3.2
92
+ version: "0"
91
93
  type: :runtime
92
- prerelease: false
93
94
  version_requirements: *id005
94
95
  - !ruby/object:Gem::Dependency
95
96
  name: conversions
97
+ prerelease: false
96
98
  requirement: &id006 !ruby/object:Gem::Requirement
97
99
  none: false
98
100
  requirements:
99
- - - ~>
101
+ - - ">="
100
102
  - !ruby/object:Gem::Version
103
+ hash: 3
101
104
  segments:
102
- - 1
103
- version: "1"
105
+ - 0
106
+ version: "0"
104
107
  type: :runtime
105
- prerelease: false
106
108
  version_requirements: *id006
107
109
  - !ruby/object:Gem::Dependency
108
110
  name: fakeweb
111
+ prerelease: false
109
112
  requirement: &id007 !ruby/object:Gem::Requirement
110
113
  none: false
111
114
  requirements:
112
115
  - - ">="
113
116
  - !ruby/object:Gem::Version
117
+ hash: 3
114
118
  segments:
115
- - 1
116
- - 2
117
- - 8
118
- version: 1.2.8
119
+ - 0
120
+ version: "0"
119
121
  type: :development
120
- prerelease: false
121
122
  version_requirements: *id007
122
123
  - !ruby/object:Gem::Dependency
123
124
  name: rspec
125
+ prerelease: false
124
126
  requirement: &id008 !ruby/object:Gem::Requirement
125
127
  none: false
126
128
  requirements:
127
129
  - - ">="
128
130
  - !ruby/object:Gem::Version
131
+ hash: 3
129
132
  segments:
130
- - 2
131
- - 0
132
133
  - 0
133
- - beta
134
- - 17
135
- version: 2.0.0.beta.17
134
+ version: "0"
136
135
  type: :development
137
- prerelease: false
138
136
  version_requirements: *id008
139
- - !ruby/object:Gem::Dependency
140
- name: activesupport
141
- requirement: &id009 !ruby/object:Gem::Requirement
142
- none: false
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- segments:
147
- - 2
148
- - 3
149
- - 5
150
- version: 2.3.5
151
- type: :runtime
152
- prerelease: false
153
- version_requirements: *id009
154
- - !ruby/object:Gem::Dependency
155
- name: nap
156
- requirement: &id010 !ruby/object:Gem::Requirement
157
- none: false
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- segments:
162
- - 0
163
- - 4
164
- version: "0.4"
165
- type: :runtime
166
- prerelease: false
167
- version_requirements: *id010
168
- - !ruby/object:Gem::Dependency
169
- name: timeframe
170
- requirement: &id011 !ruby/object:Gem::Requirement
171
- none: false
172
- requirements:
173
- - - ">="
174
- - !ruby/object:Gem::Version
175
- segments:
176
- - 0
177
- - 0
178
- - 7
179
- version: 0.0.7
180
- type: :runtime
181
- prerelease: false
182
- version_requirements: *id011
183
- - !ruby/object:Gem::Dependency
184
- name: blockenspiel
185
- requirement: &id012 !ruby/object:Gem::Requirement
186
- none: false
187
- requirements:
188
- - - ">="
189
- - !ruby/object:Gem::Version
190
- segments:
191
- - 0
192
- - 3
193
- - 2
194
- version: 0.3.2
195
- type: :runtime
196
- prerelease: false
197
- version_requirements: *id012
198
- - !ruby/object:Gem::Dependency
199
- name: conversions
200
- requirement: &id013 !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ~>
204
- - !ruby/object:Gem::Version
205
- segments:
206
- - 1
207
- version: "1"
208
- type: :runtime
209
- prerelease: false
210
- version_requirements: *id013
211
- - !ruby/object:Gem::Dependency
212
- name: fakeweb
213
- requirement: &id014 !ruby/object:Gem::Requirement
214
- none: false
215
- requirements:
216
- - - ">="
217
- - !ruby/object:Gem::Version
218
- segments:
219
- - 1
220
- - 2
221
- - 8
222
- version: 1.2.8
223
- type: :development
224
- prerelease: false
225
- version_requirements: *id014
226
- - !ruby/object:Gem::Dependency
227
- name: rspec
228
- requirement: &id015 !ruby/object:Gem::Requirement
229
- none: false
230
- requirements:
231
- - - ">="
232
- - !ruby/object:Gem::Version
233
- segments:
234
- - 2
235
- - 0
236
- - 0
237
- - beta
238
- - 17
239
- version: 2.0.0.beta.17
240
- type: :development
241
- prerelease: false
242
- version_requirements: *id015
243
137
  description: Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com). By querying the web service, it can estimate the carbon emissions of many real-life objects, such as cars and houses, based on particular attributes that they may have.
244
- email: derek.kastner@brighterplanet.com
138
+ email:
139
+ - derek.kastner@brighterplanet.com
245
140
  executables:
246
141
  - carbon
247
142
  extensions: []
248
143
 
249
- extra_rdoc_files:
250
- - README.rdoc
144
+ extra_rdoc_files: []
145
+
251
146
  files:
147
+ - .gitignore
252
148
  - Gemfile
253
- - Gemfile.lock
254
149
  - MIT-LICENSE.txt
255
150
  - README.rdoc
256
151
  - Rakefile
257
- - VERSION
258
152
  - bin/carbon
259
153
  - carbon.gemspec
260
154
  - doc/INTEGRATION_GUIDE.rdoc
@@ -274,13 +168,14 @@ files:
274
168
  - lib/carbon/emission_estimate/request.rb
275
169
  - lib/carbon/emission_estimate/response.rb
276
170
  - lib/carbon/emission_estimate/storage.rb
171
+ - lib/carbon/version.rb
277
172
  - spec/lib/carbon/cli/shell_spec.rb
278
173
  - spec/lib/carbon/emission_estimate/response_spec.rb
279
174
  - spec/lib/carbon_spec.rb
280
175
  - spec/spec_helper.rb
281
176
  - spec/specwatchr
282
177
  has_rdoc: true
283
- homepage: http://carbon.brighterplanet.com/libraries
178
+ homepage: https://github.com/brighterplanet/carbon
284
179
  licenses: []
285
180
 
286
181
  post_install_message:
@@ -293,6 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
293
188
  requirements:
294
189
  - - ">="
295
190
  - !ruby/object:Gem::Version
191
+ hash: 3
296
192
  segments:
297
193
  - 0
298
194
  version: "0"
@@ -301,12 +197,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
301
197
  requirements:
302
198
  - - ">="
303
199
  - !ruby/object:Gem::Version
200
+ hash: 3
304
201
  segments:
305
202
  - 0
306
203
  version: "0"
307
204
  requirements: []
308
205
 
309
- rubyforge_project:
206
+ rubyforge_project: carbon
310
207
  rubygems_version: 1.3.7
311
208
  signing_key:
312
209
  specification_version: 3
@@ -316,3 +213,4 @@ test_files:
316
213
  - spec/lib/carbon/emission_estimate/response_spec.rb
317
214
  - spec/lib/carbon_spec.rb
318
215
  - spec/spec_helper.rb
216
+ - spec/specwatchr
data/Gemfile.lock DELETED
@@ -1,45 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- carbon (1.0.1)
5
- activesupport (>= 2.3.5)
6
- blockenspiel (>= 0.3.2)
7
- conversions (~> 1)
8
- nap (>= 0.4)
9
- timeframe (>= 0.0.7)
10
-
11
- GEM
12
- remote: http://rubygems.org/
13
- specs:
14
- activesupport (3.0.0)
15
- blockenspiel (0.4.1)
16
- conversions (1.4.5)
17
- activesupport (>= 2.3.4)
18
- diff-lcs (1.1.2)
19
- fakeweb (1.3.0)
20
- nap (0.4)
21
- rspec (2.0.0.rc)
22
- rspec-core (= 2.0.0.rc)
23
- rspec-expectations (= 2.0.0.rc)
24
- rspec-mocks (= 2.0.0.rc)
25
- rspec-core (2.0.0.rc)
26
- rspec-expectations (2.0.0.rc)
27
- diff-lcs (>= 1.1.2)
28
- rspec-mocks (2.0.0.rc)
29
- rspec-core (= 2.0.0.rc)
30
- rspec-expectations (= 2.0.0.rc)
31
- timeframe (0.0.8)
32
- activesupport (>= 2.3.5)
33
-
34
- PLATFORMS
35
- ruby
36
-
37
- DEPENDENCIES
38
- activesupport (>= 2.3.5)
39
- blockenspiel (>= 0.3.2)
40
- carbon!
41
- conversions (~> 1)
42
- fakeweb (>= 1.2.8)
43
- nap (>= 0.4)
44
- rspec (>= 2.0.0.beta.17)
45
- timeframe (>= 0.0.7)
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.3