kramdown-tablerize 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b83c03bc46d69faff77aee6e5eab7947a4c9cf08
4
- data.tar.gz: b2c3def4fcaa0fb5a18343a18fa10c0a19e9284d
3
+ metadata.gz: 43cfede35b68fb8fe3ffb16c69817f02aab58102
4
+ data.tar.gz: b8737aef72a9f23b6f8435d65d93c6cc11f583ee
5
5
  SHA512:
6
- metadata.gz: f6cd7b548ad410e5270f6366029a92fea99bb39013b0dae51cf7bdbdac74cb8206236233dd5a337bc28efd70ba8c8093d1b2b4d2d99af9340bf4c95c4b5bed35
7
- data.tar.gz: 077504cd4575d3e1bb7e4d0878475c74151a13937c20f0ae9f3d5f89bf8d064fed6ac972a8e281d4ff71bd07f081fa0aeae0f83077b88b1e6f10d1212c2cd0c0
6
+ metadata.gz: f3a5ad2402c397505a61e53a328fe3dd87a77f6b3e7f2d6e974b6c033b965e3631bb188e071b95dba910f7274fc8da11328620c215c2b27a20b257788c4dc0f0
7
+ data.tar.gz: 8e35879375dfc292c75ba751d1253c7adf3bfec979be8692a916a70b73eb22394a4d14edcfd07eee9be49132ddc97ac693f00174d0d198af45d5ddcf91c2afbf
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'kramdown', '~> 1.2', '>= 1.2.0'
4
+ gem 'tablerize', '~> 1.0', '>= 1.0.0'
5
+
6
+ group :test do
7
+ gem 'rspec', '~> 3.0'
8
+ end
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  kramdown-tablerize
2
2
  ==================
3
3
 
4
+ [![Build Status](https://travis-ci.org/IFTTT/kramdown-tablerize.svg)](https://travis-ci.org/IFTTT/kramdown-tablerize)
5
+
6
+ ```shell
7
+ gem install kramdown-tablerize
8
+ ```
9
+
4
10
  A [kramdown] plugin to convert YAML to HTML tables inside Markdown, using
5
11
  [Tablerize].
6
12
 
@@ -10,16 +16,7 @@ A [kramdown] plugin to convert YAML to HTML tables inside Markdown, using
10
16
 
11
17
  ## Usage
12
18
 
13
- To install:
14
-
15
- ```shell
16
- cd kramdown-tablerize
17
- make install
18
- # or (soon)
19
- gem install kramdown-tablerize
20
- ```
21
-
22
- Then, in Ruby...
19
+ In Ruby...
23
20
 
24
21
  ```ruby
25
22
  require 'kramdown-tablerize'
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.email = 'opensource+tablerize@szhu.me'
16
16
  gem.license = 'MIT'
17
17
 
18
+ gem.required_ruby_version = '>= 1.9.3'
18
19
  gem.add_dependency 'kramdown', '~> 1.2', '>= 1.2.0'
19
20
  gem.add_dependency 'tablerize', '~> 1.0', '>= 1.0.0'
20
21
  gem.executables = ['kramdown-tablerize']
@@ -10,7 +10,7 @@ module Tablerize
10
10
  # number where the error occurred in YAML won't be the same as where it
11
11
  # occurred in the Markdown source.
12
12
  def self.printable_error_context(text, target_line)
13
- raw_lines = text.lines
13
+ raw_lines = text.lines.to_a
14
14
  start_line = [target_line - ERROR_CONTEXT_LINES, 1].max
15
15
  end_line = [target_line + ERROR_CONTEXT_LINES, raw_lines.length].min
16
16
  fmt_lines = (start_line..end_line).map do |line|
@@ -1,7 +1,7 @@
1
1
  module Tablerize
2
2
  module Plugin
3
3
  module Kramdown
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-tablerize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Zhu
@@ -62,6 +62,7 @@ files:
62
62
  - ".gitignore"
63
63
  - ".rspec"
64
64
  - ".travis.yml"
65
+ - Gemfile
65
66
  - LICENSE
66
67
  - Makefile
67
68
  - README.md
@@ -89,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
- version: '0'
93
+ version: 1.9.3
93
94
  required_rubygems_version: !ruby/object:Gem::Requirement
94
95
  requirements:
95
96
  - - ">="