omnifocus-github 1.0.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/.autotest ADDED
@@ -0,0 +1,24 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ Autotest.add_hook :initialize do |at|
6
+ at.testlib = "minitest/autorun"
7
+ # at.extra_files << "../some/external/dependency.rb"
8
+ #
9
+ # at.libs << ":../some/external"
10
+ #
11
+ # at.add_exception 'vendor'
12
+ #
13
+ # at.add_mapping(/dependency.rb/) do |f, _|
14
+ # at.files_matching(/test_.*rb$/)
15
+ # end
16
+ #
17
+ # %w(TestA TestB).each do |klass|
18
+ # at.extra_class_map[klass] = "test/test_misc.rb"
19
+ # end
20
+ end
21
+
22
+ # Autotest.add_hook :run_command do |at|
23
+ # system "rake build"
24
+ # end
data/History.txt ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2009-07-28
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,6 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ lib/omnifocus/github.rb
data/README.txt ADDED
@@ -0,0 +1,45 @@
1
+ = omnifocus-github
2
+
3
+ * http://rubyforge.org/projects/seattlerb
4
+
5
+ == DESCRIPTION:
6
+
7
+ Plugin for omnifocus gem to provide github BTS synchronization.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * Provides github BTS synchronization.
12
+
13
+ == REQUIREMENTS:
14
+
15
+ * omnifocus
16
+ * ~/.gitrc must have github username defined
17
+
18
+ == INSTALL:
19
+
20
+ * sudo gem install omnifocus-github
21
+
22
+ == LICENSE:
23
+
24
+ (The MIT License)
25
+
26
+ Copyright (c) Ryan Davis, seattle.rb
27
+
28
+ Permission is hereby granted, free of charge, to any person obtaining
29
+ a copy of this software and associated documentation files (the
30
+ 'Software'), to deal in the Software without restriction, including
31
+ without limitation the rights to use, copy, modify, merge, publish,
32
+ distribute, sublicense, and/or sell copies of the Software, and to
33
+ permit persons to whom the Software is furnished to do so, subject to
34
+ the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be
37
+ included in all copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
40
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
42
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
43
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
44
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugin :seattlerb
7
+
8
+ Hoe.spec 'omnifocus-github' do
9
+ developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
10
+
11
+ extra_deps << 'omnifocus'
12
+
13
+ self.rubyforge_name = 'seattlerb'
14
+ end
15
+
16
+ # vim: syntax=ruby
@@ -0,0 +1,38 @@
1
+ require 'open-uri'
2
+ require 'yaml'
3
+
4
+ module OmniFocus::Github
5
+ VERSION = '1.0.0'
6
+
7
+ GH_URL = "http://github.com"
8
+
9
+ def fetch url, key
10
+ base_url = "#{GH_URL}/api/v2/yaml"
11
+ YAML.load(URI.parse("#{base_url}/#{url}").read)[key]
12
+ end
13
+
14
+ def populate_github_tasks
15
+ user = `git config --global github.user`.chomp
16
+ projects = fetch("repos/show/#{user}", "repositories").select { |project|
17
+ project[:open_issues] > 0
18
+ }.map { |project|
19
+ project[:name]
20
+ }
21
+
22
+ projects.sort.each do |project|
23
+ fetch("issues/list/#{user}/#{project}/open", "issues").each do |issue|
24
+ number = issue["number"]
25
+ ticket_id = "GH-#{project}##{number}"
26
+ title = "#{ticket_id}: #{issue["title"]}"
27
+ url = "#{GH_URL}/#{user}/#{project}/issues/#issue/#{number}"
28
+
29
+ if existing[ticket_id] then
30
+ bug_db[existing[ticket_id]][ticket_id] = true
31
+ next
32
+ end
33
+
34
+ bug_db[project][ticket_id] = [title, url]
35
+ end
36
+ end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omnifocus-github
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Davis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-28 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: omnifocus
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: hoe
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 2.3.3
34
+ version:
35
+ description: Plugin for omnifocus gem to provide github BTS synchronization.
36
+ email:
37
+ - ryand-ruby@zenspider.com
38
+ executables: []
39
+
40
+ extensions: []
41
+
42
+ extra_rdoc_files:
43
+ - History.txt
44
+ - Manifest.txt
45
+ - README.txt
46
+ files:
47
+ - .autotest
48
+ - History.txt
49
+ - Manifest.txt
50
+ - README.txt
51
+ - Rakefile
52
+ - lib/omnifocus/github.rb
53
+ has_rdoc: true
54
+ homepage: http://rubyforge.org/projects/seattlerb
55
+ licenses: []
56
+
57
+ post_install_message:
58
+ rdoc_options:
59
+ - --main
60
+ - README.txt
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ version:
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ requirements: []
76
+
77
+ rubyforge_project: seattlerb
78
+ rubygems_version: 1.3.4
79
+ signing_key:
80
+ specification_version: 3
81
+ summary: Plugin for omnifocus gem to provide github BTS synchronization.
82
+ test_files: []
83
+