modalh 1.0.3 → 1.0.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/VERSION +1 -1
- data/lib/h/h.rb +3 -3
- data/modalh.gemspec +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.4
|
data/lib/h/h.rb
CHANGED
@@ -43,9 +43,9 @@ module H
|
|
43
43
|
return options[:blank] || '' if value.nil?
|
44
44
|
unless value.kind_of?(String)
|
45
45
|
value = round(value,precision)
|
46
|
-
if value.
|
46
|
+
if value.respond_to?(:nan?) && value.nan?
|
47
47
|
return options[:nan] || "--"
|
48
|
-
elsif value.
|
48
|
+
elsif value.respond_to?(:infinite?) && value.infinite?
|
49
49
|
inf = options[:inf] || '∞'
|
50
50
|
return value<0 ? "-#{inf}" : inf
|
51
51
|
else
|
@@ -175,7 +175,7 @@ module H
|
|
175
175
|
# include ActionView::Helpers::NumberHelper
|
176
176
|
|
177
177
|
def round(v, ndec)
|
178
|
-
return v if v.
|
178
|
+
return v if (v.respond_to?(:nan?) && v.nan?) || (v.respond_to?(:infinite?) && v.infinite?)
|
179
179
|
if ndec
|
180
180
|
case v
|
181
181
|
when BigDecimal
|
data/modalh.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "modalh"
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Javier Goizueta"]
|
12
|
-
s.date = "2012-04-
|
12
|
+
s.date = "2012-04-30"
|
13
13
|
s.description = "Rails plugin for localization & delocalization of data values"
|
14
14
|
s.email = "jgoizueta@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.homepage = "http://github.com/jgoizueta/modalh"
|
38
38
|
s.licenses = ["MIT"]
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = "1.8.
|
40
|
+
s.rubygems_version = "1.8.23"
|
41
41
|
s.summary = "Rails plugin for localization & delocalization"
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modalh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.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-04-
|
12
|
+
date: 2012-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: units-system
|
@@ -130,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
segments:
|
132
132
|
- 0
|
133
|
-
hash:
|
133
|
+
hash: -1933836106922413735
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
none: false
|
136
136
|
requirements:
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 1.8.
|
142
|
+
rubygems_version: 1.8.23
|
143
143
|
signing_key:
|
144
144
|
specification_version: 3
|
145
145
|
summary: Rails plugin for localization & delocalization
|