trenni-formatters 2.4.0 → 2.5.0
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcbacdb90ea3662f9fed9605fd4e1f6f94be34b1
|
4
|
+
data.tar.gz: eb0b08074f5727cd15bfed8914c2ed27fb572f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c035861e88321e249c350cc0ed56b65c9bfb9c6d9cd438bb47151bd1aaf363484191104b7638ab178b3a451efe4e7122009076815dd6a0de9ed56d05cddc891c
|
7
|
+
data.tar.gz: 96228e8659f3e9f0692417e0417933db56893465b6ee428eae7b53ca3509b4e5aead8d78e014fdbd102d2bd81cdf983d9ad0e6a94d76c7a1080ce4ef6fb71173
|
@@ -20,6 +20,7 @@
|
|
20
20
|
|
21
21
|
require 'trenni/strings'
|
22
22
|
require 'mapping/model'
|
23
|
+
require 'mapping/descendants'
|
23
24
|
|
24
25
|
module Trenni
|
25
26
|
module Formatters
|
@@ -58,10 +59,8 @@ module Trenni
|
|
58
59
|
options[:blank] || @options[:blank] || ""
|
59
60
|
end
|
60
61
|
|
61
|
-
|
62
|
-
|
63
|
-
object.to_s
|
64
|
-
end
|
62
|
+
map(TrueClass, FalseClass, *Mapping.lookup_descendants(Numeric)) do |object, options|
|
63
|
+
object.to_s
|
65
64
|
end
|
66
65
|
end
|
67
66
|
end
|
@@ -93,7 +93,7 @@ module Trenni::Formatters::HTML::OptionSelectSpec
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
expect(captured).to be == "<dt>Bar</dt>\n<dd>\n\t<select name=\"bar\">\n\t\t<option
|
96
|
+
expect(captured).to be == "<dt>Bar</dt>\n<dd>\n\t<select name=\"bar\">\n\t\t<option></option>\t\t<option value=\"0\">A</option><option value=\"10\" selected>B</option>\n\t</select>\n</dd>"
|
97
97
|
end
|
98
98
|
|
99
99
|
it "should add optional item in group" do
|
@@ -108,7 +108,7 @@ module Trenni::Formatters::HTML::OptionSelectSpec
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
-
expect(captured).to be == "<dt>Bar</dt>\n<dd>\n\t<select name=\"bar\">\n\t\t<optgroup label=\"group\">\n\t\t\t<option
|
111
|
+
expect(captured).to be == "<dt>Bar</dt>\n<dd>\n\t<select name=\"bar\">\n\t\t<optgroup label=\"group\">\n\t\t\t<option></option>\t\t\t<option value=\"0\">A</option>\n\t\t</optgroup>\t\t<option value=\"10\" selected>B</option>\n\t</select>\n</dd>"
|
112
112
|
end
|
113
113
|
|
114
114
|
it "should add a group" do
|
data/trenni-formatters.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
27
|
spec.add_dependency "trenni", "~> 2.1"
|
28
|
-
spec.add_dependency "mapping", "~> 1.
|
28
|
+
spec.add_dependency "mapping", "~> 1.1"
|
29
29
|
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.3"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.4"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trenni-formatters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trenni
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|