echo_cli 0.6.22 → 0.6.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d6b85ab3089231acf50fb16fa379c145fe269dc
4
- data.tar.gz: 479af41f845d3ef69a59cd5e148017d1b6071d18
3
+ metadata.gz: 4fbd07ab0c4ea7bab915e1c40cbcdb8404e5b895
4
+ data.tar.gz: a8df4959fdcd32362fdc46777f744f1e6d26d5b5
5
5
  SHA512:
6
- metadata.gz: 4131237a0635701a8d5f76c32b93c30d62e584b62d009cc252685e5c1b48bb0a4c714c2bd3e6b1d842c27a656b07bf6ba960030a4af0bc191f88e38b9b3478ae
7
- data.tar.gz: e0cc7373b95d1a4334b11f68fd3dc1c37f6f53b605cf24ec6d5aa51c38045c674d8c5dcb970553267ba97fa6fd92ae28329eb23a94950716b649ed540d573db6
6
+ metadata.gz: d7780c84587c12a3db91ebab183ea7107be797ab721213176959b56ddd39c1c6a7a4d7a434a03ddd7196f614835b7efa68d6c3145139445f63de352b92753e50
7
+ data.tar.gz: e3b12589d4ce0a17f43e26db795b17feabc264d3b2c691cc2f4eb7d49fea2900ac90d91df15d8afa7fbc350df836ba0c82fc2d7c056ee2897013e1006aef3c45
data/README.md CHANGED
@@ -141,6 +141,17 @@ Example:
141
141
  $ echo_cli help post
142
142
  ```
143
143
 
144
+ #### now
145
+ ```bash
146
+ $ echo_cli now
147
+ ```
148
+ Prints the current date/time in two formats: Epoch and human-readable.
149
+
150
+ Example:
151
+ ```bash
152
+ $ echo_cli now
153
+ ```
154
+
144
155
  #### post
145
156
  ```bash
146
157
  $ echo_cli post '<metric>' {number} {-q}
data/lib/echo_cli/cli.rb CHANGED
@@ -376,6 +376,24 @@ module Echo_cli
376
376
  puts "\nConverted timstamp: ".green + time.yellow
377
377
  return time
378
378
  end
379
+
380
+ desc "now", "The current time, in epoch and human-readable formats. Use \"echo_cli now\""
381
+
382
+ long_desc <<-LONGDESC
383
+ `echo_cli now` will present the current timestamp (based on your computer's local time) to more easily utilize the rest of the Echo CLI commands.
384
+
385
+ Epoch timestamp example: 1492186214
386
+
387
+ Human-readable date/time timestamp example: 2011-10-18T21:01:52-07:00
388
+
389
+ > $ echo_cli now
390
+
391
+ LONGDESC
392
+
393
+ def now
394
+ timestamp = Time.new.to_i.to_s
395
+ puts "\nCurrent Epoch time: ".green + timestamp.to_s.yellow + "\nCurrent time: ".green + Time.at(timestamp.to_i).to_datetime.to_s.yellow
396
+ end
379
397
  end
380
398
 
381
399
  class Helper
@@ -1,3 +1,3 @@
1
1
  module Echo_cli
2
- VERSION = "0.6.22"
2
+ VERSION = "0.6.23"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: echo_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.22
4
+ version: 0.6.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Raphael