tepoch 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/tepoch +2 -7
  3. data/lib/tepoch/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0f14e563cc475a7aaa54329b7828626d34cd86b
4
- data.tar.gz: 13316e185d45ec84ed9a9be5e1c3010c010b6c0e
3
+ metadata.gz: 5ce9f3b81f3058ca271bb33e8aab091a5d936eff
4
+ data.tar.gz: 9b245e41282a23f1333cfb80a6d1b1c6beed5953
5
5
  SHA512:
6
- metadata.gz: ea1d2297366ea4837c9465889aef16ac3fd93686b78544e4ca20193698c7fafd567e5c41604c22118c1cac8367c4a3d713833041668853d85c7847b941cc4a8c
7
- data.tar.gz: b81d7eee040dd2bb8889de9ef1594436f7bfcb8a4584c9f26ab308f715d510e5ba6c32b8c7fc3cb3a45a01b9f1e3dec9b6eb3aecc29f0ef811c3ccbda8f6087a
6
+ metadata.gz: 6194dac4f69f41b89e8aae585c63dd862449b42fc5f8789aa78ef614eb7f677f376da09c470cbb91339e476d18270c30d1d50ba4b18ec0fc69c50b4fb26b44bf
7
+ data.tar.gz: f8756ad6be4616c569f5b14224ad06ef5f6641b07e3af36618e217ae3974adbcd35c13f131e4ae1e92fba414bd63bdc4bc2a1ba48a1a077d5dde10081787c1a7
data/bin/tepoch CHANGED
@@ -16,19 +16,14 @@ OptionParser.new do |opts|
16
16
  end
17
17
  end.parse!
18
18
 
19
- arithmetic_symbols = %w(- +)
19
+ arithmetic_symbols = %w(-)
20
20
  if ARGV[1] && arithmetic_symbols.include?(ARGV[1])
21
21
  t1 = ARGV[0].to_i
22
22
  t2 = ARGV[2].to_i
23
23
 
24
24
  diff = t1.send(ARGV[1], t2)
25
25
 
26
- if ARGV[1] == "-"
27
- puts Tepoch::Tepoch.seconds_to_string(diff)
28
- else
29
- puts options[:keep_as_timestamp] ? diff.to_i : Tepoch::Tepoch.to_time(diff, options[:utc])
30
- end
31
-
26
+ puts (options[:keep_as_timestamp]) ? diff : Tepoch::Tepoch.seconds_to_string(diff)
32
27
  else
33
28
  if options[:keep_as_timestamp]
34
29
  puts ARGV
@@ -2,7 +2,7 @@ module Tepoch
2
2
  class Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].compact.join(".")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tepoch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Jorgensen