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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aafc2fa37170cfe295d443356e3485e3c6269cdf
4
- data.tar.gz: 5015aaa620204cee4db82f98e60fed0dedf531fe
3
+ metadata.gz: 96fc06163e814495c27a5877ebec28bdd16a58e7
4
+ data.tar.gz: 16e0e88aafe6fd5c599bb99c3658067255eb10dc
5
5
  SHA512:
6
- metadata.gz: c8a049b8b3b1bff5ac9c14555ecf3d1aca85eaa8e944ffe8f7feefe34c851b7fdff4d57a02ca691ad295ec821289b9cbf0a3f18cef02a39a62e01141086d2cfd
7
- data.tar.gz: 3e4ddf9f4b52824174b574eb621580988906894ae235522482637ad3c343c6166f60269222a0f07430462282575fc152f8f44fd4882fcb7601f24fe7d68c4ad5
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, :updated_gems
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
- gemfile.write if gemfile.saved_lines.any?
27
- log %Q(Done.#{' You may want run `bundle update`' if updated_gems.any?})
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} versions of #{gems.join(' ')} ...)
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
@@ -1,3 +1,3 @@
1
1
  module DRG
2
- VERSION = '0.9.2'.freeze
2
+ VERSION = '0.9.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Buckley