Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 498e1c9

Browse files
author
Dmitry Agapov
committed
Fix after CR
1 parent 2280967 commit 498e1c9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

lib/curated/renderer.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require 'erb'
4-
require_relative 'md_formating'
54

65
class Curated::Renderer
76
def call

lib/curated/utils.rb

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative 'utils/github'
44
require_relative 'utils/string'
55
require_relative 'utils/npm'
6+
require_relative 'utils/md_formating'
67

78
module Utils
89
end

lib/md_formating.rb renamed to lib/curated/utils/md_formating.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

3-
module MdFormating
3+
module Utils
4+
extend self
45
def ruby_example_code(text)
56
(+'```ruby') << "\n#{text}\n```"
67
end

lib/ruby/sablon.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# frozen_string_literal: true
22

3-
class Sablon < Curated::RubyGem
4-
extend MdFormating
5-
3+
class Curated::Sablon < Curated::RubyGem
64
package 'sablon'
75
homepage 'https://github.com/senny/sablon'
86
category Category::Other
@@ -14,7 +12,7 @@ class Sablon < Curated::RubyGem
1412
"\n\ntemplate.render_to_file File.expand_path('~/Users/bs/Documents/output.docx'), context"
1513

1614
pros "We've been usi Sablon in some projects for inserting content in docx templates."
17-
pros "It is easy to use this gem:\n #{ruby_example_code(text)}"
15+
pros "It is easy to use this gem:\n #{Utils.ruby_example_code(text)}"
1816
pros "You can add to your documents simple values(which are the results of calculations in your methods),
1917
formatted html blocks containing everything you need (tables, unsorted lists, sorted lists,
2018
any text markup you need to add to the final docx file)"

0 commit comments

Comments
 (0)