minder 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 908a6d685937c891b2d363be8f69a3a81a834050
4
- data.tar.gz: b58882c77a7923c4cea617c361b7f1141a74c995
3
+ metadata.gz: 4251411d3fe35de53a46db90a5c33f8c634f5b68
4
+ data.tar.gz: cdd37411994e62283fc72602e7133764f5d47037
5
5
  SHA512:
6
- metadata.gz: b2f5010978b63441b3edd9120563bcee45c0f7d4cdbca042a2aac1ed1527a68c34ac7776b3e6e88f787823a8fb950b3268dd873cbc701bb87dce571f5a44ba70
7
- data.tar.gz: b4537db5d97e914094b63962cb1ceadc4f55617904330592197afbe47919f5b2d0f8b19dd4a8d4596c9e418acc606fd7339e190cd0f70c435f3ce0b45643d0d0
6
+ metadata.gz: 5b2246e57465b9d1cae7ff962d0ea17bbafca2c57da22ea8c7ed7d682c132fdfe8054084029b98fd808c394aef217db2b1a8ab27bb39b4a90433e219d4de1a04
7
+ data.tar.gz: b4b9009195257ebe75296bc26cbd873872dcbaeb1ab35548ccdc354b68e7dd2f03786184c6f50ec16136418f2b5632fe385a2690fc98d06458ea7cb86b206a28
data/lib/minder.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Minder
2
2
  DEFAULT_WORK_PERIOD = 25
3
3
  DEFAULT_BREAK_PERIOD = 5
4
- CONFIG_LOCATION = ENV['HOME'] + '/.minder.json'
4
+ CONFIG_LOCATION = File.join(ENV["HOME"], '.minder', 'config.json')
5
5
  ASSETS_LOCATION = File.expand_path(File.dirname(__FILE__) + '/../assets')
6
6
  DOING_FILE = File.join(ENV["HOME"], '.minder', 'doing.txt')
7
7
  DONE_FILE = File.join(ENV["HOME"], '.minder', 'done.txt')
@@ -38,7 +38,7 @@ module Minder
38
38
  self.scene = Scene.new
39
39
  scene.setup
40
40
 
41
- options = { pomodoro_runner: pomodoro_runner, task_manager: task_manager }
41
+ options = { pomodoro_runner: pomodoro_runner, task_manager: task_manager }
42
42
 
43
43
  self.pomodoro_frame = PomodoroFrame.new(options)
44
44
  self.help_frame = HelpFrame.new(options)
@@ -91,10 +91,14 @@ module Minder
91
91
  end
92
92
 
93
93
  def pomodoro_runner
94
+ require 'gemoji'
95
+ emoji = Emoji.find_by_alias(config.emoji).raw
96
+
94
97
  @runner ||= PomodoroRunner.new(
95
98
  work_duration: config.work_duration,
96
99
  short_break_duration: config.short_break_duration,
97
100
  long_break_duration: config.long_break_duration,
101
+ emoji: emoji,
98
102
  database: database)
99
103
  end
100
104
 
@@ -52,7 +52,7 @@ TEXT
52
52
 
53
53
  def pomodoros
54
54
  pomodoro_runner.pomodoros_today.map do |pomodoro|
55
- "\xF0\x9F\x8D\x85 "
55
+ pomodoro_runner.emoji
56
56
  end.join
57
57
  end
58
58
  end
data/lib/minder/config.rb CHANGED
@@ -5,7 +5,8 @@ module Minder
5
5
  DEFAULTS = {
6
6
  work_duration: 25,
7
7
  short_break_duration: 5,
8
- long_break_duration: 15
8
+ long_break_duration: 15,
9
+ emoji: 'tomato'
9
10
  }
10
11
 
11
12
  attr_accessor :location
@@ -11,7 +11,8 @@ module Minder
11
11
  attr_accessor :work_duration,
12
12
  :short_break_duration,
13
13
  :long_break_duration,
14
- :database
14
+ :database,
15
+ :emoji
15
16
 
16
17
  attr_reader :period_count,
17
18
  :current_period
@@ -21,6 +22,7 @@ module Minder
21
22
  self.short_break_duration = options.fetch(:short_break_duration)
22
23
  self.long_break_duration = options.fetch(:long_break_duration)
23
24
  self.database = options.fetch(:database)
25
+ self.emoji = options.fetch(:emoji)
24
26
  @period_count = 0
25
27
  current_period = IdlePeriod.new
26
28
  current_period.start!
@@ -1,3 +1,3 @@
1
1
  module Minder
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  end
data/minder.gemspec CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_runtime_dependency 'rom-sql', '~> 0.6.0', '>= 0.6'
25
25
  spec.add_runtime_dependency 'sqlite3', '~> 1.3.10', '>= 1.3.10'
26
26
  spec.add_runtime_dependency 'activesupport', '~> 4.2.4', '>= 4.2.4'
27
+ spec.add_runtime_dependency 'gemoji', '~> 2.1.0', '>= 2.1.0'
27
28
 
28
29
  spec.add_development_dependency "bundler", '~> 1'
29
30
  spec.add_development_dependency "rake", "~> 10.4.2", '>= 10.4.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Method
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-29 00:00:00.000000000 Z
11
+ date: 2015-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -130,6 +130,26 @@ dependencies:
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: 4.2.4
133
+ - !ruby/object:Gem::Dependency
134
+ name: gemoji
135
+ requirement: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 2.1.0
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 2.1.0
143
+ type: :runtime
144
+ prerelease: false
145
+ version_requirements: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: 2.1.0
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 2.1.0
133
153
  - !ruby/object:Gem::Dependency
134
154
  name: bundler
135
155
  requirement: !ruby/object:Gem::Requirement