calderin 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/calderin +7 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1058c91e1e2fe73067b2ff64ffec60ff124a2ac
4
- data.tar.gz: 58b8be1cc97789f285edf068e818d0484b5beb95
3
+ metadata.gz: 01a6a91d91c5711d836c4a0f589cb26f1843fbac
4
+ data.tar.gz: 43c74bd3469984f537321f8530999e5490723919
5
5
  SHA512:
6
- metadata.gz: 7169c860c5cd5736dfd8b7f6add34fc72c9e404ce32aea6565828952a656150c188574204d3c03d1f6d48870fbf22086607974c6c60058f388c9e76a453198e3
7
- data.tar.gz: 380befcc6305f1672944a91ea65d24a1c03551ec0a8624ed93ba26ce91b1597a8f4ab64f9503813792bed515587a9edb33db3e411b6c23a0388aed615c25863f
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(ENV['HOME'], ".pondrc")
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calderin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PoTe