org_tp 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a83f8237762908daa19602bd9081127d14400a6
4
- data.tar.gz: cce28c651cbbacf2efaa215209135bc1e963337b
3
+ metadata.gz: 6796f82f609344f8350cae3affcea39fe0ca381e
4
+ data.tar.gz: 2e42598320d8acfd1e610e8049339667180b2814
5
5
  SHA512:
6
- metadata.gz: 91391f554d786d9138edb2226bf8eec232c894cc109f854f658b96b9a585a0df75bdf114414bcfbcf8c0f43881725571dc1e842149a82fe3cea603b1652e353f
7
- data.tar.gz: cb22bf2cbc811a43cbb1a19f23d728060443621139faecca02c30fc109a83dcce3502a3d7b2c8526343f623bffa215e866c2f47727381ac2881fe47be53bbd9e
6
+ metadata.gz: 155d799a55773f4bbb7cf6786695aa273f38d98ec5f2f962d5603d2042d0d19613eea54becb5760ec5a7550181cb330b9a8a2903ba8514bc20bf176acd9b7018
7
+ data.tar.gz: b36fd6df4820820e44a19916569d526adfb7a19d768abfe9969287f152f293f742135c5ef778ec658813e58735bd9f82e7bb4553239a0138482b1069c22d9d27
@@ -5,9 +5,9 @@ tp 1
5
5
  tp "foo"
6
6
  tp :foo
7
7
  tp [:a, :b]
8
- tp({:id => 1, :name => "alice"})
9
- tp [{:id => 1, :name => "alice"}, {:id => 2, :name => "bob"}]
10
- puts [{:id => 1, :name => "alice"}, {:id => 2, :name => "bob"}].to_t
8
+ tp({id: 1, name: "alice"})
9
+ tp [{id: 1, name: "alice"}, {id: 2, name: "bob"}]
10
+ puts [{id: 1, name: "alice"}, {id: 2, name: "bob"}].to_t
11
11
  puts [{"a" => ["a"]}].to_t
12
12
  puts [{"a" => {"a" => 1}}].to_t
13
13
  # >> |---|
@@ -1,3 +1,3 @@
1
1
  module OrgTp
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/spec/org_tp_spec.rb CHANGED
@@ -9,7 +9,7 @@ describe OrgTp do
9
9
  ]
10
10
  end
11
11
 
12
- it "空の場合" do
12
+ it "empty array" do
13
13
  OrgTp.generate([]).should == ""
14
14
  end
15
15
 
@@ -25,7 +25,7 @@ describe OrgTp do
25
25
  EOT
26
26
  end
27
27
 
28
- it "ヘッダーなし" do
28
+ it "header: false" do
29
29
  OrgTp.generate(@rows, header: false).should == <<~EOT
30
30
  |---+-------+------------|
31
31
  | 1 | alice | 0123456789 |
@@ -35,7 +35,7 @@ EOT
35
35
  EOT
36
36
  end
37
37
 
38
- it "パディングなし" do
38
+ it "padding disable" do
39
39
  OrgTp.generate(@rows, padding: "").should == <<~EOT
40
40
  |--+-----+-----------|
41
41
  |id|name |description|
@@ -47,8 +47,8 @@ EOT
47
47
  EOT
48
48
  end
49
49
 
50
- describe "組み込み" do
51
- it "ハッシュの配列はいままで通り" do
50
+ describe "various to_t" do
51
+ it "hash array" do
52
52
  [{a: 1}].to_t.should == <<~EOT
53
53
  |---|
54
54
  | a |
@@ -58,7 +58,7 @@ EOT
58
58
  EOT
59
59
  end
60
60
 
61
- it "ハッシュのみの場合は縦に表示" do
61
+ it "Hash" do
62
62
  {a: 1}.to_t.should == <<~EOT
63
63
  |---+---|
64
64
  | a | 1 |
@@ -66,7 +66,7 @@ EOT
66
66
  EOT
67
67
  end
68
68
 
69
- it "文字列の配列は縦に並べて表示" do
69
+ it "String Array" do
70
70
  ["a", "b"].to_t.should == <<~EOT
71
71
  |---|
72
72
  | a |
@@ -75,7 +75,7 @@ EOT
75
75
  EOT
76
76
  end
77
77
 
78
- it "その他" do
78
+ it "Others" do
79
79
  1.to_t.should be_present
80
80
  "1".to_t.should be_present
81
81
  Module.new.should be_present
@@ -86,7 +86,7 @@ EOT
86
86
  EOT
87
87
  end
88
88
 
89
- it "ハッシュの配列で値が配列のとき幅がおかしくならない" do
89
+ it "Array of hashes and width is correct even when value is array" do
90
90
  OrgTp.generate([{"a" => ["a"]}]).should == <<~EOT
91
91
  |-------|
92
92
  | a |
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org_tp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akicho8
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-05 00:00:00.000000000 Z
11
+ date: 2017-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport