emitter 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- metadata +31 -119
- data/lib/emitter/tasks.rb +0 -66
- data/spec/emitter/tasks_spec.rb +0 -59
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andy Rossmeissl
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2010-11-
|
21
|
+
date: 2010-11-23 00:00:00 -05:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|
@@ -54,94 +54,23 @@ dependencies:
|
|
54
54
|
prerelease: false
|
55
55
|
version_requirements: *id002
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: sniff
|
58
58
|
requirement: &id003 !ruby/object:Gem::Requirement
|
59
59
|
none: false
|
60
60
|
requirements:
|
61
61
|
- - ~>
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
segments:
|
64
|
-
- 1
|
65
|
-
- 4
|
66
|
-
- 0
|
67
|
-
version: 1.4.0
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: rake
|
73
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
segments:
|
79
|
-
- 0
|
80
|
-
version: "0"
|
81
|
-
type: :development
|
82
|
-
prerelease: false
|
83
|
-
version_requirements: *id004
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: rdoc
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
62
|
- !ruby/object:Gem::Version
|
91
63
|
segments:
|
92
64
|
- 0
|
93
|
-
|
94
|
-
type: :development
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: *id005
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rspec
|
99
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
100
|
-
none: false
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
segments:
|
65
|
+
- 4
|
105
66
|
- 2
|
106
|
-
|
107
|
-
- 0
|
108
|
-
- beta
|
109
|
-
- 17
|
110
|
-
version: 2.0.0.beta.17
|
111
|
-
type: :development
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: *id006
|
114
|
-
- !ruby/object:Gem::Dependency
|
115
|
-
name: sandbox
|
116
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
segments:
|
122
|
-
- 0
|
123
|
-
version: "0"
|
67
|
+
version: 0.4.2
|
124
68
|
type: :development
|
125
69
|
prerelease: false
|
126
|
-
version_requirements: *
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: sniff
|
129
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ~>
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
segments:
|
135
|
-
- 0
|
136
|
-
- 3
|
137
|
-
- 0
|
138
|
-
version: 0.3.0
|
139
|
-
type: :development
|
140
|
-
prerelease: false
|
141
|
-
version_requirements: *id008
|
70
|
+
version_requirements: *id003
|
142
71
|
- !ruby/object:Gem::Dependency
|
143
72
|
name: activesupport
|
144
|
-
requirement: &
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
145
74
|
none: false
|
146
75
|
requirements:
|
147
76
|
- - ">="
|
@@ -153,10 +82,10 @@ dependencies:
|
|
153
82
|
version: 3.0.0
|
154
83
|
type: :runtime
|
155
84
|
prerelease: false
|
156
|
-
version_requirements: *
|
85
|
+
version_requirements: *id004
|
157
86
|
- !ruby/object:Gem::Dependency
|
158
87
|
name: characterizable
|
159
|
-
requirement: &
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
160
89
|
none: false
|
161
90
|
requirements:
|
162
91
|
- - ~>
|
@@ -168,10 +97,10 @@ dependencies:
|
|
168
97
|
version: 0.1.2
|
169
98
|
type: :runtime
|
170
99
|
prerelease: false
|
171
|
-
version_requirements: *
|
100
|
+
version_requirements: *id005
|
172
101
|
- !ruby/object:Gem::Dependency
|
173
102
|
name: cohort_scope
|
174
|
-
requirement: &
|
103
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
175
104
|
none: false
|
176
105
|
requirements:
|
177
106
|
- - ~>
|
@@ -183,10 +112,10 @@ dependencies:
|
|
183
112
|
version: 0.1.0
|
184
113
|
type: :runtime
|
185
114
|
prerelease: false
|
186
|
-
version_requirements: *
|
115
|
+
version_requirements: *id006
|
187
116
|
- !ruby/object:Gem::Dependency
|
188
117
|
name: data_miner
|
189
|
-
requirement: &
|
118
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
190
119
|
none: false
|
191
120
|
requirements:
|
192
121
|
- - ~>
|
@@ -198,10 +127,10 @@ dependencies:
|
|
198
127
|
version: 0.5.5
|
199
128
|
type: :runtime
|
200
129
|
prerelease: false
|
201
|
-
version_requirements: *
|
130
|
+
version_requirements: *id007
|
202
131
|
- !ruby/object:Gem::Dependency
|
203
132
|
name: earth
|
204
|
-
requirement: &
|
133
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
205
134
|
none: false
|
206
135
|
requirements:
|
207
136
|
- - ~>
|
@@ -213,10 +142,10 @@ dependencies:
|
|
213
142
|
version: 0.3.1
|
214
143
|
type: :runtime
|
215
144
|
prerelease: false
|
216
|
-
version_requirements: *
|
145
|
+
version_requirements: *id008
|
217
146
|
- !ruby/object:Gem::Dependency
|
218
147
|
name: falls_back_on
|
219
|
-
requirement: &
|
148
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
220
149
|
none: false
|
221
150
|
requirements:
|
222
151
|
- - "="
|
@@ -228,10 +157,10 @@ dependencies:
|
|
228
157
|
version: 0.0.3
|
229
158
|
type: :runtime
|
230
159
|
prerelease: false
|
231
|
-
version_requirements: *
|
160
|
+
version_requirements: *id009
|
232
161
|
- !ruby/object:Gem::Dependency
|
233
162
|
name: fast_timestamp
|
234
|
-
requirement: &
|
163
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
235
164
|
none: false
|
236
165
|
requirements:
|
237
166
|
- - ">="
|
@@ -243,10 +172,10 @@ dependencies:
|
|
243
172
|
version: 0.0.4
|
244
173
|
type: :runtime
|
245
174
|
prerelease: false
|
246
|
-
version_requirements: *
|
175
|
+
version_requirements: *id010
|
247
176
|
- !ruby/object:Gem::Dependency
|
248
177
|
name: leap
|
249
|
-
requirement: &
|
178
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
250
179
|
none: false
|
251
180
|
requirements:
|
252
181
|
- - ~>
|
@@ -258,10 +187,10 @@ dependencies:
|
|
258
187
|
version: 0.4.4
|
259
188
|
type: :runtime
|
260
189
|
prerelease: false
|
261
|
-
version_requirements: *
|
190
|
+
version_requirements: *id011
|
262
191
|
- !ruby/object:Gem::Dependency
|
263
192
|
name: summary_judgement
|
264
|
-
requirement: &
|
193
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
265
194
|
none: false
|
266
195
|
requirements:
|
267
196
|
- - ">="
|
@@ -273,10 +202,10 @@ dependencies:
|
|
273
202
|
version: 1.3.8
|
274
203
|
type: :runtime
|
275
204
|
prerelease: false
|
276
|
-
version_requirements: *
|
205
|
+
version_requirements: *id012
|
277
206
|
- !ruby/object:Gem::Dependency
|
278
207
|
name: timeframe
|
279
|
-
requirement: &
|
208
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
280
209
|
none: false
|
281
210
|
requirements:
|
282
211
|
- - ">="
|
@@ -288,10 +217,10 @@ dependencies:
|
|
288
217
|
version: 0.0.8
|
289
218
|
type: :runtime
|
290
219
|
prerelease: false
|
291
|
-
version_requirements: *
|
220
|
+
version_requirements: *id013
|
292
221
|
- !ruby/object:Gem::Dependency
|
293
222
|
name: weighted_average
|
294
|
-
requirement: &
|
223
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
295
224
|
none: false
|
296
225
|
requirements:
|
297
226
|
- - ">="
|
@@ -303,21 +232,7 @@ dependencies:
|
|
303
232
|
version: 0.0.4
|
304
233
|
type: :runtime
|
305
234
|
prerelease: false
|
306
|
-
version_requirements: *
|
307
|
-
- !ruby/object:Gem::Dependency
|
308
|
-
name: rocco
|
309
|
-
requirement: &id020 !ruby/object:Gem::Requirement
|
310
|
-
none: false
|
311
|
-
requirements:
|
312
|
-
- - ~>
|
313
|
-
- !ruby/object:Gem::Version
|
314
|
-
segments:
|
315
|
-
- 0
|
316
|
-
- 4
|
317
|
-
version: "0.4"
|
318
|
-
type: :runtime
|
319
|
-
prerelease: false
|
320
|
-
version_requirements: *id020
|
235
|
+
version_requirements: *id014
|
321
236
|
description: A software model in Ruby for the greenhouse gas emissions
|
322
237
|
email: derek@brighterplanet.com
|
323
238
|
executables: []
|
@@ -331,9 +246,7 @@ files:
|
|
331
246
|
- LICENSE
|
332
247
|
- README.rdoc
|
333
248
|
- lib/emitter.rb
|
334
|
-
- lib/emitter/tasks.rb
|
335
249
|
- spec/emitter/meta_spec.rb
|
336
|
-
- spec/emitter/tasks_spec.rb
|
337
250
|
- spec/emitter_spec.rb
|
338
251
|
- spec/fixtures/dirigible/lib/dirigible/fallback.rb
|
339
252
|
- spec/fixtures/dirigible/lib/dirigible/carbon_model.rb
|
@@ -362,7 +275,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
362
275
|
requirements:
|
363
276
|
- - ">="
|
364
277
|
- !ruby/object:Gem::Version
|
365
|
-
hash:
|
278
|
+
hash: 419947471
|
366
279
|
segments:
|
367
280
|
- 0
|
368
281
|
version: "0"
|
@@ -383,7 +296,6 @@ specification_version: 3
|
|
383
296
|
summary: The mother of all carbon models
|
384
297
|
test_files:
|
385
298
|
- spec/emitter/meta_spec.rb
|
386
|
-
- spec/emitter/tasks_spec.rb
|
387
299
|
- spec/emitter_spec.rb
|
388
300
|
- spec/fixtures/dirigible/lib/dirigible/fallback.rb
|
389
301
|
- spec/fixtures/dirigible/lib/dirigible/carbon_model.rb
|
data/lib/emitter/tasks.rb
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
require 'emitter'
|
2
|
-
require 'rake'
|
3
|
-
require 'rake/clean'
|
4
|
-
require 'rake/tasklib'
|
5
|
-
require 'rocco/tasks'
|
6
|
-
|
7
|
-
module Emitter
|
8
|
-
class Tasks < ::Rake::TaskLib
|
9
|
-
def self.define
|
10
|
-
new.define
|
11
|
-
end
|
12
|
-
|
13
|
-
def git(cmd, dir = nil, &blk)
|
14
|
-
full_cmd = ''
|
15
|
-
full_cmd << "cd #{dir} && " if dir
|
16
|
-
full_cmd << "unset GIT_DIR && unset GIT_INDEX_FILE && unset GIT_WORK_TREE && git #{cmd}"
|
17
|
-
sh full_cmd, &blk
|
18
|
-
end
|
19
|
-
|
20
|
-
def define(name)
|
21
|
-
Rocco::make 'docs/', "lib/#{name}/carbon_model.rb"
|
22
|
-
|
23
|
-
desc 'Build rocco docs'
|
24
|
-
task :docs => :rocco
|
25
|
-
directory 'docs/'
|
26
|
-
|
27
|
-
# GITHUB PAGES ===============================================================
|
28
|
-
|
29
|
-
desc 'Update gh-pages branch'
|
30
|
-
task :pages => ['pages:sync', :docs] do
|
31
|
-
rev = `git rev-parse --short HEAD`.strip
|
32
|
-
git 'add *.html', 'docs'
|
33
|
-
git "commit -m 'rebuild pages from #{rev}'", 'docs' do |ok,res|
|
34
|
-
if ok
|
35
|
-
verbose { puts "gh-pages updated" }
|
36
|
-
git 'push -q o HEAD:gh-pages', 'docs' unless ENV['NO_PUSH']
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# Update the pages/ directory clone
|
42
|
-
namespace :pages do
|
43
|
-
task 'sync' => ['.git/refs/heads/gh-pages', '.git/refs/heads/gh-pages', 'docs/.git/refs/remotes/o'] do |f|
|
44
|
-
git 'fetch -q o', 'docs'
|
45
|
-
git 'reset -q --hard o/gh-pages', 'docs'
|
46
|
-
sh 'touch docs'
|
47
|
-
end
|
48
|
-
|
49
|
-
file '.git/refs/heads/gh-pages' do |f|
|
50
|
-
unless File.exist? f.name
|
51
|
-
git 'branch gh-pages --track origin/gh-pages', 'docs'
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
file 'docs/.git/refs/remotes/o' do |f|
|
56
|
-
unless File.exist? f.name
|
57
|
-
git 'init -q docs'
|
58
|
-
git 'remote add o ../.git', 'docs'
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
CLOBBER.include 'docs/.git'
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
data/spec/emitter/tasks_spec.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'sandbox'
|
3
|
-
require 'emitter/tasks'
|
4
|
-
|
5
|
-
describe Emitter::Tasks do
|
6
|
-
def git(cmd, dir = nil, &blk)
|
7
|
-
full_cmd = ''
|
8
|
-
full_cmd << "cd #{dir} && " if dir
|
9
|
-
full_cmd << "unset GIT_DIR && unset GIT_INDEX_FILE && unset GIT_WORK_TREE && git #{cmd}"
|
10
|
-
`#{full_cmd}`
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:tasks) { Emitter::Tasks.new }
|
14
|
-
let(:emitter_path) { File.expand_path '../../', File.dirname(__FILE__) }
|
15
|
-
let(:rakefile) do
|
16
|
-
rakefile = <<-RAKEFILE
|
17
|
-
require '#{emitter_path}/lib/emitter/tasks'
|
18
|
-
|
19
|
-
Emitter::Tasks.define
|
20
|
-
RAKEFILE
|
21
|
-
end
|
22
|
-
|
23
|
-
describe '#define' do
|
24
|
-
describe 'docs task' do
|
25
|
-
it 'should generate docs' do
|
26
|
-
Sandbox.play do |path|
|
27
|
-
flight_path = File.join(path, 'flight')
|
28
|
-
git "clone git://github.com/brighterplanet/flight.git #{flight_path}"
|
29
|
-
File.open(File.join(flight_path, 'Rakefile'), 'w') do |f|
|
30
|
-
f.puts rakefile
|
31
|
-
end
|
32
|
-
|
33
|
-
`cd #{flight_path} && rake docs`
|
34
|
-
Dir.entries(File.join(flight_path, 'docs')).
|
35
|
-
count.should > 2
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
describe 'pages task' do
|
41
|
-
it 'should commit any changed doc files' do
|
42
|
-
Sandbox.play do |path|
|
43
|
-
flight_path = File.join(path, 'flight')
|
44
|
-
git "clone git://github.com/brighterplanet/flight.git #{flight_path}"
|
45
|
-
File.open(File.join(flight_path, 'Rakefile'), 'w') do |f|
|
46
|
-
f.puts rakefile
|
47
|
-
end
|
48
|
-
|
49
|
-
`cd #{flight_path} && mkdir docs && echo "<html>" > docs/foobar.html`
|
50
|
-
`cd #{flight_path} && NO_PUSH=true rake pages`
|
51
|
-
|
52
|
-
git('log -n 1', File.join(flight_path, 'docs')).
|
53
|
-
should =~ /rebuild pages/
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|