pomo 0.0.5 → 0.1.0

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.
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+
2
+ 0.1.0 / 2009-10-16
3
+ ==================
4
+
5
+ * Added `pomo import <user> <project>`
6
+ * Added Pomo::GithubTask
1
7
 
2
8
  0.0.5 / 2009-10-16
3
9
  ==================
data/Manifest CHANGED
@@ -4,6 +4,7 @@ Rakefile
4
4
  Readme.md
5
5
  bin/pomo
6
6
  lib/pomo.rb
7
+ lib/pomo/github_task.rb
7
8
  lib/pomo/list.rb
8
9
  lib/pomo/task.rb
9
10
  lib/pomo/version.rb
data/bin/pomo CHANGED
@@ -49,6 +49,31 @@ command :start do |c|
49
49
  end
50
50
  end
51
51
  end
52
+
53
+ command :import do |c|
54
+ c.syntax = 'pomo import <user> <project> [options]'
55
+ c.summary = 'Import Github project issues'
56
+ c.description = 'Import Github project issues which have not yet been closed'
57
+ c.action do |args, options|
58
+ begin
59
+ require 'octopi'
60
+ rescue LoadError
61
+ abort 'the octopi gem is required to import issues from Github'
62
+ else
63
+ user = args.shift or raise('Github <user> is required')
64
+ project = args.shift or raise('Github <project> is required')
65
+ if repo = Octopi::Repository.find(user, project)
66
+ say "Importing items from http://github.com/#{user}/#{project}"
67
+ repo.issues.select { |i| not i.closed_at }.each do |issue|
68
+ task = Pomo::GithubTask.new issue.title, :username => user, :project => project, :description => issue.body
69
+ list << task
70
+ say "Added #{task}"
71
+ end
72
+ list.save
73
+ end
74
+ end
75
+ end
76
+ end
52
77
 
53
78
  command :add do |c|
54
79
  c.syntax = 'pomo add <task> [options]'
@@ -148,7 +173,7 @@ command :list do |c|
148
173
  list.tasks.each_with_index do |task, i|
149
174
  next if options.complete && !task.complete?
150
175
  next if options.incomplete && task.complete?
151
- say ' %s %2d. %-35s : %d minutes' % [task.complete? ? '√' : ' ', i, task.to_s, task.length]
176
+ say ' %s %2d. %-45s : %d minutes' % [task.complete? ? '√' : ' ', i, task.to_s, task.length]
152
177
  end
153
178
  end
154
179
  end
data/lib/pomo.rb CHANGED
@@ -25,4 +25,5 @@ require 'yaml'
25
25
  require 'growl'
26
26
  require 'pomo/list'
27
27
  require 'pomo/task'
28
+ require 'pomo/github_task'
28
29
  require 'pomo/version'
@@ -0,0 +1,25 @@
1
+
2
+ module Pomo
3
+ class GithubTask < Task
4
+
5
+ ##
6
+ # Username.
7
+
8
+ attr_reader :username
9
+
10
+ ##
11
+ # Project name.
12
+
13
+ attr_reader :project
14
+
15
+ ##
16
+ # Initialize with _name_ and _options_.
17
+
18
+ def initialize name = nil, options = {}
19
+ super
20
+ @username = options.delete :username
21
+ @project = options.delete :project
22
+ end
23
+
24
+ end
25
+ end
data/lib/pomo/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Pomo
3
- VERSION = '0.0.5'
3
+ VERSION = '0.1.0'
4
4
  end
data/pomo.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pomo}
5
- s.version = "0.0.5"
5
+ s.version = "0.1.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["TJ Holowaychuk"]
9
- s.date = %q{2009-10-16}
9
+ s.date = %q{2009-10-21}
10
10
  s.default_executable = %q{pomo}
11
11
  s.description = %q{Pomodoro time management for the command-line}
12
12
  s.email = %q{tj@vision-media.ca}
13
13
  s.executables = ["pomo"]
14
- s.extra_rdoc_files = ["bin/pomo", "lib/pomo.rb", "lib/pomo/list.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
15
- s.files = ["History.md", "Manifest", "Rakefile", "Readme.md", "bin/pomo", "lib/pomo.rb", "lib/pomo/list.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "pomo.gemspec", "spec/pomo_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
14
+ s.extra_rdoc_files = ["bin/pomo", "lib/pomo.rb", "lib/pomo/github_task.rb", "lib/pomo/list.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
15
+ s.files = ["History.md", "Manifest", "Rakefile", "Readme.md", "bin/pomo", "lib/pomo.rb", "lib/pomo/github_task.rb", "lib/pomo/list.rb", "lib/pomo/task.rb", "lib/pomo/version.rb", "pomo.gemspec", "spec/pomo_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
16
16
  s.homepage = %q{http://github.com/visionmedia/pomo}
17
17
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pomo", "--main", "Readme.md"]
18
18
  s.require_paths = ["lib"]
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: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TJ Holowaychuk
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 -07:00
12
+ date: 2009-10-21 00:00:00 -07:00
13
13
  default_executable: pomo
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -41,6 +41,7 @@ extensions: []
41
41
  extra_rdoc_files:
42
42
  - bin/pomo
43
43
  - lib/pomo.rb
44
+ - lib/pomo/github_task.rb
44
45
  - lib/pomo/list.rb
45
46
  - lib/pomo/task.rb
46
47
  - lib/pomo/version.rb
@@ -54,6 +55,7 @@ files:
54
55
  - Readme.md
55
56
  - bin/pomo
56
57
  - lib/pomo.rb
58
+ - lib/pomo/github_task.rb
57
59
  - lib/pomo/list.rb
58
60
  - lib/pomo/task.rb
59
61
  - lib/pomo/version.rb