thyme_verbose 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: acd38f84a754b41ae6103fbcea9752d266ecda5aeb146173b0d434ea6397f3db
4
+ data.tar.gz: dbef4ec8fdb3bf597b5c8949e2d62ccf44a592d1f1d5cdc597a3bd8f9637443b
5
+ SHA512:
6
+ metadata.gz: 77d696557e71b2c19aaa8b4084d8ef72773c527d1036c915a2cc6d05fbef40ee99e4ec157b3b4f707942ff6532650b1b90b1c8746fff62289b78b12484531e80
7
+ data.tar.gz: 83ff2bdfb4925b9dd70b289dc303add828c641685c9030b9fef1954aeb345b57ade4e64a3b2e721ba183d8e51eaf137b3e6e2c43e44a8c42b21d97ea5b9e1c17
data/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # Thyme Verbose
2
+
3
+ Is a set of plugins for [thyme pomodoro timer](https://github.com/hughbien/thyme).
4
+
5
+ ## Installation
6
+
7
+ $ gem install thyme_verbose
8
+
9
+ ## Usage
10
+
11
+ Require thyme_verbose in `~/.thymerc` and initialize plugins.
12
+
13
+ # ~/.thymerc
14
+ require 'thyme_verbose'
15
+ use ThymePluginTime
16
+ use ThymePluginLabel
17
+ use ThymePluginBell
18
+
19
+ ## Plugins
20
+
21
+ * ThymePluginTime - print current time before and after each iteration
22
+ * ThymePluginLabel - add a -l / --label option, which defines a custom text to print after each iteration
23
+ * ThymePluginBell - make an terminal alarm (beep code) after each iteration
@@ -0,0 +1,17 @@
1
+
2
+ class ThymePluginBell
3
+ def initialize(thyme, options={})
4
+ end
5
+
6
+ # Hooks
7
+
8
+ def after(seconds_left)
9
+ bell
10
+ end
11
+
12
+ private
13
+
14
+ def bell
15
+ puts "\a"
16
+ end
17
+ end
@@ -0,0 +1,30 @@
1
+
2
+ class ThymePluginLabel
3
+ def initialize(thyme, options={})
4
+ label = @label = ''
5
+ thyme.option :l, 'label str', 'Label' do |str|
6
+ label.replace str
7
+ @run = true
8
+ end
9
+ end
10
+
11
+ # Hooks
12
+
13
+ def before
14
+ show_label
15
+ end
16
+
17
+ def after(seconds_left)
18
+ show_label
19
+ end
20
+
21
+ private
22
+
23
+ def show_label
24
+ if !@label.empty?
25
+ caption = 'LABEL: ' + @label
26
+ puts caption + ' ' * (50 - caption.length)
27
+ end
28
+ end
29
+ end
30
+
@@ -0,0 +1,22 @@
1
+
2
+ class ThymePluginTime
3
+ def initialize(thyme, options={})
4
+ end
5
+
6
+ # Hooks
7
+
8
+ def before
9
+ show_time
10
+ end
11
+
12
+ def after(seconds_left)
13
+ show_time
14
+ end
15
+
16
+ private
17
+
18
+ def show_time
19
+ caption = 'TIME: ' + Time.now.to_s
20
+ puts caption + ' ' * (50 - caption.length)
21
+ end
22
+ end
@@ -0,0 +1,4 @@
1
+
2
+ require_relative "thyme_verbose/plugin_time"
3
+ require_relative "thyme_verbose/plugin_label"
4
+ require_relative "thyme_verbose/plugin_bell"
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: thyme_verbose
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Ilya Shmygol
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: " Includes fallowing plugins:\n ThymePluginTime for printing current
14
+ time before and after each iteration; \n ThymePluginLabel for adding a -l / --label
15
+ option, which defines a custom text to print after each iteration;\n ThymePluginBell
16
+ for making an terminal alarm (beep code) after each iteration\n"
17
+ email:
18
+ - ishmygol@gmail.com
19
+ executables: []
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - README.md
24
+ - lib/thyme_verbose.rb
25
+ - lib/thyme_verbose/plugin_bell.rb
26
+ - lib/thyme_verbose/plugin_label.rb
27
+ - lib/thyme_verbose/plugin_time.rb
28
+ homepage: https://github.com/trilliput/thyme_verbose
29
+ licenses:
30
+ - MIT
31
+ metadata: {}
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.6
46
+ requirements: []
47
+ rubygems_version: 3.0.1
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: Set of light plugins for the thyme pomodoro timer
51
+ test_files: []