formulario 0.1.11 → 0.1.12

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
  SHA256:
3
- metadata.gz: 3ab757ee6d796fdc4c10b03fdd3b2e3563dfcc8ceb47bdd58235a683e3a84fc0
4
- data.tar.gz: 8ff7633599412735f26effb6fe6d04184f4d20062ae99ef2ded4bcd0ae60147d
3
+ metadata.gz: 63bcd983db7081db6f273df3552b2a3c303a3ad523645ce708845261a9083eb2
4
+ data.tar.gz: c61c2edec3d80f0a63b379fff002a0466ff1fe1905c283375970da3c6b0fe338
5
5
  SHA512:
6
- metadata.gz: 171c7e2731c0b61dec804ca078414e887a1385927b26b0c9d6589b5301f955696697c6b77aa3eda0fe46bec09f095730594409e5dcaf239f412507714c123d30
7
- data.tar.gz: 2b422294cbe0be5752d6d3b94c83885a8b26e0d6c8cf297bc9a75ae58d78eca98f3177a2431e4a3d45eaa3c49d52a2ceb75863c0a6010c3ee4ce64b12b57295f
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.11)
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.0.1)
11
- coderay (1.1.2)
12
- diff-lcs (1.3)
13
- docile (1.3.2)
14
- json (2.2.0)
15
- method_source (0.9.2)
16
- pry (0.12.2)
17
- coderay (~> 1.1.0)
18
- method_source (~> 0.9.0)
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.1)
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.0)
28
- rspec-support (~> 3.9.0)
29
- rspec-expectations (3.9.0)
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.0)
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.0)
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.0.2
55
+ 2.2.3
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Formulario
2
- VERSION = "0.1.11"
2
+ VERSION = "0.1.12"
3
3
  end
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.11
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: 2019-12-09 00:00:00.000000000 Z
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.0.6
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: []