mrtable 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: 96ed9a18eb27745d6768ec317b07556ae131eb54
4
- data.tar.gz: 98d67db991cb936f04c70eb43b018a60245b01bc
3
+ metadata.gz: a645412d40e5c122ca7c6915fc81963c9e306bc7
4
+ data.tar.gz: 4e7f9d00d3504e7e93942aa6e321ae5173937a79
5
5
  SHA512:
6
- metadata.gz: b9dbcbdb67aecd85089041986b2f29a7aac7b4676e68cb31e65a175ed5ba08fcf5d725bd89599118fc7ba4667ffc99e07045fbc086109d3b333ef72d18eb4fee
7
- data.tar.gz: e8e1c9ccc929859fe482469c7d0850a5d15146af4c132caa6d7a5d746390572ca308baf18b80ed6c25148546c9170873697f86f7c9f20053ee04e0191ac0ff6b
6
+ metadata.gz: 11aef020c6fb0a49baf164584e60d6739db02c16af8e3f32ed60d403a4fdcb4f54a3a9d9155d382c53d43ff40910bff37d45a6b5d5a83a13142927e43de7fc22
7
+ data.tar.gz: fa6d9a8067f91aeed6ae6bcbf7e3f317ce6464c16e2e15a07d4e33c85a9c1f5396b824623c443cf3e3194c44a100a3d386c36d957c6963530e860463e3c784b1
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # 0.0.2
2
+
3
+ ## Breaking changes
4
+
5
+ - Always escape pipe
6
+
7
+ # 0.0.1
8
+
9
+ - First release
data/lib/mrtable.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
- require "mrtable/version"
4
3
  require "json"
5
4
 
6
5
  module Mrtable
@@ -92,10 +91,10 @@ module Mrtable
92
91
 
93
92
  ret = json_encode(col)
94
93
  if /^\s+/ =~ ret || /\s+$/ =~ ret || /^\-+$/ =~ ret
95
- '"' + ret + '"'
96
- else
97
- ret.gsub("|", "\\|")
94
+ ret = '"' + ret + '"'
98
95
  end
96
+
97
+ ret.gsub("|", "\\|")
99
98
  end
100
99
 
101
100
  def self.to_table_row(cols)
@@ -1,3 +1,3 @@
1
1
  module Mrtable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mrtable
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
  - sonota88
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-28 00:00:00.000000000 Z
11
+ date: 2017-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,11 +60,10 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - ".gitignore"
63
+ - CHANGELOG.md
63
64
  - Gemfile
64
65
  - README.md
65
66
  - Rakefile
66
- - bin/console
67
- - bin/setup
68
67
  - lib/mrtable.rb
69
68
  - lib/mrtable/version.rb
70
69
  - mrtable.gemspec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "mrtable"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install --path=vendor/bundle
7
-
8
- # Do any other automated setup that you need to do here