seed_report 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/seed_report/version.rb +1 -1
- data/lib/seed_report.rb +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 019532d49673814af6985ed6064dc8e37de51333
|
4
|
+
data.tar.gz: f19dfc85044ede21163f536b9e5e745142958b75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8d3576986076e0d6818581748f34f94e606312789b695acc80312e72cc358ff62aee3e17f1d6fba3e5f53bd240af775dbbecf9827f3b71fb72554137d0facc2
|
7
|
+
data.tar.gz: 0f8fcda82f36e1b28cd0f48b5e6cd5d6a1921946ccc8f7f29e6a9453bb5b7c01e63ae1d563a006a41c2a3e9201fe917cb62a53bdebf98b56c31fe1ef8fd35db2
|
data/lib/seed_report/version.rb
CHANGED
data/lib/seed_report.rb
CHANGED
@@ -3,20 +3,21 @@ require "seed_report/version"
|
|
3
3
|
module SeedReport
|
4
4
|
class << self
|
5
5
|
def for_model(model, &block)
|
6
|
-
print "#{heading(model)} #{initial_count_display(model)}"
|
7
6
|
initial_count = model.count
|
7
|
+
print "#{heading(model)} #{initial_count_display(initial_count)}"
|
8
|
+
|
8
9
|
block.call
|
10
|
+
|
9
11
|
increase = model.count - initial_count
|
10
12
|
puts final_count_display(increase)
|
11
13
|
end
|
12
14
|
|
13
15
|
def heading(model)
|
14
|
-
|
15
|
-
sprintf(" %-19s", class_name)
|
16
|
+
sprintf(" %-19s", model.name)
|
16
17
|
end
|
17
18
|
|
18
|
-
def initial_count_display(
|
19
|
-
"initial count: #{sprintf("%3d",
|
19
|
+
def initial_count_display(count)
|
20
|
+
"initial count: #{sprintf("%3d", count)}"
|
20
21
|
end
|
21
22
|
|
22
23
|
def final_count_display(amount)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seed_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robb Shecter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|