yattex 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/yattex +3 -0
- data/lib/yattex.rb +75 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5b3096dce45908c23ec5bbe5b2867944416d81eea39bc4f73afdf55387d9d634
|
4
|
+
data.tar.gz: 41a6fccc54343a8a9dc8d1bdf7d73f844a59eeb35a4563b1b5e37d2e0f27b56f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 670f1bd29a860394037611b4e22b4a8cafca6bb3ae9233d01e397d942d5be631924e085b1159f463d11c5b04274aad7dc0f0d158e2844bffd8d6fe93326c2ce5
|
7
|
+
data.tar.gz: 95a62dcd0cb72f52b666fad2c03d79a700a0baea10109cd423996f7d25124e591408c0a005989f116fbd4b43e29d4550a597bcbbe1c95e3d569ab3c64eaefe91
|
data/bin/yattex
ADDED
data/lib/yattex.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
module Yattex
|
2
|
+
def self.runTests
|
3
|
+
require 'rspec'
|
4
|
+
require 'json'
|
5
|
+
require 'fileutils'
|
6
|
+
require 'pathname'
|
7
|
+
@inputArray = [];
|
8
|
+
|
9
|
+
if(File.exist?('.yattex'))
|
10
|
+
FileUtils.remove_dir(".yattex")
|
11
|
+
end
|
12
|
+
|
13
|
+
Dir.mkdir(".yattex")
|
14
|
+
def self.getDecorators
|
15
|
+
value = ""
|
16
|
+
puts("Please Enter test decorator name: ")
|
17
|
+
value << gets
|
18
|
+
if(value.strip.empty?)
|
19
|
+
Yattex.getDecorators
|
20
|
+
else
|
21
|
+
@inputArray << value
|
22
|
+
Yattex.askToExit
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def self.askToExit
|
28
|
+
value1 = ""
|
29
|
+
puts("Do you want to add more?(y/n)")
|
30
|
+
value1 << gets
|
31
|
+
value1 = value1.chomp
|
32
|
+
if ["y", "yes"].include?(value1.downcase)
|
33
|
+
Yattex.getDecorators
|
34
|
+
elsif ["n", "no"].include?(value1.downcase)
|
35
|
+
puts("Your entered decorators are : #{@inputArray.map!(&:chomp)}")
|
36
|
+
else
|
37
|
+
Yattex.askToExit
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.makeGitFile
|
42
|
+
head_file = File.open(".git/HEAD", "r")
|
43
|
+
branch_name = head_file.read.strip.split("/").last
|
44
|
+
project_name = Pathname.pwd.basename
|
45
|
+
head_file.close
|
46
|
+
@git_info = {"Branch Name" => branch_name, "Project Name" => project_name}
|
47
|
+
File.open(".yattex/git.json", "w") do |f|
|
48
|
+
json = JSON.generate(@git_info)
|
49
|
+
f.write(json)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
Yattex.getDecorators
|
54
|
+
|
55
|
+
json = JSON.generate(@inputArray)
|
56
|
+
|
57
|
+
File.open(".yattex/decorators.json", "w") do |f|
|
58
|
+
f.write(json)
|
59
|
+
end
|
60
|
+
|
61
|
+
Yattex.makeGitFile
|
62
|
+
|
63
|
+
# Set the output file
|
64
|
+
RSpec.configuration.add_formatter('html', ".yattex/report.html")
|
65
|
+
|
66
|
+
# Run the tests
|
67
|
+
spec_pattern = File.expand_path('spec/**/*_spec.rb')
|
68
|
+
spec_files = Dir.glob(spec_pattern)
|
69
|
+
|
70
|
+
|
71
|
+
RSpec::Core::Runner.run(spec_files)
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yattex
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Repo Test
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Created in a tutorial found on PageKeySolutions.com/blog. Doesn't do
|
14
|
+
too much!
|
15
|
+
email:
|
16
|
+
- repotest026@gmail.com
|
17
|
+
executables:
|
18
|
+
- yattex
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- bin/yattex
|
23
|
+
- lib/yattex.rb
|
24
|
+
homepage: http://rubygems.org/gems/yattex
|
25
|
+
licenses:
|
26
|
+
- MIT
|
27
|
+
metadata: {}
|
28
|
+
post_install_message:
|
29
|
+
rdoc_options: []
|
30
|
+
require_paths:
|
31
|
+
- lib
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubygems_version: 3.2.3
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: Yattex CLI based test tool
|
47
|
+
test_files: []
|