touchpass 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -293,4 +293,9 @@ class TpCLI < Thor
293
293
  end
294
294
 
295
295
  # Kick off the Touchpass CLI
296
- TpCLI.start
296
+ begin
297
+ TpCLI.start
298
+ rescue Exception => e
299
+ warn "error: #{e}"
300
+ exit 1
301
+ end
@@ -192,11 +192,7 @@ module Touchpass
192
192
  # format_decimal(151.200948, 1) #=> 151.2
193
193
  # format_decimal(151.200948, 0) #=> 151
194
194
  def self.format_decimal(decimal, decimal_places)
195
- # KM: 20110927
196
- # Original approach was to round decimal. eg:
197
- # {}"%.#{decimal_places}f" % decimal
198
- # Changed to truncate without rounding
199
- t = 10.0 ** decimal_places
195
+ t = 100.0 ** decimal_places
200
196
  "%.#{decimal_places}f" % ((decimal * t).truncate / t)
201
197
  end
202
198
 
@@ -1,3 +1,3 @@
1
1
  module Touchpass
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: touchpass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-23 00:00:00.000000000 Z
12
+ date: 2012-11-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -325,4 +325,3 @@ test_files:
325
325
  - spec/touchpass_spec.rb
326
326
  - spec/touchpass_verification_spec.rb
327
327
  - test/claimed_vs_verified_token.rb
328
- has_rdoc: