ratch 1.1.0 → 1.2.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 (86) hide show
  1. data/.ruby +99 -0
  2. data/COPYING +203 -21
  3. data/History.rdoc +35 -0
  4. data/License.txt +204 -0
  5. data/README.rdoc +113 -0
  6. data/Version +1 -0
  7. data/bin/ludo +16 -0
  8. data/bin/ratch +1 -8
  9. data/lib/ratch.rb +28 -0
  10. data/lib/ratch.yml +99 -0
  11. data/lib/ratch/batch.rb +500 -0
  12. data/lib/ratch/console.rb +199 -0
  13. data/lib/ratch/core_ext.rb +1 -4
  14. data/lib/ratch/core_ext/facets.rb +15 -1
  15. data/lib/ratch/core_ext/filetest.rb +29 -0
  16. data/lib/ratch/core_ext/{string.rb → to_actual_filename.rb} +0 -23
  17. data/lib/ratch/core_ext/to_console.rb +30 -12
  18. data/lib/ratch/core_ext/{object.rb → to_yamlfrag.rb} +1 -0
  19. data/lib/ratch/core_ext/unfold_paragraphs.rb +27 -0
  20. data/lib/ratch/file_list.rb +411 -0
  21. data/lib/ratch/script.rb +99 -5
  22. data/lib/ratch/script/help.rb +84 -0
  23. data/lib/ratch/shell.rb +783 -0
  24. data/lib/ratch/system.rb +15 -0
  25. data/lib/ratch/utils/cli.rb +49 -0
  26. data/lib/ratch/utils/config.rb +52 -0
  27. data/lib/ratch/{emailer.rb → utils/email.rb} +43 -6
  28. data/lib/ratch/utils/ftp.rb +134 -0
  29. data/lib/ratch/utils/pom.rb +22 -0
  30. data/lib/ratch/utils/rdoc.rb +48 -0
  31. data/lib/ratch/utils/tar.rb +88 -0
  32. data/lib/ratch/utils/xdg.rb +39 -0
  33. data/lib/ratch/utils/zlib.rb +54 -0
  34. data/spec/01_shell.rdoc +198 -0
  35. data/spec/02_script.rdoc +34 -0
  36. data/spec/03_batch.rdoc +71 -0
  37. data/spec/04_system.rdoc +3 -0
  38. data/spec/applique/array.rb +8 -0
  39. data/spec/applique/setup.rb +20 -0
  40. data/test/case_batch.rb +63 -0
  41. data/test/case_shell.rb +46 -0
  42. data/test/core_ext/case_pathname.rb +361 -0
  43. data/test/helper.rb +4 -0
  44. data/test/utils/case_cli.rb +6 -0
  45. data/test/utils/case_config.rb +12 -0
  46. data/test/utils/case_email.rb +10 -0
  47. data/test/utils/case_ftp.rb +6 -0
  48. data/test/utils/case_pom.rb +17 -0
  49. data/test/utils/case_rdoc.rb +23 -0
  50. data/test/utils/case_tar.rb +6 -0
  51. data/test/utils/case_zlib.rb +11 -0
  52. data/test/utils/fixtures/pom_sample/Profile +4 -0
  53. data/test/utils/fixtures/rdoc_sample/README.rdoc +4 -0
  54. data/test/utils/fixtures/rdoc_sample/lib/rdoc_sample/rdoc_sample.rb +9 -0
  55. metadata +139 -82
  56. data/HISTORY +0 -6
  57. data/MANIFEST +0 -53
  58. data/NEWS +0 -12
  59. data/README +0 -87
  60. data/VERSION +0 -1
  61. data/demo/tryme-task.ratch +0 -12
  62. data/demo/tryme1.ratch +0 -6
  63. data/doc/log/basic_stats/index.html +0 -39
  64. data/doc/log/notes.xml +0 -18
  65. data/doc/log/stats.log +0 -14
  66. data/doc/log/syntax.log +0 -0
  67. data/doc/log/testunit.log +0 -156
  68. data/lib/ratch/commandline.rb +0 -16
  69. data/lib/ratch/core_ext/pathname.rb +0 -38
  70. data/lib/ratch/dsl.rb +0 -420
  71. data/lib/ratch/index.rb +0 -4
  72. data/lib/ratch/io.rb +0 -116
  73. data/lib/ratch/plugin.rb +0 -65
  74. data/lib/ratch/service.rb +0 -33
  75. data/lib/ratch/task.rb +0 -249
  76. data/lib/ratch/task2.rb +0 -298
  77. data/meta/abstract +0 -4
  78. data/meta/author +0 -1
  79. data/meta/contact +0 -1
  80. data/meta/homepage +0 -1
  81. data/meta/name +0 -1
  82. data/meta/requires +0 -4
  83. data/meta/summary +0 -1
  84. data/test/README +0 -1
  85. data/test/test_helper.rb +0 -4
  86. data/test/test_task.rb +0 -46
@@ -0,0 +1,17 @@
1
+ require 'ratch'
2
+
3
+ KO.case "Ratch::POMUtils" do
4
+
5
+ def initialize
6
+ stage_copy 'fixtures/pom_sample'
7
+
8
+ @shell = Ratch::Shell.new
9
+ @shell.extend(Ratch::POMUtils)
10
+ end
11
+
12
+ test :project do
13
+ @shell.project.is_a?(::POM::Project)
14
+ end
15
+
16
+ end
17
+
@@ -0,0 +1,23 @@
1
+ require 'ratch'
2
+
3
+ KO.case "Ratch::RDocUtils" do
4
+
5
+ def initialize #before :all do
6
+ @shell = Ratch::Shell.new
7
+ @shell.extend(Ratch::RDocUtils)
8
+ end
9
+
10
+ setup do
11
+ stage_copy 'fixtures/rdoc_sample'
12
+ end
13
+
14
+ test "#rdoc" do
15
+ @shell.rdoc('README.rdoc', 'lib')
16
+ File.directory?('doc') &&
17
+ File.directory?('doc/classes') &&
18
+ File.directory?('doc/files') &&
19
+ File.file?('doc/classes/RDocSample.html')
20
+ end
21
+
22
+ end
23
+
@@ -0,0 +1,6 @@
1
+ # TODO
2
+
3
+ KO.case "Ratch::TarUtils" do
4
+
5
+ end
6
+
@@ -0,0 +1,11 @@
1
+ # TODO
2
+
3
+ KO.case "Ratch::RDocUtils" do
4
+
5
+ test "foo" do |val|
6
+ val
7
+ end
8
+
9
+ ok true
10
+ end
11
+
@@ -0,0 +1,4 @@
1
+ ---
2
+ name : pom_sample
3
+ title : POM Sample
4
+ version : 1.0
@@ -0,0 +1,4 @@
1
+ = RDOC Sample
2
+
3
+ This is a sample RDoc document used to test the RDoc utility.
4
+
@@ -0,0 +1,9 @@
1
+ # This is dummy module for testing the rdoc utility.
2
+ module RDocSample
3
+
4
+ # This is a dummy method for testing the rdoc utility.
5
+ def self.hello_world
6
+ puts "Hello World"
7
+ end
8
+
9
+ end
metadata CHANGED
@@ -1,144 +1,201 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ hash: 31
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 2
9
+ - 0
10
+ version: 1.2.0
5
11
  platform: ruby
6
12
  authors:
7
- - trans <transfire@gmail.com>
13
+ - Trans <transfire@gmail.com>
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2008-11-23 00:00:00 -05:00
18
+ date: 2011-03-03 00:00:00 -05:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: facets
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
29
+ hash: 41
30
+ segments:
31
+ - 2
32
+ - 9
33
+ - 1
34
+ version: 2.9.1
35
+ type: :runtime
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
- name: folio
38
+ name: minitar
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 13
46
+ segments:
47
+ - 0
48
+ - 5
49
+ - 3
50
+ version: 0.5.3
27
51
  type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: ko
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 31
62
+ segments:
63
+ - 1
64
+ - 2
65
+ - 0
66
+ version: 1.2.0
67
+ type: :development
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: qed
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
30
74
  requirements:
31
75
  - - ">="
32
76
  - !ruby/object:Gem::Version
77
+ hash: 3
78
+ segments:
79
+ - 0
33
80
  version: "0"
34
- version:
81
+ type: :development
82
+ version_requirements: *id004
35
83
  - !ruby/object:Gem::Dependency
36
- name: clio
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
84
+ name: syckle
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
87
+ none: false
40
88
  requirements:
41
89
  - - ">="
42
90
  - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
43
94
  version: "0"
44
- version:
45
- description: Ratch is a Ruby-based batch scripting language. It's a DSL over regular RUby to make the life of the batch script writter easier.
95
+ type: :development
96
+ version_requirements: *id005
97
+ description: Ratch is a Ruby-based batch scripting language. It's a DSL over regular Ruby to make the life of the batch script writter easier.
46
98
  email: transfire@gmail.com
47
99
  executables:
48
100
  - ratch
101
+ - ludo
49
102
  extensions: []
50
103
 
51
104
  extra_rdoc_files:
52
- - README
53
- - MANIFEST
54
- - HISTORY
55
- - VERSION
56
- - NEWS
57
- - COPYING
105
+ - README.rdoc
58
106
  files:
59
- - doc
60
- - doc/log
61
- - doc/log/basic_stats
62
- - doc/log/basic_stats/index.html
63
- - doc/log/stats.log
64
- - doc/log/notes.xml
65
- - doc/log/syntax.log
66
- - doc/log/testunit.log
67
- - MANIFEST
68
- - test
69
- - test/README
70
- - test/test_helper.rb
71
- - test/test_task.rb
72
- - README
73
- - HISTORY
74
- - meta
75
- - meta/homepage
76
- - meta/summary
77
- - meta/abstract
78
- - meta/name
79
- - meta/requires
80
- - meta/author
81
- - meta/contact
82
- - demo
83
- - demo/tryme1.ratch
84
- - demo/tryme-task.ratch
85
- - lib
86
- - lib/ratch
87
- - lib/ratch/commandline.rb
88
- - lib/ratch/emailer.rb
89
- - lib/ratch/core_ext
90
- - lib/ratch/core_ext/pathname.rb
91
- - lib/ratch/core_ext/object.rb
107
+ - .ruby
108
+ - bin/ludo
109
+ - bin/ratch
110
+ - lib/ratch/batch.rb
111
+ - lib/ratch/console.rb
92
112
  - lib/ratch/core_ext/facets.rb
93
- - lib/ratch/core_ext/to_list.rb
113
+ - lib/ratch/core_ext/filetest.rb
114
+ - lib/ratch/core_ext/to_actual_filename.rb
94
115
  - lib/ratch/core_ext/to_console.rb
95
- - lib/ratch/core_ext/string.rb
96
- - lib/ratch/dsl.rb
97
- - lib/ratch/service.rb
116
+ - lib/ratch/core_ext/to_list.rb
117
+ - lib/ratch/core_ext/to_yamlfrag.rb
118
+ - lib/ratch/core_ext/unfold_paragraphs.rb
98
119
  - lib/ratch/core_ext.rb
99
- - lib/ratch/io.rb
100
- - lib/ratch/index.rb
101
- - lib/ratch/plugin.rb
102
- - lib/ratch/task.rb
103
- - lib/ratch/task2.rb
120
+ - lib/ratch/file_list.rb
121
+ - lib/ratch/script/help.rb
104
122
  - lib/ratch/script.rb
105
- - VERSION
106
- - NEWS
107
- - bin
108
- - bin/ratch
109
- - man
123
+ - lib/ratch/shell.rb
124
+ - lib/ratch/system.rb
125
+ - lib/ratch/utils/cli.rb
126
+ - lib/ratch/utils/config.rb
127
+ - lib/ratch/utils/email.rb
128
+ - lib/ratch/utils/ftp.rb
129
+ - lib/ratch/utils/pom.rb
130
+ - lib/ratch/utils/rdoc.rb
131
+ - lib/ratch/utils/tar.rb
132
+ - lib/ratch/utils/xdg.rb
133
+ - lib/ratch/utils/zlib.rb
134
+ - lib/ratch.rb
135
+ - lib/ratch.yml
110
136
  - man/ratch.1
137
+ - spec/01_shell.rdoc
138
+ - spec/02_script.rdoc
139
+ - spec/03_batch.rdoc
140
+ - spec/04_system.rdoc
141
+ - spec/applique/array.rb
142
+ - spec/applique/setup.rb
143
+ - test/case_batch.rb
144
+ - test/case_shell.rb
145
+ - test/core_ext/case_pathname.rb
146
+ - test/helper.rb
147
+ - test/utils/case_cli.rb
148
+ - test/utils/case_config.rb
149
+ - test/utils/case_email.rb
150
+ - test/utils/case_ftp.rb
151
+ - test/utils/case_pom.rb
152
+ - test/utils/case_rdoc.rb
153
+ - test/utils/case_tar.rb
154
+ - test/utils/case_zlib.rb
155
+ - test/utils/fixtures/pom_sample/Profile
156
+ - test/utils/fixtures/rdoc_sample/README.rdoc
157
+ - test/utils/fixtures/rdoc_sample/lib/rdoc_sample/rdoc_sample.rb
158
+ - README.rdoc
159
+ - History.rdoc
160
+ - Version
161
+ - License.txt
111
162
  - COPYING
112
163
  has_rdoc: true
113
- homepage: http://ratch.rubyforge.org
164
+ homepage: http://rubyworks.github.org/ratch
165
+ licenses:
166
+ - Apache 2.0
114
167
  post_install_message:
115
168
  rdoc_options:
116
- - --inline-source
117
169
  - --title
118
- - ratch api
170
+ - Ratch API
119
171
  - --main
120
- - README
172
+ - README.rdoc
121
173
  require_paths:
122
174
  - lib
123
175
  required_ruby_version: !ruby/object:Gem::Requirement
176
+ none: false
124
177
  requirements:
125
178
  - - ">="
126
179
  - !ruby/object:Gem::Version
180
+ hash: 3
181
+ segments:
182
+ - 0
127
183
  version: "0"
128
- version:
129
184
  required_rubygems_version: !ruby/object:Gem::Requirement
185
+ none: false
130
186
  requirements:
131
187
  - - ">="
132
188
  - !ruby/object:Gem::Version
189
+ hash: 3
190
+ segments:
191
+ - 0
133
192
  version: "0"
134
- version:
135
193
  requirements: []
136
194
 
137
195
  rubyforge_project: ratch
138
- rubygems_version: 1.2.0
196
+ rubygems_version: 1.3.7
139
197
  signing_key:
140
- specification_version: 2
141
- summary: Ratch is a Ruby-based batch scripting language.
198
+ specification_version: 3
199
+ summary: Ruby-based Batch Scripting
142
200
  test_files:
143
- - test/test_helper.rb
144
- - test/test_task.rb
201
+ - lib/ratch/core_ext/filetest.rb
data/HISTORY DELETED
@@ -1,6 +0,0 @@
1
- = Change History
2
-
3
- == 2008-08-16
4
-
5
- Initial public release.
6
-
data/MANIFEST DELETED
@@ -1,53 +0,0 @@
1
- doc
2
- doc/log
3
- doc/log/basic_stats
4
- doc/log/basic_stats/index.html
5
- doc/log/stats.log
6
- doc/log/notes.xml
7
- doc/log/syntax.log
8
- doc/log/testunit.log
9
- MANIFEST
10
- test
11
- test/README
12
- test/test_helper.rb
13
- test/test_task.rb
14
- README
15
- HISTORY
16
- meta
17
- meta/homepage
18
- meta/summary
19
- meta/abstract
20
- meta/name
21
- meta/requires
22
- meta/author
23
- meta/contact
24
- demo
25
- demo/tryme1.ratch
26
- demo/tryme-task.ratch
27
- lib
28
- lib/ratch
29
- lib/ratch/commandline.rb
30
- lib/ratch/emailer.rb
31
- lib/ratch/core_ext
32
- lib/ratch/core_ext/pathname.rb
33
- lib/ratch/core_ext/object.rb
34
- lib/ratch/core_ext/facets.rb
35
- lib/ratch/core_ext/to_list.rb
36
- lib/ratch/core_ext/to_console.rb
37
- lib/ratch/core_ext/string.rb
38
- lib/ratch/dsl.rb
39
- lib/ratch/service.rb
40
- lib/ratch/core_ext.rb
41
- lib/ratch/io.rb
42
- lib/ratch/index.rb
43
- lib/ratch/plugin.rb
44
- lib/ratch/task.rb
45
- lib/ratch/task2.rb
46
- lib/ratch/script.rb
47
- VERSION
48
- NEWS
49
- bin
50
- bin/ratch
51
- man
52
- man/ratch.1
53
- COPYING
data/NEWS DELETED
@@ -1,12 +0,0 @@
1
- This is the second public release of Ratch.
2
-
3
- Folio is now used a Ratch's backend. Folio handles
4
- a great deal of what Ratch requires, so much of Ratch
5
- is now just a thin wrapper around Folio.
6
-
7
- ### 1.1.0 / 2008-11-21
8
-
9
- * 1 Major Change
10
-
11
- * Overhauled system to use Folio on the backend.
12
-
data/README DELETED
@@ -1,87 +0,0 @@
1
- = Ratch -- Ruby-based Batch Scripts
2
-
3
- http://ratch.rubyforge.org
4
-
5
-
6
- == Introduction
7
-
8
- Ratch is Ruby-based DSL for building batch scripts. It's intent
9
- is to ease the burdone a batch script writers, by supplementing
10
- the standard ruby environamet to be more condusive the needs
11
- of batch scripting.
12
-
13
- In addition to using Ratch to write stand-alone batch scripts,
14
- it makes a very powerful library for other applications that
15
- require batch-like functionality. In general any program that
16
- access the file system extensively could benifit from it's use.
17
-
18
-
19
-
20
- == Installation
21
-
22
- Standard installation procedure apply.
23
-
24
- $ gem install ratch
25
-
26
- or manually
27
-
28
- $ tar -xzf ratch-1.0.0.tgz
29
- $ cd ratch-1.0.0
30
- $ setup-rb all
31
-
32
-
33
-
34
- == Usage
35
-
36
- To use for your own scripts, simply add a bang line.
37
-
38
- #!/usr/bin/env ratch
39
-
40
- On Windows, of course, you will want to associate the .ratch extension
41
- name to the ratch executable instead.
42
-
43
- To use Ratch as a library, simply require 'ratch', and subclass.
44
-
45
- require 'ratch'
46
-
47
- class MyClass < Ratch::Service
48
-
49
-
50
- end
51
-
52
- Ratch also provides a delegated service which automatically supplies
53
- method_missing() to delegate to the given *context*. This is called
54
- a Ratch Plugin.
55
-
56
- class MyClass < Ratch::Plugin
57
-
58
- end
59
-
60
- MyClass.new(context)
61
-
62
- For details on all the functionality Ratch provides, please refer to
63
- the API documentation.
64
-
65
-
66
-
67
- == Development
68
-
69
- You can use gitweb to browse the 'ratch' repository.
70
-
71
- To pull the 'ratch' repository anonymously, use:
72
-
73
- git clone git://rubyforge.org/ratch.git
74
-
75
-
76
- Developers: You can push to the 'ratch' repository using:
77
-
78
- gitosis@rubyforge.org:ratch.git
79
-
80
-
81
-
82
- == Copying
83
-
84
- Copyright (c) 2007, 2008 Tiger Ops & Thomas Sawyer
85
-
86
- Ratch is licensed under the terms of the MIT license.
87
-