ratch 0.4.1 → 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.
Files changed (107) hide show
  1. data/COPYING +17 -669
  2. data/HISTORY +6 -0
  3. data/MANIFEST +36 -0
  4. data/METADATA +14 -0
  5. data/NEWS +7 -0
  6. data/README +67 -17
  7. data/bin/ratch +5 -78
  8. data/demo/tryme-task.ratch +12 -0
  9. data/demo/tryme1.ratch +6 -0
  10. data/lib/ratch/core_ext.rb +6 -0
  11. data/lib/ratch/core_ext/facets.rb +1 -0
  12. data/lib/ratch/core_ext/filetest.rb +52 -0
  13. data/lib/ratch/core_ext/object.rb +8 -0
  14. data/lib/ratch/core_ext/pathname.rb +38 -0
  15. data/lib/ratch/core_ext/string.rb +44 -0
  16. data/lib/ratch/{dsl/console.rb → core_ext/to_console.rb} +2 -76
  17. data/lib/ratch/core_ext/to_list.rb +29 -0
  18. data/lib/ratch/dsl.rb +494 -49
  19. data/lib/ratch/index.rb +4 -0
  20. data/lib/ratch/io.rb +116 -0
  21. data/lib/ratch/pathglob.rb +73 -0
  22. data/lib/ratch/plugin.rb +55 -0
  23. data/lib/ratch/runmode.rb +69 -0
  24. data/lib/ratch/script.rb +52 -0
  25. data/lib/ratch/service.rb +33 -0
  26. data/lib/ratch/task.rb +249 -0
  27. data/lib/ratch/task2.rb +298 -0
  28. data/test/README +1 -0
  29. data/test/test_helper.rb +4 -0
  30. data/test/test_task.rb +46 -0
  31. metadata +90 -150
  32. data/CHANGES +0 -22
  33. data/TODO +0 -2
  34. data/bin/lt +0 -56
  35. data/bin/ludo +0 -14
  36. data/bin/manifest +0 -451
  37. data/bin/ratch-find +0 -21
  38. data/demo/WILMA +0 -1
  39. data/demo/XR +0 -9
  40. data/demo/lib/foo/foo.rb +0 -7
  41. data/demo/p.rb +0 -9
  42. data/demo/r.rb +0 -6
  43. data/demo/t.rb +0 -3
  44. data/demo/task/config.yaml +0 -4
  45. data/demo/task/one +0 -6
  46. data/demo/task/simplebuild +0 -15
  47. data/demo/task/stats +0 -4
  48. data/demo/task/task +0 -6
  49. data/demo/task/tryme +0 -10
  50. data/lib/ratch/dsl/argv.rb +0 -112
  51. data/lib/ratch/dsl/batch.rb +0 -232
  52. data/lib/ratch/dsl/build.rb +0 -174
  53. data/lib/ratch/dsl/email.rb +0 -108
  54. data/lib/ratch/dsl/file.rb +0 -205
  55. data/lib/ratch/dsl/meta.rb +0 -125
  56. data/lib/ratch/dsl/options.rb +0 -98
  57. data/lib/ratch/dsl/setup.rb +0 -124
  58. data/lib/ratch/dsl/sign.rb +0 -243
  59. data/lib/ratch/dsl/stage.rb +0 -147
  60. data/lib/ratch/dsl/task.rb +0 -139
  61. data/lib/ratch/dsl/upload.rb +0 -436
  62. data/lib/ratch/dsl/zip.rb +0 -59
  63. data/lib/ratch/extra/email.rb +0 -5
  64. data/lib/ratch/extra/stage.rb +0 -5
  65. data/lib/ratch/extra/zip.rb +0 -5
  66. data/lib/ratch/manager.rb +0 -53
  67. data/lib/ratch/manifest.rb +0 -540
  68. data/lib/ratch/metadata/information.rb +0 -258
  69. data/lib/ratch/metadata/package.rb +0 -108
  70. data/lib/ratch/metadata/project.rb +0 -523
  71. data/lib/ratch/metadata/release.rb +0 -108
  72. data/lib/ratch/support/errors.rb +0 -4
  73. data/lib/ratch/support/filename.rb +0 -18
  74. data/lib/ratch/support/filetest.rb +0 -29
  75. data/lib/ratch/toolset/ruby/announce +0 -224
  76. data/lib/ratch/toolset/ruby/compile +0 -49
  77. data/lib/ratch/toolset/ruby/install +0 -77
  78. data/lib/ratch/toolset/ruby/notes +0 -185
  79. data/lib/ratch/toolset/ruby/pack/gem +0 -93
  80. data/lib/ratch/toolset/ruby/pack/tgz +0 -46
  81. data/lib/ratch/toolset/ruby/pack/zip +0 -46
  82. data/lib/ratch/toolset/ruby/publish +0 -57
  83. data/lib/ratch/toolset/ruby/release +0 -8
  84. data/lib/ratch/toolset/ruby/setup +0 -1616
  85. data/lib/ratch/toolset/ruby/stamp +0 -33
  86. data/lib/ratch/toolset/ruby/stats +0 -138
  87. data/lib/ratch/toolset/ruby/test/crosstest +0 -305
  88. data/lib/ratch/toolset/ruby/test/extest +0 -129
  89. data/lib/ratch/toolset/ruby/test/isotest +0 -293
  90. data/lib/ratch/toolset/ruby/test/load +0 -39
  91. data/lib/ratch/toolset/ruby/test/loadtest +0 -28
  92. data/lib/ratch/toolset/ruby/test/syntax +0 -29
  93. data/lib/ratch/toolset/ruby/test/test +0 -26
  94. data/lib/ratch/toolset/sandbox/query +0 -11
  95. data/man/ratch.man +0 -73
  96. data/meta/MANIFEST +0 -130
  97. data/meta/config.yaml +0 -9
  98. data/meta/icli.yaml +0 -16
  99. data/meta/project.yaml +0 -20
  100. data/meta/ratch.roll +0 -2
  101. data/meta/xProjectInfo +0 -41
  102. data/task/clobber/package +0 -10
  103. data/task/man +0 -14
  104. data/task/publish +0 -57
  105. data/task/release +0 -9
  106. data/task/setup +0 -1616
  107. data/task/stats +0 -138
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- main :syntax do
4
- scripts = "lib/**/*.rb"
5
- libpath = [ 'lib/methods', 'lib/core', 'lib/more' ].join(':')
6
-
7
- checklist = []
8
- cnt = 0
9
- scripts = multiglob(*scripts) #- multiglob_r(ignore)
10
- scripts.each do |s|
11
- next unless File.file?(s)
12
- #if not system "ruby -c -Ibin:lib:test #{s} &> /dev/null" then
13
- if r = system "ruby -I#{libpath} #{s} > /dev/null"
14
- puts "#{s} [PASS]" #if verbose?
15
- else
16
- puts "Load Issue: #{s}"
17
- checklist << :load
18
- cnt += 1
19
- end
20
- end
21
-
22
- if cnt == 0
23
- puts "Load dependencies check out."
24
- else
25
- puts "#{cnt} Load Failures:\n "
26
- puts checklist.join("\n ")
27
- end
28
- end
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- main :syntax do
4
- scripts = "lib/**/*.rb"
5
- libpath = [ 'lib/methods', 'lib/core', 'lib/more' ].join(':')
6
-
7
- checklist = []
8
- cnt = 0
9
- scripts = multiglob(*scripts) #- multiglob_r(ignore)
10
- scripts.each do |s|
11
- next unless File.file?(s)
12
- #if not system "ruby -c -Ibin:lib:test #{s} &> /dev/null" then
13
- r = system "ruby -c -I#{libpath} #{s} > /dev/null"
14
- if r
15
- puts "#{s} [PASS]" #if verbose?
16
- else
17
- puts "Syntax Error: #{s}"
18
- checklist << :syntax
19
- cnt += 1
20
- end
21
- end
22
-
23
- if cnt == 0
24
- puts "Syntax checks out."
25
- else
26
- puts "#{cnt} Syntax Failures:\n "
27
- puts checklist.join("\n ")
28
- end
29
- end
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- # Run unit tests
4
-
5
- live = ARGV.delete('--live')
6
-
7
- unless live
8
- $LOAD_PATH.unshift(File.expand_path('lib/methods'))
9
- $LOAD_PATH.unshift(File.expand_path('lib/core'))
10
- $LOAD_PATH.unshift(File.expand_path('lib/more'))
11
- end
12
-
13
- main :test do
14
- if find = argv[0]
15
- unless file?(find)
16
- find = File.join(find, '**', 'test_*.rb')
17
- end
18
- else
19
- find = 'test/**/test_*.rb'
20
- end
21
-
22
- Dir.glob(find).each do |file|
23
- next if dir?(file)
24
- load file
25
- end
26
- end
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- puts
4
- puts "[Directories]"
5
- puts "root: " + root_directory
6
- puts "call: " + call_directory
7
- puts "batch: " + batch_directory
8
- puts
9
- puts "[Configuration]"
10
- y configuration
11
- puts
@@ -1,73 +0,0 @@
1
- .\" TITLE: Ratch Man Page
2
- .\"
3
- .\" SECTION: 1
4
- .\"
5
- .\" NAME:
6
- .\" ratch - ruby-based batch files
7
- .\"
8
- .\" SYNOPSIS: |
9
- .\" ratch [-n] [-h] [file]
10
- .\"
11
- .\" DESCRIPTION: |
12
- .\" Ratch is batch file system using a Ruby=based DSL.
13
- .\"
14
- .\" OPTIONS: |
15
- .\" -h help This option displays help.
16
- .\" -n dryrun Dry-run/no-harm mode.
17
- .\"
18
- .\" ENVIRONMENT: |
19
- .\" PAGER name of paging command, usually more(1), or less(1). If not set
20
- .\" falls back to more(1).
21
- .\"
22
- .\" EXAMPLES: |
23
- .\" Try this command to format this text itself:
24
- .\"
25
- .\" $ txt2man -h 2>&1 | txt2man -T
26
- .\"
27
- .\" HINTS: >
28
- .\" To obtain an overall good formating of output document, keep paragraphs
29
- .\" indented correctly. If you have unwanted bold sections, search for
30
- .\" multiple spaces between words, which are used to identify a tag list
31
- .\" (term followed by a description). Choose also carefully the name of
32
- .\" command line or function parameters, as they will be emphasized each
33
- .\" time they are encountered in the document.
34
- .\"
35
- .\" SEE ALSO:
36
- .\" man(1), mandoc(7), rman(1), groff(1), more(1), gxditview(1), troff(1).
37
- .\"
38
- .\" BUGS:
39
- .\" Automatic probe (-p option) works only if input is a regular file (i.e. not stdin).
40
- .\"
41
- .\" AUTHOR:
42
- .\" Trans <transfire@gmail,com>
43
- .TH man 1 "08 November 2007" "1.0" "Ratch Man Page"
44
- .SH NAME
45
- ratch \- ruby-based batch files
46
- .SH SYNOPSIS
47
- .B ratch [-n] [-h] [file]
48
- .SH DESCRIPTION
49
- Ratch is batch file system using a Ruby=based DSL.
50
- .SH OPTIONS
51
- -h help This option displays help.
52
- -n dryrun Dry-run/no-harm mode.
53
- .SH HINTS
54
- To obtain an overall good formating of output document, keep paragraphs indented correctly. If you have unwanted bold sections, search for multiple spaces between words, which are used to identify a tag list (term followed by a description). Choose also carefully the name of command line or function parameters, as they will be emphasized each time they are encountered in the document.
55
- .SH ENVIRONMENT
56
- PAGER name of paging command, usually more(1), or less(1). If not set
57
- falls back to more(1).
58
- .SH BUGS
59
- Automatic probe (-p option) works only if input is a regular file (i.e. not stdin).
60
- .SH SEE ALSO
61
- .BR man(1),
62
- .BR mandoc(7),
63
- .BR rman(1),
64
- .BR groff(1),
65
- .BR more(1),
66
- .BR gxditview(1),
67
- .BR troff(1).,
68
- .SH EXAMPLES
69
- Try this command to format this text itself:
70
-
71
- $ txt2man \-h 2>&1 | txt2man \-T
72
- .SH AUTHOR
73
- Trans <transfire@gmail,com>
@@ -1,130 +0,0 @@
1
- # -x doc -x pkg -x scrap
2
- CHANGES
3
- COPYING
4
- README
5
- TODO
6
- bin
7
- bin/lt
8
- bin/ludo
9
- bin/manifest
10
- bin/ratch
11
- bin/ratch-find
12
- demo
13
- demo/WILMA
14
- demo/XR
15
- demo/doc
16
- demo/lib
17
- demo/lib/foo
18
- demo/lib/foo/foo.rb
19
- demo/p.rb
20
- demo/r.rb
21
- demo/t.rb
22
- demo/task
23
- demo/task/config.yaml
24
- demo/task/one
25
- demo/task/rdoc
26
- demo/task/rdoc-old
27
- demo/task/simplebuild
28
- demo/task/stats
29
- demo/task/task
30
- demo/task/tryme
31
- lib
32
- lib/ratch
33
- lib/ratch/dsl
34
- lib/ratch/dsl/argv.rb
35
- lib/ratch/dsl/batch.rb
36
- lib/ratch/dsl/build.rb
37
- lib/ratch/dsl/console.rb
38
- lib/ratch/dsl/email.rb
39
- lib/ratch/dsl/file.rb
40
- lib/ratch/dsl/meta.rb
41
- lib/ratch/dsl/options.rb
42
- lib/ratch/dsl/setup.rb
43
- lib/ratch/dsl/sign.rb
44
- lib/ratch/dsl/stage.rb
45
- lib/ratch/dsl/task.rb
46
- lib/ratch/dsl/upload.rb
47
- lib/ratch/dsl/zip.rb
48
- lib/ratch/dsl.rb
49
- lib/ratch/extra
50
- lib/ratch/extra/email.rb
51
- lib/ratch/extra/stage.rb
52
- lib/ratch/extra/zip.rb
53
- lib/ratch/manager.rb
54
- lib/ratch/manifest.rb
55
- lib/ratch/metadata
56
- lib/ratch/metadata/information.rb
57
- lib/ratch/metadata/package.rb
58
- lib/ratch/metadata/project.rb
59
- lib/ratch/metadata/release.rb
60
- lib/ratch/support
61
- lib/ratch/support/errors.rb
62
- lib/ratch/support/filename.rb
63
- lib/ratch/support/filetest.rb
64
- lib/ratch/toolset
65
- lib/ratch/toolset/ruby
66
- lib/ratch/toolset/ruby/announce
67
- lib/ratch/toolset/ruby/clobber
68
- lib/ratch/toolset/ruby/clobber/rdoc
69
- lib/ratch/toolset/ruby/compile
70
- lib/ratch/toolset/ruby/doc
71
- lib/ratch/toolset/ruby/doc/zip
72
- lib/ratch/toolset/ruby/install
73
- lib/ratch/toolset/ruby/notes
74
- lib/ratch/toolset/ruby/pack
75
- lib/ratch/toolset/ruby/pack/gem
76
- lib/ratch/toolset/ruby/pack/tgz
77
- lib/ratch/toolset/ruby/pack/zip
78
- lib/ratch/toolset/ruby/publish
79
- lib/ratch/toolset/ruby/rdoc
80
- lib/ratch/toolset/ruby/release
81
- lib/ratch/toolset/ruby/setup
82
- lib/ratch/toolset/ruby/stamp
83
- lib/ratch/toolset/ruby/stats
84
- lib/ratch/toolset/ruby/svn
85
- lib/ratch/toolset/ruby/svn/log
86
- lib/ratch/toolset/ruby/svn/tag
87
- lib/ratch/toolset/ruby/svn/xlog
88
- lib/ratch/toolset/ruby/test
89
- lib/ratch/toolset/ruby/test/crosstest
90
- lib/ratch/toolset/ruby/test/extest
91
- lib/ratch/toolset/ruby/test/isotest
92
- lib/ratch/toolset/ruby/test/load
93
- lib/ratch/toolset/ruby/test/loadtest
94
- lib/ratch/toolset/ruby/test/syntax
95
- lib/ratch/toolset/ruby/test/test
96
- lib/ratch/toolset/sandbox
97
- lib/ratch/toolset/sandbox/query
98
- man
99
- man/ratch.man
100
- meta
101
- meta/MANIFEST
102
- meta/config.yaml
103
- meta/icli.yaml
104
- meta/project.yaml
105
- meta/ratch.roll
106
- meta/xProjectInfo
107
- task
108
- task/clobber
109
- task/clobber/package
110
- task/man
111
- task/publish
112
- task/rdoc
113
- task/release
114
- task/setup
115
- task/stats
116
- test
117
- test/fixtures
118
- work
119
- work/old
120
- work/old/batchfile.rb
121
- work/project-old.rb
122
- work/scrap
123
- work/scrap/install
124
- work/scrap/install.0
125
- work/scrap/install.1
126
- work/scrap/ludo
127
- work/scrap/oldtaskable.rb
128
- work/scrap/ratch.man
129
- work/scrap/taskable-simple.rb
130
- work/scrap/taskable.rb
@@ -1,9 +0,0 @@
1
-
2
- publish:
3
- project : ratchets
4
- username : transami
5
-
6
- rdoc:
7
- main: README
8
- output: doc/rdoc
9
-
@@ -1,16 +0,0 @@
1
- ---
2
- rubyforge:
3
- project : ratchets
4
- username : transami
5
-
6
- release:
7
- store : pkg
8
- package : ratch
9
- notelog : README
10
- changelog : CHANGES
11
-
12
- publish: {}
13
-
14
- announce:
15
- message: README
16
-
@@ -1,20 +0,0 @@
1
- ---
2
-
3
- title : Ratch
4
- summary : Ruby Batch Files
5
-
6
- description: >
7
- Ratch is batch-file system suitable for creating project build scripts
8
- and any variety of project-oriented command line utilities.
9
-
10
- author : Thomas Sawyer <transfire@gmail.com>
11
- created : "2007-08-09"
12
- homepage : "http://ratchets.rubyforge.org"
13
- repository : "http://ratchets.rubyforge.org/svn"
14
- slogan : Ratch It Up!
15
-
16
- exclude : [ pkg, work, doc ]
17
- dependency :
18
- - [facets, ">= 2.1.0"]
19
-
20
-
@@ -1,2 +0,0 @@
1
- ratch 0.4.1 beta (2007-11-18)
2
- lib/ratch
@@ -1,41 +0,0 @@
1
- ---
2
-
3
- title : Ratchets
4
- summary : Ruby Developer's Tool
5
- description: >
6
- Ratcehts is a set a colelction of tools and libraries
7
- geared toward the ruby developer.
8
-
9
- project : ratchets
10
- version : '1.0'
11
- author : Thomas Sawyer <transfire@gmail.com>
12
- created : "2006-08-09"
13
- homepage : "http://ratchets.rubyforge.org"
14
- download : "https://rubyforge.org/frs/?group_id=2144"
15
- repository : "http://ratchets.rubyforge.org/src"
16
- signiture : "_privkey.pem"
17
- slogan : ~
18
-
19
- rubyforge:
20
- project : ratchets
21
- username : transami
22
- groupid : 2144
23
- package : project
24
-
25
- archive : "~/ruby/ARCHIVE"
26
-
27
- host:
28
- domain : rubyforge.org
29
- root : /var/www/gforge-projects/ratchets
30
- user : transami
31
-
32
- mail:
33
- server : smtp.gmail.com
34
- mail_from : transfire@gmail.com
35
- mail_to : transfire@gmail.com
36
-
37
- tasks : [ publish, archive, announce ]
38
-
39
- publish:
40
- files : [ -script, -_privkey.pem, -**/*/pkg ]
41
-
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- # Remove package products.
4
-
5
- main :clobber_packaging do
6
- glob("pkg/*").each do |f|
7
- rm_r(f)
8
- end
9
- end
10
-
data/task/man DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- # generate man pages
4
-
5
- require 'ratchets/doc/man'
6
-
7
- main :man do
8
- cd 'man' do
9
- files = glob('*.man')
10
- files.each do |file|
11
- ManPage.generate(file, :dryrun=>dryrun?)
12
- end
13
- end
14
- end
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env ratch
2
-
3
- # publish website to rubyforge
4
- #
5
- # This task publishes the source dir (deafult 'doc')
6
- # to a rubyforge website.
7
-
8
- main :publish do
9
- config = configuration['publish']
10
-
11
- project = config['project']
12
- subdir = config['subdir']
13
- source = config['source'] || "doc"
14
- username = config['username'] || ENV['RUBYFORGE_USERNAME']
15
- clear = config['clear']
16
-
17
- if clear
18
- protect = config['protect'].to_a
19
- exclude = config['exclude'].to_a
20
- else
21
- protect = %w{usage statcvs statsvn robot.txt wiki} + config['protect'].to_a
22
- exclude = %w{.svn} + config['exclude'].to_a
23
- end
24
-
25
- abort "no project" unless project
26
- abort "no username" unless username
27
-
28
- if subdir
29
- destination = File.join(project, subdir)
30
- else
31
- destination = project
32
- end
33
-
34
- dir = source.chomp('/') + '/'
35
- url = "#{username}@rubyforge.org:/var/www/gforge-projects/#{destination}"
36
-
37
- op = ['-rLvz', '--delete-after'] # maybe -p ?
38
-
39
- # Using commandline filter options didn't seem
40
- # to work, so I opted for creating an .rsync_filter file for
41
- # all cases.
42
-
43
- unless protect.empty? && exclude.empty?
44
- rsync_file = File.join(source,'.rsync-filter')
45
- unless file?(rsync_file)
46
- File.open(rsync_file, 'w') do |f|
47
- exclude.each{|e| f << "- #{e}\n"}
48
- protect.each{|e| f << "P #{e}\n"}
49
- end
50
- end
51
- op << "--filter='dir-merge #{rsync_file}'"
52
- end
53
-
54
- args = op + [dir, url]
55
-
56
- rsync(*args.to_params)
57
- end