carbon 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +45 -0
- data/MIT-LICENSE.txt +1 -1
- data/README.rdoc +137 -43
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/bin/carbon +0 -0
- data/carbon.gemspec +5 -5
- data/lib/carbon.rb +0 -2
- data/lib/carbon/emission_estimate/response.rb +1 -1
- metadata +18 -39
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
carbon (0.3.0)
|
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/MIT-LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -1,16 +1,82 @@
|
|
1
1
|
= Carbon
|
2
2
|
|
3
|
-
Carbon is a Ruby API wrapper for the {Brighter Planet emission estimate web service}[http://carbon.brighterplanet.com], which is located at 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.
|
3
|
+
Carbon is a Ruby API wrapper and command-line console for the {Brighter Planet emission estimate web service}[http://carbon.brighterplanet.com], which is located at 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.
|
4
4
|
|
5
|
-
|
5
|
+
Full documentation: {RDoc}[http://rdoc.info/projects/brighterplanet/carbon]
|
6
6
|
|
7
|
-
|
7
|
+
== Quick start 1: experimenting with the console
|
8
8
|
|
9
|
-
|
9
|
+
<b>You'll need a Brighter Planet API key. See the "API keys" section below for details.</b>
|
10
|
+
|
11
|
+
First get the gem:
|
12
|
+
|
13
|
+
$ gem install carbon
|
14
|
+
|
15
|
+
Then start the console:
|
16
|
+
|
17
|
+
$ carbon
|
18
|
+
carbon->
|
19
|
+
|
20
|
+
Provide your key:
|
21
|
+
|
22
|
+
carbon-> key '123ABC'
|
23
|
+
=> Using key 123ABC
|
24
|
+
|
25
|
+
Start a flight calculation:
|
26
|
+
|
27
|
+
carbon-> flight
|
28
|
+
=> 1210.66889895298 kg CO2e
|
29
|
+
flight*>
|
30
|
+
|
31
|
+
Start providing characteristics:
|
32
|
+
|
33
|
+
flight*> origin_airport 'jfk'
|
34
|
+
=> 1593.46008200024 kg CO2e
|
35
|
+
flight*> destination_airport 'lax'
|
36
|
+
=> 1766.55536727522 kg CO2e
|
37
|
+
|
38
|
+
Review what you've entered:
|
39
|
+
|
40
|
+
flight*> characteristics
|
41
|
+
=> origin_airport: jfk
|
42
|
+
destination_airport: lax
|
43
|
+
|
44
|
+
See how the calculation's being made:
|
45
|
+
|
46
|
+
flight*> methodology
|
47
|
+
=> emission: from fuel and passengers with coefficients
|
48
|
+
[ ... ]
|
49
|
+
cohort: from t100
|
50
|
+
|
51
|
+
See intermediate calculations:
|
52
|
+
|
53
|
+
flight*> reports
|
54
|
+
=> emission: 1766.55536727522
|
55
|
+
[ ... ]
|
56
|
+
cohort: {"members"=>262}
|
57
|
+
|
58
|
+
Generate a methodology URL:
|
59
|
+
|
60
|
+
flight*> url
|
61
|
+
=> http://carbon.brighterplanet.com/flights.json?origin_airport=jfk&destination_airport=lax&key=123ABC
|
62
|
+
|
63
|
+
And when you're done:
|
64
|
+
|
65
|
+
flight*> done
|
66
|
+
=> Saved as flight #0
|
67
|
+
carbon->
|
10
68
|
|
11
|
-
|
69
|
+
You can recall this flight anytime during this same session:
|
12
70
|
|
13
|
-
|
71
|
+
carbon-> flight 0
|
72
|
+
=> 1766.55536727522 kg CO2e
|
73
|
+
flight*> characteristics
|
74
|
+
=> origin_airport: jfk
|
75
|
+
destination_airport: lax
|
76
|
+
|
77
|
+
For more, see the "Console" section below.
|
78
|
+
|
79
|
+
== Quick start 2: using the library in your application
|
14
80
|
|
15
81
|
<b>You'll need a Brighter Planet API key. See the "API keys" section below for details.</b>
|
16
82
|
|
@@ -67,52 +133,59 @@ You should get an API key from http://keys.brighterplanet.com and set it globall
|
|
67
133
|
|
68
134
|
Now all of your queries will use that key.
|
69
135
|
|
70
|
-
==
|
71
|
-
|
72
|
-
Once you understand how to map attributes using the DSL, you might still be confused about what the gem actually calls on your objects.
|
136
|
+
== Attribute serialization
|
73
137
|
|
74
|
-
|
138
|
+
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.
|
75
139
|
|
76
|
-
|
140
|
+
For example:
|
77
141
|
|
78
|
-
|
142
|
+
class RentalCar < ActiveRecord::Base
|
143
|
+
belongs_to :automobile_make
|
144
|
+
emit_as :automobile do
|
145
|
+
provide :automobile_make, :as => :make
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
class AutomobileMake < ActiveRecord::Base # schema includes :name
|
150
|
+
has_many :rental_cars
|
151
|
+
alias :to_characteristic :name
|
152
|
+
end
|
153
|
+
|
154
|
+
Without <tt>AutomobileMake#to_characteristic</tt>, the library would have no way of knowing how to serialize.
|
79
155
|
|
80
|
-
|
156
|
+
== Using timeouts
|
81
157
|
|
82
|
-
> RentalCar.new.emission_estimate :
|
158
|
+
> RentalCar.new.emission_estimate :timeout => 100
|
159
|
+
|
160
|
+
Runs a realtime request but allows timing out the network call. Raises <tt>Timeout::Error</tt> if timeout is exceeded.
|
83
161
|
|
84
|
-
|
162
|
+
== Persisted queries
|
85
163
|
|
86
|
-
You can specify that the result be
|
164
|
+
You can specify that the result be persisted in low-latency storage so that future identical requests can use the same estimate:
|
87
165
|
|
88
166
|
> RentalCar.new.emission_estimate :guid => 'A_GLOBALLY_UNIQUE_IDENTIFIER_FOR_THIS_EMISSION_ESTIMATE'
|
89
167
|
|
90
|
-
|
168
|
+
== Asynchronous queries
|
91
169
|
|
92
|
-
|
170
|
+
=== Using a callback
|
93
171
|
|
94
|
-
|
95
|
-
|
96
|
-
>
|
97
|
-
|
98
|
-
|
99
|
-
# pass 2: a while later, cron job runs these
|
100
|
-
> car51.emission_estimate :guid => '[...]'
|
101
|
-
> car52.emission_estimate :guid => '[...]'
|
102
|
-
> car96.emission_estimate :guid => '[...]'
|
172
|
+
To specify that the result of a query should be POSTed back to you, simply pass an URL as the <tt>:callback</tt> option to <tt>#emission_estimate</tt>:
|
173
|
+
|
174
|
+
> RentalCar.new.emission_estimate :callback => 'http://example.com/my/callback/handler'
|
175
|
+
|
176
|
+
A good way to test this is to set up a {PostBin}[http://postbin.org].
|
103
177
|
|
104
|
-
|
178
|
+
=== Using polling
|
105
179
|
|
106
|
-
|
180
|
+
By combining <tt>:guid</tt> and <tt>:defer => true</tt>, you can poll for a result:
|
107
181
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
* (callback) Runs an async request (so you don't immediately get the result back). The result will be POSTed to the URL you specify.
|
112
|
-
* (guid,defer) Runs an async request (so you don't immediately get the result back). The result will be stored to S3 as <tt>hxxp://storage.carbon.brighterplanet.com/SHA1-hexdigest-of-key+guid</tt>
|
113
|
-
* (guid,timeout) (NOT IMPLEMENTED) A hybrid "best effort" request that is as cheap as an async request but will try to return the full result data immediately. It keeps trying S3 until your timeout is exceeded, at which point it's just a normal async request.
|
182
|
+
> batmobile.emission_estimate :guid => '[...]', :defer => true
|
183
|
+
# Do other things . . . and then:
|
184
|
+
> batmobile.emission_estimate :guid => '[...]'
|
114
185
|
|
115
|
-
|
186
|
+
If the result isn't available by the time you want it, a standard synchronous estimate will be provided.
|
187
|
+
|
188
|
+
== Exceptions
|
116
189
|
|
117
190
|
Since this gem connects to a web service, you need to be ready for network problems and latency. For example:
|
118
191
|
|
@@ -120,21 +193,42 @@ Since this gem connects to a web service, you need to be ready for network probl
|
|
120
193
|
my_emission = my_car.emission_estimate
|
121
194
|
rescue ::SocketError, ::EOFError, ::Timeout::Error, ::Errno::ETIMEDOUT, ::Errno::ENETUNREACH, ::Errno::ECONNRESET, ::Errno::ECONNREFUSED
|
122
195
|
# These are general network errors raised by Net::HTTP.
|
123
|
-
# Your internet connection might be down
|
196
|
+
# Your internet connection might be down.
|
124
197
|
rescue ::Carbon::RateLimited
|
125
|
-
#
|
126
|
-
# In order to prevent denial-of-service attacks, our servers rate limit requests.
|
198
|
+
# In order to prevent denial-of-service attacks, our servers limit request rates.
|
127
199
|
# The gem will try up to three times to get an answer back from the server, waiting slightly longer each time.
|
128
200
|
# If you still get this exception, please contact us at staff@brighterplanet.com and we'll lift your rate.
|
129
201
|
rescue ::Carbon::RealtimeEstimateFailed
|
130
|
-
# Realtime mode only.
|
131
202
|
# Our server returned a 4XX or 5XX error.
|
132
|
-
# Please contact us at staff@brighterplanet.com
|
203
|
+
# Please contact us at staff@brighterplanet.com.
|
133
204
|
rescue ::Carbon::QueueingFailed
|
134
|
-
# Async mode only.
|
135
205
|
# The gem connects directly to Amazon SQS in order to provide maximum throughput. If that service returns anything other than success, you get this exception.
|
136
|
-
# Please contact us at staff@brighterplanet.com
|
206
|
+
# Please contact us at staff@brighterplanet.com.
|
137
207
|
end
|
208
|
+
|
209
|
+
== Console
|
210
|
+
|
211
|
+
This library includes a special console for performing calculations interactively. Quick Start #1 provides an example session. Here is a command reference:
|
212
|
+
|
213
|
+
=== Shell mode
|
214
|
+
|
215
|
+
[+help+] Displays a list of emitter types.
|
216
|
+
[+key+ _yourkey_] Set the {developer key}[http://keys.brighterplanet.com] that should be used for this session. Alternatively, put this key in <tt>~/.carbon_middleware</tt> and it will be auto-selected on console startup.
|
217
|
+
[+_emitter_type_+] (e.g. +flight+) Enters emitter mode using this emitter type.
|
218
|
+
[<tt><i>emitter_type num</i></tt>] (e.g. <tt>flight 0</tt>) Recalls a previous emitter from this session.
|
219
|
+
[+exit+] Quits.
|
220
|
+
|
221
|
+
=== Emitter mode
|
222
|
+
|
223
|
+
[+help+] Displays a list of characteristics for this emitter type.
|
224
|
+
[<tt><i>characteristic value</i></tt>] (e.g. <tt>origin_airport 'lax'</tt>) Provide a characteristic. Remember, this is Ruby we're dealing with, so strings must be quoted.
|
225
|
+
[+emission+] Displays the current emission in kilograms CO2e for this emitter.
|
226
|
+
[+lbs+, +pounds+, or +tons+] Display the emission using different units.
|
227
|
+
[+characteristics+] Lists the characteristics you have provided so far.
|
228
|
+
[+methodology+] Summarizes how the calculation is being made.
|
229
|
+
[+reports+] Displays intermediate calculations that were made in pursuit of the emission estimate.
|
230
|
+
[+url+] Generates a methodology URL suitable for pasting into your browser for further inspection.
|
231
|
+
[+done+] Saves this emitter and returns to shell mode.
|
138
232
|
|
139
233
|
== Copyright
|
140
234
|
|
data/Rakefile
CHANGED
@@ -10,11 +10,13 @@ begin
|
|
10
10
|
gemspec.email = 'derek.kastner@brighterplanet.com'
|
11
11
|
gemspec.homepage = 'http://carbon.brighterplanet.com/libraries'
|
12
12
|
gemspec.authors = ['Derek Kastner', 'Seamus Abshere', 'Andy Rossmeissl']
|
13
|
+
|
14
|
+
gemspec.required_ruby_version = '~>1.9.1'
|
15
|
+
|
13
16
|
gemspec.add_dependency 'activesupport', '>=2.3.5'
|
14
17
|
gemspec.add_dependency 'nap', '>=0.4'
|
15
18
|
gemspec.add_dependency 'timeframe', '>=0.0.7'
|
16
19
|
# This is still only on Rubyforge
|
17
|
-
gemspec.add_dependency 'SystemTimer', '>=1.2'
|
18
20
|
gemspec.add_dependency 'blockenspiel', '>=0.3.2'
|
19
21
|
gemspec.add_dependency 'conversions', '~>1'
|
20
22
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
data/bin/carbon
CHANGED
File without changes
|
data/carbon.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{carbon}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "1.0.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Derek Kastner", "Seamus Abshere", "Andy Rossmeissl"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-06}
|
13
13
|
s.default_executable = %q{carbon}
|
14
14
|
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
15
|
s.email = %q{derek.kastner@brighterplanet.com}
|
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
]
|
20
20
|
s.files = [
|
21
21
|
".gitignore",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
22
24
|
"MIT-LICENSE.txt",
|
23
25
|
"README.rdoc",
|
24
26
|
"Rakefile",
|
@@ -50,6 +52,7 @@ Gem::Specification.new do |s|
|
|
50
52
|
s.homepage = %q{http://carbon.brighterplanet.com/libraries}
|
51
53
|
s.rdoc_options = ["--charset=UTF-8"]
|
52
54
|
s.require_paths = ["lib"]
|
55
|
+
s.required_ruby_version = Gem::Requirement.new("~> 1.9.1")
|
53
56
|
s.rubygems_version = %q{1.3.7}
|
54
57
|
s.summary = %q{Carbon is a Ruby API wrapper for the Brighter Planet emission estimate web service (http://carbon.brighterplanet.com).}
|
55
58
|
s.test_files = [
|
@@ -66,7 +69,6 @@ Gem::Specification.new do |s|
|
|
66
69
|
s.add_runtime_dependency(%q<activesupport>, [">= 2.3.5"])
|
67
70
|
s.add_runtime_dependency(%q<nap>, [">= 0.4"])
|
68
71
|
s.add_runtime_dependency(%q<timeframe>, [">= 0.0.7"])
|
69
|
-
s.add_runtime_dependency(%q<SystemTimer>, [">= 1.2"])
|
70
72
|
s.add_runtime_dependency(%q<blockenspiel>, [">= 0.3.2"])
|
71
73
|
s.add_runtime_dependency(%q<conversions>, ["~> 1"])
|
72
74
|
s.add_development_dependency(%q<fakeweb>, [">= 1.2.8"])
|
@@ -75,7 +77,6 @@ Gem::Specification.new do |s|
|
|
75
77
|
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
76
78
|
s.add_dependency(%q<nap>, [">= 0.4"])
|
77
79
|
s.add_dependency(%q<timeframe>, [">= 0.0.7"])
|
78
|
-
s.add_dependency(%q<SystemTimer>, [">= 1.2"])
|
79
80
|
s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
|
80
81
|
s.add_dependency(%q<conversions>, ["~> 1"])
|
81
82
|
s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
|
@@ -85,7 +86,6 @@ Gem::Specification.new do |s|
|
|
85
86
|
s.add_dependency(%q<activesupport>, [">= 2.3.5"])
|
86
87
|
s.add_dependency(%q<nap>, [">= 0.4"])
|
87
88
|
s.add_dependency(%q<timeframe>, [">= 0.0.7"])
|
88
|
-
s.add_dependency(%q<SystemTimer>, [">= 1.2"])
|
89
89
|
s.add_dependency(%q<blockenspiel>, [">= 0.3.2"])
|
90
90
|
s.add_dependency(%q<conversions>, ["~> 1"])
|
91
91
|
s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
|
data/lib/carbon.rb
CHANGED
@@ -3,8 +3,6 @@ require 'blockenspiel'
|
|
3
3
|
require 'timeframe'
|
4
4
|
require 'digest/sha1'
|
5
5
|
require 'rest' # provided by nap gem
|
6
|
-
gem 'SystemTimer' # >=1.2, so as not to be confused with system_timer 1.0
|
7
|
-
require 'system_timer'
|
8
6
|
require 'active_support'
|
9
7
|
require 'active_support/version'
|
10
8
|
%w{
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 19
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
6
|
+
- 1
|
7
7
|
- 0
|
8
|
-
- 3
|
9
8
|
- 0
|
10
|
-
version: 0.
|
9
|
+
version: 1.0.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Derek Kastner
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-06 00:00:00 -04:00
|
21
20
|
default_executable: carbon
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +27,6 @@ dependencies:
|
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 9
|
32
30
|
segments:
|
33
31
|
- 2
|
34
32
|
- 3
|
@@ -44,7 +42,6 @@ dependencies:
|
|
44
42
|
requirements:
|
45
43
|
- - ">="
|
46
44
|
- !ruby/object:Gem::Version
|
47
|
-
hash: 3
|
48
45
|
segments:
|
49
46
|
- 0
|
50
47
|
- 4
|
@@ -59,7 +56,6 @@ dependencies:
|
|
59
56
|
requirements:
|
60
57
|
- - ">="
|
61
58
|
- !ruby/object:Gem::Version
|
62
|
-
hash: 17
|
63
59
|
segments:
|
64
60
|
- 0
|
65
61
|
- 0
|
@@ -67,76 +63,57 @@ dependencies:
|
|
67
63
|
version: 0.0.7
|
68
64
|
type: :runtime
|
69
65
|
version_requirements: *id003
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: SystemTimer
|
72
|
-
prerelease: false
|
73
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
hash: 11
|
79
|
-
segments:
|
80
|
-
- 1
|
81
|
-
- 2
|
82
|
-
version: "1.2"
|
83
|
-
type: :runtime
|
84
|
-
version_requirements: *id004
|
85
66
|
- !ruby/object:Gem::Dependency
|
86
67
|
name: blockenspiel
|
87
68
|
prerelease: false
|
88
|
-
requirement: &
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
89
70
|
none: false
|
90
71
|
requirements:
|
91
72
|
- - ">="
|
92
73
|
- !ruby/object:Gem::Version
|
93
|
-
hash: 23
|
94
74
|
segments:
|
95
75
|
- 0
|
96
76
|
- 3
|
97
77
|
- 2
|
98
78
|
version: 0.3.2
|
99
79
|
type: :runtime
|
100
|
-
version_requirements: *
|
80
|
+
version_requirements: *id004
|
101
81
|
- !ruby/object:Gem::Dependency
|
102
82
|
name: conversions
|
103
83
|
prerelease: false
|
104
|
-
requirement: &
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
105
85
|
none: false
|
106
86
|
requirements:
|
107
87
|
- - ~>
|
108
88
|
- !ruby/object:Gem::Version
|
109
|
-
hash: 1
|
110
89
|
segments:
|
111
90
|
- 1
|
112
91
|
version: "1"
|
113
92
|
type: :runtime
|
114
|
-
version_requirements: *
|
93
|
+
version_requirements: *id005
|
115
94
|
- !ruby/object:Gem::Dependency
|
116
95
|
name: fakeweb
|
117
96
|
prerelease: false
|
118
|
-
requirement: &
|
97
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
119
98
|
none: false
|
120
99
|
requirements:
|
121
100
|
- - ">="
|
122
101
|
- !ruby/object:Gem::Version
|
123
|
-
hash: 15
|
124
102
|
segments:
|
125
103
|
- 1
|
126
104
|
- 2
|
127
105
|
- 8
|
128
106
|
version: 1.2.8
|
129
107
|
type: :development
|
130
|
-
version_requirements: *
|
108
|
+
version_requirements: *id006
|
131
109
|
- !ruby/object:Gem::Dependency
|
132
110
|
name: rspec
|
133
111
|
prerelease: false
|
134
|
-
requirement: &
|
112
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
135
113
|
none: false
|
136
114
|
requirements:
|
137
115
|
- - ">="
|
138
116
|
- !ruby/object:Gem::Version
|
139
|
-
hash: 62196417
|
140
117
|
segments:
|
141
118
|
- 2
|
142
119
|
- 0
|
@@ -145,7 +122,7 @@ dependencies:
|
|
145
122
|
- 17
|
146
123
|
version: 2.0.0.beta.17
|
147
124
|
type: :development
|
148
|
-
version_requirements: *
|
125
|
+
version_requirements: *id007
|
149
126
|
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.
|
150
127
|
email: derek.kastner@brighterplanet.com
|
151
128
|
executables:
|
@@ -156,6 +133,8 @@ extra_rdoc_files:
|
|
156
133
|
- README.rdoc
|
157
134
|
files:
|
158
135
|
- .gitignore
|
136
|
+
- Gemfile
|
137
|
+
- Gemfile.lock
|
159
138
|
- MIT-LICENSE.txt
|
160
139
|
- README.rdoc
|
161
140
|
- Rakefile
|
@@ -195,18 +174,18 @@ require_paths:
|
|
195
174
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
175
|
none: false
|
197
176
|
requirements:
|
198
|
-
- -
|
177
|
+
- - ~>
|
199
178
|
- !ruby/object:Gem::Version
|
200
|
-
hash: 3
|
201
179
|
segments:
|
202
|
-
-
|
203
|
-
|
180
|
+
- 1
|
181
|
+
- 9
|
182
|
+
- 1
|
183
|
+
version: 1.9.1
|
204
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
185
|
none: false
|
206
186
|
requirements:
|
207
187
|
- - ">="
|
208
188
|
- !ruby/object:Gem::Version
|
209
|
-
hash: 3
|
210
189
|
segments:
|
211
190
|
- 0
|
212
191
|
version: "0"
|