calderin 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/calderin +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01a6a91d91c5711d836c4a0f589cb26f1843fbac
|
4
|
+
data.tar.gz: 43c74bd3469984f537321f8530999e5490723919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9fbdb494e352efddf2805c4335936a2dae2597e2693e305679ea10d56e50d4a4da6c8e3bb49692ea8d36b68f882154acd65288680cfddc054ca7c6180c3e1ea
|
7
|
+
data.tar.gz: 0ba557a2f68dd1517c7c09d2fc07494b3cbede49058be089a666437355d3c35120de236bc2375a69c6e3a198fcbce87142414f9e6c670f60f0172aa1f48f8759
|
data/bin/calderin
CHANGED
@@ -4,9 +4,12 @@ require 'clap'
|
|
4
4
|
require 'toml'
|
5
5
|
require 'securerandom'
|
6
6
|
require 'rest-client'
|
7
|
+
require 'time'
|
7
8
|
|
8
|
-
config_file = File.join(
|
9
|
+
config_file = File.join(Dir.home, '.pondrc')
|
9
10
|
pond_name = nil
|
11
|
+
pond_directory = File.join(Dir.home, '.pond')
|
12
|
+
Dir.mkdir(pond_directory) unless Dir.exists?(pond_directory)
|
10
13
|
|
11
14
|
Clap.run ARGV,
|
12
15
|
'-c' => lambda { |param| config_file = param },
|
@@ -43,5 +46,8 @@ when 'get'
|
|
43
46
|
messages = JSON.parse(RestClient.get(pond_url))
|
44
47
|
|
45
48
|
messages.each do |message|
|
49
|
+
`echo #{ message } | gpg --decrypt --output #{File.join(pond_directory, Time.now.strftime('%Y-%m-%d') + '_' + SecureRandom.hex) } && echo >> New Message`
|
46
50
|
end
|
51
|
+
when 'inbox'
|
52
|
+
system "#{ ENV['EDITOR'] || 'vi' } #{ pond_directory }"
|
47
53
|
end
|