gisdatigo 0.2.1 → 0.3.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: ad3c5a48c7703fc023d41a7af9d0b6783f118807471ecced8adfdf0766e09ef7
4
- data.tar.gz: 04b0b8616b315390bb84759a866290982cee665742c27f20b16bdb60825f8c91
3
+ metadata.gz: 49687fe078786c04161194ad58d7292c0d48a46c70ffe3a2bbe796299a5cd6dd
4
+ data.tar.gz: 1bd6e49380660110717ff87004dffb7c291cb04c3f6166a94a3884c4758c2c89
5
5
  SHA512:
6
- metadata.gz: 0c31a5c9aaca1e6b154197926eaf669a3c0091306c1818d8aab0055bfac6e32cf2fbde536cdfb8edf40348a54d61855e05771bdc8e4346ce01085ccf61f07403
7
- data.tar.gz: 55ad1f4783438cb585c4ff82ca460593894ad4ce662251c00176f57678698ecb7fed9c8b43b3b2de773ba735b87b49940ead44fe66c841f22ab3a005289a7cd0
6
+ metadata.gz: 21739de06074116be05292012749072d6b37727c5203541cbfde06ac45ab6595398e1452037788854001c254a0d96fc881d292f4eac3aba01440438a03f87bd8
7
+ data.tar.gz: c14f29bda8e4f1eb7fbf2cba3a500c60bc0b7c1e6894c0f11347d97400cbf2b0cad3cdb853aa25bd39e79f3340bb4d7f5f65ad67316c75f12b05b4ae2e1f9e4b
data/CHANGELOG CHANGED
@@ -4,6 +4,15 @@ Very opinionated automation for most of the gem update process for Rails applica
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v0.3.0 - 01/05/2018
8
+
9
+ * Run bundle update with conservative flag
10
+ * Run two updates with different options
11
+
12
+ ## v0.2.1 - 01/05/2018
13
+
14
+ * Fix release mistakes (sorry)
15
+
7
16
  ## v0.2.0 - 01/05/2018
8
17
 
9
18
  * Restrict codeclimate-test-reporter version
@@ -10,8 +10,8 @@ module Gisdatigo
10
10
  outdated_gems.map { |gem_line| gem_line.gsub(GEM_LINE_BEGINNING, '').split(" ")[0] }
11
11
  end
12
12
 
13
- def self.update_gem(gem_name)
14
- system("bundle update #{gem_name} &> /dev/null")
13
+ def self.update_gem(gem_name, opts=[])
14
+ system("bundle update #{opts.join(' ')} #{gem_name} &> /dev/null")
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -2,23 +2,41 @@ module Gisdatigo
2
2
  module Runner
3
3
  class Updater < Base
4
4
  def update
5
- puts "Running updates:"
5
+ puts "Running conservative updates:"
6
+ update_gems_with_options(['--conservative'])
6
7
 
7
- print "\tFetching outdated list..."
8
- outdated_list = BundlerManager.gem_name_list
9
- print "OK!\n"
8
+ puts "\nRunning default updates:"
9
+ update_gems_with_options([])
10
+ end
10
11
 
12
+ private
13
+
14
+ def update_gems_with_options(options)
11
15
  current_package = 1
16
+ outdated_list = fetch_outdated_list
17
+
12
18
  outdated_list.each do |gem_name|
13
19
  puts "\t#{current_package}/#{outdated_list.count} - Updating #{gem_name}"
14
- BundlerManager.update_gem(gem_name)
15
- if @git_manager.has_changes?
16
- test("ERROR: Failed to update #{gem_name}! Tests were broken!")
17
- @git_manager.commit(gem_name)
18
- end
20
+ BundlerManager.update_gem(gem_name, options)
21
+ commit(gem_name)
19
22
  current_package = current_package + 1
20
23
  end
21
24
  end
25
+
26
+ def fetch_outdated_list
27
+ print "\tFetching outdated list..."
28
+ outdated_list = BundlerManager.gem_name_list
29
+ print "OK!\n"
30
+
31
+ outdated_list
32
+ end
33
+
34
+ def commit(gem_name)
35
+ if @git_manager.has_changes?
36
+ test("ERROR: Failed to update #{gem_name}! Tests were broken!")
37
+ @git_manager.commit(gem_name)
38
+ end
39
+ end
22
40
  end
23
41
  end
24
- end
42
+ end
@@ -1,3 +1,3 @@
1
1
  module Gisdatigo
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gisdatigo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Reggiani Manzo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-01 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails