lazylead 0.9.0 → 0.9.1

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: 6dd70c73ff657c4598583180a4c21a497e6b303f2eaf7e832aadf966957d363f
4
- data.tar.gz: 4f5c7ef058b9861e9d17ffbc97aec9651f974fe808ab7a3ee4832c0800f1e50e
3
+ metadata.gz: 2cbd092ef55bfdcf7887c4e0fcf5e5838a70b91eac82011893dc9423b22a0b74
4
+ data.tar.gz: 5d71b27626fbf5e9d60ea38cce1e06ab6637aa874daa057ff9b9f8451b095dbf
5
5
  SHA512:
6
- metadata.gz: 5419ceb30c1122db9afe8051f7587dbc2cfc78896c7c83312ee2160bf8a1556a305df1dee41839048cea736a1904373aa3e8a62cbeb345c293bbb146cbd2d7ed
7
- data.tar.gz: 4fcdb20ab35edaf4f1530680ab19378ae751b8b5964e63b9061fad447ff210ff2f43548f6be3afa5e298c8800391e6fac5f07f124d21c59c509bce3579dfd329
6
+ metadata.gz: 748f97ab75655642143bd13d562aab38693df3f6496429d794e75f4c6bb9f0315537ad656027f639a9481ed0399345b3cef0f9ebcd83af680c69f5cf3be6380d
7
+ data.tar.gz: ea40e803198075657c05df31b251599aac4dbb55bf628a01e1d68bcffeedd09c713ca9d0858d153301ab88f518e5ab50a1486fbc58be3801e5a57264611d915c
data/lazylead.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.rubygems_version = "2.2"
33
33
  s.required_ruby_version = ">=2.6.5"
34
34
  s.name = "lazylead"
35
- s.version = "0.9.0"
35
+ s.version = "0.9.1"
36
36
  s.license = "MIT"
37
37
  s.summary = "Eliminate the annoying work within bug-trackers."
38
38
  s.description = "Ticketing systems (Github, Jira, etc.) are strongly
@@ -45,7 +45,7 @@ tasks instead of solving technical problems."
45
45
  s.authors = ["Yurii Dubinka"]
46
46
  s.email = "yurii.dubinka@gmail.com"
47
47
  s.homepage = "http://github.com/dgroup/lazylead"
48
- s.post_install_message = "Thanks for installing Lazylead v0.9.0!
48
+ s.post_install_message = "Thanks for installing Lazylead v0.9.1!
49
49
  Read our blog posts: https://lazylead.org
50
50
  Stay in touch with the community in Telegram: https://t.me/lazylead
51
51
  Follow us on Twitter: https://twitter.com/lazylead
@@ -79,7 +79,7 @@ tasks instead of solving technical problems."
79
79
  s.add_runtime_dependency "tzinfo-data", "1.2021.1"
80
80
  s.add_runtime_dependency "vcs4sql", "0.1.1"
81
81
  s.add_runtime_dependency "viewpoint", "1.1.1"
82
- s.add_development_dependency "codecov", "0.5.1"
82
+ s.add_development_dependency "codecov", "0.5.2"
83
83
  s.add_development_dependency "guard", "2.16.2"
84
84
  s.add_development_dependency "guard-minitest", "2.4.6"
85
85
  s.add_development_dependency "minitest", "5.14.4"
@@ -91,10 +91,10 @@ tasks instead of solving technical problems."
91
91
  s.add_development_dependency "random-port", "0.5.1"
92
92
  s.add_development_dependency "rdoc", "6.3.0"
93
93
  s.add_development_dependency "rubocop", "1.13.0"
94
- s.add_development_dependency "rubocop-minitest", "0.11.1"
94
+ s.add_development_dependency "rubocop-minitest", "0.12.1"
95
95
  s.add_development_dependency "rubocop-performance", "1.11.0"
96
96
  s.add_development_dependency "rubocop-rake", "0.5.1"
97
- s.add_development_dependency "rubocop-rspec", "2.2.0"
97
+ s.add_development_dependency "rubocop-rspec", "2.3.0"
98
98
  s.add_development_dependency "sqlint", "0.2.0"
99
99
  s.add_development_dependency "tempfile", "0.1.1"
100
100
  s.add_development_dependency "xcop", "0.6.2"
@@ -42,12 +42,17 @@ module Lazylead
42
42
 
43
43
  def passed(issue)
44
44
  return false if issue.attachments.nil? || blank?(issue, "description")
45
- references = issue.description
46
- .to_enum(:scan, /!.+!/)
47
- .map { Regexp.last_match }
48
- .map(&:to_s)
49
- return false if references.size < @minimum
50
- references.all? { |ref| pictures(issue).any? { |file| ref.include? file } }
45
+ ref = references(issue)
46
+ ref.size < @minimum ? false : ref.all? { |r| pictures(issue).any? { |file| r.include? file } }
47
+ end
48
+
49
+ # Detect all references in ticket description to attachments (including web links).
50
+ def references(issue)
51
+ issue.description
52
+ .to_enum(:scan, /!.+!/)
53
+ .map { Regexp.last_match }
54
+ .map(&:to_s)
55
+ .reject { |r| r.match?(%r{(http|https)://.*/images/icons/link_attachment.*.gif}) }
51
56
  end
52
57
 
53
58
  # Detect all pictures in ticket attachments and returns an array with file names.
@@ -43,14 +43,12 @@ module Lazylead
43
43
  def run(sys, postman, opts)
44
44
  allowed = opts.slice "allowed", ","
45
45
  silent = opts.key? "silent"
46
- issues = sys.issues opts["jql"],
47
- opts.jira_defaults.merge(expand: "changelog")
48
- return if issues.empty?
49
- postman.send opts.merge(
50
- assignees: issues.map { |i| Assignee.new(i, allowed, silent) }
51
- .select(&:illegal?)
52
- .each(&:add_label)
53
- )
46
+ assignees = sys.issues(opts["jql"], opts.jira_defaults.merge(expand: "changelog"))
47
+ .map { |i| Assignee.new(i, allowed, silent) }
48
+ .select(&:illegal?)
49
+ .each(&:add_label)
50
+ return if assignees.empty?
51
+ postman.send opts.merge(assignees: assignees)
54
52
  end
55
53
  end
56
54
 
@@ -87,7 +85,7 @@ module Lazylead
87
85
 
88
86
  # The name of current assignee for ticket
89
87
  def to
90
- @issue.fields["assignee"]["name"]
88
+ @issue.fields["assignee"]["displayName"]
91
89
  end
92
90
  end
93
91
  end
@@ -23,5 +23,5 @@
23
23
  # OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
25
  module Lazylead
26
- VERSION = "0.9.0"
26
+ VERSION = "0.9.1"
27
27
  end
@@ -69,10 +69,9 @@
69
69
  <body>
70
70
  <table summary="tickets">
71
71
  <tr>
72
- <th id="uid">ID</th>
73
72
  <th id="name">User</th>
74
73
  <th id="total">
75
- <a href="https://jira.spring.io/issues/?jql=<%= CGI.escape(jql) %>">Assigned From</a>
74
+ <a href="<%= search_link %><%= CGI.escape(jql) %>">Assigned From</a>
76
75
  </th>
77
76
  <th id="duedate">Next Due date</th>
78
77
  </tr>
@@ -83,10 +82,7 @@
83
82
  <tr>
84
83
  <% end %>
85
84
  <td>
86
- <div class="auto"><a href="<%= user_link %>"><%= teammate %></a></div>
87
- </td>
88
- <td>
89
- <div class="auto"><%= assignment.name %></div>
85
+ <div class="auto"><a href="<%= user_link %><%= teammate %>"><%= assignment.name %></a></div>
90
86
  </td>
91
87
  <td>
92
88
  <div class="auto">
@@ -122,5 +122,19 @@ module Lazylead
122
122
  )
123
123
  )
124
124
  end
125
+
126
+ test "two screenshots with docx attach" do
127
+ assert Screenshots.new.passed(
128
+ OpenStruct.new(
129
+ description: "Hi,\n here are snapshots !img1.jpg!\n!img2.jpg!\n[example.docx^!https://jira.com/images/icons/link_attachment_5.gif|width=7,height=7! ^|https://jira.com/secure/attachment/23/23_example.docx]",
130
+ fields: { "description" => "-" },
131
+ attachments: [
132
+ OpenStruct.new("filename" => "img1.jpg"),
133
+ OpenStruct.new("filename" => "img2.jpg"),
134
+ OpenStruct.new("filename" => "example.docx")
135
+ ]
136
+ )
137
+ )
138
+ end
125
139
  end
126
140
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazylead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurii Dubinka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-24 00:00:00.000000000 Z
11
+ date: 2021-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -352,14 +352,14 @@ dependencies:
352
352
  requirements:
353
353
  - - '='
354
354
  - !ruby/object:Gem::Version
355
- version: 0.5.1
355
+ version: 0.5.2
356
356
  type: :development
357
357
  prerelease: false
358
358
  version_requirements: !ruby/object:Gem::Requirement
359
359
  requirements:
360
360
  - - '='
361
361
  - !ruby/object:Gem::Version
362
- version: 0.5.1
362
+ version: 0.5.2
363
363
  - !ruby/object:Gem::Dependency
364
364
  name: guard
365
365
  requirement: !ruby/object:Gem::Requirement
@@ -520,14 +520,14 @@ dependencies:
520
520
  requirements:
521
521
  - - '='
522
522
  - !ruby/object:Gem::Version
523
- version: 0.11.1
523
+ version: 0.12.1
524
524
  type: :development
525
525
  prerelease: false
526
526
  version_requirements: !ruby/object:Gem::Requirement
527
527
  requirements:
528
528
  - - '='
529
529
  - !ruby/object:Gem::Version
530
- version: 0.11.1
530
+ version: 0.12.1
531
531
  - !ruby/object:Gem::Dependency
532
532
  name: rubocop-performance
533
533
  requirement: !ruby/object:Gem::Requirement
@@ -562,14 +562,14 @@ dependencies:
562
562
  requirements:
563
563
  - - '='
564
564
  - !ruby/object:Gem::Version
565
- version: 2.2.0
565
+ version: 2.3.0
566
566
  type: :development
567
567
  prerelease: false
568
568
  version_requirements: !ruby/object:Gem::Requirement
569
569
  requirements:
570
570
  - - '='
571
571
  - !ruby/object:Gem::Version
572
- version: 2.2.0
572
+ version: 2.3.0
573
573
  - !ruby/object:Gem::Dependency
574
574
  name: sqlint
575
575
  requirement: !ruby/object:Gem::Requirement
@@ -786,7 +786,7 @@ licenses:
786
786
  - MIT
787
787
  metadata: {}
788
788
  post_install_message: |-
789
- Thanks for installing Lazylead v0.9.0!
789
+ Thanks for installing Lazylead v0.9.1!
790
790
  Read our blog posts: https://lazylead.org
791
791
  Stay in touch with the community in Telegram: https://t.me/lazylead
792
792
  Follow us on Twitter: https://twitter.com/lazylead