bookie_accounting 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Rakefile +4 -7
- data/TODO +1 -0
- data/bin/bookie-create-tables +1 -1
- data/bin/bookie-send +10 -1
- data/bookie_accounting.gemspec +6 -3
- data/lib/bookie/database.rb +241 -175
- data/lib/bookie/extensions.rb +72 -0
- data/lib/bookie/formatter.rb +15 -7
- data/lib/bookie/formatters/comma_dump.rb +9 -3
- data/lib/bookie/formatters/stdout.rb +1 -1
- data/lib/bookie/sender.rb +76 -16
- data/lib/bookie/senders/standalone.rb +2 -2
- data/lib/bookie/version.rb +1 -1
- data/rpm/bookie_accounting.spec.erb +2 -0
- data/spec/comma_dump_formatter_spec.rb +21 -12
- data/spec/database_spec.rb +199 -103
- data/spec/extensions_spec.rb +25 -0
- data/spec/formatter_spec.rb +37 -32
- data/spec/sender_spec.rb +127 -68
- data/spec/spec_helper.rb +15 -1
- data/spec/spreadsheet_formatter_spec.rb +16 -14
- data/spec/stdout_formatter_spec.rb +10 -8
- metadata +57 -11
data/spec/formatter_spec.rb
CHANGED
@@ -30,46 +30,51 @@ describe Bookie::Formatter do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it "correctly formats durations" do
|
33
|
-
Bookie::Formatter.format_duration(
|
33
|
+
Bookie::Formatter.format_duration(1.seconds + 2.minutes + 3.hours + 4.days + 5.weeks).should eql '5 weeks, 4 days, 03:02:01'
|
34
|
+
Bookie::Formatter.format_duration(1.weeks + 1.days).should eql '1 week, 1 day, 00:00:00'
|
34
35
|
end
|
35
36
|
|
36
37
|
it "correctly calculates fields for jobs" do
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
38
|
+
with_utc do
|
39
|
+
@formatter.send(:fields_for_each_job, @jobs.limit(1).all) do |fields|
|
40
|
+
fields.should eql [
|
41
|
+
'root',
|
42
|
+
'root',
|
43
|
+
'test1',
|
44
|
+
'Standalone',
|
45
|
+
'2012-01-01 00:00:00',
|
46
|
+
'2012-01-01 01:00:00',
|
47
|
+
'0 weeks, 0 days, 01:00:00',
|
48
|
+
'0 weeks, 0 days, 00:01:40',
|
49
|
+
'200kb (avg)',
|
50
|
+
'vi',
|
51
|
+
0,
|
52
|
+
]
|
53
|
+
end
|
54
|
+
jobs = [Bookie::Database::Job.first]
|
55
|
+
jobs[0].system.system_type.memory_stat_type = :unknown
|
56
|
+
@formatter.send(:fields_for_each_job, jobs) do |fields|
|
57
|
+
fields[8].should eql '200kb'
|
58
|
+
end
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
59
62
|
describe "#print_summary" do
|
60
63
|
it "prints the correct summary fields" do
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
:
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
64
|
+
with_utc do
|
65
|
+
Time.expects(:now).returns(base_time + 40.hours).at_least_once
|
66
|
+
@formatter.print_summary(@jobs, @summaries, Bookie::Database::System)
|
67
|
+
@formatter.flush
|
68
|
+
$field_values.should eql [40, "0 weeks, 0 days, 01:06:40", "50.0000%", "0 weeks, 5 days, 20:00:00", "0.7937%", "1750000 kb", "0.0114%"]
|
69
|
+
Bookie::Database::System.expects(:summary).returns(
|
70
|
+
:avail_cpu_time => 0,
|
71
|
+
:avail_memory_time => 0,
|
72
|
+
:avail_memory_avg => 0
|
73
|
+
)
|
74
|
+
@formatter.print_summary(@jobs, @summaries, Bookie::Database::System, base_time ... base_time)
|
75
|
+
@formatter.flush
|
76
|
+
$field_values.should eql [0, "0 weeks, 0 days, 00:00:00", "0.0000%", "0 weeks, 0 days, 00:00:00", "0.0000%", "0 kb", "0.0000%"]
|
77
|
+
end
|
73
78
|
end
|
74
79
|
|
75
80
|
it "returns the summary objects" do
|
data/spec/sender_spec.rb
CHANGED
@@ -5,27 +5,48 @@ class JobStub
|
|
5
5
|
attr_accessor :group_name
|
6
6
|
attr_accessor :command_name
|
7
7
|
attr_accessor :start_time
|
8
|
-
attr_accessor :end_time
|
9
8
|
attr_accessor :wall_time
|
10
9
|
attr_accessor :cpu_time
|
11
10
|
attr_accessor :memory
|
12
11
|
attr_accessor :exit_code
|
13
12
|
|
14
13
|
include Bookie::ModelHelpers
|
14
|
+
|
15
|
+
def self.from_job(job)
|
16
|
+
stub = self.new
|
17
|
+
stub.user_name = job.user.name
|
18
|
+
stub.group_name = job.user.group.name
|
19
|
+
stub.command_name = job.command_name
|
20
|
+
stub.start_time = job.start_time
|
21
|
+
stub.wall_time = job.wall_time
|
22
|
+
stub.cpu_time = job.cpu_time
|
23
|
+
stub.memory = job.memory
|
24
|
+
stub.exit_code = job.exit_code
|
25
|
+
stub
|
26
|
+
end
|
15
27
|
end
|
16
28
|
|
17
29
|
describe Bookie::Sender do
|
18
30
|
before(:all) do
|
19
|
-
base_time = Date.new(2012).to_time
|
20
31
|
Bookie::Database::Migration.up
|
21
|
-
|
32
|
+
fields = {
|
22
33
|
:name => 'localhost',
|
23
34
|
:system_type => Bookie::Sender.new(@config).system_type,
|
24
|
-
:start_time => base_time,
|
25
|
-
:end_time => nil,
|
26
35
|
:cores => @config.cores,
|
27
|
-
:memory => @config.memory
|
28
|
-
|
36
|
+
:memory => @config.memory,
|
37
|
+
}
|
38
|
+
@sys_1 = Bookie::Database::System.new(fields)
|
39
|
+
@sys_1.start_time = base_time
|
40
|
+
@sys_1.end_time = base_time + 1000
|
41
|
+
@sys_1.save!
|
42
|
+
@sys_2 = Bookie::Database::System.new(fields)
|
43
|
+
@sys_2.start_time = base_time + 1001
|
44
|
+
@sys_2.end_time = nil
|
45
|
+
@sys_2.save!
|
46
|
+
fields[:name] = 'dummy'
|
47
|
+
@sys_dummy = Bookie::Database::System.new(fields)
|
48
|
+
@sys_dummy.start_time = base_time
|
49
|
+
@sys_dummy.save!
|
29
50
|
end
|
30
51
|
|
31
52
|
after(:all) do
|
@@ -76,34 +97,17 @@ describe Bookie::Sender do
|
|
76
97
|
end
|
77
98
|
|
78
99
|
it "chooses the correct systems" do
|
79
|
-
|
100
|
+
Bookie::Database::Job.delete_all
|
80
101
|
sender = Bookie::Sender.new(@config)
|
81
|
-
|
82
|
-
t = Date.new(2012).to_time
|
83
|
-
fields = {
|
84
|
-
:name => 'test',
|
85
|
-
:system_type => sys_type,
|
86
|
-
:cores => @config.cores,
|
87
|
-
:memory => @config.memory,
|
88
|
-
}
|
89
|
-
sys_1 = Bookie::Database::System.new(fields)
|
90
|
-
sys_1.start_time = t
|
91
|
-
sys_1.end_time = t + 1000
|
92
|
-
sys_1.save!
|
93
|
-
sys_2 = Bookie::Database::System.new(fields)
|
94
|
-
sys_2.start_time = t + 1001
|
95
|
-
sys_2.end_time = nil
|
96
|
-
sys_2.save!
|
97
|
-
|
102
|
+
|
98
103
|
def sender.each_job(filename)
|
99
|
-
t = Date.new(2012).to_time
|
100
104
|
[0, 1001].each do |offset|
|
101
105
|
job = JobStub.new
|
102
106
|
job.user_name = 'blm'
|
103
107
|
job.group_name = 'blm'
|
104
108
|
job.command_name = 'vi'
|
105
|
-
job.start_time =
|
106
|
-
job.wall_time =
|
109
|
+
job.start_time = Helpers::BASE_TIME + offset
|
110
|
+
job.wall_time = 1000
|
107
111
|
job.cpu_time = 2
|
108
112
|
job.memory = 300
|
109
113
|
job.exit_code = 0
|
@@ -111,54 +115,105 @@ describe Bookie::Sender do
|
|
111
115
|
end
|
112
116
|
end
|
113
117
|
|
114
|
-
|
118
|
+
#The filename is just a dummy argument.
|
119
|
+
sender.send_data('snapshot/pacct')
|
115
120
|
|
116
|
-
jobs = Bookie::Database::Job.by_system_name(
|
117
|
-
jobs[0].system.should eql sys_1
|
118
|
-
jobs[1].system.should eql sys_2
|
121
|
+
jobs = Bookie::Database::Job.by_system_name(@config.hostname).order(:end_time).all
|
122
|
+
jobs[0].system.should eql @sys_1
|
123
|
+
jobs[1].system.should eql @sys_2
|
124
|
+
end
|
125
|
+
|
126
|
+
it "correctly finds duplicates" do
|
127
|
+
job = Bookie::Database::Job.first
|
128
|
+
stub = JobStub.from_job(job)
|
129
|
+
duplicate = @sender.duplicate(stub, job.system)
|
130
|
+
duplicate.should eql job
|
131
|
+
@sender.duplicate(stub, @sys_2).should eql nil
|
132
|
+
[:user_name, :group_name, :command_name, :start_time, :wall_time, :cpu_time, :memory, :exit_code].each do |field|
|
133
|
+
old_val = stub.send(field)
|
134
|
+
if old_val.is_a?(String)
|
135
|
+
stub.send("#{field}=", 'string')
|
136
|
+
else
|
137
|
+
stub.send("#{field}=", old_val + 1)
|
138
|
+
end
|
139
|
+
@sender.duplicate(stub, @sys_2).should eql nil
|
140
|
+
stub.send("#{field}=", old_val)
|
141
|
+
end
|
119
142
|
end
|
120
143
|
|
121
144
|
it "deletes cached summaries that overlap the new jobs" do
|
122
145
|
Bookie::Database::Job.delete_all
|
123
|
-
sender
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
@sender.send_data('snapshot/torque_large')
|
147
|
+
time_min = Bookie::Database::Job.order(:start_time).first.start_time
|
148
|
+
time_max = Bookie::Database::Job.order('end_time DESC').first.end_time
|
149
|
+
Bookie::Database::Job.delete_all
|
150
|
+
@sender.expects(:clear_summaries).with(time_min.to_date, time_max.to_date)
|
151
|
+
@sender.send_data('snapshot/torque_large')
|
152
|
+
end
|
153
|
+
|
154
|
+
describe "#clear_summaries" do
|
155
|
+
it "deletes cached summaries" do
|
156
|
+
Bookie::Database::Job.delete_all
|
157
|
+
sender = Bookie::Sender.new(@config)
|
158
|
+
sender.send_data('snapshot/torque_large')
|
159
|
+
|
160
|
+
user = Bookie::Database::User.first
|
161
|
+
date_start = Date.new(2012) - 2
|
162
|
+
date_end = date_start + 4
|
163
|
+
(date_start .. date_end).each do |date|
|
164
|
+
[@sys_1, @sys_2, @sys_dummy].each do |system|
|
165
|
+
sum = Bookie::Database::JobSummary.create!(
|
166
|
+
:date => date,
|
167
|
+
:system => system,
|
168
|
+
:user => user,
|
169
|
+
:command_name => 'vi',
|
170
|
+
:num_jobs => 1,
|
171
|
+
:cpu_time => 1,
|
172
|
+
:memory_time => 100,
|
173
|
+
:successful => 1
|
174
|
+
)
|
175
|
+
end
|
149
176
|
end
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
sum.
|
177
|
+
|
178
|
+
sender.send(:clear_summaries, date_start + 1, date_end - 1)
|
179
|
+
|
180
|
+
sums = Bookie::Database::JobSummary.all
|
181
|
+
sums.length.should eql 9
|
182
|
+
sums.each do |sum|
|
183
|
+
unless sum.system == @sys_dummy
|
184
|
+
(date_start + 1 .. date_end - 1).cover?(sum.date).should eql false
|
185
|
+
end
|
157
186
|
end
|
187
|
+
sums = Bookie::Database::JobSummary.by_date(Date.new(2012))
|
188
|
+
sums.count.should eql 1
|
189
|
+
sums.first.system.should eql @sys_dummy
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
describe "#undo_send" do
|
194
|
+
it "removes the correct entries" do
|
195
|
+
Bookie::Database::Job.delete_all
|
196
|
+
@sender.send_data('snapshot/torque_large')
|
197
|
+
@sender.send_data('snapshot/torque')
|
198
|
+
@sender.undo_send('snapshot/torque_large')
|
199
|
+
|
200
|
+
Bookie::Database::Job.count.should eql 1
|
201
|
+
job = Bookie::Database::Job.first
|
202
|
+
Bookie::Database::Job.delete_all
|
203
|
+
@sender.send_data('snapshot/torque')
|
204
|
+
job2 = Bookie::Database::Job.first
|
205
|
+
job2.id = job.id
|
206
|
+
job2.should eql job
|
207
|
+
end
|
208
|
+
|
209
|
+
it "deletes cached summaries in the affected range" do
|
210
|
+
Bookie::Database::Job.delete_all
|
211
|
+
@sender.send_data('snapshot/torque_large')
|
212
|
+
time_min = Bookie::Database::Job.order(:start_time).first.start_time
|
213
|
+
time_max = Bookie::Database::Job.order('end_time DESC').first.end_time
|
214
|
+
@sender.expects(:clear_summaries).with(time_min.to_date, time_max.to_date)
|
215
|
+
@sender.undo_send('snapshot/torque_large')
|
158
216
|
end
|
159
|
-
sums = Bookie::Database::JobSummary.by_date(Date.new(2012)).all
|
160
|
-
sums.length.should eql 1
|
161
|
-
sums[0].system.should eql systems[1]
|
162
217
|
end
|
163
218
|
end
|
164
219
|
|
@@ -186,4 +241,8 @@ describe Bookie::ModelHelpers do
|
|
186
241
|
djob.memory.should eql @job.memory
|
187
242
|
djob.exit_code.should eql @job.exit_code
|
188
243
|
end
|
244
|
+
|
245
|
+
it "correctly calculates end time" do
|
246
|
+
@job.end_time.should eql @job.start_time + @job.wall_time
|
247
|
+
end
|
189
248
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -52,8 +52,14 @@ end
|
|
52
52
|
module Helpers
|
53
53
|
extend self
|
54
54
|
|
55
|
+
BASE_TIME = Time.utc(2012)
|
56
|
+
|
57
|
+
#To get around the 'formal argument cannot be a constant' error
|
58
|
+
def base_time
|
59
|
+
BASE_TIME
|
60
|
+
end
|
61
|
+
|
55
62
|
def generate_database
|
56
|
-
base_time = Time.local(2012)
|
57
63
|
#Create test database
|
58
64
|
groups = {}
|
59
65
|
group_names = ['root', 'default', 'admin', 'admin']
|
@@ -118,4 +124,12 @@ module Helpers
|
|
118
124
|
job.save!
|
119
125
|
end
|
120
126
|
end
|
127
|
+
|
128
|
+
def with_utc
|
129
|
+
prev = ENV['TZ']
|
130
|
+
ENV['TZ'] = 'UTC'
|
131
|
+
yield
|
132
|
+
ensure
|
133
|
+
ENV['TZ'] = prev
|
134
|
+
end
|
121
135
|
end
|
@@ -74,31 +74,33 @@ describe Bookie::Formatters::Spreadsheet do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
it "correctly formats jobs" do
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
77
|
+
with_utc do
|
78
|
+
@formatter.print_jobs(@jobs.limit(2).all)
|
79
|
+
w = @m.worksheet('Details')
|
80
|
+
w.last_row_index.should eql 2
|
81
|
+
w.mock_columns.length.should eql Bookie::Formatter::DETAILS_FIELD_LABELS.length
|
82
|
+
w.mock_columns.each do |col|
|
83
|
+
col.width.should_not eql nil
|
84
|
+
end
|
85
|
+
w.row(0).should eql Bookie::Formatter::DETAILS_FIELD_LABELS
|
86
|
+
w.row(1).should eql ["root", "root", "test1", "Standalone", "2012-01-01 00:00:00",
|
87
|
+
"2012-01-01 01:00:00", "0 weeks, 0 days, 01:00:00", "0 weeks, 0 days, 00:01:40", "200kb (avg)", 'vi', 0]
|
88
|
+
w.row(2).should eql ["test", "default", "test1", "Standalone", "2012-01-01 01:00:00",
|
89
|
+
"2012-01-01 02:00:00", "0 weeks, 0 days, 01:00:00", "0 weeks, 0 days, 00:01:40", "200kb (avg)", 'emacs', 1]
|
83
90
|
end
|
84
|
-
w.row(0).should eql Bookie::Formatter::DETAILS_FIELD_LABELS
|
85
|
-
w.row(1).should eql ["root", "root", "test1", "Standalone", "2012-01-01 00:00:00",
|
86
|
-
"2012-01-01 01:00:00", "01:00:00", "00:01:40", "200kb (avg)", 'vi', 0]
|
87
|
-
w.row(2).should eql ["test", "default", "test1", "Standalone", "2012-01-01 01:00:00",
|
88
|
-
"2012-01-01 02:00:00", "01:00:00", "00:01:40", "200kb (avg)", 'emacs', 1]
|
89
91
|
end
|
90
92
|
|
91
93
|
it "correctly formats summaries" do
|
92
|
-
Time.expects(:now).returns(
|
94
|
+
Time.expects(:now).returns(base_time + 40.hours).at_least_once
|
93
95
|
@formatter.print_summary(@jobs, @summaries, Bookie::Database::System)
|
94
96
|
w = @m.worksheet('Summary')
|
95
97
|
w.column(0).width.should_not eql nil
|
96
98
|
w.last_row_index.should eql 6
|
97
99
|
w.mock_rows.should eql [
|
98
100
|
["Number of jobs", 40],
|
99
|
-
["Total CPU time", "01:06:40"],
|
101
|
+
["Total CPU time", "0 weeks, 0 days, 01:06:40"],
|
100
102
|
["Successful", "50.0000%"],
|
101
|
-
["Available CPU time", "
|
103
|
+
["Available CPU time", "0 weeks, 5 days, 20:00:00"],
|
102
104
|
["CPU time used", "0.7937%"],
|
103
105
|
["Available memory (average)", "1750000 kb"],
|
104
106
|
["Memory used (average)", "0.0114%"],
|
@@ -34,25 +34,27 @@ describe Bookie::Formatters::Stdout do
|
|
34
34
|
end
|
35
35
|
|
36
36
|
it "correctly formats jobs" do
|
37
|
+
with_utc do
|
37
38
|
@formatter.print_jobs(@jobs.order(:start_time).limit(2))
|
38
39
|
@formatter.flush
|
39
40
|
@m.buf.should eql <<-eos
|
40
|
-
User Group System System type Start time End time Wall time
|
41
|
-
|
42
|
-
root root test1 Standalone 2012-01-01 00:00:00 2012-01-01 01:00:00 01:00:00
|
43
|
-
test default test1 Standalone 2012-01-01 01:00:00 2012-01-01 02:00:00 01:00:00
|
41
|
+
User Group System System type Start time End time Wall time CPU time Memory usage Command Exit code
|
42
|
+
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
43
|
+
root root test1 Standalone 2012-01-01 00:00:00 2012-01-01 01:00:00 0 weeks, 0 days, 01:00:00 0 weeks, 0 days, 00:01:40 200kb (avg) vi 0
|
44
|
+
test default test1 Standalone 2012-01-01 01:00:00 2012-01-01 02:00:00 0 weeks, 0 days, 01:00:00 0 weeks, 0 days, 00:01:40 200kb (avg) emacs 1
|
44
45
|
eos
|
46
|
+
end
|
45
47
|
end
|
46
|
-
|
48
|
+
|
47
49
|
it "correctly formats summaries" do
|
48
|
-
Time.expects(:now).returns(
|
50
|
+
Time.expects(:now).returns(base_time + 40.hours).at_least_once
|
49
51
|
@formatter.print_summary(@jobs, @summaries, Bookie::Database::System)
|
50
52
|
@formatter.flush
|
51
53
|
@m.buf.should eql <<-eos
|
52
54
|
Number of jobs: 40
|
53
|
-
Total CPU time: 01:06:40
|
55
|
+
Total CPU time: 0 weeks, 0 days, 01:06:40
|
54
56
|
Successful: 50.0000%
|
55
|
-
Available CPU time:
|
57
|
+
Available CPU time: 0 weeks, 5 days, 20:00:00
|
56
58
|
CPU time used: 0.7937%
|
57
59
|
Available memory (average): 1750000 kb
|
58
60
|
Memory used (average): 0.0114%
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookie_accounting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.0
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ben Merritt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-
|
18
|
+
date: 2013-06-14 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: json
|
37
37
|
prerelease: false
|
38
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id002
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: mysql2
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
@@ -61,7 +61,7 @@ dependencies:
|
|
61
61
|
type: :runtime
|
62
62
|
version_requirements: *id003
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: pacct
|
65
65
|
prerelease: false
|
66
66
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
67
|
none: false
|
@@ -72,10 +72,10 @@ dependencies:
|
|
72
72
|
segments:
|
73
73
|
- 0
|
74
74
|
version: "0"
|
75
|
-
type: :
|
75
|
+
type: :runtime
|
76
76
|
version_requirements: *id004
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
78
|
+
name: spreadsheet
|
79
79
|
prerelease: false
|
80
80
|
requirement: &id005 !ruby/object:Gem::Requirement
|
81
81
|
none: false
|
@@ -86,10 +86,10 @@ dependencies:
|
|
86
86
|
segments:
|
87
87
|
- 0
|
88
88
|
version: "0"
|
89
|
-
type: :
|
89
|
+
type: :runtime
|
90
90
|
version_requirements: *id005
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
92
|
+
name: bundler
|
93
93
|
prerelease: false
|
94
94
|
requirement: &id006 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
@@ -102,6 +102,48 @@ dependencies:
|
|
102
102
|
version: "0"
|
103
103
|
type: :development
|
104
104
|
version_requirements: *id006
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: mocha
|
107
|
+
prerelease: false
|
108
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
type: :development
|
118
|
+
version_requirements: *id007
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
name: rspec
|
121
|
+
prerelease: false
|
122
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
hash: 3
|
128
|
+
segments:
|
129
|
+
- 0
|
130
|
+
version: "0"
|
131
|
+
type: :development
|
132
|
+
version_requirements: *id008
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: sqlite3
|
135
|
+
prerelease: false
|
136
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
hash: 3
|
142
|
+
segments:
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
|
+
type: :development
|
146
|
+
version_requirements: *id009
|
105
147
|
description: A simple system to record and query process accounting records
|
106
148
|
email:
|
107
149
|
- blm768@gmail.com
|
@@ -119,6 +161,7 @@ files:
|
|
119
161
|
- LICENSE
|
120
162
|
- README.md
|
121
163
|
- Rakefile
|
164
|
+
- TODO
|
122
165
|
- bin/bookie-create-tables
|
123
166
|
- bin/bookie-data
|
124
167
|
- bin/bookie-send
|
@@ -126,6 +169,7 @@ files:
|
|
126
169
|
- lib/bookie.rb
|
127
170
|
- lib/bookie/config.rb
|
128
171
|
- lib/bookie/database.rb
|
172
|
+
- lib/bookie/extensions.rb
|
129
173
|
- lib/bookie/formatter.rb
|
130
174
|
- lib/bookie/formatters/comma_dump.rb
|
131
175
|
- lib/bookie/formatters/spreadsheet.rb
|
@@ -150,6 +194,7 @@ files:
|
|
150
194
|
- spec/comma_dump_formatter_spec.rb
|
151
195
|
- spec/config_spec.rb
|
152
196
|
- spec/database_spec.rb
|
197
|
+
- spec/extensions_spec.rb
|
153
198
|
- spec/formatter_spec.rb
|
154
199
|
- spec/sender_spec.rb
|
155
200
|
- spec/spec_helper.rb
|
@@ -195,6 +240,7 @@ test_files:
|
|
195
240
|
- spec/comma_dump_formatter_spec.rb
|
196
241
|
- spec/config_spec.rb
|
197
242
|
- spec/database_spec.rb
|
243
|
+
- spec/extensions_spec.rb
|
198
244
|
- spec/formatter_spec.rb
|
199
245
|
- spec/sender_spec.rb
|
200
246
|
- spec/spec_helper.rb
|