prolog-services-markdown_to_html 1.0.2 → 1.0.3

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
- SHA1:
3
- metadata.gz: 961101edc34b8d57ee2a3921a2419d1adb3d7ed9
4
- data.tar.gz: 10f94d2bc7fce82f8d1d9faa5a699a6a7dd818b2
2
+ SHA256:
3
+ metadata.gz: 330be0c56da93f5541afdcd157875bd09a5c2245f20f89ceba5a5edcd42919de
4
+ data.tar.gz: c8730b1001034dbe9ab6d2d6b09d57fc33e763eea4c42ac1e03f19f133593be1
5
5
  SHA512:
6
- metadata.gz: 676b9c13e264973456aadc01d402a17ff7e3c62a94dc547a893b1f2fa0cf7dfd61ee4e58c5c5e685f5d51a08fb493bcc46315c159c0a2cc8d2fd04c3949e947c
7
- data.tar.gz: 6e3f0d34adc2c7ab0f56f480476c8278b225de87cf1d3eefb4dd8aa4157d79134b933105f1f2fad43181f216a447e9049c22959a0f7fc79b1be3b6ba8761514a
6
+ metadata.gz: 4447b8345b8bd6e6db556c756abc421ea5684d5fd11c072dc8ead730e2b5e4a45185ff91538eeb13a993eb884fa1b776c80b26ff8b6e2cd8cdc37394839a6f7a
7
+ data.tar.gz: a2e1afc6f1cca71681b4746bff678af41fc9909264d7c3086de4b1db5f5609d39b3f31237f127d02d06fa7ea244e337228979b2925939e97ffa1b8dd44ae2262
data/.gitignore CHANGED
@@ -1,9 +1,12 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
9
+ /vendor/
10
+ /bin/
11
+ !/bin/setup
12
+ .rbenv-gemsets
@@ -1,46 +1,24 @@
1
1
 
2
- # CodeClimate runs an older version of RuboCop, which apparently doesn't
3
- # understand the `AllCops` setting. So we do it The Hard Way.
4
-
5
- Metrics/LineLength:
6
- Exclude:
7
- - Rakefile
8
- - prolog-services-replace_content.gemspec
9
-
10
- Style/PercentLiteralDelimiters:
11
- Exclude:
12
- - prolog-services-replace_content.gemspec
13
-
14
- Style/PercentQLiterals:
15
- Exclude:
16
- - prolog-services-replace_content.gemspec
17
-
18
- Style/StringLiterals:
19
- Exclude:
20
- - Rakefile
21
- - prolog-services-replace_content.gemspec
22
- - bin/console
23
-
24
- Style/UnneededPercentQ:
25
- Exclude:
26
- - prolog-services-replace_content.gemspec
27
-
28
- Style/WordArray:
29
- Exclude:
30
- - Rakefile
31
-
32
- # 'Real' settings follow. ###################################
33
-
34
2
  AllCops:
35
- TargetRubyVersion: 2.3
3
+ TargetRubyVersion: 2.5
36
4
 
37
- Metrics/AbcSize:
38
- Exclude:
39
- - test/prolog/use_cases/propose_edit_contribution_test.rb
5
+ Metrics/BlockLength:
6
+ Max: 300
7
+ Include:
8
+ - 'spec/**/*_spec.rb'
40
9
 
41
- Metrics/MethodLength:
42
- Exclude:
43
- - test/prolog/use_cases/propose_edit_contribution_test.rb
10
+ Metrics/ModuleLength:
11
+ Max: 300
12
+ Include:
13
+ - 'spec/**/*_spec.rb'
14
+
15
+ Style/CommentedKeyword:
16
+ Enabled: false
44
17
 
45
- Style/Alias:
18
+ # This silences 'Missing top-level class documentation comment.', which we
19
+ # particularly want to do on (initially-)generated files.
20
+ Style/Documentation:
46
21
  Enabled: false
22
+ Include:
23
+ - 'apps/**/*.rb'
24
+ - 'lib/**/*.rb'
@@ -0,0 +1,150 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ prolog-services-markdown_to_html (1.0.3)
5
+ commonmarker (>= 0.17.9)
6
+ gemoji (>= 3.0.0)
7
+ github-markdown (= 0.6.9)
8
+ html-pipeline (~> 2.3)
9
+ ox (~> 2.3)
10
+ rinku (~> 2.0)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activesupport (5.2.0)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 0.7, < 2)
18
+ minitest (~> 5.1)
19
+ tzinfo (~> 1.1)
20
+ ansi (1.5.0)
21
+ ast (2.4.0)
22
+ awesome_print (1.8.0)
23
+ axiom-types (0.1.1)
24
+ descendants_tracker (~> 0.0.4)
25
+ ice_nine (~> 0.11.0)
26
+ thread_safe (~> 0.3, >= 0.3.1)
27
+ builder (3.2.3)
28
+ byebug (10.0.2)
29
+ codeclimate-engine-rb (0.4.1)
30
+ virtus (~> 1.0)
31
+ coderay (1.1.2)
32
+ coercible (1.0.0)
33
+ descendants_tracker (~> 0.0.1)
34
+ colorize (0.8.1)
35
+ commonmarker (0.17.9)
36
+ ruby-enum (~> 0.5)
37
+ concurrent-ruby (1.0.5)
38
+ descendants_tracker (0.0.4)
39
+ thread_safe (~> 0.3, >= 0.3.1)
40
+ docile (1.3.0)
41
+ equalizer (0.0.11)
42
+ erubis (2.7.0)
43
+ flay (2.12.0)
44
+ erubis (~> 2.7.0)
45
+ path_expander (~> 1.0)
46
+ ruby_parser (~> 3.0)
47
+ sexp_processor (~> 4.0)
48
+ flog (4.6.2)
49
+ path_expander (~> 1.0)
50
+ ruby_parser (~> 3.1, > 3.1.0)
51
+ sexp_processor (~> 4.8)
52
+ gemoji (3.0.0)
53
+ github-markdown (0.6.9)
54
+ html-pipeline (2.7.2)
55
+ activesupport (>= 2)
56
+ nokogiri (>= 1.4)
57
+ i18n (1.0.1)
58
+ concurrent-ruby (~> 1.0)
59
+ ice_nine (0.11.2)
60
+ json (2.1.0)
61
+ method_source (0.9.0)
62
+ mini_portile2 (2.3.0)
63
+ minitest (5.11.3)
64
+ minitest-matchers (1.4.1)
65
+ minitest (~> 5.0)
66
+ minitest-reporters (1.2.0)
67
+ ansi
68
+ builder
69
+ minitest (>= 5.0)
70
+ ruby-progressbar
71
+ minitest-tagz (1.5.3)
72
+ minitest (~> 5)
73
+ state_machines
74
+ nokogiri (1.8.2)
75
+ mini_portile2 (~> 2.3.0)
76
+ ox (2.9.2)
77
+ parallel (1.12.1)
78
+ parser (2.5.1.0)
79
+ ast (~> 2.4.0)
80
+ path_expander (1.0.3)
81
+ powerpack (0.1.1)
82
+ pry (0.11.3)
83
+ coderay (~> 1.1.0)
84
+ method_source (~> 0.9.0)
85
+ pry-byebug (3.6.0)
86
+ byebug (~> 10.0)
87
+ pry (~> 0.10)
88
+ pry-doc (0.13.4)
89
+ pry (~> 0.11)
90
+ yard (~> 0.9.11)
91
+ rainbow (3.0.0)
92
+ rake (12.3.1)
93
+ reek (4.8.1)
94
+ codeclimate-engine-rb (~> 0.4.0)
95
+ parser (>= 2.5.0.0, < 2.6)
96
+ rainbow (>= 2.0, < 4.0)
97
+ rinku (2.0.4)
98
+ rubocop (0.55.0)
99
+ parallel (~> 1.10)
100
+ parser (>= 2.5)
101
+ powerpack (~> 0.1)
102
+ rainbow (>= 2.2.2, < 4.0)
103
+ ruby-progressbar (~> 1.7)
104
+ unicode-display_width (~> 1.0, >= 1.0.1)
105
+ ruby-enum (0.7.2)
106
+ i18n
107
+ ruby-progressbar (1.9.0)
108
+ ruby_parser (3.11.0)
109
+ sexp_processor (~> 4.9)
110
+ sexp_processor (4.11.0)
111
+ simplecov (0.16.1)
112
+ docile (~> 1.1)
113
+ json (>= 1.8, < 3)
114
+ simplecov-html (~> 0.10.0)
115
+ simplecov-html (0.10.2)
116
+ state_machines (0.5.0)
117
+ thread_safe (0.3.6)
118
+ tzinfo (1.2.5)
119
+ thread_safe (~> 0.1)
120
+ unicode-display_width (1.3.2)
121
+ virtus (1.0.5)
122
+ axiom-types (~> 0.1)
123
+ coercible (~> 1.0)
124
+ descendants_tracker (~> 0.0, >= 0.0.3)
125
+ equalizer (~> 0.0, >= 0.0.9)
126
+ yard (0.9.12)
127
+
128
+ PLATFORMS
129
+ ruby
130
+
131
+ DEPENDENCIES
132
+ awesome_print (~> 1.6, >= 1.6.1)
133
+ bundler (~> 1.11)
134
+ colorize (~> 0.7, >= 0.7.7)
135
+ flay (~> 2.6)
136
+ flog (~> 4, >= 4.4.0)
137
+ minitest (>= 5.11.3)
138
+ minitest-matchers (~> 1.4)
139
+ minitest-reporters (~> 1.0)
140
+ minitest-tagz (~> 1.2)
141
+ prolog-services-markdown_to_html!
142
+ pry-byebug (~> 3.4)
143
+ pry-doc (~> 0.8)
144
+ rake (>= 12.3.1)
145
+ reek (~> 4.0)
146
+ rubocop (= 0.55.0)
147
+ simplecov (~> 0.10)
148
+
149
+ BUNDLED WITH
150
+ 1.16.1
data/Rakefile CHANGED
@@ -17,32 +17,32 @@ Rake::TestTask.new(:test) do |t|
17
17
  end
18
18
 
19
19
  RuboCop::RakeTask.new(:rubocop) do |task|
20
- task.patterns = [
21
- 'lib/**/*.rb',
22
- 'test/**/*.rb'
23
- ]
24
- task.formatters = ['simple', 'd']
25
- task.fail_on_error = true
26
- # task.options << '--rails'
27
- task.options << '--display-cop-names'
20
+ task.patterns = [
21
+ 'lib/**/*.rb',
22
+ 'test/**/*.rb'
23
+ ]
24
+ task.formatters = ['simple', 'd']
25
+ task.fail_on_error = true
26
+ # task.options << '--rails'
27
+ task.options << '--display-cop-names'
28
28
  end
29
29
 
30
30
  Reek::Rake::Task.new do |t|
31
- t.config_file = 'config.reek'
32
- t.source_files = '{app,lib,test}/**/*.rb'
33
- t.reek_opts = '--sort-by smelliness -s'
31
+ t.config_file = 'config.reek'
32
+ t.source_files = '{app,lib,test}/**/*.rb'
33
+ t.reek_opts = '--sort-by smelliness --no-progress -s'
34
34
  end
35
35
 
36
36
  FlayTask.new do |t|
37
- t.verbose = true
38
- t.dirs = %w(app lib)
37
+ t.verbose = true
38
+ t.dirs = %w(app lib)
39
39
  end
40
40
 
41
41
  FlogTask.new do |t|
42
- t.verbose = true
43
- t.threshold = 200 # default is 200
44
- t.instance_variable_set :@methods_only, true
45
- t.dirs = %w(app lib) # Look, Ma; no tests! Run the tool manually every so often for those.
42
+ t.verbose = true
43
+ t.threshold = 200 # default is 200
44
+ t.instance_variable_set :@methods_only, true
45
+ t.dirs = %w(app lib) # Look, Ma; no tests! Run the tool manually every so often for those.
46
46
  end
47
47
 
48
48
  task(:default).clear
data/bin/setup CHANGED
@@ -1,8 +1,30 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
1
+ #!/bin/bash
5
2
 
6
- bundle install
3
+ # This works for MRI; it may or may not work for other Rubies.
4
+ RUBY_VERSION=`ruby --version | cut -d ' ' -f 2 | sed 's/p.*//'`
7
5
 
8
- # Do any other automated setup that you need to do here
6
+ ##
7
+ ## Initialise Gemset and setup if `rbenv` is available
8
+ ##
9
+
10
+ rm -f Gemfile.lock .rbenv-gemsets
11
+
12
+ if [[ `rbenv --version 2>/dev/null` ]]; then
13
+ rbenv gemset delete $RUBY_VERSION ./tmp/gemset 2>/dev/null || true
14
+ find ./tmp/gemset -delete 2>/dev/null || true
15
+ rbenv rehash
16
+ rbenv gemset create $RUBY_VERSION ./tmp/gemset
17
+ echo ./tmp/gemset > .rbenv-gemsets
18
+ # echo hanami >> .rbenv-gemsets
19
+ rbenv rehash
20
+ fi
21
+
22
+ ##
23
+ ## Install Gems
24
+ ##
25
+
26
+ gem install bundler yard:0.9.12
27
+ yard config --gem-install-yri
28
+
29
+ rm -rf vendor/*
30
+ bundle package --all --no-install && bundle install --binstubs --local --path vendor
@@ -12,14 +12,13 @@ module Prolog
12
12
 
13
13
  def initialize(content:)
14
14
  @rendered = HtmlPipelineConverter.render content
15
- self
16
15
  end
17
16
 
18
17
  def to_s
19
18
  @rendered
20
19
  end
21
20
 
22
- alias_method :to_str, :to_s
21
+ alias_method :to_str, :to_s # rubocop:disable Style/Alias
23
22
  end # class Prolog::Services::MarkdownToHtml::Renderer
24
23
  end # class Prolog::Services::MarkdownToHtml
25
24
  end
@@ -4,7 +4,7 @@ module Prolog
4
4
  module Services
5
5
  # Service to convert Markdown content to equivalent HTML.
6
6
  class MarkdownToHtml
7
- VERSION = '1.0.2'
7
+ VERSION = '1.0.3'
8
8
  end
9
9
  end
10
10
  end
@@ -32,14 +32,15 @@ Gem::Specification.new do |spec|
32
32
  spec.require_paths = ["lib"]
33
33
 
34
34
  spec.add_dependency "ox", "~> 2.3"
35
+ spec.add_dependency 'commonmarker', '>= 0.17.9'
35
36
  spec.add_dependency "html-pipeline", "~> 2.3"
36
- spec.add_dependency "gemoji", "~> 2.1"
37
+ spec.add_dependency "gemoji", ">= 3.0.0"
37
38
  spec.add_dependency "github-markdown", "0.6.9"
38
39
  spec.add_dependency "rinku", "~> 2.0"
39
40
 
40
41
  spec.add_development_dependency "bundler", "~> 1.11"
41
- spec.add_development_dependency "rake", "~> 11"
42
- spec.add_development_dependency "minitest", "~> 5.0"
42
+ spec.add_development_dependency "rake", ">= 12.3.1"
43
+ spec.add_development_dependency "minitest", ">= 5.11.3"
43
44
 
44
45
  spec.add_development_dependency "minitest-matchers", "~> 1.4"
45
46
  spec.add_development_dependency "minitest-reporters", "~> 1.0"
@@ -47,7 +48,7 @@ Gem::Specification.new do |spec|
47
48
  spec.add_development_dependency "flay", "~> 2.6"
48
49
  spec.add_development_dependency "flog", "~> 4", ">= 4.4.0"
49
50
  spec.add_development_dependency "reek", "~> 4.0"
50
- spec.add_development_dependency "rubocop", "0.39.0"
51
+ spec.add_development_dependency "rubocop", "0.55.0"
51
52
  spec.add_development_dependency "simplecov", "~> 0.10"
52
53
  spec.add_development_dependency "pry-byebug", "~> 3.4"
53
54
  spec.add_development_dependency "pry-doc", "~> 0.8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prolog-services-markdown_to_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dickey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2018-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ox
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: commonmarker
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.17.9
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.17.9
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: html-pipeline
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +56,16 @@ dependencies:
42
56
  name: gemoji
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: '2.1'
61
+ version: 3.0.0
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: '2.1'
68
+ version: 3.0.0
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: github-markdown
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -98,30 +112,30 @@ dependencies:
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - "~>"
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
- version: '11'
117
+ version: 12.3.1
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - "~>"
122
+ - - ">="
109
123
  - !ruby/object:Gem::Version
110
- version: '11'
124
+ version: 12.3.1
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: minitest
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - "~>"
129
+ - - ">="
116
130
  - !ruby/object:Gem::Version
117
- version: '5.0'
131
+ version: 5.11.3
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - "~>"
136
+ - - ">="
123
137
  - !ruby/object:Gem::Version
124
- version: '5.0'
138
+ version: 5.11.3
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: minitest-matchers
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -218,14 +232,14 @@ dependencies:
218
232
  requirements:
219
233
  - - '='
220
234
  - !ruby/object:Gem::Version
221
- version: 0.39.0
235
+ version: 0.55.0
222
236
  type: :development
223
237
  prerelease: false
224
238
  version_requirements: !ruby/object:Gem::Requirement
225
239
  requirements:
226
240
  - - '='
227
241
  - !ruby/object:Gem::Version
228
- version: 0.39.0
242
+ version: 0.55.0
229
243
  - !ruby/object:Gem::Dependency
230
244
  name: simplecov
231
245
  requirement: !ruby/object:Gem::Requirement
@@ -325,6 +339,7 @@ files:
325
339
  - ".travis.yml"
326
340
  - CODE_OF_CONDUCT.md
327
341
  - Gemfile
342
+ - Gemfile.lock
328
343
  - LICENSE.txt
329
344
  - README.md
330
345
  - Rakefile
@@ -356,9 +371,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
371
  version: '0'
357
372
  requirements: []
358
373
  rubyforge_project:
359
- rubygems_version: 2.6.4
374
+ rubygems_version: 2.7.6
360
375
  signing_key:
361
376
  specification_version: 4
362
377
  summary: Converts Markdown content to HTML with minimal whitespace.
363
378
  test_files: []
364
- has_rdoc: