reap 9.3.5 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/CHANGES +10 -0
  2. data/MANIFEST +37 -21
  3. data/NOTES +13 -11
  4. data/bin/reap-announce +40 -2
  5. data/bin/reap-check-load +20 -2
  6. data/bin/reap-check-syntax +20 -2
  7. data/bin/reap-clean +24 -2
  8. data/bin/reap-clobber +17 -2
  9. data/bin/reap-doc +12 -2
  10. data/bin/reap-doc-rdoc +17 -2
  11. data/bin/reap-doc-ri +16 -2
  12. data/bin/reap-doc-spec +18 -0
  13. data/bin/reap-init +9 -0
  14. data/bin/reap-inspect +20 -2
  15. data/bin/reap-install +13 -2
  16. data/bin/reap-install-gem +14 -2
  17. data/bin/reap-log +15 -2
  18. data/bin/reap-log-changes +15 -2
  19. data/bin/reap-log-notes +20 -2
  20. data/bin/reap-make +16 -2
  21. data/bin/reap-make-clean +10 -2
  22. data/bin/reap-make-distclean +18 -2
  23. data/bin/reap-make-extconf +14 -2
  24. data/bin/reap-make-static +14 -2
  25. data/bin/reap-package +25 -2
  26. data/bin/reap-package-gem +14 -2
  27. data/bin/reap-package-tgz +14 -2
  28. data/bin/reap-package-zip +14 -2
  29. data/bin/reap-prepare +21 -2
  30. data/bin/reap-publish +25 -2
  31. data/bin/reap-release +22 -2
  32. data/bin/reap-rollout +32 -2
  33. data/bin/reap-scaffold +16 -2
  34. data/bin/reap-scm-branch +13 -2
  35. data/bin/reap-scm-tag +13 -2
  36. data/bin/reap-spec +14 -2
  37. data/bin/reap-stats +21 -2
  38. data/bin/reap-test +14 -2
  39. data/bin/reap-test-cross +23 -2
  40. data/bin/reap-test-load +17 -2
  41. data/bin/reap-test-solo +19 -2
  42. data/bin/reap-uninstall +14 -2
  43. data/bin/reap-uninstall-gem +17 -2
  44. data/bin/reap-version +10 -2
  45. data/lib/reap/announcement.rb +136 -0
  46. data/lib/reap/application.rb +3 -1
  47. data/lib/reap/default.yaml +12 -12
  48. data/lib/reap/defaults.rb +49 -0
  49. data/lib/reap/emailer.rb +189 -0
  50. data/lib/reap/extensions.rb +1 -2
  51. data/lib/reap/hosts.rb +4 -0
  52. data/lib/reap/hosts/host.rb +69 -0
  53. data/lib/reap/hosts/mailinglist.rb +83 -0
  54. data/lib/reap/{systems → hosts}/rubyforge.rb +72 -60
  55. data/lib/reap/hosts/rubytalk.rb +39 -0
  56. data/lib/reap/iobject.rb +5 -3
  57. data/lib/reap/metadata.rb +31 -4
  58. data/lib/reap/project.rb +101 -41
  59. data/lib/reap/project/announce.rb +50 -180
  60. data/lib/reap/project/check.rb +1 -1
  61. data/lib/reap/project/gem.rb +32 -68
  62. data/lib/reap/project/log.rb +12 -7
  63. data/lib/reap/project/make.rb +0 -1
  64. data/lib/reap/project/package.rb +228 -75
  65. data/lib/reap/project/rdoc.rb +9 -8
  66. data/lib/reap/project/release.rb +52 -6
  67. data/lib/reap/project/scm.rb +40 -25
  68. data/lib/reap/project/spec.rb +3 -3
  69. data/lib/reap/project/test.rb +1 -2
  70. data/lib/reap/project/version.rb +18 -4
  71. data/lib/reap/runmodes.rb +24 -0
  72. data/lib/reap/settings.rb +3 -14
  73. data/lib/reap/systems.rb +4 -0
  74. data/lib/reap/systems/git.rb +0 -0
  75. data/lib/reap/systems/hg.rb +0 -0
  76. data/lib/reap/systems/{subversion.rb → svn.rb} +47 -16
  77. data/lib/reap/systems/system.rb +53 -0
  78. data/lib/reap/tool.rb +38 -0
  79. data/lib/reap/utilities.rb +43 -86
  80. data/log/{Changelog.txt → changelog.rdoc} +56 -0
  81. data/log/fixme.rdoc +25 -0
  82. data/log/todo.rdoc +85 -0
  83. data/meta/project.yaml +13 -2
  84. data/meta/version +1 -0
  85. data/setup.rb +74 -64
  86. data/task/allshare.rb +109 -0
  87. data/task/clean +13 -0
  88. data/task/compile +28 -0
  89. data/task/configure +372 -0
  90. data/task/install +1481 -0
  91. data/test/case/test_init.rb +32 -0
  92. data/test/case/test_scaffold.rb +32 -0
  93. data/test/data/scaffold/meta/project.yaml +28 -0
  94. data/test/lib/case_testable.rb +23 -0
  95. metadata +64 -31
  96. data/bin/reap-spec-doc +0 -8
  97. data/demo/README +0 -15
  98. data/demo/lib/foo/foo.rb +0 -7
  99. data/demo/meta/VERSION +0 -1
  100. data/demo/meta/project.yaml +0 -21
  101. data/lib/reap/project/rubyforge.rb +0 -71
  102. data/lib/reap/project/svn.rb +0 -76
  103. data/log/Fixme.txt +0 -22
  104. data/log/Todo.txt +0 -84
  105. data/meta/VERSION +0 -1
@@ -0,0 +1,53 @@
1
+ require 'reap/tool'
2
+
3
+ module Reap
4
+ module Systems
5
+
6
+ def self.registry
7
+ @registry ||= {}
8
+ end
9
+
10
+ def self.current
11
+ System.factory
12
+ end
13
+
14
+ # = System
15
+ #
16
+ # Source Control system base class.
17
+
18
+ class System < Tool
19
+
20
+ include Utilities
21
+
22
+ def self.registry
23
+ Systems.registry
24
+ end
25
+
26
+ def self.register(*names)
27
+ registry[name] = self
28
+ end
29
+
30
+ def self.inherited(base)
31
+ registry[base.basename.downcase] = base
32
+ end
33
+
34
+ def self.factory(name=nil)
35
+ name ||= detect
36
+ registry[name]
37
+ end
38
+
39
+ def self.detect
40
+ scm = %w(.svn .git .hg _darcs CVS).find{ |f| File.exist?(f) }
41
+ case scm
42
+ when '.svn' then 'svn'
43
+ when '.git' then 'git'
44
+ when 'CVS' then 'cvs'
45
+ when '_darcs' then 'darcs'
46
+ when '.hg' then 'hg'
47
+ end
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+ end
@@ -0,0 +1,38 @@
1
+ require 'reap/utilities'
2
+
3
+ module Reap
4
+
5
+ # = Tool
6
+ #
7
+ # The Tool class provides a common base classs for
8
+ # project tools.
9
+
10
+ class Tool
11
+
12
+ include Utilities
13
+
14
+ attr :project, :options
15
+
16
+ def self.from_project(project, options=nil)
17
+ new(project, options)
18
+ end
19
+
20
+ def initialize(project, options=nil)
21
+ @project = project
22
+ @options = (options || {}).rekey
23
+ end
24
+
25
+ def metadata
26
+ project.metadata
27
+ end
28
+
29
+ def force? ; project.force? ; end
30
+ def trace? ; project.trace? ; end
31
+ def debug? ; project.debug? ; end
32
+ def dryrun? ; project.dryrun? ; end
33
+ def verbose? ; project.verbose? ; end
34
+
35
+ end
36
+
37
+ end
38
+
@@ -1,20 +1,35 @@
1
1
  require 'fileutils'
2
2
  require 'reap/extensions'
3
3
  require 'facets/ziputils'
4
+ require 'facets/net/smtp_tls'
4
5
 
5
6
  module Reap
6
7
 
8
+ # = Utilities
9
+ #
10
+ # Gerenal methods useful to project and tools.
11
+
7
12
  module Utilities
8
13
 
9
- attr_accessor :dryrun
10
- attr_accessor :trace
11
- attr_accessor :force
12
- attr_accessor :verbose
14
+ #attr_accessor :dryrun
15
+ #attr_accessor :trace
16
+ #attr_accessor :force
17
+ #attr_accessor :verbose
18
+
19
+ #def dryrun? ; @dryrun ; end
20
+ #def trace? ; @trace ; end
21
+ #def force? ; @force ; end
22
+ #def verbose? ; @verbose ; end
23
+
24
+ # Helper method for cleaning list options.
25
+ # This will split the option on ':' or ';'
26
+ # if it is a string, rather than an array.
27
+ # And it will make sure there are no nil elements.
13
28
 
14
- def dryrun? ; @dryrun ; end
15
- def trace? ; @trace ; end
16
- def force? ; @force ; end
17
- def verbose? ; @verbose ; end
29
+ def list_option(option)
30
+ option = option.to_s.split(/[:;,]/) unless Array===option
31
+ [option].compact.flatten
32
+ end
18
33
 
19
34
  # Internal status report.
20
35
  # Only output if dryrun or trace mode.
@@ -289,6 +304,22 @@ module Reap
289
304
  dryrun? ? ::ZipUtils::DryRun : ::ZipUtils
290
305
  end
291
306
 
307
+ #
308
+
309
+ def compress(format, folder, file=nil, options={})
310
+ case format.to_s.downcase
311
+ when 'zip'
312
+ ziputils.zip(folder, file, options)
313
+ when 'tgz'
314
+ ziputils.tgz(folder, file, options)
315
+ when 'tbz', 'bzip'
316
+ ziputils.tar_bzip(folder, file, options)
317
+ else
318
+ raise ArguementError, "unsupported compression format -- #{format}"
319
+ end
320
+ end
321
+
322
+ =begin
292
323
  # Zip folder into file.
293
324
 
294
325
  def zip(folder, file=nil, options={})
@@ -306,87 +337,13 @@ module Reap
306
337
  def tgz(folder, file=nil, options={})
307
338
  ziputils.tgz(folder, file, options)
308
339
  end
340
+ =end
309
341
 
310
-
311
- # Email function to easily send out an email.
312
- #
313
- # Settings:
314
- #
315
- # subject Subject of email message.
316
- # from Message FROM address [email].
317
- # to Email address to send announcemnt.
318
- # server Email server to route message.
319
- # port Email server's port.
320
- # port_secure Email server's port.
321
- # domain Email server's domain name.
322
- # account Email account name if needed.
323
- # password Password for login..
324
- # login Login type: plain, cram_md5 or login [plain].
325
- # secure Uses TLS security, true or false? [false]
326
- # message Mesage to send -or-
327
- # file File that contains message.
328
-
329
- def email(message, settings)
330
- settings ||= {}
331
- settings.rekey
332
-
333
- server = settings[:server]
334
- account = settings[:account] || ENV['EMAIL_ACCOUNT']
335
- passwd = settings[:password] || ENV['EMAIL_PASSWORD']
336
- login = settings[:login]
337
- subject = settings[:subject]
338
- mail_to = settings[:to] || settings[:mail_to]
339
- mail_from = settings[:from] || settings[:mail_from]
340
- secure = settings[:secure]
341
- domain = settings[:domain] || server
342
-
343
- port = (settings[:port_secure] || 465) if secure
344
- port = (settings[:port] || 25) unless secure
345
-
346
- account ||= mail_from
347
- login ||= :plain
348
-
349
- login = login.to_sym
350
-
351
- #mail_to = nil if mail_to.empty?
352
-
353
- raise ArgumentError, "missing email field -- server" unless server
354
- raise ArgumentError, "missing email field -- account" unless account
355
- raise ArgumentError, "missing email field -- subject" unless subject
356
- raise ArgumentError, "missing email field -- to" unless mail_to
357
- raise ArgumentError, "missing email field -- from" unless mail_from
358
-
359
- passwd ||= password("#{account} password:")
360
-
361
- mail_to = [mail_to].flatten.compact
362
-
363
- msg = ""
364
- msg << "From: #{mail_from}\n"
365
- msg << "To: #{mail_to.join(';')}\n"
366
- msg << "Subject: #{subject}\n"
367
- msg << ""
368
- msg << message
369
-
370
- if secure
371
- Net::SMTP.send(:include, Net::SMTP::TLS)
372
- Net::SMTP.enable_tls #if secure #if Net::SMTP.respond_to?(:enable_tls) and secure
373
- end
374
-
375
- begin
376
- Net::SMTP.start(server, port, domain, account, passwd, login) do |smtp|
377
- smtp.send_message(msg, mail_from, mail_to)
378
- end
379
- puts "Email sent successfully to #{mail_to.join(';')}."
380
- return true
381
- rescue => e
382
- if trace?
383
- raise e
384
- else
385
- abort "Email delivery failed."
386
- end
387
- end
342
+ def email(message, options)
343
+ Emailer.new(options).email(message)
388
344
  end
389
345
 
390
346
  end
391
347
 
392
348
  end
349
+
@@ -1,7 +1,63 @@
1
1
  = Subversion Changelog
2
2
 
3
+ == 2008-04-03 transami
4
+
5
+ * Moved demo to sandbox and update metadata. (260)
6
+ * Added demo metadata. (259)
7
+ * General bug-fixes. (258)
8
+
9
+ == 2008-04-02 transami
10
+
11
+ * Basic update to docs. (257)
12
+ * reap-make-extconf routes to make_config. (TODO: reconcille the two names). (256)
13
+ * reap-doc now generates both rdoc and ri docs. (255)
14
+ * Update reap-publish help. (254)
15
+ * Cross the board updates to support multiple hosts. (253)
16
+ * Updated svn system. (252)
17
+ * Added new hosts. (251)
18
+ * Removed old svn.rb --class handles it now. (250)
19
+ * Source control manager routes to scm classes. (249)
20
+ * Packaging now supports binary platform packages.
21
+ * Should work fine for Gems.
22
+ * Packages, but install needs refinement for source packages (ie. setup.rb). (248)
23
+ * Adjusted platform specification. (247)
24
+ * Remorked announce system to be more fleixble.
25
+ * Announce task now cycles through hosts looking for an announce method.
26
+ * Specify hosts used by project in the project metadata.
27
+ * Narrow host selection by using 'hosts:' in task's .reap config. (246)
28
+
29
+ == 2008-03-29 transami
30
+
31
+ * Renamed systems/subversion.rb to svn.rb. (245)
32
+ * Revert scms to systems change. (244)
33
+ * Moved systems to scms. (243)
34
+ * Moved systems/rubyforge.rb to hots/rubyforge.rb. (242)
35
+
36
+ == 2008-03-20 transami
37
+
38
+ * Added help options (--help) to all commands. (241)
39
+
40
+ == 2008-03-07 transami
41
+
42
+ * Fixed bug in gem creation wehre extensions were not be found. (240)
43
+
44
+ == 2008-02-22 transami
45
+
46
+ * Finish up touch-ups to website. (239)
47
+ * Fixed broken link in site. (238)
48
+ * A little better polish to the website. (237)
49
+ * Touched up ad organization. (236)
50
+ * New amazon ad. (235)
51
+ * Added .rsync-filter file to site scaffold. (234)
52
+ * Lower-cased meta/VERSION to meta/version. (233)
53
+ * Changed setup.rb doc installto ruby-{project}/. (232)
54
+ * Added screencast. (231)
55
+ * Replaced Google ad with Amaznon ad on website. (230)
56
+
3
57
  == 2008-02-21 transami
4
58
 
59
+ * Added site to scaffolding. (229)
60
+ * Update changelogs. (228)
5
61
  * Added test to Rakfile. (227)
6
62
  * Fixed bug in version task. (226)
7
63
  * Added screencast to website. (225)
@@ -0,0 +1,25 @@
1
+
2
+ = FIXME
3
+
4
+ == file://lib/reap/defaults.rb
5
+ * FIXME: when using the settings, I think nil should be considered a none entry and
6
+ so false would be required to actually mean "off". This means assigning each key value par one a time? (16)
7
+
8
+ == file://lib/reap/emailer.rb
9
+ * FIXME: Does not hide password. (166)
10
+
11
+ == file://lib/reap/project/check.rb
12
+ * FIXME: This isn't routing output to dev/null as expected ? (61)
13
+
14
+ == file://lib/reap/project/gem.rb
15
+ * FIXME (118)
16
+
17
+ == file://lib/reap/project/package.rb
18
+ * FIXME: package_docs is not yet ready for use. (184)
19
+ * FIXME: will type, name and version always be right? (267)
20
+ * FIXME: will type, name and version always be right? (283)
21
+
22
+ == file://lib/reap/project/scaffold.rb
23
+ * FIXME: This doesn't yet work b/c reap doesn't work unless
24
+ a project file is already in place. (34)
25
+ * FIXME: RubyGems has a new way to do this. Use that instead and fix Rolls to use it too. (136)
@@ -0,0 +1,85 @@
1
+
2
+ = TODO
3
+
4
+ == file://lib/reap/hosts/rubyforge.rb
5
+ * TODO IS THIS WORKING? (556)
6
+ * TODO Remove package argument, it is no longer needed. (598)
7
+ * TODO: Handle publish tasks to upload website files (currently this is handled separately) (26)
8
+ * TODO Deal with https, and possible other protocols too. (40)
9
+
10
+ == file://lib/reap/iobject.rb
11
+ * TODO Change name of this method to something better? (143)
12
+ * TODO Use in method missing instead? (127)
13
+ * TODO Could add yield(self) via:
14
+ yld.to_h.each do |k,v|
15
+ send( "#{k}=", v ) rescue nil
16
+ end (115)
17
+
18
+ == file://lib/reap/metadata.rb
19
+ * TODO: Improve buildno support. (500)
20
+ * TODO: Fit release name into name or package_name (?)
21
+ def name
22
+ @name ||= release.name
23
+ end (138)
24
+ * TODO: if current? (446)
25
+ * TODO Move to Variants? (172)
26
+ * TODO: Think of a more descirptive name than 'default'. (306)
27
+
28
+ == file://lib/reap/project/gem.rb
29
+ * TODO: Endure that we even need a gem package using #out_of_date? (29)
30
+ * TODO make test_files configurable (?) (112)
31
+ * TODO: Should this use staging too, like zip/tgz? (21)
32
+ * TODO: Sepcify version? (38)
33
+
34
+ == file://lib/reap/project/log.rb
35
+ * TODO: Remove format field, and ultimately use XML as primary format? (34)
36
+ * TODO: Naming policy needs to be apply to changelog too. (163)
37
+ * TODO: Add ability to read header notes. (22)
38
+
39
+ == file://lib/reap/project/make.rb
40
+ * TODO: win32 cross-compile ? (10)
41
+
42
+ == file://lib/reap/project/package.rb
43
+ * TODO: When we add support for binary packages distclean
44
+ should not be done for them. (40)
45
+ * TODO: Should this use staging too, like zip/tgz? (118)
46
+
47
+ == file://lib/reap/project/publish.rb
48
+ * TODO: Add FTP/SFTP support. (12)
49
+
50
+ == file://lib/reap/project/scaffold.rb
51
+ * TODO: Improve scaffolding. Make more intelligent. (72)
52
+
53
+ == file://lib/reap/project/scm.rb
54
+ * TODO: How should metadata.repository come into play here? (71)
55
+ * TODO: scm? may need to be made more robsut. (9)
56
+ * TODO: How should metadata.repository come into play here? (57)
57
+
58
+ == file://lib/reap/project/site.rb
59
+ * TODO: Remove special reap options from command line. (7)
60
+ * TODO: Create uninstall task. (18)
61
+
62
+ == file://lib/reap/project/stats.rb
63
+ * TODO: Add C support for ext/. (20)
64
+
65
+ == file://lib/reap/project/test.rb
66
+ * TODO: Generate a test log entry? (37)
67
+
68
+ == file://lib/reap/project/version.rb
69
+ * TODO: Considerding createing a standard status marker (a=alpha, b=beta, r=release candidate)
70
+ So a version would read, eg. 1.2.4a, or with status number, eg. 1.2.4r1). (34)
71
+ * TODO: Stamp .roll if roll file exists.
72
+ should we read current .roll file and use as defaults? (103)
73
+ * TODO: Should we also update a lib/version.rb file? (33)
74
+
75
+ == file://lib/reap/systems/svn.rb
76
+ * TODO: Allow for a way to dump the text-based Changelog to standard out. "$stdout" as the filename? (178)
77
+ * TODO: How to apply naming policy from here? (179)
78
+ * TODO: tie in Metadata#scm, but probably via project/scm.rb. (71)
79
+ * TODO: Perhaps format prefix, like:
80
+ prefix = prefix + '_' if prefix && prefix !~ /[_-]$/ (68)
81
+
82
+ == file://lib/reap/utilities.rb
83
+ * TODO: Make more robust. Probably needs to be fixed for Windows. (204)
84
+ * TODO: Make more robust. (217)
85
+ * TODO Dryrun test here or before folder creation? (274)
@@ -2,7 +2,11 @@
2
2
  title : Reap
3
3
  summary : Ruby Project Assistant
4
4
  description: >
5
- Reap is a Ruby project management system.
5
+ Reap is a Ruby-oriented project assitant applicaiton.
6
+ It provides tools developers commonly require
7
+ to manage projects, from scaffolding thru packaging
8
+ and releasing.
9
+
6
10
 
7
11
  project : reap
8
12
  author : Thomas Sawyer <transfire@gmail.com>
@@ -14,7 +18,14 @@ slogan : Reap Your Rewards
14
18
  exclude : [ pkg, work, doc, site, ri ]
15
19
 
16
20
  dependency :
17
- - [facets, ">= 2.3.0"]
21
+ - [facets, ">= 2.4.1"]
18
22
 
19
23
  libpath: lib/reap
20
24
 
25
+ hosts:
26
+ rubyforge: {}
27
+ rubytalk: {}
28
+ personal:
29
+ type: mailinglist
30
+ mailto: transfire@gmail.com
31
+