drg 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/drg/tasks/active_pinner.rb +7 -6
- data/lib/drg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96fc06163e814495c27a5877ebec28bdd16a58e7
|
4
|
+
data.tar.gz: 16e0e88aafe6fd5c599bb99c3658067255eb10dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b908176c46e6dede83f003c7a4b3d01cea105670739229b47df36c1d5e1fbaf9b8c0e4286bdc2d28b7a56124e45d6ccbf38ffd7d549d92ea7ae21d8b5894b709
|
7
|
+
data.tar.gz: c70a7a42223177ccab32e7c902bcadcd79babcc3374cccdc0b32d15461bb4a1175212e8165f3d7c6b212975576cbd019ca445ba82c1a77b3cc489fe69c33a649
|
data/README.md
CHANGED
@@ -108,6 +108,15 @@ Pins your gems at the major level:
|
|
108
108
|
rake drg:pin:major
|
109
109
|
```
|
110
110
|
|
111
|
+
### drg:pin:latest
|
112
|
+
|
113
|
+
Updates each outdated gem to the latest available version:
|
114
|
+
|
115
|
+
```bash
|
116
|
+
rake drg:pin:latest #=> updates all gems in the Gemfile
|
117
|
+
rake drg:pin:latest[<gem>] #=> updates only the specified <gem>
|
118
|
+
```
|
119
|
+
|
111
120
|
### drg:pin:patch_latest
|
112
121
|
|
113
122
|
Updates the patch version for each outdated gem to the latest version:
|
@@ -3,7 +3,7 @@ module DRG
|
|
3
3
|
class ActivePinnner
|
4
4
|
include Log
|
5
5
|
|
6
|
-
attr_reader :gemfile, :type
|
6
|
+
attr_reader :gemfile, :type
|
7
7
|
attr_writer :versions
|
8
8
|
|
9
9
|
# @param [Symbol] type of pin to perform. Available options are [:available, :minor, :patch]
|
@@ -11,7 +11,6 @@ module DRG
|
|
11
11
|
@type = type
|
12
12
|
@gemfile = Gemfile.new
|
13
13
|
@versions = {}
|
14
|
-
@updated_gems = Set.new
|
15
14
|
end
|
16
15
|
|
17
16
|
def perform(gem_name = nil)
|
@@ -23,8 +22,11 @@ module DRG
|
|
23
22
|
gems.each &method(:update)
|
24
23
|
end
|
25
24
|
end
|
26
|
-
|
27
|
-
|
25
|
+
log %Q(Done)
|
26
|
+
if gemfile.saved_lines.any?
|
27
|
+
gemfile.write
|
28
|
+
log %Q(You may want run `bundle update`)
|
29
|
+
end
|
28
30
|
end
|
29
31
|
|
30
32
|
# @note calls #latest_minor_version and #latest_patch_version
|
@@ -36,7 +38,6 @@ module DRG
|
|
36
38
|
if latest_version
|
37
39
|
log %Q(Updating "#{spec.name}" from #{spec.version.to_s} to #{latest_version})
|
38
40
|
gemfile.update gem, latest_version
|
39
|
-
updated_gems << gem.name
|
40
41
|
else
|
41
42
|
log %Q(No newer #{type} versions found)
|
42
43
|
end
|
@@ -95,7 +96,7 @@ module DRG
|
|
95
96
|
end
|
96
97
|
|
97
98
|
def load_gem_versions(gems)
|
98
|
-
log %Q(Searching for latest #{type}
|
99
|
+
log %Q(Searching for latest #{type} version of #{gems.join(' ')} ...)
|
99
100
|
`gem query -ra #{gems.join(' ')}`
|
100
101
|
end
|
101
102
|
|
data/lib/drg/version.rb
CHANGED