flippy 0.0.7 → 0.0.8

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: 7953fdf72ddb0ae18ecd68c3025a97869672eca7
4
- data.tar.gz: 608eb487cd019392e6eb0df87daf6a7bfaaaf625
3
+ metadata.gz: 2ac32b046bd9e616d2a792b80f1ac7a596dcd4ae
4
+ data.tar.gz: a9ee303090506ecceabd43544db5607ac335fc3a
5
5
  SHA512:
6
- metadata.gz: 6bedc81d02fce143787c053c2b96439af32f2ddbc126a98fc30a52d714d076e31ff732242998fd93cd53f879c42b4571f70a9ad60688db89579ea7f58000a6be
7
- data.tar.gz: ae1f6f493cd013be7313352df1a4b00bbcd987350384bc21916978b33dfedba72f412c3e423c7f9082eb5a5da2039ec2e51b3dfe5868b10377639f2d3b3400b2
6
+ metadata.gz: 7d61a1ad9a28d39cadea03b50383133f575edbc19a29754d6f7a399a52440059dc45caff8f597fbf2e9a09c5d2abd8e83d2b533134440a4d75e720b41f71b936
7
+ data.tar.gz: 761fb2f023a3a26762d230783808a7f46469fa9462d2ebaa56a69a4c080b83aee025df09ca14edcd42e6b46e7549bf90c7cf8bb87ba329f4cd54251bc1f4579e
@@ -1,3 +1,6 @@
1
+ == 0.0.7-8 / 2013-03-18
2
+ * Bug Fixes
3
+
1
4
  == 0.0.6 / 2013-03-17
2
5
  * Add Flippy#vertical for conversion of left-right vertical writing style
3
6
  * Add `vertical` option to flippy command
@@ -1,3 +1,3 @@
1
1
  module Flippy
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module Flippy::Vertical
2
3
  PUNC = ["、","。",",","."]
3
4
 
@@ -24,7 +25,7 @@ module Flippy::Vertical
24
25
  top = line[0] || ""
25
26
  rest = line[1..-1] || ""
26
27
  lines << rest.gsub(/[^#{PUNC.join}]/, ' ')
27
- lines << top + rest.gsub(/#{PUNC.join("|")}/, '')
28
+ lines << top + rest.gsub(/#{PUNC.join("|")}/, ' ')
28
29
  }
29
30
 
30
31
  max = lines.map(&:size).max
@@ -12,9 +12,23 @@ describe Flippy do
12
12
    ち 
13
13
    は 
14
14
    |、
15
+     
15
16
  EOS
16
17
  end
17
18
 
19
+ context "with any strings(multiple punctuations)" do
20
+ subject { "こんにちはー、\n日本。人。".vertical }
21
+ it { should eq <<-EOS.chomp }
22
+ 日 こ 
23
+ 本。ん 
24
+   に 
25
+ 人。ち 
26
+   は 
27
+   |、
28
+     
29
+ EOS
30
+ end
31
+
18
32
  context "with empty strings" do
19
33
  subject { "".vertical }
20
34
  it { should eq "" }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flippy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyoendo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-17 00:00:00.000000000 Z
11
+ date: 2013-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop