gemdiff 2.4.2 → 2.5.0

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: 5979cb21043ef31f5525f388c0dabeca39d0eaa9060d60b0c72f8fbed7db8568
4
- data.tar.gz: 527e22aa8f7a0f29d6733ea2cf43d7fbb6b29dab911b94832376b8cdb70ad834
3
+ metadata.gz: 2dfa229575ced63a5649de607ba777920da27cd020fcf512dc323f6c10c95338
4
+ data.tar.gz: e326d6a70ffb6f1ef561853b9bafa8065f7b91b034cfa94354e1030612511b5b
5
5
  SHA512:
6
- metadata.gz: e345a719befa5dc26e5a54beede527aef3a7ba7db98bb8bff3811d908bbf9b51195f62ce95bdd3c15992df78e96b0df7f6cebcc17d439fbb37128d01933245e7
7
- data.tar.gz: 954d7e4340573685bd3f9217d0ce3ea25fbaebaace40373e1d0da37dd061e8b4531caf83282c1c0ef0e854ad90d2a7aca5628afc6d0db7ddc1b01adf8369cb8c
6
+ metadata.gz: 14a755c689d9329bf84463c4a5564ab74c46653d410755be16337fdfbe96ad2e2a07750f33355d29c909ada31a6940a8e857bc127b433a2f3dea63f1c06db81d
7
+ data.tar.gz: 361d0eccc283f2e9896ef98c5cd89a98e6dafb7988a4e8a1b978c73f6118cde95107568eed65531b2516afe82886e60ad7a3f2413c1b35e53adfa91280d91a73
@@ -3,7 +3,11 @@
3
3
  module Gemdiff
4
4
  class BundleInspector
5
5
  def list
6
- @list ||= outdated.split("\n").map { |line| new_outdated_gem(line) }.compact
6
+ @list ||=
7
+ outdated
8
+ .split("\n")
9
+ .map { |line| new_outdated_gem(line) }
10
+ .compact
7
11
  end
8
12
 
9
13
  def outdated
@@ -24,7 +28,7 @@ module Gemdiff
24
28
  return unless line.start_with?(" * ")
25
29
 
26
30
  # clean & convert new & old output to same format
27
- items = line.gsub("*", "")
31
+ items = line.delete("*")
28
32
  .gsub("(newest", "")
29
33
  .gsub(", installed", " >")
30
34
  .gsub(/([(),])/, "")
data/lib/gemdiff/cli.rb CHANGED
@@ -39,11 +39,11 @@ module Gemdiff
39
39
  find(gem_name).master
40
40
  end
41
41
 
42
- desc "compare <gem> [<old> <new>]", <<DESC
43
- Compare gem versions. Opens the compare view between the specified new and old versions.
44
- If versions are not specified, your bundle is inspected and the latest version of the
45
- gem is compared with the current version in your bundle.
46
- DESC
42
+ desc "compare <gem> [<old> <new>]", <<~DESC
43
+ Compare gem versions. Opens the compare view between the specified new and old versions.
44
+ If versions are not specified, your bundle is inspected and the latest version of the
45
+ gem is compared with the current version in your bundle.
46
+ DESC
47
47
  def compare(gem_name, old_version = nil, new_version = nil)
48
48
  outdated_gem = find(gem_name)
49
49
  return unless outdated_gem.repo?
@@ -9,7 +9,7 @@ module Gemdiff
9
9
  yellow: 33,
10
10
  blue: 34,
11
11
  magenta: 35,
12
- }
12
+ }.freeze
13
13
 
14
14
  # works with `git show` and `git diff`
15
15
  def colorize_git_output(lines)
@@ -62,7 +62,7 @@ module Gemdiff
62
62
  # + activejob (4.2.3)
63
63
  # + activejob (= 4.2.3)
64
64
  def git_added_line
65
- @added_line ||= `git diff | grep ' #{name} (' | grep '+ '`
65
+ @git_added_line ||= `git diff | grep ' #{name} (' | grep '+ '`
66
66
  end
67
67
 
68
68
  # example returns:
@@ -30,7 +30,7 @@ module Gemdiff
30
30
  slack-notifier
31
31
  signet
32
32
  twilio-ruby
33
- ]
33
+ ].freeze
34
34
 
35
35
  attr_accessor :name, :old_version, :new_version
36
36
 
@@ -105,7 +105,7 @@ module Gemdiff
105
105
 
106
106
  def open_url(url)
107
107
  Launchy.open(url) do |exception|
108
- $stderr.puts "Could not open #{url} because #{exception}"
108
+ warn "Could not open #{url} because #{exception}"
109
109
  end
110
110
  end
111
111
 
@@ -5,7 +5,7 @@ require "yaml"
5
5
 
6
6
  module Gemdiff
7
7
  module RepoFinder
8
- GITHUB_REPO_REGEX = /(https?):\/\/(www.)?github\.com\/([\w.%-]*)\/([\w.%-]*)/
8
+ GITHUB_REPO_REGEX = %r{(https?)://(www.)?github\.com/([\w.%-]*)/([\w.%-]*)}.freeze
9
9
 
10
10
  # rails builds several gems that are not individual projects
11
11
  # some repos move and the old repo page still exists
@@ -34,6 +34,7 @@ module Gemdiff
34
34
  "foundation-rails": "zurb/foundation-rails",
35
35
  googleauth: "google/google-auth-library-ruby",
36
36
  gosu: "jlnr/gosu",
37
+ grpc: "google/grpc",
37
38
  "guard-livereload": "guard/guard-livereload",
38
39
  "jquery-ujs": "rails/jquery-ujs",
39
40
  json: "flori/json",
@@ -82,7 +83,7 @@ module Gemdiff
82
83
  "twitter-text": "twitter/twitter-text",
83
84
  ox: "ohler55/ox",
84
85
  zeus: "burke/zeus",
85
- }
86
+ }.freeze
86
87
 
87
88
  class << self
88
89
  # Try to get the homepage from the gemspec
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gemdiff
4
- VERSION = "2.4.2"
4
+ VERSION = "2.5.0"
5
5
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tee Parham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-23 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octokit
14
+ name: launchy
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.0'
19
+ version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '4.0'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
- name: thor
28
+ name: octokit
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.19'
33
+ version: '4.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.19'
40
+ version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: launchy
42
+ name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.4'
47
+ version: '0.19'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.4'
54
+ version: '0.19'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.7.7
151
+ rubygems_version: 2.7.8
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Find source repositories for ruby gems. Open, compare, and update outdated