mdextab 0.1.3 → 0.1.4

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
2
  SHA256:
3
- metadata.gz: 940c4e17899ee4eef8145f326d7631601a3807e0dc16f1f958b047ed1768dc2d
4
- data.tar.gz: 5de5348d82cfdcd6fdaa2676405fb04a55225d34ba90c12d870de02473d9592e
3
+ metadata.gz: e016a0418703b435409b67011b11b5dd13764ca2670454359f3451656505f58d
4
+ data.tar.gz: 8750236c9cf545d4f79b648ea58c36df20f2918eff410e7a019df25bc5ad17dd
5
5
  SHA512:
6
- metadata.gz: 7a0e6bc0e270196e51992d7f7ae02adc8aed0caf28b88f7f1324cc4ab2cf65ac06aabf1f30dfe3982f163915e9635f923fa57590a9a64eb20544e480da65983f
7
- data.tar.gz: 1b34a809d152d85a921a66f95912f2e10230f215350fa5b34d9a59e639d518dd7f07bffb7b9811bb589e5351bcc88be56d8df808316a8bbe1d71b60308a7dd7f
6
+ metadata.gz: 29b682f4eb3c1cfd3a88d7c37d4ab0b794edf77d076af496bbf76fa87c5934cca0cec38acd7d6aaf337745c1c20281baa09cfeac23435020e4d40f8ee2d21bff
7
+ data.tar.gz: 751592e3b58625fac6492ffb12fb284d2b01843ae00d0c9c6d69371816cd75a8b2278a287840725878ce054c061f88e431c487df6c01cff84578f47928d903a8
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.5
4
+ TargetRubyVersion: 2.3
5
5
  DisplayCopNames: true
6
6
  #
7
7
  StyleGuideBaseURL: https://github.com/fortissimo1997/ruby-style-guide/blob/japanese/README.ja.md
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,16 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config --exclude-limit 9999 --no-offense-counts --no-auto-gen-timestamp`
3
- # using RuboCop version 0.68.1.
3
+ # using RuboCop version 0.69.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Cop supports --auto-correct.
10
+ Layout/EmptyLineAfterMagicComment:
11
+ Exclude:
12
+ # - 'lib/mdextab.rb'
13
+
9
14
  # Cop supports --auto-correct.
10
15
  # Configuration parameters: .
11
16
  # SupportedStyles: space, no_space
@@ -17,10 +22,27 @@ Metrics/AbcSize:
17
22
 
18
23
  # Configuration parameters: CountComments.
19
24
  Metrics/ClassLength:
20
- Max: 366
25
+ Max: 371
21
26
 
22
27
  Metrics/CyclomaticComplexity:
23
28
  Max: 10
24
29
 
25
30
  Metrics/PerceivedComplexity:
26
31
  Max: 9
32
+
33
+ # Cop supports --auto-correct.
34
+ Style/Encoding:
35
+ Exclude:
36
+ # - 'lib/mdextab.rb'
37
+
38
+ # Configuration parameters: MinBodyLength.
39
+ Style/GuardClause:
40
+ Exclude:
41
+ # - 'lib/mdextab/layer.rb'
42
+
43
+ # Cop supports --auto-correct.
44
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
45
+ # Whitelist: present?, blank?, presence, try, try!
46
+ Style/SafeNavigation:
47
+ Exclude:
48
+ # - 'lib/mdextab.rb'
data/lib/mdextab/layer.rb CHANGED
@@ -78,9 +78,9 @@ module Mdextab
78
78
 
79
79
  def process_table_end(token)
80
80
  prev_layer = peek_prev_layer
81
- if prev_layer
82
- process_table_end_for_prev_env(token, prev_layer)
83
- end
81
+ return unless prev_layer
82
+
83
+ process_table_end_for_prev_env(token, prev_layer)
84
84
  end
85
85
 
86
86
  def process_table_end_for_prev_env(token, prev_layer)
@@ -1,3 +1,3 @@
1
1
  module Mdextab
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/lib/mdextab.rb CHANGED
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  #
3
2
  # MarkDownテーブル拡張モジュール
4
3
  #
@@ -222,7 +221,6 @@ module Mdextab
222
221
  when :STAR_END
223
222
  @layer.star = false
224
223
  output_in_else("*" + token.opt[:content])
225
- output_in_else(token.opt[:content])
226
224
  else
227
225
  @mes.output_fatal("In :START unknown tag=(#{token.kind}) in process_one_line_for_start")
228
226
  @mes.output_fatal("@fname=#{@fname} | lineno=#{lineno}")
@@ -246,7 +244,6 @@ module Mdextab
246
244
  output_in_else("*" + token.opt[:content])
247
245
  when :STAR_END
248
246
  @layer.star = false
249
- output_in_else("*" + token.opt[:content])
250
247
  output_in_else(token.opt[:content])
251
248
  when :TD
252
249
  # treat as :ELSE
@@ -490,11 +487,16 @@ module Mdextab
490
487
  if @layer.return_from_nested_env
491
488
  next_state = @layer.cur_state
492
489
  else
493
- next_state = get_next_state(token, line, lineno, @fname)
490
+ next_state = get_next_state(token, line, lineno)
494
491
 
495
492
  @mes.output_debug("#{__LINE__}|next_state=#{next_state}")
496
493
  end
497
494
  next_state
498
495
  end
496
+
497
+ def post_process
498
+ @output&.close
499
+ @output = nil
500
+ end
499
501
  end
500
502
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdextab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - yasuo kominami
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-22 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler