keep_up 0.8.0 → 0.8.1

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: 52b70904ec7c224effe5484fb97708042a32cbcf83b6ee7861bc4cc9441666de
4
- data.tar.gz: 02c104ee54bd19abd878bdb97e3492101f28ac429808e246af8658d983288e37
3
+ metadata.gz: 801a2183bb26562d1312f2aab9533084b9858c15102f247026ce2bab5ae441e3
4
+ data.tar.gz: c98dc0df6a89fbecb06b49dc428027a0b4406f4107d252be5cb325795b288be0
5
5
  SHA512:
6
- metadata.gz: 6e5b75af3971406213ac2de2d5f7b1ca171f02eccc462c182e90b893a1025ae8a4a4394bc101dafbbf7db00bd52d538ffc735c96fe8be5419520a82383b9bd8b
7
- data.tar.gz: 2d15c001ba5ef14540bc98a21282effcaec1e6b96de56c68942d38e92c8ce44ff358006363d3c1141ac08c4e76452940f64819edab8877e4fd18d1c922ad4c0b
6
+ metadata.gz: bc24c9ea45e40f4d3a7289ea1189f95154a641ceb3d4dfdf9dd3148ccadfcea450b38c0a358e042d3dac23816affd707a4f9c573e74bba18b000273b9f14afe7
7
+ data.tar.gz: c0b4cedf1a784b6efbd3964278ec76211031fc8bbacd3323c7ccbcf4ad58e2367d7b37616c76a31bfe8a7c296dfd6774746a9136203ec857438d781d67d680b3
data/.rubocop.yml CHANGED
@@ -9,20 +9,32 @@ AllCops:
9
9
  - 'tmp/**/*'
10
10
  TargetRubyVersion: 2.4
11
11
 
12
- # Dot at end of line makes it clearer that the line is not done
13
- Layout/DotPosition:
14
- EnforcedStyle: trailing
12
+ # Require lines to fit in pull requests.
13
+ Layout/LineLength:
14
+ Max: 92
15
15
 
16
- # Multi-line assignment should be simply indented. Aligning them makes it even
17
- # harder to keep a sane line length.
18
- Layout/MultilineOperationIndentation:
19
- EnforcedStyle: indented
16
+ # Don't force lonely closing parentheses
17
+ Layout/MultilineMethodCallBraceLayout:
18
+ EnforcedStyle: same_line
20
19
 
21
20
  # Multi-line method calls should be simply indented. Aligning them makes it
22
21
  # even harder to keep a sane line length.
23
22
  Layout/MultilineMethodCallIndentation:
24
23
  EnforcedStyle: indented
25
24
 
25
+ # Multi-line assignment should be simply indented. Aligning them makes it even
26
+ # harder to keep a sane line length.
27
+ Layout/MultilineOperationIndentation:
28
+ EnforcedStyle: indented
29
+
30
+ # Force consistent spacing independent of block contents
31
+ Layout/SpaceBeforeBlockBraces:
32
+ EnforcedStyleForEmptyBraces: space
33
+
34
+ # This cop gives bad advice
35
+ Lint/AmbiguousBlockAssociation:
36
+ Enabled: false
37
+
26
38
  # Allow if (foo = get_foo) style
27
39
  Lint/AssignmentInCondition:
28
40
  AllowSafeAssignment: true
@@ -32,14 +44,6 @@ Metrics/BlockLength:
32
44
  Exclude:
33
45
  - 'spec/**/*'
34
46
 
35
- # Require lines to fit in pull requests.
36
- Metrics/LineLength:
37
- Max: 92
38
-
39
- # Allow deeper nesting for spec organization
40
- RSpec/NestedGroups:
41
- Max: 4
42
-
43
47
  # Allow and/or for control flow only
44
48
  Style/AndOr:
45
49
  EnforcedStyle: conditionals
@@ -56,6 +60,16 @@ Style/NumericPredicate:
56
60
  Style/RedundantReturn:
57
61
  AllowMultipleReturnValues: true
58
62
 
59
- # I prefer to have symbols look like symbols
63
+ # Do not commit to use of interpolation
64
+ Style/StringLiterals:
65
+ EnforcedStyle: double_quotes
66
+
67
+ # Prefer symbols to look like symbols
60
68
  Style/SymbolArray:
61
69
  EnforcedStyle: brackets
70
+
71
+ # Project-specific configuration goes here.
72
+
73
+ # Allow deeper nesting for spec organization
74
+ RSpec/NestedGroups:
75
+ Max: 4
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-12-03 09:08:01 +0100 using RuboCop version 0.60.0.
3
+ # on 2019-12-22 13:07:39 +0100 using RuboCop version 0.78.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -9,7 +9,7 @@
9
9
  # Offense count: 1
10
10
  # Configuration parameters: CountComments, ExcludedMethods.
11
11
  Metrics/MethodLength:
12
- Max: 17
12
+ Max: 15
13
13
 
14
14
  # Offense count: 1
15
15
  Security/Eval:
data/.travis.yml CHANGED
@@ -1,15 +1,19 @@
1
- sudo: false
2
1
  language: ruby
3
2
 
4
- before_install:
3
+ dist: xenial
4
+
5
+ before_script:
5
6
  - git config --global user.email "you@example.com"
6
7
  - git config --global user.name "Your Name"
7
- - gem update --system
8
+
9
+ cache:
10
+ bundler: true
8
11
 
9
12
  rvm:
10
13
  - 2.4
11
14
  - 2.5
12
15
  - 2.6
16
+ - 2.7
13
17
  - ruby-head
14
18
 
15
19
  matrix:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1 / 2019-12-30
4
+
5
+ * Silence keyword arguments deprecation on Ruby 2.7
6
+
3
7
  ## 0.8.0 / 2019-10-16
4
8
 
5
9
  * Drop support for Ruby 2.3
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in keep_up.gemspec
6
6
  gemspec
data/Rakefile CHANGED
@@ -1,10 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
- require 'cucumber/rake/task'
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+ require "cucumber/rake/task"
6
+
7
+ RSpec::Core::RakeTask.new(:spec) do |t|
8
+ t.ruby_opts = ["-w"]
9
+ end
6
10
 
7
- RSpec::Core::RakeTask.new(:spec)
8
11
  Cucumber::Rake::Task.new(:features)
9
12
 
10
13
  task default: [:spec, :features]
data/bin/keep_up CHANGED
@@ -1,30 +1,30 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'optparse'
5
- require_relative '../lib/keep_up'
4
+ require "optparse"
5
+ require_relative "../lib/keep_up"
6
6
 
7
7
  options = {
8
8
  local: false,
9
- test_command: 'bundle exec rake',
9
+ test_command: "bundle exec rake",
10
10
  skip: []
11
11
  }
12
12
 
13
13
  opt_parser = OptionParser.new do |parser|
14
- parser.on('--[no-]local', 'Only consider locally installed gems') do |local|
14
+ parser.on("--[no-]local", "Only consider locally installed gems") do |local|
15
15
  options[:local] = local
16
16
  end
17
- parser.on('--test-command=COMMAND', 'Run COMMAND to test each update') do |command|
17
+ parser.on("--test-command=COMMAND", "Run COMMAND to test each update") do |command|
18
18
  options[:test_command] = command
19
19
  end
20
- parser.on('--skip=SKIPPED_GEM', 'Do not consider SKIPPED_GEM for updating') do |gemname|
20
+ parser.on("--skip=SKIPPED_GEM", "Do not consider SKIPPED_GEM for updating") do |gemname|
21
21
  options[:skip] << gemname
22
22
  end
23
- parser.on_tail('-h', '--help', 'Show this message') do
23
+ parser.on_tail("-h", "--help", "Show this message") do
24
24
  puts parser
25
25
  exit
26
26
  end
27
- parser.on_tail('-v', '--version', 'Show version') do
27
+ parser.on_tail("-v", "--version", "Show version") do
28
28
  puts "#{parser.program_name} #{KeepUp::VERSION}\n"
29
29
  exit
30
30
  end
@@ -33,7 +33,7 @@ end
33
33
  opt_parser.parse!
34
34
 
35
35
  begin
36
- KeepUp::Application.new(options).run
36
+ KeepUp::Application.new(**options).run
37
37
  rescue KeepUp::BailOut => e
38
38
  warn e.message
39
39
  exit 1
data/keep_up.gemspec CHANGED
@@ -1,35 +1,36 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'keep_up/version'
5
+ require "keep_up/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'keep_up'
8
+ spec.name = "keep_up"
9
9
  spec.version = KeepUp::VERSION
10
- spec.authors = ['Matijs van Zuijlen']
11
- spec.email = ['matijs@matijs.net']
10
+ spec.authors = ["Matijs van Zuijlen"]
11
+ spec.email = ["matijs@matijs.net"]
12
12
 
13
- spec.summary = 'Automatically update your dependencies'
13
+ spec.summary = "Automatically update your dependencies"
14
14
  spec.description =
15
- 'Automatically update the dependencies listed in your Gemfile,' \
16
- ' Gemfile.lock, and gemspec.'
17
- spec.homepage = 'https://github.com/mvz/keep_up'
18
- spec.license = 'MIT'
15
+ "Automatically update the dependencies listed in your Gemfile," \
16
+ " Gemfile.lock, and gemspec."
17
+ spec.homepage = "https://github.com/mvz/keep_up"
18
+ spec.license = "MIT"
19
19
 
20
- spec.files = `git ls-files -z`.split("\x0").
21
- reject { |f| f.match(%r{^(test|script|spec|features)/}) }
20
+ spec.files = `git ls-files -z`.split("\x0")
21
+ .reject { |f| f.match(%r{^(test|script|spec|features)/}) }
22
22
 
23
- spec.bindir = 'bin'
23
+ spec.bindir = "bin"
24
24
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
25
- spec.require_paths = ['lib']
25
+ spec.require_paths = ["lib"]
26
26
 
27
- spec.required_ruby_version = '>= 2.4.0'
27
+ spec.required_ruby_version = ">= 2.4.0"
28
28
 
29
- spec.add_runtime_dependency 'bundler', ['>= 1.15', '< 3.0']
29
+ spec.add_runtime_dependency "bundler", [">= 1.15", "< 3.0"]
30
30
 
31
- spec.add_development_dependency 'aruba', '~> 0.14.2'
32
- spec.add_development_dependency 'rake', '~> 13.0'
33
- spec.add_development_dependency 'rspec', '~> 3.0'
34
- spec.add_development_dependency 'simplecov', '~> 0.17.0'
31
+ spec.add_development_dependency "aruba", "~> 0.14.2"
32
+ spec.add_development_dependency "cucumber", "~> 3.1"
33
+ spec.add_development_dependency "rake", "~> 13.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_development_dependency "simplecov", "~> 0.17.0"
35
36
  end
data/lib/keep_up.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'keep_up/version'
4
- require_relative 'keep_up/application'
3
+ require_relative "keep_up/version"
4
+ require_relative "keep_up/application"
5
5
 
6
6
  # Main KeepUp namespace
7
7
  module KeepUp
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'runner'
4
- require_relative 'bundle'
5
- require_relative 'null_filter'
6
- require_relative 'skip_filter'
7
- require_relative 'updater'
8
- require_relative 'version_control'
3
+ require_relative "runner"
4
+ require_relative "bundle"
5
+ require_relative "null_filter"
6
+ require_relative "skip_filter"
7
+ require_relative "updater"
8
+ require_relative "version_control"
9
9
 
10
10
  module KeepUp
11
11
  # Error thrown when we can't go any further.
@@ -60,7 +60,7 @@ module KeepUp
60
60
  end
61
61
 
62
62
  def report_done
63
- puts 'All done!'
63
+ puts "All done!"
64
64
  end
65
65
 
66
66
  def filter
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'gemfile_filter'
4
- require_relative 'gemspec_filter'
5
- require_relative 'dependency'
3
+ require_relative "gemfile_filter"
4
+ require_relative "gemspec_filter"
5
+ require_relative "dependency"
6
6
 
7
7
  module KeepUp
8
8
  # A Gemfile with its current set of locked dependencies.
@@ -25,8 +25,8 @@ module KeepUp
25
25
  lines.map do |name, newest, version, requirement|
26
26
  requirement_list = requirement&.split(/,\s*/)
27
27
  requirement_list ||= fetch_gemspec_dependency_requirements(name)
28
- version = version.split(' ').first
29
- newest = newest.split(' ').first
28
+ version = version.split(" ").first
29
+ newest = newest.split(" ").first
30
30
  Dependency.new(name: name,
31
31
  locked_version: version,
32
32
  newest_version: newest,
@@ -36,7 +36,7 @@ module KeepUp
36
36
  end
37
37
 
38
38
  def check?
39
- _, status = @runner.run2 'bundle check'
39
+ _, status = @runner.run2 "bundle check"
40
40
  status == 0
41
41
  end
42
42
 
@@ -44,7 +44,7 @@ module KeepUp
44
44
  update = find_specification_update(dependencies, update)
45
45
  return unless update
46
46
 
47
- update_specification_contents(update, 'Gemfile', GemfileFilter)
47
+ update_specification_contents(update, "Gemfile", GemfileFilter)
48
48
  end
49
49
 
50
50
  def update_gemspec_contents(update)
@@ -107,7 +107,7 @@ module KeepUp
107
107
  end
108
108
 
109
109
  def gemspec_name
110
- @gemspec_name ||= Dir.glob('*.gemspec').first
110
+ @gemspec_name ||= Dir.glob("*.gemspec").first
111
111
  end
112
112
 
113
113
  def run_filtered(command, regexp)
@@ -26,7 +26,7 @@ module KeepUp
26
26
  segments = specification.version.segments
27
27
  return specification if segments.count <= segment_count
28
28
 
29
- version = segments.take(segment_count).join('.')
29
+ version = segments.take(segment_count).join(".")
30
30
  Gem::Specification.new(specification.name, version)
31
31
  end
32
32
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'open3'
3
+ require "open3"
4
4
 
5
5
  module KeepUp
6
6
  # Encapsulate knowledge of running external commands
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'null_filter'
3
+ require_relative "null_filter"
4
4
 
5
5
  module KeepUp
6
6
  # Apply potential updates to a Gemfile.
@@ -27,9 +27,9 @@ module KeepUp
27
27
  end
28
28
 
29
29
  def possible_updates
30
- bundle.dependencies.
31
- select { |dep| filter.call dep }.
32
- map { |dep| updated_dependency_for dep }.compact.uniq
30
+ bundle.dependencies
31
+ .select { |dep| filter.call dep }
32
+ .map { |dep| updated_dependency_for dep }.compact.uniq
33
33
  end
34
34
 
35
35
  private
@@ -52,7 +52,7 @@ module KeepUp
52
52
  @out.puts " to #{result.version}"
53
53
  else
54
54
  @out.puts " to #{dependency.version}"
55
- @out.puts 'Update failed'
55
+ @out.puts "Update failed"
56
56
  end
57
57
  end
58
58
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KeepUp
4
- VERSION = '0.8.0'
4
+ VERSION = "0.8.1"
5
5
  end
@@ -12,11 +12,11 @@ module KeepUp
12
12
  end
13
13
 
14
14
  def revert_changes
15
- @runner.run 'git reset --hard'
15
+ @runner.run "git reset --hard"
16
16
  end
17
17
 
18
18
  def clean?
19
- @runner.run('git status -s') == ''
19
+ @runner.run("git status -s") == ""
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keep_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 0.14.2
47
+ - !ruby/object:Gem::Dependency
48
+ name: cucumber
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.1'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.1'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rake
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -143,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
157
  - !ruby/object:Gem::Version
144
158
  version: '0'
145
159
  requirements: []
146
- rubygems_version: 3.0.3
160
+ rubygems_version: 3.1.2
147
161
  signing_key:
148
162
  specification_version: 4
149
163
  summary: Automatically update your dependencies