memo 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +1 -0
  2. data/bin/memo +31 -0
  3. metadata +68 -0
data/README ADDED
@@ -0,0 +1 @@
1
+ Readme file
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/ruby
2
+
3
+ MEMO_FILE = File.join(ENV['HOME'], '.memo/memos')
4
+
5
+ unless File.exists?(MEMO_FILE)
6
+ unless File.exists? File.join(ENV['HOME'], '.memo')
7
+ Dir.mkdir(File.join(ENV['HOME'], '.memo'))
8
+ File.new(MEMO_FILE, 'w+')
9
+ end
10
+ end
11
+
12
+ def push(arg)
13
+ File.open(MEMO_FILE,'a') do |f|
14
+ f.puts arg
15
+ end
16
+ end
17
+
18
+ def pop
19
+ File.open(MEMO_FILE,'r') do |f|
20
+ f.readlines.reverse.each do |line|
21
+ print line
22
+ STDIN.readline
23
+ end
24
+ end
25
+ end
26
+
27
+ if (arg = ARGV.shift)
28
+ push arg
29
+ else
30
+ pop
31
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: memo
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Matt Manning
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-01-02 00:00:00 -05:00
19
+ default_executable: memo
20
+ dependencies: []
21
+
22
+ description: A memo pad to store your ideas
23
+ email: matt.manning@gmail.com
24
+ executables:
25
+ - memo
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - bin/memo
32
+ - README
33
+ has_rdoc: true
34
+ homepage: ""
35
+ licenses: []
36
+
37
+ post_install_message:
38
+ rdoc_options: []
39
+
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ hash: 3
48
+ segments:
49
+ - 0
50
+ version: "0"
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ requirements: []
61
+
62
+ rubyforge_project: memo
63
+ rubygems_version: 1.4.1
64
+ signing_key:
65
+ specification_version: 3
66
+ summary: A memo pad to store your ideas
67
+ test_files: []
68
+