lhj-tools 0.2.74 → 0.2.75

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
  SHA256:
3
- metadata.gz: d7617205034e037486f6f9cb332e7064f49bd32d509d9f1e957c5df47100dabb
4
- data.tar.gz: 254627f1697ed73f5aeb332d8e9da0f15e2b356698e02d1ce695836d0e7139cf
3
+ metadata.gz: 5e5b22cf3aed7dd2a1da0fa7815a55275c0118d3ae130bab1ad44afea25f81e2
4
+ data.tar.gz: b833c76e141e5b0ffa0037aad3f943b3c86d8ee5f6303c183150644b13269ebc
5
5
  SHA512:
6
- metadata.gz: 8f596ee969cb0231148e553cff8683280ea271dd4bf303ea6347c2963d6ee8f05b8802d05ebca7f174834aec3e09874b58ba16141df418420f1a44304584a1b6
7
- data.tar.gz: 8cdcccbca6add90899a7e0efb3c3b62a5c67bc9f7ba054c5c183b4e6626cb369da5dc6c11026090a46e059f9d6fb4f6b172f1d33fb523d42d6ce63714e5a75f0
6
+ metadata.gz: b3e75769782d140d16ca06b5e0518c9f0a5d8657fb0f88eb012913674734c11026e22c630b951449629e8a3ca94bc0220f1302c599b82a1630acaaaef2bb6940
7
+ data.tar.gz: d49c7806545e0ab67b843f933663f588ed9f2ab2c14f918487c286844891cb932a827cd373e0fb66a0be8e7548e1e90a5eb97ea46bd5ab32e4b5dcc3b1621a71
@@ -47,7 +47,7 @@ module Lhj
47
47
 
48
48
  available_idx += 1 if line =~ /\{/
49
49
  available_idx -= 1 if line =~ /\}/
50
- lines << { idx: idx, line: line }
50
+ lines << { idx: idx }
51
51
  end
52
52
  end
53
53
  lines
@@ -71,15 +71,15 @@ module Lhj
71
71
  # 2. 找到的行是否已available代码块
72
72
  next if wrapper_lines.length.positive? && wrapper_lines.any? { |w| w[:idx] == idx }
73
73
 
74
- result << { idx: idx + 1, line: line }
74
+ result << { idx: idx + 1, line: line.strip }
75
75
  end
76
76
  end
77
77
  result
78
78
  end
79
79
 
80
80
  def self.match_white_list_reg(line)
81
- regs ||= load_white_api_list
82
- regs.any? { |r| line =~ /#{r}/ }
81
+ @regs ||= load_white_api_list
82
+ @regs.any? { |r| /#{r}/ =~ line }
83
83
  end
84
84
 
85
85
  def self.load_white_api_list
@@ -95,6 +95,7 @@ module Lhj
95
95
  def self.notify(result)
96
96
  temp = Lhj::ErbTemplateHelper.load('ios_avaliable_api_notify')
97
97
  temp_result = Lhj::ErbTemplateHelper.render(temp, { result: result, branch: git_branch }, '-')
98
+ puts temp_result
98
99
  Lhj::Dingtalk.post_message_robot(robot_url, 'check code', temp_result)
99
100
  end
100
101
 
data/lib/lhj/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lhj
4
- VERSION = '0.2.74'
4
+ VERSION = '0.2.75'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhj-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.74
4
+ version: 0.2.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - lihaijian