formulario 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -17
- data/lib/formulario/fields.rb +1 -0
- data/lib/formulario/fields/float.rb +14 -0
- data/lib/formulario/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63bcd983db7081db6f273df3552b2a3c303a3ad523645ce708845261a9083eb2
|
4
|
+
data.tar.gz: c61c2edec3d80f0a63b379fff002a0466ff1fe1905c283375970da3c6b0fe338
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09e7e4a46761f274b6f7666367e727a32af5dabe85c4d4ab7da4449b33c5bdfe226cb09aaa71c0750a30c227d3dec0afc00fce99be4270b7751df58ea0da4a0f'
|
7
|
+
data.tar.gz: f7ba1d511605f3fd4bb3cc993148729dab7d9d5dba54de53a853a016fe40b2ef2527c576ccf38fd28f3f624ce0f89c2340a22b037d2f104260fb1fa7a5f7e6b8
|
data/Gemfile.lock
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
formulario (0.1.
|
4
|
+
formulario (0.1.12)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
awesome_print (1.8.0)
|
10
|
-
byebug (11.
|
11
|
-
coderay (1.1.
|
12
|
-
diff-lcs (1.
|
13
|
-
docile (1.3.
|
14
|
-
json (2.
|
15
|
-
method_source (0.
|
16
|
-
pry (0.
|
17
|
-
coderay (~> 1.1
|
18
|
-
method_source (~>
|
10
|
+
byebug (11.1.3)
|
11
|
+
coderay (1.1.3)
|
12
|
+
diff-lcs (1.4.4)
|
13
|
+
docile (1.3.5)
|
14
|
+
json (2.5.1)
|
15
|
+
method_source (1.0.0)
|
16
|
+
pry (0.14.0)
|
17
|
+
coderay (~> 1.1)
|
18
|
+
method_source (~> 1.0)
|
19
19
|
pry-byebug (3.7.0)
|
20
20
|
byebug (~> 11.0)
|
21
21
|
pry (~> 0.10)
|
22
|
-
rake (13.0.
|
22
|
+
rake (13.0.3)
|
23
23
|
rspec (3.9.0)
|
24
24
|
rspec-core (~> 3.9.0)
|
25
25
|
rspec-expectations (~> 3.9.0)
|
26
26
|
rspec-mocks (~> 3.9.0)
|
27
|
-
rspec-core (3.9.
|
28
|
-
rspec-support (~> 3.9.
|
29
|
-
rspec-expectations (3.9.
|
27
|
+
rspec-core (3.9.3)
|
28
|
+
rspec-support (~> 3.9.3)
|
29
|
+
rspec-expectations (3.9.4)
|
30
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
31
31
|
rspec-support (~> 3.9.0)
|
32
|
-
rspec-mocks (3.9.
|
32
|
+
rspec-mocks (3.9.1)
|
33
33
|
diff-lcs (>= 1.2.0, < 2.0)
|
34
34
|
rspec-support (~> 3.9.0)
|
35
|
-
rspec-support (3.9.
|
35
|
+
rspec-support (3.9.4)
|
36
36
|
simplecov (0.17.1)
|
37
37
|
docile (~> 1.1)
|
38
38
|
json (>= 1.8, < 3)
|
@@ -52,4 +52,4 @@ DEPENDENCIES
|
|
52
52
|
simplecov (~> 0.17.1)
|
53
53
|
|
54
54
|
BUNDLED WITH
|
55
|
-
2.
|
55
|
+
2.2.3
|
data/lib/formulario/fields.rb
CHANGED
@@ -7,6 +7,7 @@ require "formulario/fields/blank"
|
|
7
7
|
require "formulario/fields/exceptional_value"
|
8
8
|
require "formulario/fields/string"
|
9
9
|
require "formulario/fields/integer"
|
10
|
+
require "formulario/fields/float"
|
10
11
|
require "formulario/fields/boolean"
|
11
12
|
|
12
13
|
require "formulario/fields/default_time_field"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Formulario
|
2
|
+
class Field
|
3
|
+
class Float < Field
|
4
|
+
private
|
5
|
+
|
6
|
+
def self.build(raw_value)
|
7
|
+
new Float(raw_value)
|
8
|
+
rescue ArgumentError, TypeError => e
|
9
|
+
ExceptionalValue.new(raw_value, reasons: ['needs to represent a float'])
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/formulario/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formulario
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/formulario/fields/default_time_field.rb
|
124
124
|
- lib/formulario/fields/exceptional_value.rb
|
125
125
|
- lib/formulario/fields/field.rb
|
126
|
+
- lib/formulario/fields/float.rb
|
126
127
|
- lib/formulario/fields/form_field.rb
|
127
128
|
- lib/formulario/fields/id.rb
|
128
129
|
- lib/formulario/fields/integer.rb
|
@@ -140,7 +141,7 @@ metadata:
|
|
140
141
|
homepage_uri: https://gitlab.com/fiachetti/formulario
|
141
142
|
source_code_uri: https://gitlab.com/fiachetti/formulario
|
142
143
|
changelog_uri: https://gitlab.com/fiachetti/formulario/blob/d46f675a18c4fbf1d16634a5da343a648af7cf0c/CHANGELOG.org
|
143
|
-
post_install_message:
|
144
|
+
post_install_message:
|
144
145
|
rdoc_options: []
|
145
146
|
require_paths:
|
146
147
|
- lib
|
@@ -155,8 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
156
|
- !ruby/object:Gem::Version
|
156
157
|
version: '0'
|
157
158
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
159
|
-
signing_key:
|
159
|
+
rubygems_version: 3.2.3
|
160
|
+
signing_key:
|
160
161
|
specification_version: 4
|
161
162
|
summary: Form objects for your project
|
162
163
|
test_files: []
|