purchase 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
| @@ -1,33 +1,85 @@ | |
| 1 1 | 
             
            Feature: Purchase Characterizations
         | 
| 2 2 | 
             
              The purchase model should be characterized
         | 
| 3 3 |  | 
| 4 | 
            +
              Scenario: Merchant characteristic
         | 
| 5 | 
            +
                Given a purchase has "merchant.id" of "2"
         | 
| 6 | 
            +
                When emissions are calculated
         | 
| 7 | 
            +
                Then the "merchant" characteristic should be displayed as "Derek's Fantasy-Mart"
         | 
| 8 | 
            +
             | 
| 4 9 | 
             
              Scenario: Merchant category characteristic
         | 
| 5 10 | 
             
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 6 | 
            -
                And it has "cost" of "100"
         | 
| 7 11 | 
             
                When emissions are calculated
         | 
| 8 12 | 
             
                Then the "merchant_category" characteristic should be displayed as "Fantasy creature product shops"
         | 
| 9 13 |  | 
| 10 14 | 
             
              Scenario: Merchant category industries characteristic
         | 
| 11 15 | 
             
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 12 | 
            -
                And it has "cost" of "100"
         | 
| 13 16 | 
             
                When emissions are calculated
         | 
| 14 17 | 
             
                Then the "merchant_category_industries" characteristic should be displayed as "2 merchant categories"
         | 
| 15 18 |  | 
| 19 | 
            +
              Scenario: Industry characteristic
         | 
| 20 | 
            +
                Given a purchase has "industry.naics_code" of "111111"
         | 
| 21 | 
            +
                When emissions are calculated
         | 
| 22 | 
            +
                Then the "industry" characteristic should be displayed as "A simple industry"
         | 
| 23 | 
            +
             | 
| 16 24 | 
             
              Scenario: Trade industry ratios characteristic
         | 
| 17 25 | 
             
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 18 | 
            -
                And it has "cost" of "100"
         | 
| 19 26 | 
             
                When emissions are calculated
         | 
| 20 27 | 
             
                Then the "trade_industry_ratios" characteristic should be displayed as "1 trade industry ratio"
         | 
| 21 28 |  | 
| 22 29 | 
             
              Scenario: Non-trade industry ratios characteristic
         | 
| 23 30 | 
             
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 24 | 
            -
                And it has "cost" of "100"
         | 
| 25 31 | 
             
                When emissions are calculated
         | 
| 26 32 | 
             
                Then the "non_trade_industry_ratios" characteristic should be displayed as "1 non-trade industry ratio"
         | 
| 27 33 |  | 
| 34 | 
            +
              Scenario: Product line ratios characteristic
         | 
| 35 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 36 | 
            +
                When emissions are calculated
         | 
| 37 | 
            +
                Then the "product_line_ratios" characteristic should be displayed as "2 product line ratios"
         | 
| 38 | 
            +
             | 
| 39 | 
            +
              Scenario: Product line industry product ratios characteristic
         | 
| 40 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 41 | 
            +
                When emissions are calculated
         | 
| 42 | 
            +
                Then the "product_line_industry_product_ratios" characteristic should be displayed as "4 product line industry product ratios"
         | 
| 43 | 
            +
             | 
| 44 | 
            +
              Scenario: Industry product ratios characteristic
         | 
| 45 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 46 | 
            +
                When emissions are calculated
         | 
| 47 | 
            +
                Then the "industry_product_ratios" characteristic should be displayed as "2 industry product ratios"
         | 
| 48 | 
            +
             | 
| 49 | 
            +
              Scenario: Industry ratios characteristic
         | 
| 50 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 51 | 
            +
                When emissions are calculated
         | 
| 52 | 
            +
                Then the "industry_ratios" characteristic should be displayed as "3 industry ratios"
         | 
| 53 | 
            +
             | 
| 54 | 
            +
              Scenario: Industry sector ratios characteristic
         | 
| 55 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 56 | 
            +
                When emissions are calculated
         | 
| 57 | 
            +
                Then the "industry_sector_ratios" characteristic should be displayed as "4 industry sector ratios"
         | 
| 58 | 
            +
             | 
| 59 | 
            +
              Scenario: Industry sector shares characteristic
         | 
| 60 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 61 | 
            +
                When emissions are calculated
         | 
| 62 | 
            +
                Then the "industry_sector_shares" characteristic should be displayed as "4 industry sector shares"
         | 
| 63 | 
            +
             | 
| 64 | 
            +
              Scenario: Sector shares characteristic
         | 
| 65 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 66 | 
            +
                When emissions are calculated
         | 
| 67 | 
            +
                Then the "sector_shares" characteristic should be displayed as "6-element sector shares vector"
         | 
| 68 | 
            +
             | 
| 28 69 | 
             
              Scenario: Sector direct requirements characteristic
         | 
| 29 70 | 
             
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 30 | 
            -
                And it has "cost" of "100"
         | 
| 31 71 | 
             
                When emissions are calculated
         | 
| 32 72 | 
             
                Then the "sector_direct_requirements" characteristic should be displayed as "6x6 sector direct requirements matrix"
         | 
| 33 73 |  | 
| 74 | 
            +
              Scenario: Economic flows characteristic
         | 
| 75 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 76 | 
            +
                When emissions are calculated
         | 
| 77 | 
            +
                Then the "economic_flows" characteristic should be displayed as "6-element economic flows vector"
         | 
| 78 | 
            +
             | 
| 79 | 
            +
              Scenario: Impact vector characteristic
         | 
| 80 | 
            +
                Pending a proper test for impact vector
         | 
| 81 | 
            +
             | 
| 82 | 
            +
              Scenario: Impacts characteristic
         | 
| 83 | 
            +
                Given a purchase has "merchant_category.mcc" of "2222"
         | 
| 84 | 
            +
                When emissions are calculated
         | 
| 85 | 
            +
                Then the "impacts" characteristic should be displayed as "6-element impacts vector"
         | 
| @@ -6,7 +6,7 @@ Feature: Purchase Committee Calculations | |
| 6 6 | 
             
                And a characteristic "purchase_amount" of "107.11"
         | 
| 7 7 | 
             
                When the "cost" committee is calculated
         | 
| 8 8 | 
             
                Then the committee should have used quorum "from purchase amount"
         | 
| 9 | 
            -
                And the conclusion of the committee should be "100"
         | 
| 9 | 
            +
                And the conclusion of the committee should be "100.00"
         | 
| 10 10 |  | 
| 11 11 | 
             
              Scenario: Cost committee from purchase amount and tax
         | 
| 12 12 | 
             
                Given a purchase emitter
         | 
| @@ -20,14 +20,14 @@ Feature: Purchase Committee Calculations | |
| 20 20 | 
             
                Given a purchase emitter
         | 
| 21 21 | 
             
                When the "cost" committee is calculated
         | 
| 22 22 | 
             
                Then the committee should have used quorum "default"
         | 
| 23 | 
            -
                Then the conclusion of the committee should be " | 
| 23 | 
            +
                Then the conclusion of the committee should be "624.00"
         | 
| 24 24 |  | 
| 25 25 | 
             
              Scenario: Adjusted cost committee starting from nothing
         | 
| 26 26 | 
             
                Given a purchase emitter
         | 
| 27 27 | 
             
                When the "date" committee is calculated
         | 
| 28 28 | 
             
                And the "cost" committee is calculated
         | 
| 29 29 | 
             
                And the "adjusted_cost" committee is calculated
         | 
| 30 | 
            -
                Then the conclusion of the committee should be " | 
| 30 | 
            +
                Then the conclusion of the committee should be "516.98426"
         | 
| 31 31 |  | 
| 32 32 | 
             
              Scenario Outline: Adjusted cost committee from cost and date
         | 
| 33 33 | 
             
                Given a purchase emitter
         | 
| @@ -40,12 +40,6 @@ Feature: Purchase Committee Calculations | |
| 40 40 | 
             
                  | 831.23 | 2010-08-01 |     688.67439 |
         | 
| 41 41 | 
             
                  |  11.00 | 2005-07-14 |       9.11350 |
         | 
| 42 42 |  | 
| 43 | 
            -
              Scenario: Merchant category committee from default
         | 
| 44 | 
            -
                Given a purchase emitter
         | 
| 45 | 
            -
                When the "merchant_category" committee is calculated
         | 
| 46 | 
            -
                Then the committee should have used quorum "default"
         | 
| 47 | 
            -
                And the conclusion of the committee should have "mcc" of "5111"
         | 
| 48 | 
            -
             | 
| 49 43 | 
             
              Scenario Outline: Merchant category committee from merchant
         | 
| 50 44 | 
             
                Given a purchase emitter
         | 
| 51 45 | 
             
                And a characteristic "merchant.id" of "<id>"
         | 
| @@ -68,26 +62,26 @@ Feature: Purchase Committee Calculations | |
| 68 62 | 
             
                  | 2222 | 399900 | 0.5   |
         | 
| 69 63 | 
             
                  | 2222 | 459000 | 0.5   |
         | 
| 70 64 |  | 
| 71 | 
            -
              Scenario | 
| 65 | 
            +
              Scenario: Trade industry ratios from default
         | 
| 72 66 | 
             
                Given a purchase emitter
         | 
| 73 | 
            -
                 | 
| 67 | 
            +
                When the "trade_industry_ratios" committee is calculated
         | 
| 68 | 
            +
                Then the committee should have used quorum "default"
         | 
| 69 | 
            +
                And the conclusion of the committee should include a key of "" and value ""
         | 
| 70 | 
            +
             | 
| 71 | 
            +
              Scenario: Trade industry ratios from merchant category industries
         | 
| 72 | 
            +
                Given a purchase emitter
         | 
| 73 | 
            +
                And a characteristic "merchant_category.mcc" of "2222"
         | 
| 74 74 | 
             
                When the "merchant_category_industries" committee is calculated
         | 
| 75 75 | 
             
                And the "trade_industry_ratios" committee is calculated
         | 
| 76 76 | 
             
                Then the committee should have used quorum "from merchant category industries"
         | 
| 77 | 
            -
                And the conclusion of the committee should include a key of " | 
| 78 | 
            -
                Examples:
         | 
| 79 | 
            -
                  | mcc  | naics  | ratio |
         | 
| 80 | 
            -
                  | 2222 | 459000 | 0.5   |
         | 
| 77 | 
            +
                And the conclusion of the committee should include a key of "459000" and value "0.5"
         | 
| 81 78 |  | 
| 82 | 
            -
              Scenario | 
| 79 | 
            +
              Scenario: Trade industry ratios from industry
         | 
| 83 80 | 
             
                Given a purchase emitter
         | 
| 84 | 
            -
                And a characteristic "industry.naics_code" of " | 
| 81 | 
            +
                And a characteristic "industry.naics_code" of "459000"
         | 
| 85 82 | 
             
                When the "trade_industry_ratios" committee is calculated
         | 
| 86 83 | 
             
                Then the committee should have used quorum "from industry"
         | 
| 87 | 
            -
                And the conclusion of the committee should include a key of " | 
| 88 | 
            -
                Examples:
         | 
| 89 | 
            -
                  | naics  |
         | 
| 90 | 
            -
                  | 459000 |
         | 
| 84 | 
            +
                And the conclusion of the committee should include a key of "459000" and value "1"
         | 
| 91 85 |  | 
| 92 86 | 
             
              Scenario: Trade industry ratios from merchant category industries and industry
         | 
| 93 87 | 
             
                Given a purchase emitter
         | 
| @@ -98,6 +92,12 @@ Feature: Purchase Committee Calculations | |
| 98 92 | 
             
                Then the committee should have used quorum "from industry"
         | 
| 99 93 | 
             
                And the conclusion of the committee should include a key of "459000" and value "1"
         | 
| 100 94 |  | 
| 95 | 
            +
              Scenario: Non-trade industry ratios from default
         | 
| 96 | 
            +
                Given a purchase emitter
         | 
| 97 | 
            +
                When the "non_trade_industry_ratios" committee is calculated
         | 
| 98 | 
            +
                Then the committee should have used quorum "default"
         | 
| 99 | 
            +
                And the conclusion of the committee should include a key of "339991" and value "1"
         | 
| 100 | 
            +
             | 
| 101 101 | 
             
              Scenario Outline: Non-trade industry ratios from merchant category industries
         | 
| 102 102 | 
             
                Given a purchase emitter
         | 
| 103 103 | 
             
                And a characteristic "merchant_category.mcc" of "<mcc>"
         | 
| @@ -202,6 +202,7 @@ Feature: Purchase Committee Calculations | |
| 202 202 | 
             
                Examples:
         | 
| 203 203 | 
             
                  | naics  | new_naics | ratio |
         | 
| 204 204 | 
             
                  | 111111 | 111111    | 1.0   |
         | 
| 205 | 
            +
                  | 339991 | 339991    | 1.0   |
         | 
| 205 206 | 
             
                  | 399100 | 399100    | 1.0   |
         | 
| 206 207 | 
             
                  | 399200 | 399200    | 1.0   |
         | 
| 207 208 | 
             
                  | 459000 | 399100    | 0.75  |
         | 
| @@ -258,6 +259,7 @@ Feature: Purchase Committee Calculations | |
| 258 259 | 
             
                Examples:
         | 
| 259 260 | 
             
                  | naics  | io_code | ratio |
         | 
| 260 261 | 
             
                  | 111111 | 111000  | 1.0   |
         | 
| 262 | 
            +
                  | 339991 | 111000  | 1.0   |
         | 
| 261 263 | 
             
                  | 399100 | 3991A0  | 0.75  |
         | 
| 262 264 | 
             
                  | 399100 | 3991B0  | 0.25  |
         | 
| 263 265 | 
             
                  | 459000 | 3991A0  | 0.5625|
         | 
| @@ -278,6 +280,7 @@ Feature: Purchase Committee Calculations | |
| 278 280 | 
             
                Examples:
         | 
| 279 281 | 
             
                  | naics  |
         | 
| 280 282 | 
             
                  | 111111 |
         | 
| 283 | 
            +
                  | 339991 |
         | 
| 281 284 | 
             
                  | 399100 |
         | 
| 282 285 | 
             
                  | 459000 |
         | 
| 283 286 |  | 
| @@ -319,6 +322,7 @@ Feature: Purchase Committee Calculations | |
| 319 322 | 
             
                Examples:
         | 
| 320 323 | 
             
                  | naics  | io_code | share |
         | 
| 321 324 | 
             
                  | 111111 | 111000  | 100.0 |
         | 
| 325 | 
            +
                  | 339991 | 111000  | 100.0 |
         | 
| 322 326 | 
             
                  | 399100 | 3991A0  | 75.0  |
         | 
| 323 327 | 
             
                  | 399100 | 3991B0  | 25.0  |
         | 
| 324 328 | 
             
                  | 399200 | 399200  | 100.0 |
         | 
| @@ -4,7 +4,7 @@ Feature: Purchase Emissions Calculations | |
| 4 4 | 
             
              Scenario: Calculations starting from nothing
         | 
| 5 5 | 
             
                Given a purchase has nothing
         | 
| 6 6 | 
             
                When emissions are calculated
         | 
| 7 | 
            -
                Then the emission value should be within "0.001" kgs of " | 
| 7 | 
            +
                Then the emission value should be within "0.001" kgs of "789.601"
         | 
| 8 8 |  | 
| 9 9 | 
             
              Scenario: Calculations starting from purchase amount
         | 
| 10 10 | 
             
                Given a purchase has "purchase_amount" of "107.11"
         | 
| @@ -14,7 +14,7 @@ Feature: Purchase Emissions Calculations | |
| 14 14 | 
             
              Scenario: Calculations starting from date
         | 
| 15 15 | 
             
                Given a purchase has "date" of "2010-07-28"
         | 
| 16 16 | 
             
                When emissions are calculated
         | 
| 17 | 
            -
                Then the emission value should be within "0.001" kgs of " | 
| 17 | 
            +
                Then the emission value should be within "0.001" kgs of "789.601"
         | 
| 18 18 |  | 
| 19 19 | 
             
              Scenario Outline: Calculations starting from a merchant
         | 
| 20 20 | 
             
                Given a purchase has "merchant.id" of "<id>"
         | 
| @@ -22,8 +22,8 @@ Feature: Purchase Emissions Calculations | |
| 22 22 | 
             
                Then the emission value should be within "0.001" kgs of "<emission>"
         | 
| 23 23 | 
             
                Examples:
         | 
| 24 24 | 
             
                  | id  | emission |
         | 
| 25 | 
            -
                  | 1   |   | 
| 26 | 
            -
                  | 2   | | 
| 25 | 
            +
                  | 1   |  789.601 |
         | 
| 26 | 
            +
                  | 2   | 1710.581 |
         | 
| 27 27 |  | 
| 28 28 | 
             
              Scenario Outline: Calculations starting from a merchant with purchase amount
         | 
| 29 29 | 
             
                Given a purchase has "merchant.id" of "<id>"
         | 
| @@ -68,7 +68,6 @@ Feature: Purchase Emissions Calculations | |
| 68 68 | 
             
                  | mcc  | cost   | date       | emission |
         | 
| 69 69 | 
             
                  | 1111 | 100.00 | 2010-07-28 |  126.538 |
         | 
| 70 70 | 
             
                  | 2222 | 100.00 | 2010-07-28 |  274.131 |
         | 
| 71 | 
            -
                  | 5111 | 100.00 | 2010-07-28 |  126.538 |
         | 
| 72 71 |  | 
| 73 72 | 
             
              Scenario Outline: Calculations starting from industry
         | 
| 74 73 | 
             
                Given a purchase has "industry.naics_code" of "<naics>"
         | 
| @@ -161,6 +161,13 @@ module BrighterPlanet | |
| 161 161 | 
             
                              ntir
         | 
| 162 162 | 
             
                          end
         | 
| 163 163 | 
             
                        end
         | 
| 164 | 
            +
                        
         | 
| 165 | 
            +
                        # FIXME TODO 11/15/2010
         | 
| 166 | 
            +
                        # NAICS 339991 chosen because it's emissions intensity is close to the average of the entire U.S. economy
         | 
| 167 | 
            +
                        # (calculated by multiplying each sector's emissions intensity by it's share of total 2002 value)
         | 
| 168 | 
            +
                        quorum 'default' do
         | 
| 169 | 
            +
                          { '339991' => 1 }
         | 
| 170 | 
            +
                        end
         | 
| 164 171 | 
             
                      end
         | 
| 165 172 |  | 
| 166 173 | 
             
                      committee :trade_industry_ratios do
         | 
| @@ -180,6 +187,10 @@ module BrighterPlanet | |
| 180 187 | 
             
                              tir
         | 
| 181 188 | 
             
                          end
         | 
| 182 189 | 
             
                        end
         | 
| 190 | 
            +
                        
         | 
| 191 | 
            +
                        quorum 'default' do
         | 
| 192 | 
            +
                          {}
         | 
| 193 | 
            +
                        end
         | 
| 183 194 | 
             
                      end
         | 
| 184 195 |  | 
| 185 196 | 
             
                      # a dictionary to go from merchant categories to industries
         | 
| @@ -193,18 +204,11 @@ module BrighterPlanet | |
| 193 204 | 
             
                        quorum 'from merchant', :needs => [:merchant] do |characteristics|
         | 
| 194 205 | 
             
                          characteristics[:merchant].merchant_category
         | 
| 195 206 | 
             
                        end
         | 
| 196 | 
            -
                        
         | 
| 197 | 
            -
                        quorum 'default' do
         | 
| 198 | 
            -
                          MerchantCategory.
         | 
| 199 | 
            -
                            joins(:merchant_category_industries).
         | 
| 200 | 
            -
                            where(:mcc => 5111).
         | 
| 201 | 
            -
                            first
         | 
| 202 | 
            -
                        end
         | 
| 203 207 | 
             
                      end
         | 
| 204 208 |  | 
| 205 209 | 
             
                      committee :adjusted_cost do
         | 
| 206 210 | 
             
                        quorum 'from cost and date', :needs => [:cost, :date] do |characteristics|
         | 
| 207 | 
            -
                          # TODO:  | 
| 211 | 
            +
                          # FIXME TODO: Import CPI conversions
         | 
| 208 212 | 
             
                          @cpi_lookup ||= { 
         | 
| 209 213 | 
             
                            2009 => 1.189, 2010 => 1.207, 2011 => 1.225, 2012 => 1.245, 
         | 
| 210 214 | 
             
                            2013 => 1.265 }
         | 
| @@ -222,14 +226,16 @@ module BrighterPlanet | |
| 222 226 | 
             
                          characteristics[:purchase_amount].to_f - characteristics[:tax].to_f
         | 
| 223 227 | 
             
                        end
         | 
| 224 228 |  | 
| 229 | 
            +
                        # Based on http://www.thestc.com/STrates.stm weighted by US Census 2010 projected state population (exclude samoa, guam, pr)
         | 
| 225 230 | 
             
                        quorum 'from purchase amount', :needs => :purchase_amount do |characteristics|
         | 
| 226 | 
            -
                          # tax based on http://www.thestc.com/STrates.stm weighted by US Census 2010 projected state population (exclude samoa, guam, pr)
         | 
| 227 231 | 
             
                          characteristics[:purchase_amount].to_f / 1.0711
         | 
| 228 232 | 
             
                        end
         | 
| 229 233 |  | 
| 234 | 
            +
                        # FIXME TODO 11/15/2010
         | 
| 235 | 
            +
                        # This is the average federal government purchase card transaction in 2003, converted to 2010 dollars, with tax taken out
         | 
| 236 | 
            +
                        # See http://www.sba.gov/advo/research/rs226tot.pdf
         | 
| 230 237 | 
             
                        quorum 'default' do
         | 
| 231 | 
            -
                           | 
| 232 | 
            -
                          100
         | 
| 238 | 
            +
                          624
         | 
| 233 239 | 
             
                        end
         | 
| 234 240 | 
             
                      end
         | 
| 235 241 |  | 
| @@ -13,15 +13,18 @@ module BrighterPlanet | |
| 13 13 | 
             
                      has :purchase_amount # full purchase amount, including tax
         | 
| 14 14 | 
             
                      has :tax             # tax portion of purchase
         | 
| 15 15 | 
             
                      has :date
         | 
| 16 | 
            -
                      has :merchant
         | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 16 | 
            +
                      has :merchant do
         | 
| 17 | 
            +
                        displays { |m| m.name }
         | 
| 18 | 
            +
                      end
         | 
| 19 19 | 
             
                      has :merchant_category do
         | 
| 20 | 
            -
                        displays { |mc| mc. | 
| 20 | 
            +
                        displays { |mc| mc.description }
         | 
| 21 21 | 
             
                      end
         | 
| 22 22 | 
             
                      has :merchant_category_industries do
         | 
| 23 23 | 
             
                        displays { |mci| pluralize(mci.count, 'merchant category') }
         | 
| 24 24 | 
             
                      end
         | 
| 25 | 
            +
                      has :industry do
         | 
| 26 | 
            +
                        displays { |ind| ind.description }
         | 
| 27 | 
            +
                      end
         | 
| 25 28 | 
             
                      has :trade_industry_ratios do
         | 
| 26 29 | 
             
                        displays { |tir| pluralize(tir.count, 'trade industry ratio') }
         | 
| 27 30 | 
             
                      end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,12 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: purchase
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 3
         | 
| 4 5 | 
             
              prerelease: false
         | 
| 5 6 | 
             
              segments: 
         | 
| 6 7 | 
             
              - 1
         | 
| 7 8 | 
             
              - 0
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 1.0. | 
| 9 | 
            +
              - 10
         | 
| 10 | 
            +
              version: 1.0.10
         | 
| 10 11 | 
             
            platform: ruby
         | 
| 11 12 | 
             
            authors: 
         | 
| 12 13 | 
             
            - Andy Rossmeissl
         | 
| @@ -18,100 +19,108 @@ autorequire: | |
| 18 19 | 
             
            bindir: bin
         | 
| 19 20 | 
             
            cert_chain: []
         | 
| 20 21 |  | 
| 21 | 
            -
            date: 2010-11- | 
| 22 | 
            +
            date: 2010-11-16 00:00:00 -08:00
         | 
| 22 23 | 
             
            default_executable: 
         | 
| 23 24 | 
             
            dependencies: 
         | 
| 24 25 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 25 26 | 
             
              name: activerecord
         | 
| 27 | 
            +
              prerelease: false
         | 
| 26 28 | 
             
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 27 29 | 
             
                none: false
         | 
| 28 30 | 
             
                requirements: 
         | 
| 29 31 | 
             
                - - ~>
         | 
| 30 32 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 33 | 
            +
                    hash: 7
         | 
| 31 34 | 
             
                    segments: 
         | 
| 32 35 | 
             
                    - 3
         | 
| 33 36 | 
             
                    - 0
         | 
| 34 37 | 
             
                    - 0
         | 
| 35 38 | 
             
                    version: 3.0.0
         | 
| 36 39 | 
             
              type: :development
         | 
| 37 | 
            -
              prerelease: false
         | 
| 38 40 | 
             
              version_requirements: *id001
         | 
| 39 41 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 40 42 | 
             
              name: bundler
         | 
| 43 | 
            +
              prerelease: false
         | 
| 41 44 | 
             
              requirement: &id002 !ruby/object:Gem::Requirement 
         | 
| 42 45 | 
             
                none: false
         | 
| 43 46 | 
             
                requirements: 
         | 
| 44 47 | 
             
                - - ~>
         | 
| 45 48 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 49 | 
            +
                    hash: 23
         | 
| 46 50 | 
             
                    segments: 
         | 
| 47 51 | 
             
                    - 1
         | 
| 48 52 | 
             
                    - 0
         | 
| 49 53 | 
             
                    - 0
         | 
| 50 54 | 
             
                    version: 1.0.0
         | 
| 51 55 | 
             
              type: :development
         | 
| 52 | 
            -
              prerelease: false
         | 
| 53 56 | 
             
              version_requirements: *id002
         | 
| 54 57 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 55 58 | 
             
              name: cucumber
         | 
| 59 | 
            +
              prerelease: false
         | 
| 56 60 | 
             
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 57 61 | 
             
                none: false
         | 
| 58 62 | 
             
                requirements: 
         | 
| 59 63 | 
             
                - - ">="
         | 
| 60 64 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 65 | 
            +
                    hash: 3
         | 
| 61 66 | 
             
                    segments: 
         | 
| 62 67 | 
             
                    - 0
         | 
| 63 68 | 
             
                    version: "0"
         | 
| 64 69 | 
             
              type: :development
         | 
| 65 | 
            -
              prerelease: false
         | 
| 66 70 | 
             
              version_requirements: *id003
         | 
| 67 71 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 68 72 | 
             
              name: jeweler
         | 
| 73 | 
            +
              prerelease: false
         | 
| 69 74 | 
             
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 70 75 | 
             
                none: false
         | 
| 71 76 | 
             
                requirements: 
         | 
| 72 77 | 
             
                - - ~>
         | 
| 73 78 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 79 | 
            +
                    hash: 7
         | 
| 74 80 | 
             
                    segments: 
         | 
| 75 81 | 
             
                    - 1
         | 
| 76 82 | 
             
                    - 4
         | 
| 77 83 | 
             
                    - 0
         | 
| 78 84 | 
             
                    version: 1.4.0
         | 
| 79 85 | 
             
              type: :development
         | 
| 80 | 
            -
              prerelease: false
         | 
| 81 86 | 
             
              version_requirements: *id004
         | 
| 82 87 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 83 88 | 
             
              name: rake
         | 
| 89 | 
            +
              prerelease: false
         | 
| 84 90 | 
             
              requirement: &id005 !ruby/object:Gem::Requirement 
         | 
| 85 91 | 
             
                none: false
         | 
| 86 92 | 
             
                requirements: 
         | 
| 87 93 | 
             
                - - ">="
         | 
| 88 94 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 95 | 
            +
                    hash: 3
         | 
| 89 96 | 
             
                    segments: 
         | 
| 90 97 | 
             
                    - 0
         | 
| 91 98 | 
             
                    version: "0"
         | 
| 92 99 | 
             
              type: :development
         | 
| 93 | 
            -
              prerelease: false
         | 
| 94 100 | 
             
              version_requirements: *id005
         | 
| 95 101 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 96 102 | 
             
              name: rdoc
         | 
| 103 | 
            +
              prerelease: false
         | 
| 97 104 | 
             
              requirement: &id006 !ruby/object:Gem::Requirement 
         | 
| 98 105 | 
             
                none: false
         | 
| 99 106 | 
             
                requirements: 
         | 
| 100 107 | 
             
                - - ">="
         | 
| 101 108 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 109 | 
            +
                    hash: 3
         | 
| 102 110 | 
             
                    segments: 
         | 
| 103 111 | 
             
                    - 0
         | 
| 104 112 | 
             
                    version: "0"
         | 
| 105 113 | 
             
              type: :development
         | 
| 106 | 
            -
              prerelease: false
         | 
| 107 114 | 
             
              version_requirements: *id006
         | 
| 108 115 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 109 116 | 
             
              name: rspec
         | 
| 117 | 
            +
              prerelease: false
         | 
| 110 118 | 
             
              requirement: &id007 !ruby/object:Gem::Requirement 
         | 
| 111 119 | 
             
                none: false
         | 
| 112 120 | 
             
                requirements: 
         | 
| 113 121 | 
             
                - - ~>
         | 
| 114 122 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 123 | 
            +
                    hash: 62196417
         | 
| 115 124 | 
             
                    segments: 
         | 
| 116 125 | 
             
                    - 2
         | 
| 117 126 | 
             
                    - 0
         | 
| @@ -120,97 +129,102 @@ dependencies: | |
| 120 129 | 
             
                    - 17
         | 
| 121 130 | 
             
                    version: 2.0.0.beta.17
         | 
| 122 131 | 
             
              type: :development
         | 
| 123 | 
            -
              prerelease: false
         | 
| 124 132 | 
             
              version_requirements: *id007
         | 
| 125 133 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 126 134 | 
             
              name: sniff
         | 
| 135 | 
            +
              prerelease: false
         | 
| 127 136 | 
             
              requirement: &id008 !ruby/object:Gem::Requirement 
         | 
| 128 137 | 
             
                none: false
         | 
| 129 138 | 
             
                requirements: 
         | 
| 130 139 | 
             
                - - ~>
         | 
| 131 140 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 141 | 
            +
                    hash: 17
         | 
| 132 142 | 
             
                    segments: 
         | 
| 133 143 | 
             
                    - 0
         | 
| 134 144 | 
             
                    - 2
         | 
| 135 145 | 
             
                    - 3
         | 
| 136 146 | 
             
                    version: 0.2.3
         | 
| 137 147 | 
             
              type: :development
         | 
| 138 | 
            -
              prerelease: false
         | 
| 139 148 | 
             
              version_requirements: *id008
         | 
| 140 149 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 141 150 | 
             
              name: actionpack
         | 
| 151 | 
            +
              prerelease: false
         | 
| 142 152 | 
             
              requirement: &id009 !ruby/object:Gem::Requirement 
         | 
| 143 153 | 
             
                none: false
         | 
| 144 154 | 
             
                requirements: 
         | 
| 145 155 | 
             
                - - ~>
         | 
| 146 156 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 157 | 
            +
                    hash: 5
         | 
| 147 158 | 
             
                    segments: 
         | 
| 148 159 | 
             
                    - 3
         | 
| 149 160 | 
             
                    - 0
         | 
| 150 161 | 
             
                    - 1
         | 
| 151 162 | 
             
                    version: 3.0.1
         | 
| 152 163 | 
             
              type: :runtime
         | 
| 153 | 
            -
              prerelease: false
         | 
| 154 164 | 
             
              version_requirements: *id009
         | 
| 155 165 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 156 166 | 
             
              name: earth
         | 
| 167 | 
            +
              prerelease: false
         | 
| 157 168 | 
             
              requirement: &id010 !ruby/object:Gem::Requirement 
         | 
| 158 169 | 
             
                none: false
         | 
| 159 170 | 
             
                requirements: 
         | 
| 160 171 | 
             
                - - ~>
         | 
| 161 172 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 173 | 
            +
                    hash: 31
         | 
| 162 174 | 
             
                    segments: 
         | 
| 163 175 | 
             
                    - 0
         | 
| 164 176 | 
             
                    - 2
         | 
| 165 177 | 
             
                    - 4
         | 
| 166 178 | 
             
                    version: 0.2.4
         | 
| 167 179 | 
             
              type: :runtime
         | 
| 168 | 
            -
              prerelease: false
         | 
| 169 180 | 
             
              version_requirements: *id010
         | 
| 170 181 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 171 182 | 
             
              name: emitter
         | 
| 183 | 
            +
              prerelease: false
         | 
| 172 184 | 
             
              requirement: &id011 !ruby/object:Gem::Requirement 
         | 
| 173 185 | 
             
                none: false
         | 
| 174 186 | 
             
                requirements: 
         | 
| 175 187 | 
             
                - - ~>
         | 
| 176 188 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 189 | 
            +
                    hash: 9
         | 
| 177 190 | 
             
                    segments: 
         | 
| 178 191 | 
             
                    - 0
         | 
| 179 192 | 
             
                    - 1
         | 
| 180 193 | 
             
                    - 9
         | 
| 181 194 | 
             
                    version: 0.1.9
         | 
| 182 195 | 
             
              type: :runtime
         | 
| 183 | 
            -
              prerelease: false
         | 
| 184 196 | 
             
              version_requirements: *id011
         | 
| 185 197 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 186 198 | 
             
              name: fastercsv
         | 
| 199 | 
            +
              prerelease: false
         | 
| 187 200 | 
             
              requirement: &id012 !ruby/object:Gem::Requirement 
         | 
| 188 201 | 
             
                none: false
         | 
| 189 202 | 
             
                requirements: 
         | 
| 190 203 | 
             
                - - ~>
         | 
| 191 204 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 205 | 
            +
                    hash: 5
         | 
| 192 206 | 
             
                    segments: 
         | 
| 193 207 | 
             
                    - 1
         | 
| 194 208 | 
             
                    - 5
         | 
| 195 209 | 
             
                    - 3
         | 
| 196 210 | 
             
                    version: 1.5.3
         | 
| 197 211 | 
             
              type: :runtime
         | 
| 198 | 
            -
              prerelease: false
         | 
| 199 212 | 
             
              version_requirements: *id012
         | 
| 200 213 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 201 214 | 
             
              name: slither
         | 
| 215 | 
            +
              prerelease: false
         | 
| 202 216 | 
             
              requirement: &id013 !ruby/object:Gem::Requirement 
         | 
| 203 217 | 
             
                none: false
         | 
| 204 218 | 
             
                requirements: 
         | 
| 205 219 | 
             
                - - ~>
         | 
| 206 220 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 221 | 
            +
                    hash: 405
         | 
| 207 222 | 
             
                    segments: 
         | 
| 208 223 | 
             
                    - 0
         | 
| 209 224 | 
             
                    - 99
         | 
| 210 225 | 
             
                    - 3
         | 
| 211 226 | 
             
                    version: 0.99.3
         | 
| 212 227 | 
             
              type: :runtime
         | 
| 213 | 
            -
              prerelease: false
         | 
| 214 228 | 
             
              version_requirements: *id013
         | 
| 215 229 | 
             
            description: A software model in Ruby for the greenhouse gas emissions of a purchase
         | 
| 216 230 | 
             
            email: seamus@brighterplanet.com
         | 
| @@ -234,11 +248,11 @@ files: | |
| 234 248 | 
             
            - lib/test_support/purchase_record.rb
         | 
| 235 249 | 
             
            - lib/test_support/test_impact_vectors_adapter.rb
         | 
| 236 250 | 
             
            - lib/test_support/test_sector_direct_requirements_adapter.rb
         | 
| 237 | 
            -
            - features/ | 
| 238 | 
            -
            - features/support/env.rb
         | 
| 251 | 
            +
            - features/step_definitions/characteristic_steps.rb
         | 
| 239 252 | 
             
            - features/step_definitions/matrix_steps.rb
         | 
| 240 253 | 
             
            - features/step_definitions/purchase_steps.rb
         | 
| 241 | 
            -
            - features/ | 
| 254 | 
            +
            - features/support/env.rb
         | 
| 255 | 
            +
            - features/support/matrix_ext.rb
         | 
| 242 256 | 
             
            - features/purchase_characterization.feature
         | 
| 243 257 | 
             
            - features/purchase_committees.feature
         | 
| 244 258 | 
             
            - features/purchase_emissions.feature
         | 
| @@ -256,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 256 270 | 
             
              requirements: 
         | 
| 257 271 | 
             
              - - ">="
         | 
| 258 272 | 
             
                - !ruby/object:Gem::Version 
         | 
| 259 | 
            -
                  hash:  | 
| 273 | 
            +
                  hash: 3
         | 
| 260 274 | 
             
                  segments: 
         | 
| 261 275 | 
             
                  - 0
         | 
| 262 276 | 
             
                  version: "0"
         | 
| @@ -265,6 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 265 279 | 
             
              requirements: 
         | 
| 266 280 | 
             
              - - ">="
         | 
| 267 281 | 
             
                - !ruby/object:Gem::Version 
         | 
| 282 | 
            +
                  hash: 3
         | 
| 268 283 | 
             
                  segments: 
         | 
| 269 284 | 
             
                  - 0
         | 
| 270 285 | 
             
                  version: "0"
         | 
| @@ -276,15 +291,15 @@ signing_key: | |
| 276 291 | 
             
            specification_version: 3
         | 
| 277 292 | 
             
            summary: A carbon model
         | 
| 278 293 | 
             
            test_files: 
         | 
| 279 | 
            -
            - features/ | 
| 280 | 
            -
            - features/support/env.rb
         | 
| 294 | 
            +
            - features/step_definitions/characteristic_steps.rb
         | 
| 281 295 | 
             
            - features/step_definitions/matrix_steps.rb
         | 
| 282 296 | 
             
            - features/step_definitions/purchase_steps.rb
         | 
| 283 | 
            -
            - features/ | 
| 297 | 
            +
            - features/support/env.rb
         | 
| 298 | 
            +
            - features/support/matrix_ext.rb
         | 
| 284 299 | 
             
            - features/purchase_characterization.feature
         | 
| 285 300 | 
             
            - features/purchase_committees.feature
         | 
| 286 301 | 
             
            - features/purchase_emissions.feature
         | 
| 287 | 
            -
            - lib/test_support/test_sector_direct_requirements_adapter.rb
         | 
| 288 302 | 
             
            - lib/test_support/db/schema.rb
         | 
| 289 303 | 
             
            - lib/test_support/purchase_record.rb
         | 
| 290 304 | 
             
            - lib/test_support/test_impact_vectors_adapter.rb
         | 
| 305 | 
            +
            - lib/test_support/test_sector_direct_requirements_adapter.rb
         |