kukushka 0.1.9 → 0.1.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94f4bb61fb7d9a47ef5b89702b98ea7bf1b73e80625b848734d4cd891f5febf0
4
- data.tar.gz: 663865c3e2b233d58d4347b21795986971a255a7a11ce58768fc06f4190470a3
3
+ metadata.gz: 9db49c16a0aea63858b52800a977d161d39736202ea11efd22a671f50ebb1ac0
4
+ data.tar.gz: 207e13e36c4253212426ce27545b619c51794d7af3ec6989dab7da48e5667a0f
5
5
  SHA512:
6
- metadata.gz: e24ce23687b82d96cbb4d28a142ff046c499b5bbe6e6b86e93c860a941c845c6a280c21dbfbce9abcdf4af59f6cb97452ae91eef3f2bd1ff9874d955852e530f
7
- data.tar.gz: 0d5757c62b60e0dc17ff637934c69b2d230c46df14741b10b336d48e75d37bbf13149a02d43d2f20675b366b37dbe8c2a04673a3edfa265040019911465622ad
6
+ metadata.gz: f13272fdf33abf33d5d926eb42798eb61be81786871deb14ccff81289e306004bfbf8717d3230be051eb368413667f3cb4a207fd3f2143d161fa82d981b331b7
7
+ data.tar.gz: e393403061baeb44b50b89297a7dceaf6f28356fd38b5996448a118e2858726d6e8f5cd455eddcea62ff2141caeb33b227bf2b5a2e98ab4364a788e1909431ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kukushka (0.1.8)
4
+ kukushka (0.1.10)
5
5
  commander (~> 4.4)
6
6
  rainbow (~> 3.0)
7
7
  redis (~> 5.3)
@@ -11,7 +11,7 @@ GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
13
  ast (2.4.2)
14
- bigdecimal (3.1.8)
14
+ bigdecimal (3.1.9)
15
15
  coderay (1.1.3)
16
16
  commander (4.6.0)
17
17
  highline (~> 2.0.0)
@@ -26,7 +26,7 @@ GEM
26
26
  logger
27
27
  zeitwerk (~> 2.6)
28
28
  dry-inflector (1.1.0)
29
- dry-initializer (3.1.1)
29
+ dry-initializer (3.2.0)
30
30
  dry-logic (1.5.0)
31
31
  concurrent-ruby (~> 1.0)
32
32
  dry-core (~> 1.0, < 2)
@@ -47,15 +47,15 @@ GEM
47
47
  dry-logic (~> 1.4)
48
48
  zeitwerk (~> 2.6)
49
49
  highline (2.0.3)
50
- json (2.9.0)
50
+ json (2.9.1)
51
51
  language_server-protocol (3.17.0.3)
52
- logger (1.6.3)
52
+ logger (1.6.4)
53
53
  method_source (1.1.0)
54
54
  parallel (1.26.3)
55
55
  parser (3.3.6.0)
56
56
  ast (~> 2.4.1)
57
57
  racc
58
- pry (0.15.0)
58
+ pry (0.15.2)
59
59
  coderay (~> 1.1)
60
60
  method_source (~> 1.0)
61
61
  racc (1.8.1)
@@ -72,8 +72,8 @@ GEM
72
72
  parser (~> 3.3.0)
73
73
  rainbow (>= 2.0, < 4.0)
74
74
  rexml (~> 3.1)
75
- regexp_parser (2.9.3)
76
- rexml (3.3.9)
75
+ regexp_parser (2.10.0)
76
+ rexml (3.4.0)
77
77
  rspec (3.13.0)
78
78
  rspec-core (~> 3.13.0)
79
79
  rspec-expectations (~> 3.13.0)
@@ -100,10 +100,10 @@ GEM
100
100
  rubocop-ast (1.37.0)
101
101
  parser (>= 3.3.1.0)
102
102
  ruby-progressbar (1.13.0)
103
- unicode-display_width (3.1.2)
103
+ unicode-display_width (3.1.3)
104
104
  unicode-emoji (~> 4.0, >= 4.0.4)
105
105
  unicode-emoji (4.0.4)
106
- zeitwerk (2.6.18)
106
+ zeitwerk (2.7.1)
107
107
 
108
108
  PLATFORMS
109
109
  arm64-darwin-22
data/exe/kuku CHANGED
@@ -22,6 +22,10 @@ Commander.configure do
22
22
  c.description = 'Show next sample'
23
23
  c.action do |args, options|
24
24
  next unless redis.get('enabled') == 'true'
25
+ annoying = redis.get(:annoying).to_i
26
+ if annoying > 0
27
+ next if 1.0/annoying < rand
28
+ end
25
29
 
26
30
  res = Kukushka.kuku(redis)
27
31
  puts res if res
@@ -37,6 +41,23 @@ Commander.configure do
37
41
  end
38
42
  end
39
43
 
44
+ command :annoying do |c|
45
+ c.syntax = 'kuku annoying [int]'
46
+ c.description = 'Sets annoying factor'
47
+ c.action do |args, options|
48
+ redis.set(:annoying, args.first)
49
+ # puts res if res
50
+ end
51
+ end
52
+
53
+ command :output do |c|
54
+ c.syntax = 'kuku output simple'
55
+ c.description = 'Sets output format'
56
+ c.action do |args, options|
57
+ redis.set(:output, args.first)
58
+ end
59
+ end
60
+
40
61
  command :source do |c|
41
62
  c.syntax = 'kuku source file_path'
42
63
  c.description = 'Add new source'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kukushka
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
data/lib/kukushka.rb CHANGED
@@ -54,6 +54,8 @@ module Kukushka
54
54
  set_counter(from)
55
55
  end
56
56
 
57
+
58
+ return lines[counter] if redis.get(:output) == 'simple'
57
59
  return "#{lines[counter]} #{counter} [#{from}-#{to}/#{lines.size - 1}]"
58
60
  end
59
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kukushka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serge Kislak