Module: Minder
- Defined in:
- lib/minder.rb,
lib/minder/config.rb,
lib/minder/version.rb,
lib/minder/cli/frame.rb,
lib/minder/cli/scene.rb,
lib/minder/tasks/task.rb,
lib/minder/application.rb,
lib/minder/cli/help_frame.rb,
lib/minder/cli/task_editor.rb,
lib/minder/pomodoro/period.rb,
lib/minder/cli/filter_frame.rb,
lib/minder/cli/search_frame.rb,
lib/minder/cli/message_frame.rb,
lib/minder/cli/pomodoro_frame.rb,
lib/minder/tasks/task_manager.rb,
lib/minder/cli/quick_add_frame.rb,
lib/minder/pomodoro/idle_period.rb,
lib/minder/pomodoro/work_period.rb,
lib/minder/pomodoro/break_period.rb,
lib/minder/pomodoro/pomodoro_runner.rb,
lib/minder/database/database_migrator.rb,
lib/minder/database/commands/delete_task.rb
Defined Under Namespace
Modules: Commands
Classes: Application, BreakPeriod, Config, DatabaseMigrator, FilterFrame, Frame, HelpFrame, IdlePeriod, MessageFrame, Period, PomodoroFrame, PomodoroRunner, QuickAddFrame, Scene, SearchFrame, Task, TaskEditor, TaskManager, WorkPeriod
Constant Summary
collapse
- DEFAULT_WORK_PERIOD =
25
- DEFAULT_BREAK_PERIOD =
5
- CONFIG_LOCATION =
ENV['HOME'] + '/.minder.json'
- ASSETS_LOCATION =
File.expand_path(File.dirname(__FILE__) + '/../assets')
- DOING_FILE =
File.join(ENV["HOME"], '.minder', 'doing.txt')
- DONE_FILE =
File.join(ENV["HOME"], '.minder', 'done.txt')
- MIGRATIONS_PATH =
File.expand_path(File.dirname(__FILE__) + '/../')
- DATABASE_LOCATION =
"#{ENV['HOME']}/.minder/database.sqlite3"
- LOG_LOCATION =
"#{ENV['HOME']}/.minder/info.log"
- VERSION =
'0.4.0'
Class Method Summary
collapse
Class Method Details
19
20
21
22
23
|
# File 'lib/minder.rb', line 19
def self.formatted_time(seconds)
minutes = (seconds / 60).to_i
seconds = (seconds % 60).round
"#{'%02d' % minutes}:#{'%02d' % seconds}"
end
|
.is_linux? ⇒ Boolean
32
33
34
|
# File 'lib/minder.rb', line 32
def self.is_linux?
RUBY_PLATFORM =~ /linux/
end
|
.play_sound(name) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/minder.rb', line 25
def self.play_sound(name)
command = is_linux? ? 'aplay' : 'afplay'
spawn("#{command} #{ASSETS_LOCATION}/#{name}",
out: '/dev/null',
err: '/dev/null')
end
|
.pry_open(b) ⇒ Object
36
37
38
39
40
|
# File 'lib/minder.rb', line 36
def self.pry_open(b)
Curses.close_screen
require 'pry'
b.pry
end
|