carbon 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ $:.unshift File.expand_path("../lib", __FILE__)
3
3
  require "carbon/version"
4
4
 
5
5
  Gem::Specification.new do |s|
@@ -12,8 +12,6 @@ Gem::Specification.new do |s|
12
12
  s.summary = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com).}
13
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.}
14
14
 
15
- s.rubyforge_project = "carbon"
16
-
17
15
  s.files = `git ls-files`.split("\n")
18
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -31,4 +29,5 @@ Gem::Specification.new do |s|
31
29
  s.add_development_dependency 'rspec'
32
30
  s.add_development_dependency 'aruba'
33
31
  s.add_development_dependency 'rake'
32
+ s.add_development_dependency 'vcr'
34
33
  end
@@ -13,8 +13,10 @@ module Carbon
13
13
 
14
14
  def self.parse(str) #:nodoc:
15
15
  data = ::ActiveSupport::JSON.decode str
16
- # TODO rename to timeframe
17
- data['active_subtimeframe'] = ::Timeframe.interval(data['active_subtimeframe']) if data.has_key? 'active_subtimeframe'
16
+ if data.has_key? 'active_subtimeframe'
17
+ interval = "#{data['active_subtimeframe']['startDate']}/#{data['active_subtimeframe']['endDate']}"
18
+ data['active_subtimeframe'] = Timeframe.interval(interval)
19
+ end
18
20
  data['updated_at'] = ::Time.parse(data['updated_at']) if data.has_key?('updated_at') and data['updated_at'].is_a?(::String)
19
21
  data
20
22
  end
@@ -1,3 +1,3 @@
1
1
  module Carbon
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -0,0 +1,47 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://carbon.brighterplanet.com:80/flights.json
6
+ body: !!null
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - nginx/0.7.67
17
+ date:
18
+ - Thu, 17 Nov 2011 15:53:19 GMT
19
+ content-type:
20
+ - application/json
21
+ transfer-encoding:
22
+ - chunked
23
+ connection:
24
+ - keep-alive
25
+ status:
26
+ - 200 OK
27
+ body: ! '{"emission":1092.2723218858448,"emitter":"Flight","timeframe":"2011-01-01/2012-01-01","emission_units":"kilograms","methodology":"http://impact.brighterplanet.com/flights","execution_id":"UNSUPPORTED","scope":"The
28
+ flight greenhouse gas emission is the anthropogenic greenhouse gas emissions
29
+ attributed to a single passenger on this flight. It includes CO2 emissions from
30
+ combustion of non-biogenic fuel and extra forcing effects of high-altitude fuel
31
+ combustion.","complies":[],"errors":[],"equivalents":{"cars_off_the_road_for_a_year":0.19879356258322375,"cars_off_the_road_for_a_month":2.3833382063549133,"cars_off_the_road_for_a_week":10.327434803430663,"cars_off_the_road_for_a_day":72.48974491427597,"cars_to_priuses_for_a_year":0.3975871251664475,"cars_to_priuses_for_a_month":4.766676412709827,"cars_to_priuses_for_a_week":20.654869606861325,"cars_to_priuses_for_a_day":144.97948982855195,"one_way_domestic_flight":3.5498850461289955,"round_trip_domestic_flight":1.7749425230644977,"one_way_cross_country_flight":1.2473749915936347,"round_trip_cross_country_flight":0.6236874957968174,"vegan_meals_instead_of_non_vegan_ones":878.9373378813549,"days_of_veganism":292.97911262711824,"weeks_of_veganism":41.8536908300218,"months_of_veganism":9.766006829981338,"years_of_veganism":0.802820156586096,"barrels_of_petroleum":2.540625420706475,"canisters_of_bbq_propane":45.5117108360175,"railroad_cars_full_of_coal":0.005461361609429225,"homes_energy_in_a_year":0.10595041522292695,"homes_energy_in_a_month":1.2659436210656942,"homes_energy_in_a_week":5.484299328188827,"homes_energy_in_a_day":38.49932252951037,"homes_electricity_in_a_year":0.1605640313172192,"homes_electricity_in_a_month":1.9213070141972008,"homes_electricity_in_a_week":8.32529963741391,"homes_electricity_in_a_day":58.43547694857081,"homes_with_lowered_thermostat_2_degrees_for_a_winter":5.7333374175788,"homes_with_raised_thermostat_3_degrees_for_a_summer":2.577762679650594,"replaced_refrigerators":1.0999182281390458,"loads_of_cold_laundry":500.8745804686168,"lightbulbs_for_a_year":2.0163347062012695,"lightbulbs_for_a_month":24.537897711165503,"lightbulbs_for_a_week":105.16179460652536,"lightbulbs_for_a_day":736.1358390626432,"lightbulbs_for_an_evening":4416.816126648181,"lightbulbs_to_CFLs_for_a_day":12529.975725977742,"lightbulbs_to_CFLs_for_a_week":1789.9962202047284,"lightbulbs_to_CFLs_for_a_month":417.666367259675,"lightbulbs_to_CFLs_for_a_year":34.32902680455022,"days_with_lightbulbs_to_CFLs":278.4442448397833,"weeks_with_lightbulbs_to_CFLs":39.777281146116806,"months_with_lightbulbs_to_CFLs":9.281037919064023,"years_with_lightbulbs_to_CFLs":0.7624060806763198,"recycled_kgs_of_trash":753.2910681501824,"recycled_bags_of_trash":417.3954837238473},"reports":[{"committee":{"name":"emission"},"conclusion":{"value":1092.2723218858448,"units":"kilograms"},"quorum":{"name":"from
32
+ fuel use and greenhouse gas emission factor"}},{"committee":{"name":"ghg_emission_factor"},"conclusion":5.15214,"quorum":{"name":"from
33
+ fuel and aviation multiplier"}},{"committee":{"name":"aviation_multiplier"},"conclusion":2.0,"quorum":{"name":"default"}},{"committee":{"name":"energy"},"conclusion":{"value":7976.996543941375,"units":"megajoules"},"quorum":{"name":"from
34
+ fuel use and fuel"}},{"committee":{"name":"fuel_use"},"conclusion":212.00361828014084,"quorum":{"name":"from
35
+ fuel per segment, segments per trip, trips, freight_share, passengers, seat
36
+ class multiplier, fuel, date, and timeframe"}},{"committee":{"name":"fuel_per_segment"},"conclusion":8444.423485578423,"quorum":{"name":"from
37
+ adjusted distance per segment and fuel use coefficients"}},{"committee":{"name":"seat_class_multiplier"},"conclusion":1.0,"quorum":{"name":"default"}},{"committee":{"name":"distance_class"},"conclusion":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
38
+ haul"}},"quorum":{"name":"from adjusted distance per segment"}},{"committee":{"name":"adjusted_distance_per_segment"},"conclusion":952.9200693676661,"quorum":{"name":"from
39
+ adjusted distance and segments per trip"}},{"committee":{"name":"adjusted_distance"},"conclusion":1600.905716537679,"quorum":{"name":"from
40
+ distance, route inefficiency factor, and dogleg factor"}},{"committee":{"name":"distance"},"conclusion":1250.472807191592,"quorum":{"name":"default"}},{"committee":{"name":"route_inefficiency_factor"},"conclusion":1.100000023841858,"quorum":{"name":"default"}},{"committee":{"name":"dogleg_factor"},"conclusion":1.1638548181950328,"quorum":{"name":"from
41
+ segments per trip"}},{"committee":{"name":"fuel_use_coefficients"},"conclusion":{"m3":1.0627617772702186e-07,"m2":-0.0001553124677028947,"m1":7.176288726885266,"b":1655.0651026365715},"quorum":{"name":"default"}},{"committee":{"name":"fuel"},"conclusion":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
42
+ Fuel","oxidation_factor":1.0}},"quorum":{"name":"default"}},{"committee":{"name":"passengers"},"conclusion":130,"quorum":{"name":"from
43
+ seats and load factor"}},{"committee":{"name":"seats"},"conclusion":168.87079036564523,"quorum":{"name":"default"}},{"committee":{"name":"load_factor"},"conclusion":0.7706950558978438,"quorum":{"name":"default"}},{"committee":{"name":"freight_share"},"conclusion":0.06795767512927696,"quorum":{"name":"default"}},{"committee":{"name":"trips"},"conclusion":1.7,"quorum":{"name":"default"}},{"committee":{"name":"segments_per_trip"},"conclusion":1.68,"quorum":{"name":"default"}},{"committee":{"name":"date"},"conclusion":"2011-01-01","quorum":{"name":"from
44
+ timeframe"}}],"date":"2011-01-01","segments_per_trip":1.68,"trips":1.7,"freight_share":0.06795767512927696,"load_factor":0.7706950558978438,"seats":168.87079036564523,"passengers":130,"fuel":{"fuel":{"biogenic_fraction":0.0,"carbon_content":18.672,"carbon_content_units":"grams_per_megajoule","co2_biogenic_emission_factor":0.0,"co2_biogenic_emission_factor_units":"kilograms_per_litre","co2_emission_factor":2.57607,"co2_emission_factor_units":"kilograms_per_litre","density":0.8156,"density_units":"kilograms_per_litre","energy_content":37.6267,"energy_content_units":"megajoules_per_litre","name":"Jet
45
+ Fuel","oxidation_factor":1.0}},"fuel_use_coefficients":{"m3":1.0627617772702186e-07,"m2":-0.0001553124677028947,"m1":7.176288726885266,"b":1655.0651026365715},"dogleg_factor":1.1638548181950328,"route_inefficiency_factor":1.100000023841858,"distance":1250.472807191592,"adjusted_distance":1600.905716537679,"adjusted_distance_per_segment":952.9200693676661,"distance_class":{"flight_distance_class":{"distance":1108.0,"distance_units":"kilometres","max_distance":3700.0,"max_distance_units":"kilometres","min_distance":0.0,"min_distance_units":"kilometres","name":"short
46
+ haul"}},"seat_class_multiplier":1.0,"fuel_per_segment":8444.423485578423,"fuel_use":212.00361828014084,"energy":{"value":7976.996543941375,"units":"megajoules"},"aviation_multiplier":2.0,"ghg_emission_factor":5.15214,"carbon":{"value":1092.2723218858448,"units":"kilograms"}}'
47
+ http_version: '1.1'
@@ -0,0 +1,44 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: http://carbon.brighterplanet.com:80/residences.json
6
+ body: !!null
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - nginx/0.7.67
17
+ date:
18
+ - Thu, 17 Nov 2011 16:06:52 GMT
19
+ content-type:
20
+ - application/json
21
+ transfer-encoding:
22
+ - chunked
23
+ connection:
24
+ - keep-alive
25
+ status:
26
+ - 200 OK
27
+ body: ! '{"emission":3913.377091407546,"emitter":"Residence","timeframe":"2011-01-01/2012-01-01","emission_units":"kilograms","methodology":"http://impact.brighterplanet.com/residences","execution_id":"UNSUPPORTED","scope":null,"complies":[],"errors":[],"equivalents":{"cars_off_the_road_for_a_year":0.7122346306361733,"cars_off_the_road_for_a_month":8.538988813451265,"cars_off_the_road_for_a_week":37.000980399258346,"cars_off_the_road_for_a_day":259.71518404835314,"cars_to_priuses_for_a_year":1.4244692612723466,"cars_to_priuses_for_a_month":17.07797762690253,"cars_to_priuses_for_a_week":74.00196079851669,"cars_to_priuses_for_a_day":519.4303680967063,"one_way_domestic_flight":12.718475547074522,"round_trip_domestic_flight":6.359237773537261,"one_way_cross_country_flight":4.469076638387417,"round_trip_cross_country_flight":2.2345383191937085,"vegan_meals_instead_of_non_vegan_ones":3149.043671553464,"days_of_veganism":1049.6812238511545,"weeks_of_veganism":149.95278338855434,"months_of_veganism":34.98950457427486,"years_of_veganism":2.876332162184546,"barrels_of_petroleum":9.10251511461395,"canisters_of_bbq_propane":163.05868326767822,"railroad_cars_full_of_coal":0.01956688545703773,"homes_energy_in_a_year":0.3795975778665319,"homes_energy_in_a_month":4.535604048941346,"homes_energy_in_a_week":19.64906637595729,"homes_energy_in_a_day":137.93480234084177,"homes_electricity_in_a_year":0.5752664324369092,"homes_electricity_in_a_month":6.883630303785873,"homes_electricity_in_a_week":29.827760190708315,"homes_electricity_in_a_day":209.3617610132123,"homes_with_lowered_thermostat_2_degrees_for_a_winter":20.54131635279821,"homes_with_raised_thermostat_3_degrees_for_a_summer":9.23556993572181,"replaced_refrigerators":3.9407707310473987,"loads_of_cold_laundry":1794.526025790027,"lightbulbs_for_a_year":7.22409411073833,"lightbulbs_for_a_month":87.9140163584705,"lightbulbs_for_a_week":376.7721196065357,"lightbulbs_for_a_day":2637.416577377024,"lightbulbs_for_an_evening":15824.503377639234,"lightbulbs_to_CFLs_for_a_day":44892.21138303146,"lightbulbs_to_CFLs_for_a_week":6413.17193661104,"lightbulbs_to_CFLs_for_a_month":1496.4088723436914,"lightbulbs_to_CFLs_for_a_year":122.99352860584776,"days_with_lightbulbs_to_CFLs":997.6059148957943,"weeks_with_lightbulbs_to_CFLs":142.5134535377886,"months_with_lightbulbs_to_CFLs":33.251965145689915,"years_with_lightbulbs_to_CFLs":2.7315372098024673,"recycled_kgs_of_trash":2698.880077974671,"recycled_bags_of_trash":1495.4383548250225},"reports":[{"committee":{"name":"emission"},"conclusion":{"value":3913.377091407546,"units":"kilograms"},"quorum":{"name":"from
28
+ fuel and electricity use and occupation and residents"}},{"committee":{"name":"fuel_oil_consumed"},"conclusion":199.07480656200002,"quorum":{"name":"from
29
+ research"}},{"committee":{"name":"natural_gas_consumed"},"conclusion":42683876171.345726,"quorum":{"name":"from
30
+ research"}},{"committee":{"name":"propane_consumed"},"conclusion":183.25178523799994,"quorum":{"name":"from
31
+ research"}},{"committee":{"name":"biomass_consumed"},"conclusion":3798201078.0000005,"quorum":{"name":"from
32
+ research"}},{"committee":{"name":"kerosene_consumed"},"conclusion":4.050390626,"quorum":{"name":"from
33
+ research"}},{"committee":{"name":"coal_consumed"},"conclusion":2.871239704507795,"quorum":{"name":"from
34
+ research"}},{"committee":{"name":"dirty_electricity_generated"},"conclusion":11462.092843034108,"quorum":{"name":"from
35
+ electricity generated and green electricity"}},{"committee":{"name":"green_electricity"},"conclusion":0.0,"quorum":{"name":"default"}},{"committee":{"name":"electricity_generated"},"conclusion":11462.092843034108,"quorum":{"name":"from
36
+ electricity used and loss rate"}},{"committee":{"name":"electricity_used"},"conclusion":10752.83,"quorum":{"name":"from
37
+ research"}},{"committee":{"name":"missing_annual_energy"},"conclusion":0,"quorum":{"name":"from
38
+ fuel reports"}},{"committee":{"name":"electricity_loss_rate"},"conclusion":0.061879,"quorum":{"name":"default"}},{"committee":{"name":"electricity_emission_factor"},"conclusion":0.6060757767293904,"quorum":{"name":"default"}},{"committee":{"name":"occupation"},"conclusion":0.937,"quorum":{"name":"default"}},{"committee":{"name":"residents"},"conclusion":2.57,"quorum":{"name":"default"}},{"committee":{"name":"air_conditioner_use"},"conclusion":{"air_conditioner_use":{"fugitive_emission":0.4994479354338,"fugitive_emission_units":"kilograms_per_square_metre"}},"quorum":{"name":"default"}},{"committee":{"name":"predicted_fuel_shares"},"conclusion":{"fuel_oil":0.41679323558325115,"natural_gas":0.1613371881024962,"propane":0.25265921858930535,"kerosene":0.008254483221570639,"biomass":0.014356500316711278,"coal":0.0002819952830220514,"electricity":0.14631737890364346},"quorum":{"name":"from
39
+ research"}},{"committee":{"name":"predicted_annual_energy_consumption"},"conclusion":264563159141.1461,"quorum":{"name":"from
40
+ research"}},{"committee":{"name":"predicted_annual_fuel_oil_consumption"},"conclusion":199.07480656200002,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_natural_gas_consumption"},"conclusion":42683876171.345726,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_propane_consumption"},"conclusion":183.25178523799997,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_kerosene_consumption"},"conclusion":4.050390626,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_biomass_consumption"},"conclusion":3798201078.0,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_coal_consumption"},"conclusion":2.871239704507795,"quorum":{"name":"default"}},{"committee":{"name":"predicted_annual_electricity_use"},"conclusion":10752.83,"quorum":{"name":"default"}},{"committee":{"name":"active_subtimeframe"},"conclusion":{"startDate":"2011-01-01","endDate":"2012-01-01"},"quorum":{"name":"from
41
+ acquisition and retirement"}},{"committee":{"name":"acquisition"},"conclusion":"2011-01-01","quorum":{"name":"from
42
+ retirement"}},{"committee":{"name":"retirement"},"conclusion":"2012-01-01","quorum":{"name":"from
43
+ acquisition"}},{"committee":{"name":"floorspace_estimate"},"conclusion":214.47688717440002,"quorum":{"name":"default"}}],"floorspace_estimate":214.47688717440002,"retirement":"2012-01-01","acquisition":"2011-01-01","active_subtimeframe":{"startDate":"2011-01-01","endDate":"2012-01-01"},"predicted_annual_electricity_use":10752.83,"predicted_annual_coal_consumption":2.871239704507795,"predicted_annual_biomass_consumption":3798201078.0,"predicted_annual_kerosene_consumption":4.050390626,"predicted_annual_propane_consumption":183.25178523799997,"predicted_annual_natural_gas_consumption":42683876171.345726,"predicted_annual_fuel_oil_consumption":199.07480656200002,"predicted_annual_energy_consumption":264563159141.1461,"predicted_fuel_shares":{"fuel_oil":0.41679323558325115,"natural_gas":0.1613371881024962,"propane":0.25265921858930535,"kerosene":0.008254483221570639,"biomass":0.014356500316711278,"coal":0.0002819952830220514,"electricity":0.14631737890364346},"air_conditioner_use":{"air_conditioner_use":{"fugitive_emission":0.4994479354338,"fugitive_emission_units":"kilograms_per_square_metre"}},"residents":2.57,"occupation":0.937,"electricity_emission_factor":0.6060757767293904,"electricity_loss_rate":0.061879,"missing_annual_energy":0,"electricity_used":10752.83,"electricity_generated":11462.092843034108,"green_electricity":0.0,"dirty_electricity_generated":11462.092843034108,"coal_consumed":2.871239704507795,"kerosene_consumed":4.050390626,"biomass_consumed":3798201078.0000005,"propane_consumed":183.25178523799994,"natural_gas_consumed":42683876171.345726,"fuel_oil_consumed":199.07480656200002,"carbon":{"value":3913.377091407546,"units":"kilograms"}}'
44
+ http_version: '1.1'
@@ -1,6 +1,26 @@
1
1
  require 'spec_helper'
2
+ require 'uri'
2
3
 
3
4
  describe Carbon::EmissionEstimate do
5
+ describe '.parse' do
6
+ it 'parses a standard CM1 response' do
7
+ response = nil
8
+ VCR.use_cassette('flight', :record => :once) do
9
+ response = Net::HTTP.post_form(URI('http://carbon.brighterplanet.com/flights.json'), {})
10
+ end
11
+ estimate = Carbon::EmissionEstimate.parse response.body
12
+ estimate['emission'].should > 0
13
+ end
14
+ it 'parses a CM1 response with an active_subtimeframe' do
15
+ response = nil
16
+ VCR.use_cassette('residence', :record => :once) do
17
+ response = Net::HTTP.post_form(URI('http://carbon.brighterplanet.com/residences.json'), {})
18
+ end
19
+ estimate = Carbon::EmissionEstimate.parse response.body
20
+ estimate['active_subtimeframe'].should be_a(Timeframe)
21
+ end
22
+ end
23
+
4
24
  describe '#take_options' do
5
25
  it 'accepts the :comply option' do
6
26
  estimate = Carbon::EmissionEstimate.new(RentalCar.new)
@@ -52,3 +52,9 @@ class DonutFactory
52
52
  provide :mixer, :key => :upc
53
53
  end
54
54
  end
55
+
56
+ require 'vcr'
57
+ VCR.config do |c|
58
+ c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
59
+ c.stub_with :fakeweb
60
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2011-07-15 00:00:00.000000000Z
14
+ date: 2011-11-17 00:00:00.000000000Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
- requirement: &2162440820 !ruby/object:Gem::Requirement
18
+ requirement: &2167482440 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 2.3.5
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2162440820
26
+ version_requirements: *2167482440
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: i18n
29
- requirement: &2162440400 !ruby/object:Gem::Requirement
29
+ requirement: &2167482000 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2162440400
37
+ version_requirements: *2167482000
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: nap
40
- requirement: &2162439940 !ruby/object:Gem::Requirement
40
+ requirement: &2167481360 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2162439940
48
+ version_requirements: *2167481360
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: timeframe
51
- requirement: &2162439520 !ruby/object:Gem::Requirement
51
+ requirement: &2167480700 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2162439520
59
+ version_requirements: *2167480700
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: blockenspiel
62
- requirement: &2162439100 !ruby/object:Gem::Requirement
62
+ requirement: &2167480040 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *2162439100
70
+ version_requirements: *2167480040
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: conversions
73
- requirement: &2162438680 !ruby/object:Gem::Requirement
73
+ requirement: &2167479540 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *2162438680
81
+ version_requirements: *2167479540
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: brighter_planet_metadata
84
- requirement: &2162438260 !ruby/object:Gem::Requirement
84
+ requirement: &2167479120 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *2162438260
92
+ version_requirements: *2167479120
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: bombshell
95
- requirement: &2162437840 !ruby/object:Gem::Requirement
95
+ requirement: &2167478680 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0'
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *2162437840
103
+ version_requirements: *2167478680
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: fakeweb
106
- requirement: &2162437420 !ruby/object:Gem::Requirement
106
+ requirement: &2167478180 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: '0'
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2162437420
114
+ version_requirements: *2167478180
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rspec
117
- requirement: &2162437000 !ruby/object:Gem::Requirement
117
+ requirement: &2167477600 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: '0'
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *2162437000
125
+ version_requirements: *2167477600
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: aruba
128
- requirement: &2152166340 !ruby/object:Gem::Requirement
128
+ requirement: &2167476940 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: '0'
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *2152166340
136
+ version_requirements: *2167476940
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rake
139
- requirement: &2152165920 !ruby/object:Gem::Requirement
139
+ requirement: &2167475940 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,7 +144,18 @@ dependencies:
144
144
  version: '0'
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *2152165920
147
+ version_requirements: *2167475940
148
+ - !ruby/object:Gem::Dependency
149
+ name: vcr
150
+ requirement: &2167475060 !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ! '>='
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ type: :development
157
+ prerelease: false
158
+ version_requirements: *2167475060
148
159
  description: Carbon is a Ruby API wrapper for the Brighter Planet emission estimate
149
160
  web service (http://carbon.brighterplanet.com). By querying the web service, it
150
161
  can estimate the carbon emissions of many real-life objects, such as cars and houses,
@@ -181,6 +192,8 @@ files:
181
192
  - lib/carbon/shell.rb
182
193
  - lib/carbon/shell/emitter.rb
183
194
  - lib/carbon/version.rb
195
+ - spec/fixtures/vcr_cassettes/flight.yml
196
+ - spec/fixtures/vcr_cassettes/residence.yml
184
197
  - spec/lib/carbon/emission_estimate/request_spec.rb
185
198
  - spec/lib/carbon/emission_estimate/response_spec.rb
186
199
  - spec/lib/carbon/emission_estimate_spec.rb
@@ -206,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
219
  - !ruby/object:Gem::Version
207
220
  version: '0'
208
221
  requirements: []
209
- rubyforge_project: carbon
210
- rubygems_version: 1.8.5
222
+ rubyforge_project:
223
+ rubygems_version: 1.8.11
211
224
  signing_key:
212
225
  specification_version: 3
213
226
  summary: Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web
@@ -215,6 +228,8 @@ summary: Carbon is a Ruby API wrapper for the Brighter Planet emission estimate
215
228
  test_files:
216
229
  - features/shell.feature
217
230
  - features/support/env.rb
231
+ - spec/fixtures/vcr_cassettes/flight.yml
232
+ - spec/fixtures/vcr_cassettes/residence.yml
218
233
  - spec/lib/carbon/emission_estimate/request_spec.rb
219
234
  - spec/lib/carbon/emission_estimate/response_spec.rb
220
235
  - spec/lib/carbon/emission_estimate_spec.rb