minitest-keyword 0.0.2 → 1.0.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
- SHA1:
3
- metadata.gz: 4a6def3f236a875e344c8319d67b706fcc74b1ef
4
- data.tar.gz: 674ed4c01d9426b89e90b08f9607b7be684666cb
2
+ SHA256:
3
+ metadata.gz: 4aed7685063ddba46ffee74bf622edbd0f6a7146fedfe45cc13e59e4a6d986c4
4
+ data.tar.gz: 726bd9ed6d71b31f0620f673ef857a4ffbc1590c827ed52c849f0f78b9d49ee0
5
5
  SHA512:
6
- metadata.gz: 8d80dbaa4353678dc91da6e60f44858a427f5ac8148eed53840c85657717135e0fdb051396118497f6ea12f951b5059f373c24b8c3d4fc694ef142763b63b4f3
7
- data.tar.gz: ee43f67179591e194469a161d88307dc2ce4ebd904f1b00f199b98a772c1284da111587ee2d97d4c28df81285f9bfd53e8881934baf8c9ef6804e71b1842ca3b
6
+ metadata.gz: 0a5bfb013c016b9ff7eb4c6bb54437a684dfeecfe421baac9db19ff6f0fb62c2c2234dcdca5d8c41c579fb5881022622c4bf27b48e859a6000a6262f844eaf5a
7
+ data.tar.gz: 437e24403249041deaae6cb2c631b74107e66b0ace75dbfd97647c7a168d40bf0a7de6ad8843015062878b91e7d19cf3d8e60fff6211121f97e6d012c1202c89
data/.rubocop.yml CHANGED
@@ -1,11 +1,6 @@
1
1
  AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
- TargetRubyVersion: 2.1
4
+ TargetRubyVersion: 2.6
5
5
  Exclude:
6
6
  - 'vendor/**/*'
7
-
8
- Style/PercentLiteralDelimiters:
9
- PreferredDelimiters:
10
- default: '[]'
11
- '%r': '{}'
data/.travis.yml CHANGED
@@ -1,7 +1,10 @@
1
1
  language: ruby
2
- rvm: 2.4.1
3
- before_install: gem install bundler -v 1.14.6
4
- cache: bundler
2
+ rvm: 2.6.0
3
+ branches:
4
+ only: master
5
+ before_install:
6
+ - gem install bundler
5
7
  script:
6
8
  - bundle exec rake
7
9
  - bundle exec rubocop
10
+ cache: bundler
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0] - 2019-01-06
10
+ ### Changed
11
+ - The name of the underlying parameter changed for `assert_in_epsilon` from `a` and `b` to `exp` and `act`. As such in order to normalize, those were aliased to `expected` and `actual` as well.
12
+
13
+ [Unreleased]: https://github.com/CultureHQ/client/compare/v1.0.0...HEAD
14
+ [1.0.0]: https://github.com/CultureHQ/client/compare/v0.0.2...v1.0.0
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017 Kevin Deisz
3
+ Copyright (c) 2019 Kevin Deisz
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Minitest::Keyword
2
2
 
3
3
  [![Build Status](https://travis-ci.org/kddeisz/minitest-keyword.svg?branch=master)](https://travis-ci.org/kddeisz/minitest-keyword)
4
- [![Coverage Status](https://coveralls.io/repos/github/kddeisz/minitest-keyword/badge.svg?branch=master)](https://coveralls.io/github/kddeisz/minitest-keyword?branch=master)
5
4
  [![Gem](https://img.shields.io/gem/v/minitest-keyword.svg)](https://rubygems.org/gems/minitest-keyword)
6
5
 
7
6
  A small gem for allowing you to use Minitest assertions with keyword arguments. No longer worry about remembering the order of arguments!
@@ -24,7 +23,7 @@ Or install it yourself as:
24
23
 
25
24
  ## Usage
26
25
 
27
- Add `require 'minitest-keyword'` to the top of your `test_helper.rb` script. In your tests you will now be able to change your assertions from:
26
+ Add `require 'minitest/keyword'` to your `test_helper.rb` script. In your tests you will now be able to change your assertions from:
28
27
 
29
28
  ```ruby
30
29
  assert_equal 'foo', foo.inspect
@@ -47,7 +46,7 @@ assert test:, message: nil
47
46
  assert_empty object:, message: nil
48
47
  assert_equal expected:, actual:, message: nil
49
48
  assert_in_delta expected:, actual:, delta:, message: nil
50
- assert_in_epsilon a:, b:, epsilon:, message: nil
49
+ assert_in_epsilon expected:, actual:, epsilon:, message: nil
51
50
  assert_includes collection:, object:, message: nil
52
51
  assert_instance_of class:, object:, message: nil
53
52
  assert_kind_of class:, object:, message: nil
@@ -69,7 +68,7 @@ refute test:, message: nil
69
68
  refute_empty object:, message: nil
70
69
  refute_equal expected:, actual:, message: nil
71
70
  refute_in_delta expected:, actual:, delta:, message: nil
72
- refute_in_epsilon a:, b:, epsilon:, message: nil
71
+ refute_in_epsilon expected:, actual:, epsilon:, message: nil
73
72
  refute_includes collection:, object:, message: nil
74
73
  refute_instance_of class:, object:, message: nil
75
74
  refute_kind_of class:, object:, message: nil
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
 
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'minitest/keyword'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'minitest'
2
4
  require 'minitest/keyword/version'
3
5
 
@@ -7,7 +9,9 @@ module Minitest
7
9
  module Keyword
8
10
  # Longer names so that the keywords make more sense
9
11
  ALIASES = {
12
+ a: :expected,
10
13
  act: :actual,
14
+ b: :actual,
11
15
  cls: :class,
12
16
  exp: :expected,
13
17
  meth: :method,
@@ -38,6 +42,7 @@ module Minitest
38
42
  parameters = Assertions.instance_method(method_name).parameters
39
43
  next if parameters.empty?
40
44
 
45
+ # rubocop:disable Metrics/MethodLength
41
46
  define_method(method_name) do |*args, **kwargs, &block|
42
47
  passed_params = []
43
48
 
@@ -65,6 +70,7 @@ module Minitest
65
70
  super(*passed_params, &block)
66
71
  end
67
72
  end
73
+ # rubocop:enable Metrics/MethodLength
68
74
  end
69
75
 
70
76
  # Hook into the Minitest::Test class and prepend the Keyword module
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Minitest
2
4
  module Keyword
3
- VERSION = '0.0.2'.freeze
5
+ VERSION = '1.0.0'
4
6
  end
5
7
  end
@@ -1,6 +1,6 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'minitest/keyword/version'
6
6
 
@@ -21,12 +21,10 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.required_ruby_version = '>= 2.1.0'
25
24
  spec.add_dependency 'minitest', '~> 5.0'
26
25
 
27
- spec.add_development_dependency 'bundler', '~> 1.14'
28
- spec.add_development_dependency 'coveralls', '~> 0.8'
29
- spec.add_development_dependency 'rake', '~> 12.0'
30
- spec.add_development_dependency 'rubocop', '~> 0.48'
31
- spec.add_development_dependency 'simplecov', '~> 0.14'
26
+ spec.add_development_dependency 'bundler', '~> 2.0'
27
+ spec.add_development_dependency 'rake', '~> 12.3'
28
+ spec.add_development_dependency 'rubocop', '~> 0.62'
29
+ spec.add_development_dependency 'simplecov', '~> 0.15'
32
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-keyword
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Deisz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2019-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -30,70 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.14'
33
+ version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.14'
41
- - !ruby/object:Gem::Dependency
42
- name: coveralls
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.8'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.8'
40
+ version: '2.0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '12.0'
47
+ version: '12.3'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '12.0'
54
+ version: '12.3'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rubocop
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0.48'
61
+ version: '0.62'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0.48'
68
+ version: '0.62'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: simplecov
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '0.14'
75
+ version: '0.15'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '0.14'
82
+ version: '0.15'
97
83
  description:
98
84
  email:
99
85
  - kevin.deisz@gmail.com
@@ -104,8 +90,9 @@ files:
104
90
  - ".gitignore"
105
91
  - ".rubocop.yml"
106
92
  - ".travis.yml"
93
+ - CHANGELOG.md
107
94
  - Gemfile
108
- - LICENSE.txt
95
+ - LICENSE
109
96
  - README.md
110
97
  - Rakefile
111
98
  - bin/console
@@ -125,15 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
112
  requirements:
126
113
  - - ">="
127
114
  - !ruby/object:Gem::Version
128
- version: 2.1.0
115
+ version: '0'
129
116
  required_rubygems_version: !ruby/object:Gem::Requirement
130
117
  requirements:
131
118
  - - ">="
132
119
  - !ruby/object:Gem::Version
133
120
  version: '0'
134
121
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.6.11
122
+ rubygems_version: 3.0.1
137
123
  signing_key:
138
124
  specification_version: 4
139
125
  summary: Use Minitest assertions with keyword arguments