gemdiff 0.9.1 → 0.9.2
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 +4 -4
- data/README.md +3 -3
- data/bin/gemdiff +2 -2
- data/lib/gemdiff/bundle_inspector.rb +2 -2
- data/lib/gemdiff/colorize.rb +2 -2
- data/lib/gemdiff/gem_updater.rb +2 -2
- data/lib/gemdiff/outdated_gem.rb +7 -8
- data/lib/gemdiff/repo_finder.rb +42 -42
- data/lib/gemdiff/version.rb +1 -1
- data/lib/gemdiff.rb +8 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1692d5dbfd215607bce00d2e653d6d34aab121f3
|
4
|
+
data.tar.gz: 07536f532c1d8efc455434fea89b5b9441bf8f3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f76e638b118512f94197996782c689b30f9dec884490bfdc35e85b443365dca419713176636204de8add5421c6ce6498e2913e8bcfd6e3b8dfcc874d37b05cf
|
7
|
+
data.tar.gz: 25a140410e491b6f44df005d4d6d1c4dfa458c9ed7537a143a176430eeaf88863a74cf26803d951e353f6ef3ec4d96cc166a19ed85ed52f412edbc66de1d5b76
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ Show the repository URL using the gemspec. If a GitHub URL is not found, query t
|
|
35
35
|
|
36
36
|
```sh
|
37
37
|
$ gemdiff find pundit
|
38
|
-
|
38
|
+
https://github.com/elabs/pundit
|
39
39
|
```
|
40
40
|
|
41
41
|
### `gemdiff open [gem]`
|
@@ -87,7 +87,7 @@ $ gemdiff master haml
|
|
87
87
|
|
88
88
|
### `gemdiff update [gem]`
|
89
89
|
|
90
|
-
Use `update` to update a gem in your bundle and commit the change
|
90
|
+
Use `update` to update a gem in your bundle and commit the change with git.
|
91
91
|
You will be shown a preview of the `git diff` and you may choose to commit or reset the change.
|
92
92
|
|
93
93
|
```sh
|
@@ -121,7 +121,7 @@ diff --git a/Gemfile.lock
|
|
121
121
|
|
122
122
|
### `gemdiff outdated`
|
123
123
|
|
124
|
-
Runs `bundle outdated --strict` in the current directory.
|
124
|
+
Runs `bundle outdated --strict` in the current directory. For each outdated gem,
|
125
125
|
you can open the compare view for that gem, skip it, or exit.
|
126
126
|
Enter `y` to review. Enter `A` to open all compare views (beware!).
|
127
127
|
|
data/bin/gemdiff
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
$LOAD_PATH.unshift File.dirname(__FILE__) +
|
3
|
+
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
|
4
4
|
|
5
5
|
# Exit cleanly from an early interrupt
|
6
6
|
Signal.trap("INT") { exit 1 }
|
7
7
|
|
8
|
-
require
|
8
|
+
require "gemdiff"
|
9
9
|
|
10
10
|
Gemdiff::CLI.start(ARGV)
|
data/lib/gemdiff/colorize.rb
CHANGED
@@ -14,7 +14,7 @@ module Gemdiff
|
|
14
14
|
out = []
|
15
15
|
lines.split("\n").each do |line|
|
16
16
|
out <<
|
17
|
-
if line.start_with?("---"
|
17
|
+
if line.start_with?("---", "+++", "diff", "index")
|
18
18
|
colorize line, :blue
|
19
19
|
elsif line.start_with?("@@")
|
20
20
|
colorize line, :magenta
|
@@ -35,7 +35,7 @@ module Gemdiff
|
|
35
35
|
"\e[#{to_color_code(color)}m#{string}\e[0m"
|
36
36
|
end
|
37
37
|
|
38
|
-
|
38
|
+
private
|
39
39
|
|
40
40
|
def to_color_code(color)
|
41
41
|
COLORS[color] || 30
|
data/lib/gemdiff/gem_updater.rb
CHANGED
@@ -30,7 +30,7 @@ module Gemdiff
|
|
30
30
|
git_diff.empty?
|
31
31
|
end
|
32
32
|
|
33
|
-
|
33
|
+
private
|
34
34
|
|
35
35
|
def git_show
|
36
36
|
`git show`
|
@@ -43,7 +43,7 @@ module Gemdiff
|
|
43
43
|
def git_commit
|
44
44
|
added = git_changed_line
|
45
45
|
return false if added.empty?
|
46
|
-
version = added.split("\n").first.split(
|
46
|
+
version = added.split("\n").first.split(" ").last.gsub(/[()]/, "")
|
47
47
|
git_add_and_commit_lockfile version
|
48
48
|
true
|
49
49
|
end
|
data/lib/gemdiff/outdated_gem.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
require
|
1
|
+
require "launchy"
|
2
2
|
|
3
3
|
module Gemdiff
|
4
4
|
class OutdatedGem
|
5
|
-
|
6
5
|
# gems that tag releases with tag names like 1.2.3
|
7
6
|
# keep it alphabetical
|
8
|
-
LIST_NO_V = %w
|
7
|
+
LIST_NO_V = %w(
|
9
8
|
atomic
|
10
9
|
autoprefixer-rails
|
11
10
|
babosa
|
@@ -20,7 +19,7 @@ module Gemdiff
|
|
20
19
|
safe_yaml
|
21
20
|
sass
|
22
21
|
twilio-ruby
|
23
|
-
|
22
|
+
)
|
24
23
|
|
25
24
|
attr_accessor :name, :old_version, :new_version
|
26
25
|
|
@@ -50,7 +49,7 @@ module Gemdiff
|
|
50
49
|
end
|
51
50
|
|
52
51
|
def repo?
|
53
|
-
|
52
|
+
repo
|
54
53
|
end
|
55
54
|
|
56
55
|
def releases_url
|
@@ -85,7 +84,7 @@ module Gemdiff
|
|
85
84
|
open_url(repo) if repo?
|
86
85
|
end
|
87
86
|
|
88
|
-
|
87
|
+
private
|
89
88
|
|
90
89
|
def open_url(url)
|
91
90
|
Launchy.open(url) do |exception|
|
@@ -99,7 +98,7 @@ module Gemdiff
|
|
99
98
|
else
|
100
99
|
# if the new version is not a number, assume it is a branch name
|
101
100
|
# and drop the 'v'
|
102
|
-
prefix = (new_version[0] =~ /^[0-9]/) == 0 ?
|
101
|
+
prefix = (new_version[0] =~ /^[0-9]/) == 0 ? "v" : ""
|
103
102
|
"v#{old_version}...#{prefix}#{new_version}"
|
104
103
|
end
|
105
104
|
end
|
@@ -115,7 +114,7 @@ module Gemdiff
|
|
115
114
|
# swap versions if needed
|
116
115
|
def old_new(v_old, v_new)
|
117
116
|
return [v_old, v_new] unless v_old && v_new
|
118
|
-
if v_old ==
|
117
|
+
if v_old == "master" || (Gem::Version.new(v_old) > Gem::Version.new(v_new))
|
119
118
|
[v_new, v_old]
|
120
119
|
else
|
121
120
|
[v_old, v_new]
|
data/lib/gemdiff/repo_finder.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "octokit"
|
2
|
+
require "yaml"
|
3
3
|
|
4
4
|
module Gemdiff
|
5
5
|
module RepoFinder
|
@@ -10,44 +10,44 @@ module Gemdiff
|
|
10
10
|
# some repos are not mostly ruby so the github search doesn't find them
|
11
11
|
REPO_EXCEPTIONS =
|
12
12
|
{
|
13
|
-
actionmailer:
|
14
|
-
actionpack:
|
15
|
-
actionview:
|
16
|
-
activejob:
|
17
|
-
activemodel:
|
18
|
-
activerecord:
|
19
|
-
activesupport:
|
20
|
-
chunky_png:
|
21
|
-
:"color-schemer" =>
|
22
|
-
delayed_job:
|
23
|
-
execjs:
|
24
|
-
faraday_middleware:
|
25
|
-
ffi:
|
26
|
-
googleauth:
|
27
|
-
gosu:
|
28
|
-
:"guard-livereload" =>
|
29
|
-
:"jquery-ujs" =>
|
30
|
-
json:
|
31
|
-
:"modular-scale" =>
|
32
|
-
nokogiri:
|
33
|
-
nokogumbo:
|
34
|
-
passenger:
|
35
|
-
pg:
|
36
|
-
:"pry-doc" =>
|
37
|
-
railties:
|
38
|
-
rake:
|
39
|
-
resque:
|
40
|
-
:"resque-multi-job-forks" =>
|
41
|
-
rr:
|
42
|
-
SassyLists:
|
43
|
-
:"Sassy-Maps" =>
|
44
|
-
:"sassy-math" =>
|
45
|
-
sinatra:
|
46
|
-
stripe:
|
47
|
-
thread_safe:
|
48
|
-
tolk:
|
49
|
-
toolkit:
|
50
|
-
zeus:
|
13
|
+
actionmailer: "rails/rails",
|
14
|
+
actionpack: "rails/rails",
|
15
|
+
actionview: "rails/rails",
|
16
|
+
activejob: "rails/rails",
|
17
|
+
activemodel: "rails/rails",
|
18
|
+
activerecord: "rails/rails",
|
19
|
+
activesupport: "rails/rails",
|
20
|
+
chunky_png: "wvanbergen/chunky_png",
|
21
|
+
:"color-schemer" => "at-import/color-schemer",
|
22
|
+
delayed_job: "collectiveidea/delayed_job",
|
23
|
+
execjs: "rails/execjs",
|
24
|
+
faraday_middleware: "lostisland/faraday_middleware",
|
25
|
+
ffi: "ffi/ffi",
|
26
|
+
googleauth: "google/google-auth-library-ruby",
|
27
|
+
gosu: "jlnr/gosu",
|
28
|
+
:"guard-livereload" => "guard/guard-livereload",
|
29
|
+
:"jquery-ujs" => "rails/jquery-ujs",
|
30
|
+
json: "flori/json",
|
31
|
+
:"modular-scale" => "modularscale/modularscale-sass",
|
32
|
+
nokogiri: "sparklemotion/nokogiri",
|
33
|
+
nokogumbo: "rubys/nokogumbo",
|
34
|
+
passenger: "phusion/passenger",
|
35
|
+
pg: "ged/ruby-pg",
|
36
|
+
:"pry-doc" => "pry/pry-doc",
|
37
|
+
railties: "rails/rails",
|
38
|
+
rake: "ruby/rake",
|
39
|
+
resque: "resque/resque",
|
40
|
+
:"resque-multi-job-forks" => "stulentsev/resque-multi-job-forks",
|
41
|
+
rr: "rr/rr",
|
42
|
+
SassyLists: "at-import/SassyLists",
|
43
|
+
:"Sassy-Maps" => "at-import/Sassy-Maps",
|
44
|
+
:"sassy-math" => "at-import/Sassy-math",
|
45
|
+
sinatra: "sinatra/sinatra",
|
46
|
+
stripe: "stripe/stripe-ruby",
|
47
|
+
thread_safe: "ruby-concurrency/thread_safe",
|
48
|
+
tolk: "tolk/tolk",
|
49
|
+
toolkit: "at-import/tookit",
|
50
|
+
zeus: "burke/zeus",
|
51
51
|
}
|
52
52
|
|
53
53
|
class << self
|
@@ -57,7 +57,7 @@ module Gemdiff
|
|
57
57
|
gemspec_homepage(gem_name) || search(gem_name)
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
private
|
61
61
|
|
62
62
|
def gemspec_homepage(gem_name)
|
63
63
|
if (full_name = REPO_EXCEPTIONS[gem_name.to_sym])
|
@@ -92,7 +92,7 @@ module Gemdiff
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def last_shell_command_success?
|
95
|
-
|
95
|
+
$CHILD_STATUS.success?
|
96
96
|
end
|
97
97
|
|
98
98
|
def find_local_gemspec(name)
|
data/lib/gemdiff/version.rb
CHANGED
data/lib/gemdiff.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
1
|
+
require "English"
|
2
|
+
require "gemdiff/version"
|
3
|
+
require "gemdiff/colorize"
|
4
|
+
require "gemdiff/cli"
|
5
|
+
require "gemdiff/bundle_inspector"
|
6
|
+
require "gemdiff/outdated_gem"
|
7
|
+
require "gemdiff/repo_finder"
|
8
|
+
require "gemdiff/gem_updater"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tee Parham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.3'
|
111
111
|
description: Command-line utility to find source repositories for ruby gems, open
|
112
|
-
common github pages, compare gem versions, and simplify gem update workflow in git
|
112
|
+
common github pages, compare gem versions, and simplify gem update workflow in git)
|
113
113
|
email:
|
114
114
|
- tee@neighborland.com
|
115
115
|
executables:
|
@@ -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.5.
|
151
|
+
rubygems_version: 2.5.2
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Find source repositories for ruby gems. Open, compare, and update outdated
|