compare_linker 1.4.2 → 1.4.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
2
  SHA256:
3
- metadata.gz: 65da887b73e5fabab1db09457461a5579fd2bb42471e5f6880d09641c68acb5c
4
- data.tar.gz: 4b29c00670d32ee28010f07ad31d88590d128a61c48aa4ca814b95a5335ed2d6
3
+ metadata.gz: a66e1f77f2336333a3fec1904453bed0c8e006981bce6cb3c07261e32d8f264a
4
+ data.tar.gz: c840aa131e2ced1492a3c8ba2b3c468b19ed7914f1ba79de1ad71b338244f347
5
5
  SHA512:
6
- metadata.gz: 01066c681a37b6b9368814a6653792ab7c77c2b917a12e20b83fb40b74ff2f5cc29f9c0f6b5fa96ead45737d8f176ef8df081486f87b9cb007539e4658a16e84
7
- data.tar.gz: 7fcdf4d543eb414a30e2bcaeae80863917c282a28b55adcb6cf553d48f8c8b4588abc8727fa31eb9141b1613ff2cc8d9579867655eab462625bdf85bf5e9f7dd
6
+ metadata.gz: a5f77468a540e60074128207a50a4880fa763b2a4b870d91a07e207750585e9af92c82dba8242a412bb1f6ba1ca050ef2285ef05a45af547e80de9e7be4094fe
7
+ data.tar.gz: fd762ab40117f3c14411b43456b29eee15ee7dfa2effddb95a16bde412bf8f84f163baa3dc5a61580e8655944ca77ba94e0893fe7e6eb2486cc265732b469ea6
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.5.1
4
- - 2.4.4
5
- - 2.3.7
3
+ - 2.6.1
4
+ - 2.5.3
5
+ - 2.4.5
6
+ - 2.3.8
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Compare Linker
2
2
 
3
- [![Travis Status](https://img.shields.io/travis/masutaka/compare_linker.svg?style=flat-square)][travisci]
3
+ [![Travis Status](https://img.shields.io/travis/masutaka/compare_linker.svg?logo=travis&style=flat-square)][travisci]
4
4
  [![License](https://img.shields.io/github/license/masutaka/compare_linker.svg?style=flat-square)][license]
5
- [![Gem](https://img.shields.io/gem/v/compare_linker.svg?style=flat-square)][gem-link]
5
+ [![Gem](https://img.shields.io/gem/v/compare_linker.svg?logo=ruby&style=flat-square)][gem-link]
6
6
 
7
7
  [travisci]: https://travis-ci.org/masutaka/compare_linker
8
8
  [license]: https://github.com/masutaka/compare_linker/blob/master/LICENSE.txt
@@ -6,8 +6,8 @@ require 'compare_linker/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "compare_linker"
8
8
  spec.version = CompareLinker::VERSION
9
- spec.authors = ["Kensuke Nagae"]
10
- spec.email = ["kyanny@gmail.com"]
9
+ spec.authors = ["Takashi Masuda", "Kensuke Nagae"]
10
+ spec.email = ["masutaka.net@gmail.com", "kyanny@gmail.com"]
11
11
  spec.description = %q{Create GitHub's compare view URLs for pull request from diff of Gemfile.lock}
12
12
  spec.summary = %q{Create GitHub's compare view URLs for pull request}
13
13
  spec.homepage = "https://github.com/masutaka/compare_linker"
@@ -21,9 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency "octokit"
22
22
  spec.add_dependency "httpclient"
23
23
 
24
- spec.add_development_dependency "activesupport", "~> 4" # for ruby-2.[0-2].0 tests, required by factory_girl
25
- spec.add_development_dependency "bundler", "~> 1.3"
26
- spec.add_development_dependency "factory_girl"
24
+ spec.add_development_dependency "bundler", ">= 1.3"
25
+ spec.add_development_dependency "factory_bot"
27
26
  spec.add_development_dependency "rake"
28
27
  spec.add_development_dependency "rspec"
29
28
  end
@@ -26,37 +26,41 @@ class CompareLinker
26
26
  old_lockfile = fetcher.fetch(repo_full_name, pull_request.base.sha)
27
27
  new_lockfile = fetcher.fetch(repo_full_name, pull_request.head.sha)
28
28
 
29
- comparator = LockfileComparator.new
30
- comparator.compare(old_lockfile, new_lockfile)
31
- @compare_links = comparator.updated_gems.map { |gem_name, gem_info|
32
- if gem_info[:owner].nil?
33
- finder = GithubLinkFinder.new(octokit, gem_dictionary)
34
- finder.find(gem_name)
35
- gem_info[:homepage_uri] = finder.homepage_uri
36
- if finder.repo_owner.nil?
37
- formatter.format(gem_info)
38
- else
39
- gem_info[:repo_owner] = finder.repo_owner
40
- gem_info[:repo_name] = finder.repo_name
29
+ make_compare_links_from_lockfiles(old_lockfile, new_lockfile)
30
+ end
31
+ end
32
+
33
+ def make_compare_links_from_lockfiles(old_lockfile, new_lockfile)
34
+ comparator = LockfileComparator.new
35
+ comparator.compare(old_lockfile, new_lockfile)
36
+ @compare_links = comparator.updated_gems.map { |gem_name, gem_info|
37
+ if gem_info[:owner].nil?
38
+ finder = GithubLinkFinder.new(octokit, gem_dictionary)
39
+ finder.find(gem_name)
40
+ gem_info[:homepage_uri] = finder.homepage_uri
41
+ if finder.repo_owner.nil?
42
+ formatter.format(gem_info)
43
+ else
44
+ gem_info[:repo_owner] = finder.repo_owner
45
+ gem_info[:repo_name] = finder.repo_name
41
46
 
42
- tag_finder = GithubTagFinder.new(octokit, gem_name, finder.repo_full_name)
43
- old_tag = tag_finder.find(gem_info[:old_ver])
44
- new_tag = tag_finder.find(gem_info[:new_ver])
47
+ tag_finder = GithubTagFinder.new(octokit, gem_name, finder.repo_full_name)
48
+ old_tag = tag_finder.find(gem_info[:old_ver])
49
+ new_tag = tag_finder.find(gem_info[:new_ver])
45
50
 
46
- if old_tag && new_tag
47
- gem_info[:old_tag] = old_tag.name
48
- gem_info[:new_tag] = new_tag.name
49
- formatter.format(gem_info)
50
- else
51
- formatter.format(gem_info)
52
- end
51
+ if old_tag && new_tag
52
+ gem_info[:old_tag] = old_tag.name
53
+ gem_info[:new_tag] = new_tag.name
54
+ formatter.format(gem_info)
55
+ else
56
+ formatter.format(gem_info)
53
57
  end
54
- else
55
- formatter.format(gem_info)
56
58
  end
57
- }
58
- @compare_links
59
- end
59
+ else
60
+ formatter.format(gem_info)
61
+ end
62
+ }
63
+ @compare_links
60
64
  end
61
65
 
62
66
  def add_comment(repo_full_name, pr_number, compare_links)
@@ -1,3 +1,3 @@
1
1
  class CompareLinker
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :gem_info, class: Hash do
3
3
  factory :g_owner__old_rev__new_rev do
4
4
  defaults = {
@@ -1,5 +1,5 @@
1
1
  require 'compare_linker'
2
- require 'factory_girl'
2
+ require 'factory_bot'
3
3
  require 'rspec'
4
4
 
5
5
  Dir["#{__dir__}/support/**/*.rb"].each do |f|
@@ -7,10 +7,10 @@ Dir["#{__dir__}/support/**/*.rb"].each do |f|
7
7
  end
8
8
 
9
9
  RSpec.configure do |config|
10
- config.include FactoryGirl::Syntax::Methods
10
+ config.include FactoryBot::Syntax::Methods
11
11
  config.include LoadFixtureHelper
12
12
 
13
13
  config.before(:suite) do
14
- FactoryGirl.find_definitions
14
+ FactoryBot.find_definitions
15
15
  end
16
16
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compare_linker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
+ - Takashi Masuda
7
8
  - Kensuke Nagae
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
12
+ date: 2019-03-03 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: octokit
@@ -38,36 +39,22 @@ dependencies:
38
39
  - - ">="
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: activesupport
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '4'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '4'
55
42
  - !ruby/object:Gem::Dependency
56
43
  name: bundler
57
44
  requirement: !ruby/object:Gem::Requirement
58
45
  requirements:
59
- - - "~>"
46
+ - - ">="
60
47
  - !ruby/object:Gem::Version
61
48
  version: '1.3'
62
49
  type: :development
63
50
  prerelease: false
64
51
  version_requirements: !ruby/object:Gem::Requirement
65
52
  requirements:
66
- - - "~>"
53
+ - - ">="
67
54
  - !ruby/object:Gem::Version
68
55
  version: '1.3'
69
56
  - !ruby/object:Gem::Dependency
70
- name: factory_girl
57
+ name: factory_bot
71
58
  requirement: !ruby/object:Gem::Requirement
72
59
  requirements:
73
60
  - - ">="
@@ -110,6 +97,7 @@ dependencies:
110
97
  version: '0'
111
98
  description: Create GitHub's compare view URLs for pull request from diff of Gemfile.lock
112
99
  email:
100
+ - masutaka.net@gmail.com
113
101
  - kyanny@gmail.com
114
102
  executables: []
115
103
  extensions: []
@@ -167,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
155
  - !ruby/object:Gem::Version
168
156
  version: '0'
169
157
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 2.7.6
158
+ rubygems_version: 3.0.1
172
159
  signing_key:
173
160
  specification_version: 4
174
161
  summary: Create GitHub's compare view URLs for pull request