bundleup 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +3 -3
- data/lib/bundleup/console.rb +9 -4
- data/lib/bundleup/gemfile.rb +7 -9
- data/lib/bundleup/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d61632914c5c1ca565a988a58d9afe3eb87b20b8
|
4
|
+
data.tar.gz: 5acef44c5c76ba56f4b45f8691440b3d5b821a8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f760e4e30738338457bb265e70a8019e24b72495fdc0a40931598b58f4504cbdf7c557d1a87f078836ab93124d37ccdaab8cbcb9c86a5cf9add431175cd3a59e
|
7
|
+
data.tar.gz: 9c0fcc6014120a5bbf4a844ff58b61816a81dc19b6927d6e0e41d5188af9da329481c454f85a804925e8413c364d2e7c1feaebeebfe59507450e30e3027c9411
|
data/CHANGELOG.md
CHANGED
@@ -8,9 +8,17 @@ bundleup is in a pre-1.0 state. This means that its APIs and behavior are subjec
|
|
8
8
|
|
9
9
|
* Your contribution here!
|
10
10
|
|
11
|
+
## [0.2.0][] (2015-12-26)
|
12
|
+
|
13
|
+
* Animated spinner during long-running bundler commands
|
14
|
+
* Rather than run `bundle` in a temp directory, run within the current
|
15
|
+
directory, making a backup copy of Gemfile.lock. This ensures that relative
|
16
|
+
paths and `.bundle/config` are honored.
|
17
|
+
|
11
18
|
## 0.1.0 (2015-12-24)
|
12
19
|
|
13
20
|
* Initial release
|
14
21
|
|
15
22
|
[Semver]: http://semver.org
|
16
|
-
[Unreleased]: https://github.com/mattbrictson/bundleup/compare/v0.
|
23
|
+
[Unreleased]: https://github.com/mattbrictson/bundleup/compare/v0.2.0...HEAD
|
24
|
+
[0.2.0]: https://github.com/mattbrictson/bundleup/compare/v0.1.0...v0.2.0
|
data/README.md
CHANGED
@@ -36,11 +36,11 @@ That’s it!
|
|
36
36
|
|
37
37
|
## How it works
|
38
38
|
|
39
|
-
bundleup starts by making a copy of your Gemfile
|
39
|
+
bundleup starts by making a backup copy of your Gemfile.lock. Next it runs `bundle show`, then `bundle update` and `bundle show` again to find what gems versions are being used before and after Bundler does its updating magic. (Since gems are actually being installed into your Ruby environment during these steps, the process may take a few moments to complete, especially if gems with native extensions need to be compiled.)
|
40
40
|
|
41
|
-
Finally, bundleup runs `bundle outdated` to see the gems that were *not* updated due to Gemfile restrictions.
|
41
|
+
Finally, bundleup runs `bundle outdated` to see the gems that were *not* updated due to Gemfile restrictions. It then restores your original Gemfile.lock from the backup, leaving your project as it started.
|
42
42
|
|
43
|
-
|
43
|
+
After displaying its findings, bundleup gives you the option of running `bundle update` once more against your project. This time your Gemfile.lock *will* be changed. You can skip this step if you want.
|
44
44
|
|
45
45
|
|
46
46
|
## Roadmap
|
data/lib/bundleup/console.rb
CHANGED
@@ -27,11 +27,16 @@ module Bundleup
|
|
27
27
|
gets =~ /^($|y)/i
|
28
28
|
end
|
29
29
|
|
30
|
-
def progress(message)
|
31
|
-
print "\e[90m#{message}
|
32
|
-
|
30
|
+
def progress(message, &block)
|
31
|
+
print "\e[90m#{message}... \e[0m"
|
32
|
+
thread = Thread.new(&block)
|
33
|
+
thread.join(0.5)
|
34
|
+
%w(/ - \\ |).cycle do |char|
|
35
|
+
break if thread.join(0.1)
|
36
|
+
print "\r\e[90m#{message}... #{char} \e[0m"
|
37
|
+
end
|
33
38
|
puts "\r\e[90m#{message}... OK\e[0m"
|
34
|
-
|
39
|
+
thread.value
|
35
40
|
end
|
36
41
|
|
37
42
|
# Given a two-dimensional Array of strings representing a table of data,
|
data/lib/bundleup/gemfile.rb
CHANGED
@@ -22,7 +22,7 @@ module Bundleup
|
|
22
22
|
attr_reader :commands
|
23
23
|
|
24
24
|
def load
|
25
|
-
|
25
|
+
with_copy_of_lockfile do
|
26
26
|
find_versions(:old)
|
27
27
|
commands.update
|
28
28
|
find_versions(:new)
|
@@ -30,14 +30,12 @@ module Bundleup
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
Dir.chdir(dir, &block)
|
40
|
-
end
|
33
|
+
def with_copy_of_lockfile
|
34
|
+
backup = ".Gemfile.lock.#{rand(1_000_000_000).to_s(36)}"
|
35
|
+
FileUtils.cp("Gemfile.lock", backup)
|
36
|
+
yield
|
37
|
+
ensure
|
38
|
+
FileUtils.mv(backup, "Gemfile.lock")
|
41
39
|
end
|
42
40
|
|
43
41
|
def find_pinned_versions
|
data/lib/bundleup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundleup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.5.1
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: A friendlier command-line interface for Bundler’s `update` and `outdated`
|