minitestify 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/minitestify +1 -2
- data/lib/minitestify/cli.rb +21 -29
- data/lib/minitestify/version.rb +1 -1
- data/minitestify.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b012230457ed386a978b8a3366d2c845466da034e3d5936416bd8fc81558a07
|
4
|
+
data.tar.gz: 6080e67d0d428b7285acec73d46a52a795ee3f598cabe62618f661c9323fe278
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27cdc711b434341e092fa5f6a649d4ffdff2a2f04cde9fc8d51066dae0bdad006c18c1e50f9df377a995b571fa110a189091b35b4fbf76a9fb512126abb77364
|
7
|
+
data.tar.gz: 3a80822f1245e64241d6cddb499353ff79e6d10fc1f6b907887bebfc0228441a14a0ccf97835dde7105186721bdeccd2344a205b462cf182db57349d05852738
|
data/exe/minitestify
CHANGED
data/lib/minitestify/cli.rb
CHANGED
@@ -1,42 +1,34 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "dry/cli"
|
4
3
|
require "minitestify"
|
5
4
|
require "minitestify/version"
|
6
5
|
require "minitestify/spec"
|
6
|
+
require "optparse"
|
7
7
|
|
8
8
|
module Minitestify::CLI
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
class Print < Dry::CLI::Command
|
21
|
-
desc "Convert one or more specs to minitest and print to standard out"
|
22
|
-
|
23
|
-
argument :files, type: :array, required: true, desc: "Spec files to convert"
|
24
|
-
|
25
|
-
example [
|
26
|
-
"spec/dog_spec.rb # Generates dog_test.rb and prints to standard out"
|
27
|
-
]
|
9
|
+
module_function def run
|
10
|
+
options = {}
|
11
|
+
OptionParser
|
12
|
+
.new do |parser|
|
13
|
+
parser.banner = "Usage: minitestify [options] <spec_files>"
|
14
|
+
|
15
|
+
parser.on("-v", "--version", "Print version") do |v|
|
16
|
+
puts(Minitestify::VERSION)
|
17
|
+
exit
|
18
|
+
end
|
28
19
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
puts "# #{spec.to_test_filepath}"
|
33
|
-
puts spec.to_test_code
|
34
|
-
puts
|
20
|
+
parser.on("-h", "--help", "Prints this help") do
|
21
|
+
puts(parser)
|
22
|
+
exit
|
35
23
|
end
|
36
24
|
end
|
37
|
-
|
25
|
+
.parse!
|
38
26
|
|
39
|
-
|
40
|
-
|
27
|
+
ARGV.each do |file|
|
28
|
+
spec = Minitestify::Spec.new(file: file)
|
29
|
+
puts("# #{spec.to_test_filepath}")
|
30
|
+
puts(spec.to_test_code)
|
31
|
+
puts
|
32
|
+
end
|
41
33
|
end
|
42
34
|
end
|
data/lib/minitestify/version.rb
CHANGED
data/minitestify.gemspec
CHANGED
@@ -31,7 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
# Uncomment to register a new dependency of your gem
|
32
32
|
spec.add_dependency "syntax_tree", "~> 5.0"
|
33
33
|
spec.add_dependency "dry-inflector", "~> 1.0"
|
34
|
-
spec.add_dependency "dry-cli", "~> 1.0"
|
35
34
|
|
36
35
|
# For more information and examples about making a new gem, check out our
|
37
36
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitestify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafe Rosen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: syntax_tree
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: dry-cli
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.0'
|
55
41
|
description:
|
56
42
|
email:
|
57
43
|
- rafe@existentialmutt.com
|