assayo 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/assayo/assets/ci-cd.sh +2 -0
  3. data/assayo/assets/games/4x3.png +0 -0
  4. data/assayo/assets/games/car.png +0 -0
  5. data/assayo/assets/games/green.png +0 -0
  6. data/assayo/assets/games/quize/balloon_0.png +0 -0
  7. data/assayo/assets/games/quize/balloon_1.png +0 -0
  8. data/assayo/assets/games/quize/balloon_2.png +0 -0
  9. data/assayo/assets/games/quize/balloon_3.png +0 -0
  10. data/assayo/assets/games/quize/balloon_4.png +0 -0
  11. data/assayo/assets/games/quize/balloon_5.png +0 -0
  12. data/assayo/assets/games/quize/border.png +0 -0
  13. data/assayo/assets/games/quize/cloud.png +0 -0
  14. data/assayo/assets/games/quize/cloud_bg.png +0 -0
  15. data/assayo/assets/games/quize/cloud_big.png +0 -0
  16. data/assayo/assets/games/quize//320/244/320/276/320/275.png +0 -0
  17. data/assayo/assets/games/quize//320/272/320/275/320/276/320/277/320/272/320/260.png +0 -0
  18. data/assayo/assets/games/quize//320/276/320/272/320/275/320/276.png +0 -0
  19. data/assayo/assets/games/quize//321/204/320/276/320/275 /320/262/320/274/320/265/321/201/321/202/320/265.jpg +0 -0
  20. data/assayo/assets/games/quize//321/204/320/276/320/275 /320/262/321/201/320/265 /320/262/320/274/320/265/321/201/321/202/320/265.png +0 -0
  21. data/assayo/assets/games/races/bg.png +0 -0
  22. data/assayo/assets/games/races/car.png +0 -0
  23. data/assayo/assets/games/races/car2.png +0 -0
  24. data/assayo/assets/games/races/greenBottom.png +0 -0
  25. data/assayo/assets/games/races/greenTop.png +0 -0
  26. data/assayo/assets/games/races/road.png +0 -0
  27. data/assayo/assets/games/swimmingPool/bg.png +0 -0
  28. data/assayo/assets/games/swimmingPool/block.png +0 -0
  29. data/assayo/assets/games/swimmingPool/block2.png +0 -0
  30. data/assayo/assets/games/swimmingPool/man.png +0 -0
  31. data/assayo/assets/games/swimmingPool/track_titl3e.png +0 -0
  32. data/assayo/assets/games/swimmingPool/track_title.png +0 -0
  33. data/assayo/assets/games/swimmingPool/track_title3.png +0 -0
  34. data/assayo/assets/games/swimmingPool/water.png +0 -0
  35. data/assayo/assets/games/swimmingPool//320/261/320/265/320/273/320/260/321/217 /320/272/320/273/320/265/321/202/320/272/320/260 /321/201/320/276 /321/201/321/202/321/200/320/265/320/273/320/272/320/276/320/271.png +0 -0
  36. data/assayo/assets/games/swimmingPool//320/272/320/273/320/265/321/202/320/276/321/207/320/272/320/270 /320/262/321/201/320/265 /320/262/320/274/320/265/321/201/321/202/320/265.png +0 -0
  37. data/assayo/assets/games/swimmingPool//321/201/321/202/321/200/320/265/320/273/320/276/321/207/320/272/320/260.png +0 -0
  38. data/assayo/assets/games/swimmingPool//321/207/320/265/321/200/320/275/320/260/321/217 /320/272/320/273/320/265/321/202/320/272/320/260.png +0 -0
  39. data/ruby/assayo +61 -0
  40. metadata +44 -6
  41. data/bin/assayo +0 -72
  42. data/bin/assayo.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37f8087157d098b93b1325ec6609049607efaaf11bfecdc2c77d435b73c03996
4
- data.tar.gz: 80cdfe46e757dd2e1bff36603d428f9748ecd631ef619e57c034e562d8e5be14
3
+ metadata.gz: 8a7e63f96cde364bff3b0625ec7ee4e10d0a52122251a750fe7bd2b19c31037b
4
+ data.tar.gz: 18ff2b2c2f8f8abd6c027d4e628151808aa40408bd80d31ccec155ab73abfb3c
5
5
  SHA512:
6
- metadata.gz: be43bf25204fbfeffa612304b779e628fbd66eaca599ca544d164340a16471164ca49fb0fd7208ea89e40d43cbb7b8932de2b7fd72c61b72d286e91dc3aaf2a7
7
- data.tar.gz: 64b16e64da84da3a2855b6df73d7e0bfed8ae144f5c30e387c6024c307cb364ecb283d2d1ca9a418900c5f3c39adaf90ef46a7b750363cebeb5e087f1d73b1f8
6
+ metadata.gz: 6e44d3f676e66f20a36851f219b3e24bd7e23a56d86c15cee4223fa15e880413f91034b77d0d787871b5922028a8c2a47e3ce5b63b956a017b7b72366ba358ff
7
+ data.tar.gz: '078002c41ffe892c75ea6d94f7ce03b909de4ab3943ebbe823fe1011fe8c7dd4d4459e2e771951a981d299c0ec297d85aaf801b65548250c99a848394ad1f02a'
@@ -0,0 +1,2 @@
1
+ git pull
2
+ git --no-pager log --numstat --oneline --all --no-merges --reverse --date=iso-strict --pretty=format:"%ad>%aN>%aE>%s" | sed -e 's/\\/\\\\/g' | sed -e 's/`/"/g' | sed -e 's/^/report.push(\`/g' | sed 's/$/\`\);/g' | sed 's/\$/_/g' > dump.git
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/ruby/assayo ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ def get_save_log_command()
4
+ $raw = "--raw --numstat"
5
+ if ARGV.include?('--no-file')
6
+ $raw = ""
7
+ end
8
+ return "git --no-pager log #{$raw} --oneline --all --reverse --date=iso-strict --pretty=format:\"%ad>%aN>%aE>%s\""
9
+ end
10
+
11
+ def show_message(message)
12
+ if ARGV.include?('--debug')
13
+ puts "Assayo: #{message}"
14
+ end
15
+ end
16
+
17
+ def write_in_file(fileName, content)
18
+ File.open(fileName, 'w') do |file|
19
+ file.write(content)
20
+ end
21
+ end
22
+
23
+ def create_report()
24
+ # folder, when library was saved
25
+ $SOURCE_DIR = '../assayo'
26
+ $SOURCE_PATH = __dir__
27
+
28
+ # folder, when user run library
29
+ $DIST_DIR = 'assayo'
30
+ $DIST_PATH = Dir.pwd
31
+
32
+ # 1. Copy folder ./assayo from package to ./assayo in project
33
+ $source = File.join($SOURCE_PATH, $SOURCE_DIR)
34
+ $target = File.join($DIST_PATH, $DIST_DIR)
35
+ $copy_cmd = "cp -r #{$source} #{$target}"
36
+ begin
37
+ system($copy_cmd) or raise $copy_cmd
38
+ rescue => e
39
+ puts "Assayo: cant copy files: #{e.message}"
40
+ end
41
+ show_message("directory with HTML report was be created")
42
+
43
+ # Run "git log" and save output in file ./assayo/log.txt
44
+ show_message("reading git log was be started")
45
+ $fileName = File.join(Dir.pwd, $DIST_DIR, "log.txt")
46
+ $save_log_cmd = get_save_log_command()
47
+ begin
48
+ system($save_log_cmd, { out: $fileName }) or raise $save_log_cmd
49
+ rescue => e
50
+ puts "Assayo: cant create log file: #{e.message}"
51
+ end
52
+ show_message("the file with git log was be saved")
53
+
54
+ # 3. Replace symbols in ./assayo/log.txt
55
+ $content = IO.read($fileName)
56
+ $content = $content.gsub(/`/, "")
57
+ $content = $content.gsub(/\n/, "`);\nr(f`")
58
+ write_in_file($fileName, "r(f\`#{$content}\`);")
59
+ end
60
+
61
+ create_report()
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assayo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksei Bakhirev
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: ruby
10
10
  cert_chain: []
11
11
  date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies: []
@@ -137,7 +137,44 @@ files:
137
137
  - assayo/assets/chart/sort.svg
138
138
  - assayo/assets/chart/sort_down.svg
139
139
  - assayo/assets/chart/sort_up.svg
140
+ - assayo/assets/ci-cd.sh
140
141
  - assayo/assets/close.svg
142
+ - assayo/assets/games/4x3.png
143
+ - assayo/assets/games/car.png
144
+ - assayo/assets/games/green.png
145
+ - assayo/assets/games/quize/balloon_0.png
146
+ - assayo/assets/games/quize/balloon_1.png
147
+ - assayo/assets/games/quize/balloon_2.png
148
+ - assayo/assets/games/quize/balloon_3.png
149
+ - assayo/assets/games/quize/balloon_4.png
150
+ - assayo/assets/games/quize/balloon_5.png
151
+ - assayo/assets/games/quize/border.png
152
+ - assayo/assets/games/quize/cloud.png
153
+ - assayo/assets/games/quize/cloud_bg.png
154
+ - assayo/assets/games/quize/cloud_big.png
155
+ - assayo/assets/games/quize/Фон.png
156
+ - assayo/assets/games/quize/кнопка.png
157
+ - assayo/assets/games/quize/окно.png
158
+ - assayo/assets/games/quize/фон вместе.jpg
159
+ - assayo/assets/games/quize/фон все вместе.png
160
+ - assayo/assets/games/races/bg.png
161
+ - assayo/assets/games/races/car.png
162
+ - assayo/assets/games/races/car2.png
163
+ - assayo/assets/games/races/greenBottom.png
164
+ - assayo/assets/games/races/greenTop.png
165
+ - assayo/assets/games/races/road.png
166
+ - assayo/assets/games/swimmingPool/bg.png
167
+ - assayo/assets/games/swimmingPool/block.png
168
+ - assayo/assets/games/swimmingPool/block2.png
169
+ - assayo/assets/games/swimmingPool/man.png
170
+ - assayo/assets/games/swimmingPool/track_titl3e.png
171
+ - assayo/assets/games/swimmingPool/track_title.png
172
+ - assayo/assets/games/swimmingPool/track_title3.png
173
+ - assayo/assets/games/swimmingPool/water.png
174
+ - assayo/assets/games/swimmingPool/белая клетка со стрелкой.png
175
+ - assayo/assets/games/swimmingPool/клеточки все вместе.png
176
+ - assayo/assets/games/swimmingPool/стрелочка.png
177
+ - assayo/assets/games/swimmingPool/черная клетка.png
141
178
  - assayo/assets/icons/Cards.svg
142
179
  - assayo/assets/icons/CloseFullscreen.svg
143
180
  - assayo/assets/icons/Download.svg
@@ -187,16 +224,17 @@ files:
187
224
  - assayo/index.html
188
225
  - assayo/static/index.css
189
226
  - assayo/static/index.js
190
- - bin/assayo
191
- - bin/assayo.rb
227
+ - ruby/assayo
192
228
  homepage: https://github.com/bakhirev/assayo
193
229
  licenses:
194
230
  - MIT
195
- metadata: {}
231
+ metadata:
232
+ homepage_uri: https://github.com/bakhirev/assayo
233
+ source_code_uri: https://github.com/bakhirev/assayo
196
234
  post_install_message:
197
235
  rdoc_options: []
198
236
  require_paths:
199
- - assayo
237
+ - lib
200
238
  required_ruby_version: !ruby/object:Gem::Requirement
201
239
  requirements:
202
240
  - - ">="
data/bin/assayo DELETED
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env php
2
- <?php
3
-
4
- function logMessage($message) {
5
- global $argv;
6
- if (in_array('--debug', $argv)) {
7
- echo "Assayo: $message\n";
8
- }
9
- }
10
-
11
- function getErrorMessage($error) {
12
- if (!is_object($error) || $error === null) {
13
- return strval($error);
14
- }
15
- if (method_exists($error, 'getTraceAsString')) {
16
- return $error->getTraceAsString();
17
- }
18
- return print_r($error, true);
19
- }
20
-
21
- function onFatalError($error) {
22
- http_response_code(500);
23
- $message = getErrorMessage($error) ?? 'error';
24
- fwrite(STDERR, "Assayo: $message\n");
25
- exit(2);
26
- }
27
-
28
- function getSaveLogCommand($fileName) {
29
- global $argv;
30
- $raw = in_array('--no-file', $argv) ? '' : '--raw --numstat';
31
- return "git --no-pager log $raw --oneline --all --reverse --date=iso-strict --pretty=format:\"%ad>%aN>%aE>%s\" > $fileName";
32
- }
33
-
34
- try {
35
- // folder, when library was saved
36
- $SOURCE_DIR = 'assayo';
37
- $SOURCE_PATH = __DIR__ . DIRECTORY_SEPARATOR. '..';
38
-
39
- // folder, when user run library
40
- $DIST_DIR = 'assayo';
41
- $DIST_PATH = getcwd();
42
-
43
- // 1. Copy folder ./assayo from package to ./assayo in project
44
- $source = realpath($SOURCE_PATH . DIRECTORY_SEPARATOR . $SOURCE_DIR);
45
- $target = $DIST_PATH . DIRECTORY_SEPARATOR . $DIST_DIR;
46
-
47
- $copyCommand = "cp -r $source $target";
48
- exec($copyCommand, $output, $returnVar);
49
- if ($returnVar !== 0) {
50
- throw new Exception("Failed to copy directory. Command: $copyCommand");
51
- }
52
- logMessage('directory with HTML report was created');
53
-
54
- // 2. Run "git log" and save output in file ./assayo/log.txt
55
- logMessage('reading git log started');
56
- $fileName = $DIST_PATH . DIRECTORY_SEPARATOR . $DIST_DIR . DIRECTORY_SEPARATOR . 'log.txt';
57
- $logCommand = getSaveLogCommand($fileName);
58
-
59
- exec($logCommand, $output, $returnVar);
60
- if ($returnVar !== 0) {
61
- throw new Exception("Failed to run git log. Command: $logCommand");
62
- }
63
- logMessage('the file with git log was saved');
64
-
65
- // 3. Replace symbols in ./assayo/log.txt
66
- $content = file_get_contents($fileName);
67
- $content = preg_replace(['/\`/m', '/\n/m'], ['', '`);' . PHP_EOL . 'r(f`'], $content);
68
- file_put_contents($fileName, "r(f`$content`);");
69
-
70
- } catch (Throwable $error) {
71
- onFatalError($error);
72
- }
data/bin/assayo.rb DELETED
@@ -1,54 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- def get_save_log_command(fileName)
4
- raw = "--raw --numstat"
5
- if ARGV.include?('--no-file')
6
- raw = ""
7
- end
8
- return "git --no-pager log #{raw} --oneline --all --reverse --date=iso-strict --pretty=format:\"%ad>%aN>%aE>%s\" > #{fileName}"
9
- end
10
-
11
- def show_message(message)
12
- if ARGV.include?('--debug')
13
- puts "Assayo: #{message}"
14
- end
15
- end
16
-
17
- def create_report()
18
- # folder, when library was saved
19
- SOURCE_DIR = 'assayo'
20
- SOURCE_PATH = Dir.pwd
21
-
22
- # folder, when user run library
23
- DIST_DIR = 'assayo'
24
- DIST_PATH = Process.cwd
25
-
26
- # 1. Copy folder ./assayo from package to ./assayo in project
27
- source = File.join(SOURCE_PATH, SOURCE_DIR)
28
- target = File.join(DIST_PATH, DIST_DIR)
29
- copy_cmd = "cp -r #{source} #{target}"
30
- begin
31
- system(copy_cmd)
32
- rescue => e
33
- puts "Assayo: cant copy files: #{e.message}"
34
- end
35
- show_message("directory with HTML report was be created")
36
-
37
- # Run "git log" and save output in file ./assayo/log.txt
38
- show_message("reading git log was be started")
39
- fileName = File.join(Dir.pwd, DIST_DIR, 'log.txt')
40
- save_log_cmd = get_save_log_command(fileName)
41
- begin
42
- system(save_log_cmd)
43
- rescue => e
44
- puts "Assayo: cant create log file: #{e.message}"
45
- end
46
- show_message("the file with git log was be saved")
47
-
48
- # 3. Replace symbols in ./assayo/log.txt
49
- content = File.read(filename, 'UTF-8').gsub(/`/, '')
50
- content = content.gsub(/\n/, '`);\nr(f`')
51
- File.open(filename, 'w') { |file| file.write("r(f\`#{content}\`);") }
52
- end
53
-
54
- create_report()