raicoto 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/raicoto/activerecord/inspection.rb +3 -1
- data/lib/raicoto/railtie.rb +9 -0
- data/lib/raicoto/version.rb +1 -1
- data/lib/raicoto.rb +3 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDllMzI2MTRhZGNjZDM4Nzk0OTRjOTg2ZTE0YTUyOTcyOTIzM2U3OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTFmMmQxNTgwODY2OTIxNDI3MTFlOTA4N2EzOTQwNjhkNjRjODk2Mw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Zjk1M2EwMzRlZDdjOTNjOTgxZmYzY2I5YzU0MTdjMTM2NDA1NjY0YWIyZTA4
|
10
|
+
NjNiYmMxNTM2Mjg0MmIwMWE5ZDlmNDg0YTgzYjgxYjU1MTNiNWY0NzdmZTkw
|
11
|
+
ODg5MTMxNDhiODM0NjljYmExNGRmMDBhM2I5NmI3OGJiMmJiMWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTYwOGY2MjkxYzljZDcxYjQ2YmQ5OTAxMjZmMDUzYjc1YjI2ZjZiMWFhZWYw
|
14
|
+
MDI4YjRmZmViODc3NDBjZDlhZTFmNDlmMzdmYjNiYmE2YTNlZGQwM2QzNjk3
|
15
|
+
MmJlMWIzMTFiMzQyNGI3OGUyY2IzMjU2ZDU5OTQzOWZjYjQ5YzI=
|
@@ -7,6 +7,9 @@ class ActiveRecord::Base
|
|
7
7
|
attrs.uniq!
|
8
8
|
lengths = {}
|
9
9
|
records = self.all
|
10
|
+
if records.count < 1
|
11
|
+
return
|
12
|
+
end
|
10
13
|
records.each do |r|
|
11
14
|
attrs.each do |a|
|
12
15
|
val = r
|
@@ -16,7 +19,6 @@ class ActiveRecord::Base
|
|
16
19
|
lengths[a] = [lengths[a], len].max
|
17
20
|
end
|
18
21
|
end
|
19
|
-
|
20
22
|
out = [attrs.map{|a| a.rjust(lengths[a]+1)}.join]
|
21
23
|
out += records.map { |r|
|
22
24
|
line = ""
|
data/lib/raicoto/version.rb
CHANGED
data/lib/raicoto.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raicoto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Johnston
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- lib/raicoto.rb
|
54
54
|
- lib/raicoto/activerecord/inspection.rb
|
55
|
+
- lib/raicoto/railtie.rb
|
55
56
|
- lib/raicoto/version.rb
|
56
57
|
- raicoto.gemspec
|
57
58
|
homepage: ''
|