pomo 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +3 -0
- data/CHANGELOG.md +9 -1
- data/Gemfile +9 -0
- data/README.md +7 -7
- data/lib/pomo/configuration.rb +4 -6
- data/lib/pomo/github_task.rb +14 -6
- data/lib/pomo/list.rb +28 -26
- data/lib/pomo/version.rb +1 -1
- data/pomo.gemspec +1 -6
- metadata +4 -68
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
2.1.2 / 2013-02-09
|
5
|
+
==================
|
6
|
+
|
7
|
+
* Fixed default Break time. Closes #36
|
8
|
+
|
9
|
+
View [the full changelog][2.1.2].
|
10
|
+
[2.1.2]: https://github.com/visionmedia/pomo/compare/v2.1.1...v2.1.2
|
11
|
+
|
4
12
|
2.1.1 / 2013-01-19
|
5
13
|
==================
|
6
14
|
|
@@ -15,7 +23,7 @@ View [the full changelog][2.1.1].
|
|
15
23
|
* Added `pomo initconfig` to set up global preferences. Preferences
|
16
24
|
can be overridden on the command-line (e.g. `pomo start --notifier
|
17
25
|
growl`). Closes #30
|
18
|
-
* Added multiple args to commands (e.g. `pomo rm 1..3 5..8`). Closes
|
26
|
+
* Added multiple args to commands (e.g. `pomo rm 1..3 5..8`). Closes #12
|
19
27
|
* Added `pomo move` and `pomo copy`. Closes #18
|
20
28
|
* Added RSpec specs and Cucumber features. Closes #9
|
21
29
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Pomo [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/visionmedia/pomo)
|
1
|
+
# Pomo [![Build Status](https://travis-ci.org/visionmedia/pomo.png?branch=master)](https://travis-ci.org/visionmedia/pomo) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/visionmedia/pomo)
|
2
2
|
|
3
3
|
Command-line application for the [Pomodoro](http://www.pomodorotechnique.com/)
|
4
4
|
time management technique, with notification and tmux status bar support.
|
@@ -141,10 +141,10 @@ Taken from `pomo help`:
|
|
141
141
|
|
142
142
|
* View task details:
|
143
143
|
|
144
|
-
$ pomo
|
145
|
-
$ pomo
|
146
|
-
$ pomo
|
147
|
-
$ pomo
|
144
|
+
$ pomo show first
|
145
|
+
$ pomo show last
|
146
|
+
$ pomo show 5
|
147
|
+
$ pomo show 1 2 3
|
148
148
|
|
149
149
|
* Remove all tasks:
|
150
150
|
|
@@ -199,11 +199,11 @@ and blue during a break e.g.
|
|
199
199
|
|
200
200
|
We :heart: pull requests and feedback. Feel free to
|
201
201
|
[submit a ticket](https://github.com/visionmedia/pomo/issues) or see
|
202
|
-
[CONTRIBUTING](
|
202
|
+
[CONTRIBUTING](CONTRIBUTING.md)
|
203
203
|
for details on pull requests.
|
204
204
|
|
205
205
|
## Copyright
|
206
206
|
|
207
207
|
Copyright (c) 2012 TJ Holowaychuk. See
|
208
|
-
[LICENSE](
|
208
|
+
[LICENSE](LICENSE.md)
|
209
209
|
for details.
|
data/lib/pomo/configuration.rb
CHANGED
@@ -38,7 +38,7 @@ module Pomo
|
|
38
38
|
# Load configuration file or default_options. Passed options take precedence.
|
39
39
|
|
40
40
|
def self.load(options = {})
|
41
|
-
options.reject
|
41
|
+
user_options = options.reject{|k,v| ![:notifier, :progress, :tmux].include? k}
|
42
42
|
|
43
43
|
if !(File.exists? config_file)
|
44
44
|
File.open(config_file, 'w') { |file| YAML::dump(default_options, file) }
|
@@ -46,20 +46,18 @@ module Pomo
|
|
46
46
|
end
|
47
47
|
|
48
48
|
config_file_options = YAML.load_file(config_file)
|
49
|
-
new(config_file_options.merge(
|
49
|
+
new(config_file_options.merge(user_options))
|
50
50
|
end
|
51
51
|
|
52
52
|
##
|
53
53
|
# Save configuration. Passed options take precendence over default_options.
|
54
54
|
|
55
55
|
def self.save(options = {})
|
56
|
+
user_options = options.reject{|k,v| ![:notifier, :progress, :tmux].include? k}
|
56
57
|
force_save = options.delete :force
|
57
|
-
options.reject!{|k,v| ![:notifier, :progress, :tmux].include? k}
|
58
|
-
|
59
|
-
options = default_options.merge(options)
|
60
58
|
|
61
59
|
if !(File.exists? config_file) || force_save
|
62
|
-
File.open(config_file, 'w') { |file| YAML::dump(
|
60
|
+
File.open(config_file, 'w') { |file| YAML::dump(default_options.merge(user_options), file) }
|
63
61
|
say "Initialized config file in #{config_file}"
|
64
62
|
else
|
65
63
|
say_error "Not overwriting existing config file #{config_file}, use --force to override. See 'pomo help initconfig'."
|
data/lib/pomo/github_task.rb
CHANGED
@@ -63,13 +63,10 @@ module Pomo
|
|
63
63
|
##
|
64
64
|
# Import Github issue(s) with _user_, _project_, _number_ as GithubTask(s).
|
65
65
|
|
66
|
-
def self.import(user, project, number)
|
66
|
+
def self.import(user, project, number=nil)
|
67
67
|
tasks = []
|
68
|
-
|
69
|
-
|
70
|
-
else
|
71
|
-
issues = Octokit.list_issues({:username => user, :repo => project}, :state => 'open', :sort => 'created')
|
72
|
-
end
|
68
|
+
|
69
|
+
issues = get_issues(user, project, number)
|
73
70
|
|
74
71
|
issues.each do |issue|
|
75
72
|
tasks << new(issue.title,
|
@@ -81,7 +78,18 @@ module Pomo
|
|
81
78
|
:url => issue.html_url
|
82
79
|
)
|
83
80
|
end
|
81
|
+
|
84
82
|
return tasks
|
83
|
+
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def self.get_issues(user, project, number)
|
88
|
+
if number
|
89
|
+
issues = [Octokit.issue({:username => user, :repo => project}, number)]
|
90
|
+
else
|
91
|
+
issues = Octokit.list_issues({:username => user, :repo => project}, :state => 'open', :sort => 'created')
|
92
|
+
end
|
85
93
|
rescue Octokit::NotFound => e
|
86
94
|
say "\n"
|
87
95
|
say_error '404: This is not the repo you are looking for.'
|
data/lib/pomo/list.rb
CHANGED
@@ -46,32 +46,7 @@ module Pomo
|
|
46
46
|
#
|
47
47
|
|
48
48
|
def find(*args, &block)
|
49
|
-
found =
|
50
|
-
found << tasks.first if args.empty?
|
51
|
-
|
52
|
-
args.each do |arg|
|
53
|
-
case arg
|
54
|
-
when 'all'
|
55
|
-
found = tasks
|
56
|
-
break
|
57
|
-
when 'first'
|
58
|
-
found << tasks.first
|
59
|
-
when 'last'
|
60
|
-
found << tasks.last
|
61
|
-
when 'complete'
|
62
|
-
found.concat tasks.select { |task| task.complete? }
|
63
|
-
when 'completed'
|
64
|
-
found.concat tasks.select { |task| task.complete? }
|
65
|
-
when 'incomplete'
|
66
|
-
found.concat tasks.select { |task| not task.complete? }
|
67
|
-
when /^(\d+)$/
|
68
|
-
found << tasks[$1.to_i]
|
69
|
-
when /^(\d+)\.\.(-?\d+)$/
|
70
|
-
found.concat tasks[$1.to_i..$2.to_i]
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
found.compact!
|
49
|
+
found = find_tasks(args)
|
75
50
|
|
76
51
|
if block.arity == 2
|
77
52
|
found.each_with_index do |task, i|
|
@@ -126,6 +101,33 @@ module Pomo
|
|
126
101
|
|
127
102
|
private
|
128
103
|
|
104
|
+
def find_tasks(args)
|
105
|
+
found = []
|
106
|
+
found << tasks.first if args.empty?
|
107
|
+
|
108
|
+
args.each do |arg|
|
109
|
+
case arg
|
110
|
+
when 'all'
|
111
|
+
found = tasks
|
112
|
+
break
|
113
|
+
when 'first'
|
114
|
+
found << tasks.first
|
115
|
+
when 'last'
|
116
|
+
found << tasks.last
|
117
|
+
when 'complete', 'completed'
|
118
|
+
found.concat tasks.select { |task| task.complete? }
|
119
|
+
when 'incomplete'
|
120
|
+
found.concat tasks.select { |task| not task.complete? }
|
121
|
+
when /^(\d+)$/
|
122
|
+
found << tasks[$1.to_i]
|
123
|
+
when /^(\d+)\.\.(-?\d+)$/
|
124
|
+
found.concat tasks[$1.to_i..$2.to_i]
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
found.compact
|
129
|
+
end
|
130
|
+
|
129
131
|
def index(arg)
|
130
132
|
case arg
|
131
133
|
when 'first'
|
data/lib/pomo/version.rb
CHANGED
data/pomo.gemspec
CHANGED
@@ -19,16 +19,11 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
21
|
spec.require_paths = ['lib']
|
22
|
-
spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'Pomo', '--main', '
|
22
|
+
spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'Pomo', '--main', 'README.md']
|
23
23
|
|
24
24
|
spec.add_dependency('commander', '~> 4.1')
|
25
25
|
spec.add_dependency('octokit', '~> 1.19')
|
26
26
|
spec.add_dependency('terminal-notifier', '~> 1.4') if Pomo::OS.mac?
|
27
27
|
spec.add_dependency('growl', '~> 1.0') if Pomo::OS.mac? || Pomo::OS.windows?
|
28
28
|
spec.add_dependency('libnotify', '~> 0.8') if Pomo::OS.linux?
|
29
|
-
|
30
|
-
spec.add_development_dependency('aruba', '~> 0.5.1')
|
31
|
-
spec.add_development_dependency('rspec', '~> 2.12')
|
32
|
-
spec.add_development_dependency('fakefs', '~> 0.4')
|
33
|
-
spec.add_development_dependency('yard')
|
34
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pomo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-02-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: commander
|
@@ -76,70 +76,6 @@ dependencies:
|
|
76
76
|
- - ~>
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '1.0'
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
|
-
name: aruba
|
81
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 0.5.1
|
87
|
-
type: :development
|
88
|
-
prerelease: false
|
89
|
-
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
|
-
requirements:
|
92
|
-
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 0.5.1
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rspec
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
|
-
requirements:
|
100
|
-
- - ~>
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '2.12'
|
103
|
-
type: :development
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
|
-
requirements:
|
108
|
-
- - ~>
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '2.12'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: fakefs
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
|
-
requirements:
|
116
|
-
- - ~>
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0.4'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
|
-
requirements:
|
124
|
-
- - ~>
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: '0.4'
|
127
|
-
- !ruby/object:Gem::Dependency
|
128
|
-
name: yard
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
130
|
-
none: false
|
131
|
-
requirements:
|
132
|
-
- - ! '>='
|
133
|
-
- !ruby/object:Gem::Version
|
134
|
-
version: '0'
|
135
|
-
type: :development
|
136
|
-
prerelease: false
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
138
|
-
none: false
|
139
|
-
requirements:
|
140
|
-
- - ! '>='
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
79
|
description: Pomodoro time management for the command-line
|
144
80
|
email:
|
145
81
|
- tj@vision-media.ca
|
@@ -191,7 +127,7 @@ rdoc_options:
|
|
191
127
|
- --title
|
192
128
|
- Pomo
|
193
129
|
- --main
|
194
|
-
-
|
130
|
+
- README.md
|
195
131
|
require_paths:
|
196
132
|
- lib
|
197
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -211,7 +147,7 @@ rubyforge_project: pomo
|
|
211
147
|
rubygems_version: 1.8.23
|
212
148
|
signing_key:
|
213
149
|
specification_version: 3
|
214
|
-
summary: pomo-2.1.
|
150
|
+
summary: pomo-2.1.2
|
215
151
|
test_files:
|
216
152
|
- features/configuration.feature
|
217
153
|
- features/manage_list.feature
|