recho 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +15 -0
  2. data/lib/recho.rb +10 -0
  3. data/recho.gemspec +26 -0
  4. metadata +57 -0
@@ -0,0 +1,15 @@
1
+ # echo
2
+
3
+ ## Usage
4
+
5
+ include FileUtils
6
+
7
+ require 'echo'
8
+
9
+ echo("foo msg") > "foofile"
10
+ echo("foo msg") >> "foofile"
11
+
12
+ or
13
+
14
+ FileUtils.echo("foo msg") > "foofile"
15
+ FileUtils.echo("foo msg") >> "foofile"
@@ -0,0 +1,10 @@
1
+ module FileUtils
2
+ def echo(msg, *opts)
3
+ msg << "\n" if !opts.include?(:n)
4
+ def msg.>(fname) ; w(fname, 'w') ; end
5
+ def msg.>>(fname) ; w(fname, 'a') ; end
6
+ def msg.w(fname, mode) ; open(fname, mode) {|f| f << self } ; self ; end
7
+ msg
8
+ end
9
+ module_function :echo
10
+ end
@@ -0,0 +1,26 @@
1
+ Gem::Specification.new do |s|
2
+ s.specification_version = 2 if s.respond_to? :specification_version=
3
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
+
5
+ s.name = 'recho'
6
+ s.version = '0.1.0'
7
+ s.date = '2009-10-28'
8
+
9
+ s.description = "echo(1) in ruby"
10
+ s.summary = s.description
11
+
12
+ s.authors = ["Blake Mizerany"]
13
+ s.email = "blake.mizerany@gmail.com"
14
+
15
+ s.files = %w[
16
+ README.md
17
+ recho.gemspec
18
+ lib/recho.rb
19
+ ]
20
+
21
+ s.extra_rdoc_files = %w[README.md]
22
+
23
+ s.homepage = "http://github.com/bmizerany/recho/"
24
+ s.require_paths = %w[lib]
25
+ s.rubygems_version = '1.1.1'
26
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: recho
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Blake Mizerany
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-28 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: echo(1) in ruby
17
+ email: blake.mizerany@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README.md
24
+ files:
25
+ - README.md
26
+ - recho.gemspec
27
+ - lib/recho.rb
28
+ has_rdoc: true
29
+ homepage: http://github.com/bmizerany/recho/
30
+ licenses: []
31
+
32
+ post_install_message:
33
+ rdoc_options: []
34
+
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: "0"
42
+ version:
43
+ required_rubygems_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: "0"
48
+ version:
49
+ requirements: []
50
+
51
+ rubyforge_project:
52
+ rubygems_version: 1.3.4
53
+ signing_key:
54
+ specification_version: 2
55
+ summary: echo(1) in ruby
56
+ test_files: []
57
+