doro 0.2.3 → 0.2.4

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.
@@ -31,11 +31,15 @@
31
31
  <a href="Gemfile_lock.html">Gemfile.lock</a>
32
32
  </li>
33
33
  <li class="file">
34
- <a href="README_rdoc.html">README</a>
34
+ <a href="README_md.html">README</a>
35
35
 
36
36
  <ul>
37
- <li><a href="README_rdoc.html#label-doro">doro</a>
38
- <li><a href="README_rdoc.html#label-doro">doro</a>
37
+ <li><a href="README_md.html#label-doro">doro</a>
38
+ <li><a href="README_md.html#label-Description">Description</a>
39
+ <li><a href="README_md.html#label-Install">Install</a>
40
+ <li><a href="README_md.html#label-Usage">Usage</a>
41
+ <li><a href="README_md.html#label-Todo">Todo</a>
42
+ <li><a href="README_md.html#label-Notifications">Notifications</a>
39
43
  </ul>
40
44
  </li>
41
45
  <li class="file">
@@ -48,12 +52,32 @@
48
52
  <a href="doro_rdoc.html">doro</a>
49
53
 
50
54
  <ul>
51
- <li><a href="doro_rdoc.html#label-doro">doro</a>
55
+ <li><a href="doro_rdoc.html#label-doro+-+A+minimalist+pomodoro+application">doro - A minimalist pomodoro application</a>
56
+ <li><a href="doro_rdoc.html#label-Global+Options">Global Options</a>
57
+ <li><a href="doro_rdoc.html#label--help">–help</a>
58
+ <li><a href="doro_rdoc.html#label--version">–version</a>
59
+ <li><a href="doro_rdoc.html#label-Commands">Commands</a>
60
+ <li><a href="doro_rdoc.html#label-Command-3A+break++none">Command: break none</a>
61
+ <li><a href="doro_rdoc.html#label-Options">Options</a>
62
+ <li><a href="doro_rdoc.html#label-t+arg">-t arg</a>
63
+ <li><a href="doro_rdoc.html#label---5Bno--5Dlong">–[no-]long</a>
64
+ <li><a href="doro_rdoc.html#label-Command-3A+help++command">Command: help command</a>
65
+ <li><a href="doro_rdoc.html#label-Options">Options</a>
66
+ <li><a href="doro_rdoc.html#label-c">-c</a>
67
+ <li><a href="doro_rdoc.html#label-Command-3A+list++-2Ano+arguments-2A">Command: list *no arguments*</a>
68
+ <li><a href="doro_rdoc.html#label-Options">Options</a>
69
+ <li><a href="doro_rdoc.html#label-n+arg">-n arg</a>
70
+ <li><a href="doro_rdoc.html#label-Command-3A+start++-2Adescription+of+task-2A+-28eg.+cool+task-29">Command: start *description of task* (eg. cool task)</a>
71
+ <li><a href="doro_rdoc.html#label-Options">Options</a>
72
+ <li><a href="doro_rdoc.html#label-t+arg">-t arg</a>
52
73
  </ul>
53
74
  </li>
54
75
  <li class="file">
55
76
  <a href="features/doro_feature.html">doro.feature</a>
56
77
  </li>
78
+ <li class="file">
79
+ <a href="results_html.html">results.html</a>
80
+ </li>
57
81
 
58
82
  </ul>
59
83
 
@@ -65,6 +89,9 @@
65
89
  <li class="module">
66
90
  <a href="Doro.html">Doro</a>
67
91
  </li>
92
+ <li class="module">
93
+ <a href="Doro/Entries.html">Doro::Entries</a>
94
+ </li>
68
95
  <li class="module">
69
96
  <a href="File.html">File</a>
70
97
  </li>
@@ -74,6 +101,9 @@
74
101
  <li class="class">
75
102
  <a href="Object.html">Object</a>
76
103
  </li>
104
+ <li class="class">
105
+ <a href="ProgressBar.html">ProgressBar</a>
106
+ </li>
77
107
  <li class="module">
78
108
  <a href="Test.html">Test</a>
79
109
  </li>
@@ -88,11 +118,31 @@
88
118
  <h2 id="methods">Methods</h2>
89
119
  <ul>
90
120
 
121
+ <li class="method">
122
+ <a href="Doro/Entries.html#method-c-add_entry">::add_entry</a>
123
+ &mdash;
124
+ <span class="container">Doro::Entries</span>
125
+
126
+ <li class="method">
127
+ <a href="Doro/Entries.html#method-c-display_entries">::display_entries</a>
128
+ &mdash;
129
+ <span class="container">Doro::Entries</span>
130
+
131
+ <li class="method">
132
+ <a href="ProgressBar.html#method-c-new">::new</a>
133
+ &mdash;
134
+ <span class="container">ProgressBar</span>
135
+
91
136
  <li class="method">
92
137
  <a href="DefaultTest.html#method-i-setup">#setup</a>
93
138
  &mdash;
94
139
  <span class="container">DefaultTest</span>
95
140
 
141
+ <li class="method">
142
+ <a href="ProgressBar.html#method-i-start">#start</a>
143
+ &mdash;
144
+ <span class="container">ProgressBar</span>
145
+
96
146
  <li class="method">
97
147
  <a href="DefaultTest.html#method-i-teardown">#teardown</a>
98
148
  &mdash;
data/doro.rdoc CHANGED
@@ -1,5 +1,67 @@
1
- = doro
1
+ == doro - A minimalist pomodoro application
2
+
3
+ v0.2.3
4
+
5
+ === Global Options
6
+ === --help
7
+ Show this message
8
+
9
+
10
+
11
+ === --version
12
+ Display the program version
13
+
14
+
15
+
16
+ === Commands
17
+ ==== Command: <tt>break *none*</tt>
18
+ Begins a break timer
19
+
20
+
21
+ ===== Options
22
+ ===== -t arg
23
+
24
+ Set time in minutes
25
+
26
+ [Default Value] 5
27
+
28
+
29
+ ===== --[no-]long
30
+ Long (15 min) break
31
+
32
+
33
+
34
+ ==== Command: <tt>help command</tt>
35
+ Shows a list of commands or help for one command
36
+
37
+ Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function
38
+ ===== Options
39
+ ===== -c
40
+ List commands one per line, to assist with shell completion
41
+
42
+
43
+
44
+ ==== Command: <tt>list *no arguments*</tt>
45
+ Displays completed pomodoros
46
+
47
+
48
+ ===== Options
49
+ ===== -n arg
50
+
51
+ Number of pomodoros to show
52
+
53
+ [Default Value] 10
54
+
55
+
56
+ ==== Command: <tt>start *description of task* (eg. cool task)</tt>
57
+ Begins a pomodoro timer
58
+
59
+
60
+ ===== Options
61
+ ===== -t arg
62
+
63
+ Tag task
64
+
65
+ [Default Value] untagged
66
+
2
67
 
3
- Generate this with
4
- doro rdoc
5
- After you have described your command line interface
@@ -1,10 +1,23 @@
1
+ require 'pp'
2
+
1
3
  module Doro
2
4
  module Entries
3
5
 
4
6
  def self.display_entries(doro_file: "#{Dir.home}/.doro", num_entries: 10)
7
+ rows = []
8
+ start_index = num_entries
9
+
5
10
  CSV.foreach doro_file do |row|
6
- p row
11
+ rows << row
12
+ end
13
+
14
+ if rows.size < num_entries
15
+ start_index = rows.size
7
16
  end
17
+
18
+ start_index *= -1
19
+
20
+ pp rows[start_index..-1]
8
21
  end
9
22
 
10
23
  def self.add_entry(
@@ -2,7 +2,11 @@ require 'io/console'
2
2
  require 'time'
3
3
  require 'notifier'
4
4
 
5
+ ##
6
+ # This class handles the incrementing and display of the progress bar.
5
7
  class ProgressBar
8
+ ##
9
+ # Title can be any string, max_progress is in seconds.
6
10
  def initialize(title, max_progress)
7
11
  @progress = 0
8
12
  @max_progress = max_progress
@@ -11,6 +15,13 @@ class ProgressBar
11
15
  @interrupt = false
12
16
  end
13
17
 
18
+ ##
19
+ # This starts the timer. It accepts a block which allows you plug in other
20
+ # behaviors (such as incrementing another timer outside of the class).
21
+ # You'd do something like:
22
+ # ProgressBar.new("Example", 60).start do |t|
23
+ # p 'this fires every second'
24
+ # end
14
25
  def start
15
26
  Signal.trap("INT") { @interrupt = true }
16
27
 
@@ -30,10 +41,10 @@ class ProgressBar
30
41
 
31
42
  def render_progress
32
43
  print @title
33
- print " ["
34
- print "=" * progress_bar_ticks
35
- print " " * remaining_bar_ticks rescue 0
36
- print "] "
44
+ print ' ['
45
+ print '=' * progress_bar_ticks
46
+ print ' ' * remaining_bar_ticks rescue 0
47
+ print '] '
37
48
  print "\e[32m#{display_time}\e[0m"
38
49
  print "\r"
39
50
  end
@@ -65,7 +76,7 @@ class ProgressBar
65
76
  return 80 unless unix?
66
77
 
67
78
  result = dynamic_width
68
- result < 20? 80 : result
79
+ result < 20 ? 80 : result
69
80
 
70
81
  rescue
71
82
  80
@@ -88,3 +99,4 @@ class ProgressBar
88
99
  end
89
100
 
90
101
  end
102
+
@@ -1,3 +1,3 @@
1
1
  module Doro
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
@@ -470,4 +470,6 @@ e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["
470
470
  $('#'+element_id).css('color', '#000000');
471
471
  }
472
472
 
473
- </script></head><body><!-- Step count 0--><div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div><div id="summary"><p id="totals"></p><p id="duration"></p><div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div></div></div><div class="feature"><h2><span class="val">Feature: My bootstrapped app kinda works</span></h2><p class="narrative">In order to keep track of my time<br/>I want use a command line tool to manage my pomodoros<br/></p><div class='scenario'><span class="scenario_file">features/doro.feature:5</span><h3 id="scenario_1"><span class="keyword">Scenario:</span> <span class="val">App just runs</span></h3><ol><li id='' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run `<span class="param">doro help</span>`</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:13</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the exit status should be <span class="param">0</span></span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:277</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script></ol></div><div class='scenario'><span class="scenario_file">features/doro.feature:9</span><h3 id="scenario_2"><span class="keyword">Scenario:</span> <span class="val">App lists todos</span></h3><ol><li id='' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run `<span class="param">doro list</span>`</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:13</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the <span class="param">output</span> should contain &quot;<span class="param">[</span>&quot;</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:159</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the <span class="param">output</span> should contain &quot;<span class="param">]</span>&quot;</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:159</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script></ol></div></div><script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0m0.662s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "2 scenarios (2 passed)<br />5 steps (5 passed)";</script></div></body></html>
473
+ </script></head><body><!-- Step count 0--><div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div><div id="summary"><p id="totals"></p><p id="duration"></p><div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div></div></div><div class="feature"><h2><span class="val">Feature: My bootstrapped app kinda works</span></h2><p class="narrative">In order to keep track of my time<br/>I want use a command line tool to manage my pomodoros<br/></p><div class='scenario'><span class="scenario_file">features/doro.feature:5</span><h3 id="scenario_1"><span class="keyword">Scenario:</span> <span class="val">App just runs</span></h3><ol><li id='' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run `<span class="param">doro help</span>`</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:13</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the exit status should be <span class="param">0</span></span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:277</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script></ol></div><div class='scenario'><span class="scenario_file">features/doro.feature:9</span><h3 id="scenario_2"><span class="keyword">Scenario:</span> <span class="val">App lists todos</span></h3><ol><li id='' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run `<span class="param">doro list</span>`</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:13</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">Then </span><span class="step val">the <span class="param">output</span> should contain &quot;<span class="param">[</span>&quot;</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:159</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><li id='' class='step passed'><div class="step_name"><span class="keyword">And </span><span class="step val">the <span class="param">output</span> should contain &quot;<span class="param">]</span>&quot;</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:159</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script></ol></div><div class='scenario'><span class="scenario_file">features/doro.feature:14</span><h3 id="scenario_3"><span class="keyword">Scenario:</span> <span class="val">App can start a pomodoro</span></h3><ol><li id='' class='step passed'><div class="step_name"><span class="keyword">When </span><span class="step val">I run `<span class="param">doro start test task</span>`</span></div><div class="step_file"><span>aruba-0.13.0/lib/aruba/cucumber/command.rb:13</span></div></li> <script type="text/javascript">moveProgressBar('100.0');</script><script>makeYellow('cucumber-header');makeYellow('scenario_3');</script><li id='' class='step undefined'><div class="step_name"><span class="keyword">Then </span><span class="step val">the output shold contain</span></div><div class="step_file"><span>features/doro.feature:16</span></div><pre>Then(/^the output shold contain$/) do
474
+ pending # Write code here that turns the phrase above into concrete actions
475
+ end</pre></li> <script type="text/javascript">moveProgressBar('100.0');</script></ol></div></div><script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0m15.880s seconds</strong>";</script><script type="text/javascript">document.getElementById('totals').innerHTML = "3 scenarios (1 undefined, 2 passed)<br />7 steps (1 undefined, 6 passed)";</script></div></body></html>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Orochena
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-01 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -110,11 +110,14 @@ files:
110
110
  - bin/logo.jpg
111
111
  - doc/DefaultTest.html
112
112
  - doc/Doro.html
113
+ - doc/Doro/Entries.html
113
114
  - doc/File.html
114
115
  - doc/FileUtils.html
115
116
  - doc/Gemfile.html
116
117
  - doc/Gemfile_lock.html
117
118
  - doc/Object.html
119
+ - doc/ProgressBar.html
120
+ - doc/README_md.html
118
121
  - doc/README_rdoc.html
119
122
  - doc/Rakefile.html
120
123
  - doc/Test.html
@@ -164,6 +167,7 @@ files:
164
167
  - doc/js/search.js
165
168
  - doc/js/search_index.js
166
169
  - doc/js/searcher.js
170
+ - doc/results_html.html
167
171
  - doc/table_of_contents.html
168
172
  - doro.gemspec
169
173
  - doro.rdoc