xforge 0.3.5 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/CHANGES +34 -0
  2. data/Rakefile +5 -5
  3. data/lib/meta_project.rb +6 -0
  4. data/lib/meta_project/project.rb +4 -0
  5. data/lib/meta_project/project/base.rb +7 -0
  6. data/lib/meta_project/project/codehaus.rb +1 -0
  7. data/lib/meta_project/project/codehaus/codehaus_project_svn.rb +26 -0
  8. data/lib/meta_project/project/trac.rb +1 -0
  9. data/lib/meta_project/project/trac/trac_project.rb +26 -0
  10. data/lib/meta_project/project/xforge.rb +5 -0
  11. data/lib/meta_project/project/xforge/ruby_forge.rb +46 -0
  12. data/lib/meta_project/project/xforge/session.rb +162 -0
  13. data/lib/meta_project/project/xforge/source_forge.rb +46 -0
  14. data/lib/meta_project/project/xforge/xfile.rb +45 -0
  15. data/lib/meta_project/project/xforge/xforge_base.rb +76 -0
  16. data/lib/meta_project/project_analyzer.rb +36 -0
  17. data/lib/meta_project/scm_web.rb +53 -0
  18. data/lib/meta_project/tracker.rb +6 -0
  19. data/lib/meta_project/tracker/base.rb +18 -0
  20. data/lib/meta_project/tracker/digit_issues.rb +24 -0
  21. data/lib/meta_project/tracker/issue.rb +11 -0
  22. data/lib/meta_project/tracker/jira.rb +1 -0
  23. data/lib/meta_project/tracker/jira/jira_tracker.rb +68 -0
  24. data/lib/meta_project/tracker/trac.rb +1 -0
  25. data/lib/meta_project/tracker/trac/trac_tracker.rb +29 -0
  26. data/lib/meta_project/tracker/xforge.rb +3 -0
  27. data/lib/meta_project/tracker/xforge/ruby_forge_tracker.rb +17 -0
  28. data/lib/meta_project/tracker/xforge/source_forge_tracker.rb +17 -0
  29. data/lib/meta_project/tracker/xforge/xforge_tracker.rb +83 -0
  30. data/lib/{xforge → meta_project}/version_parser.rb +6 -6
  31. data/lib/rake/contrib/xforge/base.rb +2 -3
  32. data/lib/rake/contrib/xforge/news_publisher.rb +1 -5
  33. data/lib/rake/contrib/xforge/release.rb +3 -7
  34. data/lib/xforge.rb +0 -1
  35. metadata +30 -27
  36. data/lib/scm_web/base.rb +0 -12
  37. data/lib/scm_web/file_uri.rb +0 -21
  38. data/lib/scm_web/view_cvs.rb +0 -44
  39. data/lib/tracker/base.rb +0 -16
  40. data/lib/tracker/bugzilla/project.rb +0 -8
  41. data/lib/tracker/digit_issues.rb +0 -22
  42. data/lib/tracker/fog_bugz/project.rb +0 -8
  43. data/lib/tracker/issue.rb +0 -9
  44. data/lib/tracker/jira.rb +0 -2
  45. data/lib/tracker/jira/host.rb +0 -40
  46. data/lib/tracker/jira/project.rb +0 -43
  47. data/lib/tracker/mantis/project.rb +0 -8
  48. data/lib/tracker/scarab/project.rb +0 -8
  49. data/lib/tracker/trac.rb +0 -1
  50. data/lib/tracker/trac/project.rb +0 -35
  51. data/lib/tracker/xforge.rb +0 -2
  52. data/lib/tracker/xforge/base.rb +0 -77
  53. data/lib/tracker/xforge/rubyforge.rb +0 -7
  54. data/lib/xforge/host.rb +0 -26
  55. data/lib/xforge/project.rb +0 -87
  56. data/lib/xforge/rubyforge.rb +0 -50
  57. data/lib/xforge/session.rb +0 -158
  58. data/lib/xforge/sourceforge.rb +0 -46
  59. data/lib/xforge/xfile.rb +0 -41
@@ -1,46 +0,0 @@
1
- module XForge
2
- class SourceForge < Host
3
- def initialize
4
- super("sourceforge.net")
5
- end
6
-
7
- def login_port
8
- 443
9
- end
10
-
11
- def cvs_server_path(project_unix_name)
12
- "/cvsroot/#{project_unix_name}"
13
- end
14
-
15
- def cvs_host_name
16
- "cvs.sourceforge.net"
17
- end
18
-
19
- def scm_web(project)
20
- view_cvs = "http://cvs.sourceforge.net/viewcvs.py/"
21
- project_path = "#{project.unix_name}/\#{path}"
22
- rev = "rev=\#{revision}"
23
-
24
- overview = "#{view_cvs}#{project_path}"
25
- raw = "#{view_cvs}*checkout*/#{project_path}?#{rev}"
26
- html = "#{overview}?#{rev}&view=markup"
27
- diff = "#{overview}?r1=\#{previous_revision}&r2=\#{revision}"
28
-
29
- module_regexp = /viewcvs\.py\/#{project.unix_name}\/(\w+)\//
30
- ::ScmWeb::ViewCvs.new(
31
- {"overview" => overview, "raw" => raw, "html" => html, "diff" => diff},
32
- cvs_host_name,
33
- cvs_server_path(project.unix_name),
34
- project.unix_name,
35
- module_regexp
36
- )
37
- end
38
-
39
- # Regexp used to find projects' home page
40
- def home_page_regexp
41
- # This seems a little volatile
42
- /<A href=\"(\w*:\/\/[^\"]*)\">&nbsp;Project Home Page<\/A>/
43
- end
44
-
45
- end
46
- end
@@ -1,41 +0,0 @@
1
- module XForge
2
-
3
- class XFile # :nodoc:
4
-
5
- # extension => [mime_type, rubyforge_bin_type_id, rubyforge_src_type_id]
6
- FILE_TYPES = {
7
- ".deb" => ["application/octet-stream", 1000],
8
-
9
- # all of these can be source or binary
10
- ".rpm" => ["application/octet-stream", 2000, 5100],
11
- ".zip" => ["application/octet-stream", 3000, 5000],
12
- ".bz2" => ["application/octet-stream", 3100, 5010],
13
- ".gz" => ["application/octet-stream", 3110, 5020],
14
- ".jpg" => ["application/octet-stream", 8000],
15
- ".jpeg" => ["application/octet-stream", 8000],
16
- ".txt" => ["text/plain", 8100, 8100],
17
- ".html" => ["text/html", 8200, 8200],
18
- ".pdf" => ["application/octet-stream", 8300],
19
- ".ebuild" => ["application/octet-stream", 1300],
20
- ".exe" => ["application/octet-stream", 1100],
21
- ".dmg" => ["application/octet-stream", 1200],
22
- ".gem" => ["application/octet-stream", 1400],
23
- ".sig" => ["application/octet-stream", 8150]
24
- }
25
- FILE_TYPES.default = ["application/octet-stream", 9999, 5900] # default to "other", "other source"
26
-
27
- attr_reader :basename, :ext, :content_type, :bin_type_id, :src_type_id
28
-
29
- def initialize(filename)
30
- @filename = filename
31
- @basename = File.basename(filename)
32
- @ext = File.extname(filename)
33
- @content_type = FILE_TYPES[@ext][0]
34
- @bin_type_id = FILE_TYPES[@ext][1]
35
- end
36
-
37
- def data
38
- File.open(@filename, "rb") { |file| file.read }
39
- end
40
- end
41
- end