mark_maker 0.1.0 → 0.2.0

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: fe104d472a4262bf1642fcb00e4f35befa6c0af5
4
- data.tar.gz: 27b3877793ee354426e0019712a69b5f2226061d
3
+ metadata.gz: 1a68f07f8d48fdc287cc5c6f646e84f3a3647bea
4
+ data.tar.gz: 8e9a4a968cfbd8ba7b4d6113349cadfa8f4403a1
5
5
  SHA512:
6
- metadata.gz: dda6c904f6dcda86b820dc8d4df52ee04132f0bc9b5936cbc19efde9a2df57a74517e088ff6f59f7dfd56a8a2cffcefe729d83c0584e37b3a02afd76cf00368f
7
- data.tar.gz: a03c38095f9975f2a6b894512a6025f7e8cfa4e5a868c386d8134eaa703936d998fe8c26ef6b4b585a7775b4e0006b68f0904575b5802b57ff27b927d6a84352
6
+ metadata.gz: c2fd47a0dae3bc3976af88f5474c6a964c8225359138708cc093bfaadf9123336d456ad18475394bced8b3691022dcc5b0c1219ce60356e95b653410862c8c19
7
+ data.tar.gz: 2c18d49746a7db186226069519da9a3cf66b482e709e5bd36bfd5e2bd166c3bd81ad5f12c720a9dbdf401e53ce1c27fa79ce418ffd8578490bc7d14b65fabbc7
data/README.md CHANGED
@@ -23,7 +23,7 @@ Usage
23
23
 
24
24
  MarkMaker provides line oriented conversion of content to markdown elements. It
25
25
  currently supports first, second and third level headings, links, bullets, numbered
26
- bullets, *emphasis* and code markdown. See bin/generate_readme.rb for the code used to generate this
26
+ bullets, *emphasis*, **strong** and code markdown. See bin/generate_readme.rb for the code used to generate this
27
27
  document and a sample of all these markdown generators in action.
28
28
 
29
29
  ### Header Example
@@ -38,7 +38,7 @@ doc << gen.header2("Usage")
38
38
  doc << ""
39
39
  doc << "MarkMaker provides line oriented conversion of content to markdown elements. It"
40
40
  doc << "currently supports first, second and third level headings, links, bullets, numbered"
41
- doc << "bullets, #{gen.emphasis('emphasis')} and code markdown. See #{__FILE__} for the code used to generate this"
41
+ doc << "bullets, #{gen.emphasis('emphasis')}, #{gen.strong('strong')} and code markdown. See #{__FILE__} for the code used to generate this"
42
42
  doc << "document and a sample of all these markdown generators in action."
43
43
  doc << ""
44
44
  doc << gen.header3("Header Example")
@@ -49,21 +49,25 @@ module MarkMaker
49
49
 
50
50
  # creates a github flavored markdown fenced code block
51
51
  def fenced_code_block(*content)
52
- block = *MarkMaker::FENCE
52
+ block = *FENCE
53
53
  block.push(*content)
54
- block << MarkMaker::FENCE
54
+ block << FENCE
55
55
  end
56
56
 
57
57
  # creates a github flavored markdown fenced code block that
58
58
  # specifies the language for syntax highlighting purposes
59
59
  def fenced_code_language(lang, *content)
60
- block = *MarkMaker::FENCE + lang
60
+ block = *FENCE + lang
61
61
  block.push(*content)
62
- block << MarkMaker::FENCE
62
+ block << FENCE
63
63
  end
64
64
 
65
65
  def emphasis(content)
66
- "#{MarkMaker::EMPHASIS}#{content}#{MarkMaker::EMPHASIS}"
66
+ "#{EMPHASIS}#{content}#{EMPHASIS}"
67
+ end
68
+
69
+ def strong(content)
70
+ EMPHASIS * 2 + content + EMPHASIS * 2
67
71
  end
68
72
  end
69
73
  end
@@ -1,3 +1,3 @@
1
1
  module MarkMaker
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -109,10 +109,18 @@ class TestMarkMaker < Minitest::Test
109
109
  assert(markup.last == MarkMaker::FENCE, "Markup should end with the code fence.")
110
110
  end
111
111
 
112
- def test_emphasis
112
+ def test_emphasis_generation
113
113
  content = "emphasize this"
114
114
  gen = MarkMaker::Generator.new
115
115
  markup = gen.emphasis(content)
116
116
  assert_match(/^#{Regexp.quote(MarkMaker::EMPHASIS)}#{content}#{Regexp.quote(MarkMaker::EMPHASIS)}$/, markup)
117
117
  end
118
+
119
+ def test_strong_generation
120
+ content = "strong stuff"
121
+ gen = MarkMaker::Generator.new
122
+ markup = gen.strong(content)
123
+ assert_match(/^#{Regexp.quote(MarkMaker::EMPHASIS * 2)}#{content}#{Regexp.quote(MarkMaker::EMPHASIS * 2)}$/, markup)
124
+ end
118
125
  end
126
+
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.1.0
4
+ version: 0.2.0
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-03-24 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler