omnifocus-rubyforge 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-26
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/rubyforge.rb
data/README.txt ADDED
@@ -0,0 +1,45 @@
1
+ = omnifocus-rubyforge
2
+
3
+ * http://rubyforge.org/projects/seattlerb
4
+
5
+ == DESCRIPTION:
6
+
7
+ Plugin for omnifocus gem to provide rubyforge BTS synchronization.
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * Provides rubyforge BTS synchronization.
12
+
13
+ == REQUIREMENTS:
14
+
15
+ * omnifocus
16
+ * rubyforge (gem & user configuration -- `rubyforge login` must work)
17
+
18
+ == INSTALL:
19
+
20
+ * sudo gem install omnifocus-rubyforge
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,17 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugin :seattlerb
7
+
8
+ Hoe.spec 'omnifocus-rubyforge' do
9
+ developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
10
+
11
+ extra_deps << 'omnifocus'
12
+ extra_deps << 'rubyforge'
13
+
14
+ self.rubyforge_name = 'seattlerb'
15
+ end
16
+
17
+ # vim: syntax=ruby
@@ -0,0 +1,63 @@
1
+ require 'rubyforge'
2
+
3
+ module OmniFocus::Rubyforge
4
+ VERSION = '1.0.0'
5
+ RF_URL = "http://rubyforge.org"
6
+
7
+ def rubyforge
8
+ unless defined? @rubyforge then
9
+ @rubyforge = RubyForge.new
10
+ @rubyforge.configure
11
+ end
12
+ @rubyforge
13
+ end
14
+
15
+ def login_to_rubyforge
16
+ m, login_url = mechanize, "/account/login.php"
17
+
18
+ m.get("#{RF_URL}#{login_url}").form_with(:action => login_url) do |f|
19
+ f.form_loginname = rubyforge.userconfig["username"]
20
+ f.form_pw = rubyforge.userconfig["password"]
21
+ end.click_button
22
+ end
23
+
24
+ def populate_rubyforge_tasks
25
+ home = login_to_rubyforge
26
+
27
+ # nuke all the tracker links on "My Page" after "My Submitted Items"
28
+ node = home.root.xpath('//tr[td[text() = "My Submitted Items"]]').first
29
+ loop do
30
+ prev, node = node, node.next
31
+ prev.remove
32
+ break unless node
33
+ end
34
+
35
+ group_ids = rubyforge.autoconfig["group_ids"].invert
36
+
37
+ rubyforge_tickets = home.links_with(:href => /^.tracker/)
38
+ rubyforge_tickets.each do |link|
39
+ if link.href =~ /func=detail&aid=(\d+)&group_id=(\d+)&atid=(\d+)/ then
40
+ ticket_id, group_id = $1.to_i, $2.to_i
41
+ group = group_ids[group_id]
42
+
43
+ next unless group
44
+
45
+ if existing[ticket_id] then
46
+ bug_db[existing[ticket_id]][ticket_id] = true
47
+ next
48
+ end
49
+
50
+ warn "scanning ticket RF##{ticket_id}"
51
+ details = link.click.form_with :action => /^.tracker/
52
+ select = details.field_with :name => "category_id"
53
+ project = select.selected_options.first
54
+ project = project ? project.text.downcase : group
55
+ project = group if project =~ /\s/
56
+ title = "RF##{ticket_id}: #{link.text}"
57
+ url = "#{RF_URL}/#{link.href}"
58
+
59
+ bug_db[project][ticket_id] = [title, url]
60
+ end
61
+ end
62
+ end
63
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omnifocus-rubyforge
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-26 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: rubyforge
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.3
44
+ version:
45
+ description: Plugin for omnifocus gem to provide rubyforge BTS synchronization.
46
+ email:
47
+ - ryand-ruby@zenspider.com
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ extra_rdoc_files:
53
+ - History.txt
54
+ - Manifest.txt
55
+ - README.txt
56
+ files:
57
+ - .autotest
58
+ - History.txt
59
+ - Manifest.txt
60
+ - README.txt
61
+ - Rakefile
62
+ - lib/omnifocus/rubyforge.rb
63
+ has_rdoc: true
64
+ homepage: http://rubyforge.org/projects/seattlerb
65
+ licenses: []
66
+
67
+ post_install_message:
68
+ rdoc_options:
69
+ - --main
70
+ - README.txt
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ requirements: []
86
+
87
+ rubyforge_project: seattlerb
88
+ rubygems_version: 1.3.4
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: Plugin for omnifocus gem to provide rubyforge BTS synchronization.
92
+ test_files: []
93
+