mark_maker 0.5.0 → 0.5.1

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: 76f4840b445542d5b47ffbe2c24cbace45b7bee2
4
- data.tar.gz: 21963a8d8dbbb87fcdd2fcbf1dc753438dedf243
3
+ metadata.gz: fd856055ec57459656c6963b82423f55febfe440
4
+ data.tar.gz: 355e6e14d071a9d53a9f2fd4333896ab1e0253b7
5
5
  SHA512:
6
- metadata.gz: 6215987f2defe491353b4a2fdb7d67b65836f0d93054f9c7d21e71e4fc9eddc5a94bf7770d9cce31d4916fabcb88c3d1324f8352c4114c831560e9ae901d1a3a
7
- data.tar.gz: ed59aa1746b2e05038cccfbc361ba386fa09dcd724ef5d13e4c870c85b79655be9bc19dd0fad1663f24e2cfed3ca52fd10439d2869e903a5389fd94ec39d2441
6
+ metadata.gz: 95a31758ca8963bebd1080210c333c0ffc7d29767ffeaed3151a7cf92c5cd8bbacaa7788ad359c73efb9db943c735d5e8564eb7ddb2a2cbf47c1d6986203b075
7
+ data.tar.gz: 351deb838b05b55f91f1a40991de02e297ed08bbc795a7ffb73cf7d9dad0c74648f26337fb88dcf9cd8a012aa860be5402be3e2906331ae1b136f7053f73f383
data/.gitignore CHANGED
@@ -12,3 +12,4 @@
12
12
  *.o
13
13
  *.a
14
14
  mkmf.log
15
+ /.idea/
data/README.md CHANGED
@@ -204,8 +204,7 @@ content = <<-QUOTE
204
204
  If you want to quote, you'll get a quote.
205
205
  Warning, it will just quote line by line, not break it up nicely.
206
206
  QUOTE
207
- puts gen.block_quote(*content.split("
208
- "))
207
+ puts gen.block_quote(*content.lines)
209
208
  ```
210
209
 
211
210
  Produces the markdown ...
@@ -108,7 +108,7 @@ puts ""
108
108
  puts "Standard markdown code blocks and #{gen.code_span('code span')} are supported, as well as github"
109
109
  puts "flavored markdown fenced code blocks."
110
110
  puts ""
111
- sample_block = <<-EOT.split("\n")
111
+ sample_block = <<-EOT.lines
112
112
  some_code = [ "# add it up",
113
113
  "total = [1, 2, 3, 4].inject do |sum, i|",
114
114
  " sum += i",
@@ -154,14 +154,14 @@ table_code = <<-EOT
154
154
  puts gen.table_row("Second", "BC", "$14.00")
155
155
  puts gen.table_row("Third", "DEFGH", "$1,034.50")
156
156
  EOT
157
- puts gen.code_block(*table_code.split("\n"))
157
+ puts gen.code_block(*table_code.lines)
158
158
  puts ""
159
159
  puts "Produces this terribly ugly markdown ..."
160
160
  puts ""
161
161
  table_markdown = capture_stdout do
162
162
  eval(table_code)
163
163
  end
164
- puts gen.fenced_code_block(*table_markdown.string.split("\n"))
164
+ puts gen.fenced_code_block(*table_markdown.string.lines)
165
165
  puts ""
166
166
  puts "Or, you can pass all the rows in at once like so ..."
167
167
  puts ""
@@ -175,12 +175,12 @@ pretty_table_code = <<-EOT
175
175
  ]
176
176
  puts gen.table(*table_data)
177
177
  EOT
178
- puts gen.fenced_code_language('ruby', *pretty_table_code.split("\n"))
178
+ puts gen.fenced_code_language('ruby', *pretty_table_code.lines)
179
179
  puts "And get nicely justified markdown like this ..."
180
180
  pretty_table_markdown = capture_stdout do
181
181
  eval(pretty_table_code)
182
182
  end
183
- puts gen.fenced_code_block(*pretty_table_markdown.string.split("\n"))
183
+ puts gen.fenced_code_block(*pretty_table_markdown.string.lines)
184
184
  puts "Which gives you this stunning HTML table ..."
185
185
  puts ""
186
186
  puts eval(pretty_table_code)
@@ -192,16 +192,16 @@ content = <<-QUOTE
192
192
  If you want to quote, you'll get a quote.
193
193
  Warning, it will just quote line by line, not break it up nicely.
194
194
  QUOTE
195
- puts gen.block_quote(*content.split("\n"))
195
+ puts gen.block_quote(*content.lines)
196
196
  EOT
197
- puts gen.fenced_code_block(*block_quote_code.split("\n"))
197
+ puts gen.fenced_code_block(*block_quote_code.lines)
198
198
  puts ""
199
199
  puts "Produces the markdown ..."
200
200
  puts ""
201
201
  block_quote_markdown = capture_stdout do
202
202
  eval(block_quote_code)
203
203
  end
204
- puts gen.fenced_code_block(*block_quote_markdown.string.split("\n"))
204
+ puts gen.fenced_code_block(*block_quote_markdown.string.lines)
205
205
  puts ""
206
206
  puts ""
207
207
  puts "Which looks like this when viewed as HTML..."
@@ -189,12 +189,12 @@ module MarkMaker
189
189
  end
190
190
  end
191
191
 
192
+ # split the cell in two and then add the fill character
193
+ # to the end of the first half of the cell to reach the
194
+ # justified width
192
195
  def fill_justify(fill, *content)
193
196
  width = column_width(*content)
194
197
  content.map do |c|
195
- # split the cell in two and then add the fill character
196
- # to the end of the first half of the cell to reach the
197
- # justified width
198
198
  c.insert(c.length / 2, fill * (width - c.length))
199
199
  end
200
200
  end
@@ -1,4 +1,4 @@
1
1
  # version management
2
2
  module MarkMaker
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
@@ -2,3 +2,5 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
  require 'mark_maker'
3
3
  require 'active_support/core_ext/string'
4
4
  require 'minitest/autorun'
5
+ require 'minitest/reporters'
6
+ Minitest::Reporters.use! Minitest::Reporters::DefaultReporter.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mark_maker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Schneider
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-12 00:00:00.000000000 Z
11
+ date: 2016-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler