lite-form 1.0.2 → 1.0.3
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 +4 -4
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +54 -54
- data/README.md +11 -8
- data/lib/generators/rails/USAGE +0 -1
- data/lib/generators/rails/form_generator.rb +0 -6
- data/lib/generators/rails/templates/form.rb.tt +1 -1
- data/lib/lite/form/version.rb +1 -1
- data/lib/lite/form.rb +0 -1
- metadata +3 -6
- data/lib/generators/lite/form/install_generator.rb +0 -17
- data/lib/generators/lite/form/templates/install.rb +0 -4
- data/lib/generators/rails/templates/spec.rb.tt +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea2f3c1a9fa5400e41478b65b200c21c3308f1d1e0d15cd0817d51439ca35f9d
|
|
4
|
+
data.tar.gz: abde0d2692e46fe859b5bf5e632ef777ea891acc988e02d8bd95dfe56f71a6fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 352537783f3c6edd12db09afe98a3b5125e92e99b21edd4891495b9cc06ef445539ece33c41577cdbe0c848349265e515a6ba4e5cd98286334a1c9e14392e5eb
|
|
7
|
+
data.tar.gz: 8abd3defb7ae22d462fe5816b0bcca03e4c882111c7d0f7450125c1b1a8f7c0dbfc9df8f3192175fa9d3d9d8c4a2f03124200d95471ddb070a538a8b6d975461
|
data/.rubocop.yml
CHANGED
|
@@ -5,8 +5,6 @@ AllCops:
|
|
|
5
5
|
TargetRubyVersion: 2.6
|
|
6
6
|
DisplayCopNames: true
|
|
7
7
|
DisplayStyleGuide: true
|
|
8
|
-
LineLength:
|
|
9
|
-
Max: 100
|
|
10
8
|
Layout/EmptyLinesAroundBlockBody:
|
|
11
9
|
Exclude:
|
|
12
10
|
- 'spec/**/**/*'
|
|
@@ -14,6 +12,8 @@ Layout/EmptyLinesAroundClassBody:
|
|
|
14
12
|
EnforcedStyle: empty_lines_except_namespace
|
|
15
13
|
Layout/EmptyLinesAroundModuleBody:
|
|
16
14
|
EnforcedStyle: empty_lines_except_namespace
|
|
15
|
+
Layout/LineLength:
|
|
16
|
+
Max: 100
|
|
17
17
|
Metrics/BlockLength:
|
|
18
18
|
Exclude:
|
|
19
19
|
- 'spec/**/**/*'
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.0.2] - 2019-09-16
|
|
10
|
+
### Removed
|
|
11
|
+
- Removed lite-form generator
|
|
12
|
+
- Removed spec from rails generator
|
|
13
|
+
|
|
9
14
|
## [1.0.2] - 2019-09-16
|
|
10
15
|
### Changed
|
|
11
16
|
- Changed create propagation to check errors instead of persistence
|
data/Gemfile.lock
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
lite-form (1.0.
|
|
4
|
+
lite-form (1.0.3)
|
|
5
5
|
activemodel
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
actionpack (6.0.
|
|
11
|
-
actionview (= 6.0.
|
|
12
|
-
activesupport (= 6.0.
|
|
13
|
-
rack (~> 2.0)
|
|
10
|
+
actionpack (6.0.2.1)
|
|
11
|
+
actionview (= 6.0.2.1)
|
|
12
|
+
activesupport (= 6.0.2.1)
|
|
13
|
+
rack (~> 2.0, >= 2.0.8)
|
|
14
14
|
rack-test (>= 0.6.3)
|
|
15
15
|
rails-dom-testing (~> 2.0)
|
|
16
16
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
17
|
-
actionview (6.0.
|
|
18
|
-
activesupport (= 6.0.
|
|
17
|
+
actionview (6.0.2.1)
|
|
18
|
+
activesupport (= 6.0.2.1)
|
|
19
19
|
builder (~> 3.1)
|
|
20
20
|
erubi (~> 1.4)
|
|
21
21
|
rails-dom-testing (~> 2.0)
|
|
22
22
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
23
|
-
activemodel (6.0.
|
|
24
|
-
activesupport (= 6.0.
|
|
25
|
-
activerecord (6.0.
|
|
26
|
-
activemodel (= 6.0.
|
|
27
|
-
activesupport (= 6.0.
|
|
28
|
-
activesupport (6.0.
|
|
23
|
+
activemodel (6.0.2.1)
|
|
24
|
+
activesupport (= 6.0.2.1)
|
|
25
|
+
activerecord (6.0.2.1)
|
|
26
|
+
activemodel (= 6.0.2.1)
|
|
27
|
+
activesupport (= 6.0.2.1)
|
|
28
|
+
activesupport (6.0.2.1)
|
|
29
29
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
30
30
|
i18n (>= 0.7, < 2)
|
|
31
31
|
minitest (~> 5.1)
|
|
32
32
|
tzinfo (~> 1.1)
|
|
33
|
-
zeitwerk (~> 2.
|
|
33
|
+
zeitwerk (~> 2.2)
|
|
34
34
|
ast (2.4.0)
|
|
35
|
-
builder (3.2.
|
|
35
|
+
builder (3.2.4)
|
|
36
36
|
colorize (0.8.1)
|
|
37
37
|
concurrent-ruby (1.1.5)
|
|
38
|
-
crass (1.0.
|
|
38
|
+
crass (1.0.5)
|
|
39
39
|
database_cleaner (1.7.0)
|
|
40
40
|
diff-lcs (1.3)
|
|
41
|
-
erubi (1.
|
|
42
|
-
fasterer (0.
|
|
41
|
+
erubi (1.9.0)
|
|
42
|
+
fasterer (0.8.1)
|
|
43
43
|
colorize (~> 0.7)
|
|
44
|
-
ruby_parser (>= 3.
|
|
44
|
+
ruby_parser (>= 3.14.1)
|
|
45
45
|
generator_spec (0.9.4)
|
|
46
46
|
activesupport (>= 3.0.0)
|
|
47
47
|
railties (>= 3.0.0)
|
|
48
|
-
i18n (1.
|
|
48
|
+
i18n (1.7.0)
|
|
49
49
|
concurrent-ruby (~> 1.0)
|
|
50
|
-
jaro_winkler (1.5.
|
|
51
|
-
loofah (2.
|
|
50
|
+
jaro_winkler (1.5.4)
|
|
51
|
+
loofah (2.4.0)
|
|
52
52
|
crass (~> 1.0.2)
|
|
53
53
|
nokogiri (>= 1.5.9)
|
|
54
54
|
method_source (0.9.2)
|
|
55
55
|
mini_portile2 (2.4.0)
|
|
56
|
-
minitest (5.
|
|
57
|
-
nokogiri (1.10.
|
|
56
|
+
minitest (5.13.0)
|
|
57
|
+
nokogiri (1.10.7)
|
|
58
58
|
mini_portile2 (~> 2.4.0)
|
|
59
|
-
parallel (1.
|
|
60
|
-
parser (2.6.
|
|
59
|
+
parallel (1.19.1)
|
|
60
|
+
parser (2.6.5.0)
|
|
61
61
|
ast (~> 2.4.0)
|
|
62
|
-
rack (2.0.
|
|
62
|
+
rack (2.0.8)
|
|
63
63
|
rack-test (1.1.0)
|
|
64
64
|
rack (>= 1.0, < 3)
|
|
65
65
|
rails-dom-testing (2.0.3)
|
|
66
66
|
activesupport (>= 4.2.0)
|
|
67
67
|
nokogiri (>= 1.6)
|
|
68
|
-
rails-html-sanitizer (1.
|
|
69
|
-
loofah (~> 2.
|
|
70
|
-
railties (6.0.
|
|
71
|
-
actionpack (= 6.0.
|
|
72
|
-
activesupport (= 6.0.
|
|
68
|
+
rails-html-sanitizer (1.3.0)
|
|
69
|
+
loofah (~> 2.3)
|
|
70
|
+
railties (6.0.2.1)
|
|
71
|
+
actionpack (= 6.0.2.1)
|
|
72
|
+
activesupport (= 6.0.2.1)
|
|
73
73
|
method_source
|
|
74
74
|
rake (>= 0.8.7)
|
|
75
75
|
thor (>= 0.20.3, < 2.0)
|
|
76
76
|
rainbow (3.0.0)
|
|
77
|
-
rake (
|
|
78
|
-
rspec (3.
|
|
79
|
-
rspec-core (~> 3.
|
|
80
|
-
rspec-expectations (~> 3.
|
|
81
|
-
rspec-mocks (~> 3.
|
|
82
|
-
rspec-core (3.
|
|
83
|
-
rspec-support (~> 3.
|
|
84
|
-
rspec-expectations (3.
|
|
77
|
+
rake (13.0.1)
|
|
78
|
+
rspec (3.9.0)
|
|
79
|
+
rspec-core (~> 3.9.0)
|
|
80
|
+
rspec-expectations (~> 3.9.0)
|
|
81
|
+
rspec-mocks (~> 3.9.0)
|
|
82
|
+
rspec-core (3.9.0)
|
|
83
|
+
rspec-support (~> 3.9.0)
|
|
84
|
+
rspec-expectations (3.9.0)
|
|
85
85
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
86
|
-
rspec-support (~> 3.
|
|
87
|
-
rspec-mocks (3.
|
|
86
|
+
rspec-support (~> 3.9.0)
|
|
87
|
+
rspec-mocks (3.9.0)
|
|
88
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
89
|
-
rspec-support (~> 3.
|
|
90
|
-
rspec-support (3.
|
|
91
|
-
rubocop (0.
|
|
89
|
+
rspec-support (~> 3.9.0)
|
|
90
|
+
rspec-support (3.9.0)
|
|
91
|
+
rubocop (0.78.0)
|
|
92
92
|
jaro_winkler (~> 1.5.1)
|
|
93
93
|
parallel (~> 1.10)
|
|
94
94
|
parser (>= 2.6)
|
|
95
95
|
rainbow (>= 2.2.2, < 4.0)
|
|
96
96
|
ruby-progressbar (~> 1.7)
|
|
97
97
|
unicode-display_width (>= 1.4.0, < 1.7)
|
|
98
|
-
rubocop-performance (1.
|
|
98
|
+
rubocop-performance (1.5.1)
|
|
99
99
|
rubocop (>= 0.71.0)
|
|
100
|
-
rubocop-rspec (1.
|
|
101
|
-
rubocop (>= 0.
|
|
100
|
+
rubocop-rspec (1.37.1)
|
|
101
|
+
rubocop (>= 0.68.1)
|
|
102
102
|
ruby-progressbar (1.10.1)
|
|
103
|
-
ruby_parser (3.
|
|
103
|
+
ruby_parser (3.14.1)
|
|
104
104
|
sexp_processor (~> 4.9)
|
|
105
|
-
sexp_processor (4.
|
|
106
|
-
sqlite3 (1.4.
|
|
107
|
-
thor (0.
|
|
105
|
+
sexp_processor (4.13.0)
|
|
106
|
+
sqlite3 (1.4.2)
|
|
107
|
+
thor (1.0.1)
|
|
108
108
|
thread_safe (0.3.6)
|
|
109
109
|
tzinfo (1.2.5)
|
|
110
110
|
thread_safe (~> 0.1)
|
|
111
111
|
unicode-display_width (1.6.0)
|
|
112
|
-
zeitwerk (2.
|
|
112
|
+
zeitwerk (2.2.2)
|
|
113
113
|
|
|
114
114
|
PLATFORMS
|
|
115
115
|
ruby
|
|
@@ -129,4 +129,4 @@ DEPENDENCIES
|
|
|
129
129
|
sqlite3
|
|
130
130
|
|
|
131
131
|
BUNDLED WITH
|
|
132
|
-
2.0.
|
|
132
|
+
2.0.2
|
data/README.md
CHANGED
|
@@ -30,18 +30,21 @@ Or install it yourself as:
|
|
|
30
30
|
|
|
31
31
|
## Setup
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
`../app/forms/application_form.rb`
|
|
33
|
+
### Generators
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
Use `rails g form NAME` will generate the following files:
|
|
36
|
+
|
|
37
|
+
```erb
|
|
38
|
+
app/forms/[name]_form.rb
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
If a `ApplicationForm` file in the `app/forms` directory is available, the
|
|
42
|
+
generator will create file that inherit from `ApplicationForm` if not it will
|
|
43
|
+
fallback to `Lite::Form::Base`.
|
|
44
|
+
|
|
45
|
+
### Forms
|
|
43
46
|
|
|
44
|
-
You will
|
|
47
|
+
You will need to fill this class with the methods and actions you want to perform:
|
|
45
48
|
|
|
46
49
|
```ruby
|
|
47
50
|
class UserForm < ApplicationForm
|
data/lib/generators/rails/USAGE
CHANGED
|
@@ -14,12 +14,6 @@ module Rails
|
|
|
14
14
|
template('form.rb.tt', path)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def copy_specs
|
|
18
|
-
path = File.join('spec', 'forms', class_path, "#{file_name}_form_spec.rb")
|
|
19
|
-
empty_directory('spec/forms')
|
|
20
|
-
template('spec.rb.tt', path)
|
|
21
|
-
end
|
|
22
|
-
|
|
23
17
|
private
|
|
24
18
|
|
|
25
19
|
def file_name
|
data/lib/lite/form/version.rb
CHANGED
data/lib/lite/form.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lite-form
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -200,12 +200,9 @@ files:
|
|
|
200
200
|
- _config.yml
|
|
201
201
|
- bin/console
|
|
202
202
|
- bin/setup
|
|
203
|
-
- lib/generators/lite/form/install_generator.rb
|
|
204
|
-
- lib/generators/lite/form/templates/install.rb
|
|
205
203
|
- lib/generators/rails/USAGE
|
|
206
204
|
- lib/generators/rails/form_generator.rb
|
|
207
205
|
- lib/generators/rails/templates/form.rb.tt
|
|
208
|
-
- lib/generators/rails/templates/spec.rb.tt
|
|
209
206
|
- lib/lite/form.rb
|
|
210
207
|
- lib/lite/form/base.rb
|
|
211
208
|
- lib/lite/form/exceptions.rb
|
|
@@ -234,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
234
231
|
- !ruby/object:Gem::Version
|
|
235
232
|
version: '0'
|
|
236
233
|
requirements: []
|
|
237
|
-
rubygems_version: 3.
|
|
234
|
+
rubygems_version: 3.1.1
|
|
238
235
|
signing_key:
|
|
239
236
|
specification_version: 4
|
|
240
237
|
summary: Ruby Form based framework (aka form objects)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rails/generators'
|
|
4
|
-
|
|
5
|
-
module Lite
|
|
6
|
-
module Form
|
|
7
|
-
class InstallGenerator < Rails::Generators::Base
|
|
8
|
-
|
|
9
|
-
source_root File.expand_path('../templates', __FILE__)
|
|
10
|
-
|
|
11
|
-
def copy_application_query_file
|
|
12
|
-
copy_file('install.rb', 'app/forms/application_form.rb')
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|