touchpass 0.1.3 → 0.1.4
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.
- data/bin/touchpass +6 -1
- data/lib/touchpass/prp.rb +1 -5
- data/lib/touchpass/version.rb +1 -1
- metadata +2 -3
data/bin/touchpass
CHANGED
data/lib/touchpass/prp.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/touchpass/version.rb
CHANGED
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.
|
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-
|
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:
|