devise_materialize 1.1.1 → 1.2.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 +5 -5
- data/.circleci/config.yml +93 -196
- data/.codeclimate.json +80 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- data/.github/ISSUE_TEMPLATE/feature-request.md +20 -0
- data/.github/ISSUE_TEMPLATE/question.md +10 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +28 -5
- data/.gitignore +1 -0
- data/.mdlrc +5 -0
- data/.rubocop.yml +494 -1354
- data/CHANGELOG.md +20 -10
- data/CODE_OF_CONDUCT.md +4 -7
- data/CONTRIBUTING.md +132 -0
- data/Gemfile +7 -2
- data/README.md +18 -16
- data/_config.yml +1 -1
- data/bin/console +0 -3
- data/bin/publish +68 -0
- data/bin/setup +0 -2
- data/devise_materialize.gemspec +8 -8
- data/lib/devise_materialize/version.rb +1 -1
- data/lib/generators/devise_materialize/install_generator.rb +2 -2
- data/test/devise_materialize_test.rb +5 -0
- data/test/lib/install_generator_test.rb +14 -12
- data/test/test_helper.rb +14 -16
- metadata +19 -14
- data/.codeclimate.yml +0 -45
- data/.github/CONTRIBUTING.md +0 -17
- data/.github/ISSUE_TEMPLATE.md +0 -21
@@ -4,7 +4,7 @@ require "test_helper"
|
|
4
4
|
|
5
5
|
class InstallGeneratorTest < Rails::Generators::TestCase
|
6
6
|
tests DeviseMaterialize::InstallGenerator
|
7
|
-
destination File.expand_path("
|
7
|
+
destination File.expand_path("../tmp", __dir__)
|
8
8
|
setup :prepare_destination
|
9
9
|
|
10
10
|
test "assert files created for default namespace and no params" do
|
@@ -13,60 +13,61 @@ class InstallGeneratorTest < Rails::Generators::TestCase
|
|
13
13
|
end
|
14
14
|
|
15
15
|
test "assert files created for default namespace with haml" do
|
16
|
-
run_generator %w
|
16
|
+
run_generator %w(-v haml)
|
17
17
|
assert_files nil, view_engine: "html.haml"
|
18
18
|
end
|
19
19
|
|
20
20
|
test "assert files created for default namespace wil slim" do
|
21
|
-
run_generator %w
|
21
|
+
run_generator %w(-v slim)
|
22
22
|
assert_files nil, view_engine: "html.slim"
|
23
23
|
end
|
24
24
|
|
25
25
|
test "assert files created for users namespace with no params" do
|
26
|
-
run_generator %w
|
26
|
+
run_generator %w(User)
|
27
27
|
assert_files "users"
|
28
28
|
end
|
29
29
|
|
30
30
|
test "assert files created for users namespace with haml" do
|
31
|
-
run_generator %w
|
31
|
+
run_generator %w(User -v haml)
|
32
32
|
assert_files "users", view_engine: "html.haml"
|
33
33
|
end
|
34
34
|
|
35
35
|
test "assert files created for users namespace wil slim" do
|
36
|
-
run_generator %w
|
36
|
+
run_generator %w(User -v slim)
|
37
37
|
assert_files "users", view_engine: "html.slim"
|
38
38
|
end
|
39
39
|
|
40
40
|
test "assert files created for default namespace and simple form" do
|
41
|
-
run_generator %w
|
41
|
+
run_generator %w(-f simple_form)
|
42
42
|
assert_files
|
43
43
|
end
|
44
44
|
|
45
45
|
test "assert files created for default namespace with haml and simple_form" do
|
46
|
-
run_generator %w
|
46
|
+
run_generator %w(-v haml -f simple_form)
|
47
47
|
assert_files nil, view_engine: "html.haml"
|
48
48
|
end
|
49
49
|
|
50
50
|
test "assert files created for default namespace wil slim and simple form" do
|
51
|
-
run_generator %w
|
51
|
+
run_generator %w(-v slim -f simple_form)
|
52
52
|
assert_files nil, view_engine: "html.slim"
|
53
53
|
end
|
54
54
|
|
55
55
|
test "assert files created for users namespace with and simple form" do
|
56
|
-
run_generator %w
|
56
|
+
run_generator %w(User -f simple_form)
|
57
57
|
assert_files "users"
|
58
58
|
end
|
59
59
|
|
60
60
|
test "assert files created for users namespace with haml and simple form" do
|
61
|
-
run_generator %w
|
61
|
+
run_generator %w(User -v haml -f simple_form)
|
62
62
|
assert_files "users", view_engine: "html.haml"
|
63
63
|
end
|
64
64
|
|
65
65
|
test "assert files created for users namespace wil slim and simple form" do
|
66
|
-
run_generator %w
|
66
|
+
run_generator %w(User -v slim -f simple_form)
|
67
67
|
assert_files "users", view_engine: "html.slim"
|
68
68
|
end
|
69
69
|
|
70
|
+
# rubocop:disable MethodLength, AbcSize
|
70
71
|
def assert_files(scope = nil, options = {})
|
71
72
|
scope = "devise" if scope.nil?
|
72
73
|
view_engine = options[:view_engine] || "html.erb"
|
@@ -91,4 +92,5 @@ class InstallGeneratorTest < Rails::Generators::TestCase
|
|
91
92
|
assert_file "app/views/#{scope}/shared/_links.#{view_engine}"
|
92
93
|
assert_file "app/views/#{scope}/unlocks/new.#{view_engine}"
|
93
94
|
end
|
95
|
+
# rubocop:enable MethodLength, AbcSize
|
94
96
|
end
|
data/test/test_helper.rb
CHANGED
@@ -1,9 +1,21 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "simplecov"
|
4
|
+
require "simplecov-material"
|
5
|
+
|
6
|
+
SimpleCov.formatter = SimpleCov::Formatter::MaterialFormatter
|
7
|
+
|
8
|
+
SimpleCov.start do
|
9
|
+
add_filter "/test/"
|
10
|
+
add_group "Library", "lib/"
|
11
|
+
end
|
12
|
+
|
13
|
+
SimpleCov.minimum_coverage_by_file 90
|
14
|
+
SimpleCov.minimum_coverage 90
|
15
|
+
|
3
16
|
ENV["RAILS_ENV"] = "test"
|
4
|
-
$LOAD_PATH.unshift File.expand_path("
|
17
|
+
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
|
5
18
|
|
6
|
-
require "simplecov"
|
7
19
|
require "devise_materialize"
|
8
20
|
require "rails_app/config/environment"
|
9
21
|
require "rails/test_help"
|
@@ -13,20 +25,6 @@ require "minitest/pride"
|
|
13
25
|
require "minitest/autorun"
|
14
26
|
require "minitest/ci"
|
15
27
|
|
16
|
-
if ENV["CIRCLE_TEST_REPORTS"].present?
|
17
|
-
Minitest::Ci.report_dir = "#{ENV['CIRCLE_TEST_REPORTS']}/reports"
|
18
|
-
end
|
19
|
-
|
20
|
-
SimpleCov.formatters = [
|
21
|
-
SimpleCov::Formatter::HTMLFormatter
|
22
|
-
]
|
23
|
-
|
24
|
-
SimpleCov.start do
|
25
|
-
add_filter "/test/"
|
26
|
-
|
27
|
-
add_group "Library", "lib"
|
28
|
-
end
|
29
|
-
|
30
28
|
# For generators
|
31
29
|
require "rails/generators/test_case"
|
32
30
|
require "generators/devise_materialize/install_generator"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_materialize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Pezza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 4.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 7.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,31 +29,37 @@ dependencies:
|
|
29
29
|
version: 4.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
-
description:
|
34
|
-
|
32
|
+
version: 7.0.0
|
33
|
+
description: |-
|
34
|
+
This Gem provides a generator for Materialize styled
|
35
|
+
Devise Views in HAML, SLIM, and ERB format with
|
36
|
+
standard Form or simple form functionality
|
35
37
|
email:
|
36
|
-
-
|
38
|
+
- chiefpansancolt@gmail.com
|
37
39
|
executables: []
|
38
40
|
extensions: []
|
39
41
|
extra_rdoc_files: []
|
40
42
|
files:
|
41
43
|
- ".circleci/config.yml"
|
42
|
-
- ".codeclimate.
|
43
|
-
- ".github/
|
44
|
-
- ".github/ISSUE_TEMPLATE.md"
|
44
|
+
- ".codeclimate.json"
|
45
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
46
|
+
- ".github/ISSUE_TEMPLATE/feature-request.md"
|
47
|
+
- ".github/ISSUE_TEMPLATE/question.md"
|
45
48
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
46
49
|
- ".gitignore"
|
50
|
+
- ".mdlrc"
|
47
51
|
- ".rubocop.yml"
|
48
52
|
- ".yardopts"
|
49
53
|
- CHANGELOG.md
|
50
54
|
- CODE_OF_CONDUCT.md
|
55
|
+
- CONTRIBUTING.md
|
51
56
|
- Gemfile
|
52
57
|
- LICENSE.txt
|
53
58
|
- README.md
|
54
59
|
- Rakefile
|
55
60
|
- _config.yml
|
56
61
|
- bin/console
|
62
|
+
- bin/publish
|
57
63
|
- bin/setup
|
58
64
|
- devise_materialize.gemspec
|
59
65
|
- lib/devise_materialize.rb
|
@@ -163,7 +169,7 @@ files:
|
|
163
169
|
- test/rails_app/public/500.html
|
164
170
|
- test/rails_app/public/favicon.ico
|
165
171
|
- test/test_helper.rb
|
166
|
-
homepage: https://github.
|
172
|
+
homepage: https://chiefpansancolt.github.io/devise_materialize/
|
167
173
|
licenses:
|
168
174
|
- MIT
|
169
175
|
metadata: {}
|
@@ -175,15 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
181
|
requirements:
|
176
182
|
- - ">="
|
177
183
|
- !ruby/object:Gem::Version
|
178
|
-
version: '2.
|
184
|
+
version: '2.3'
|
179
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
186
|
requirements:
|
181
187
|
- - ">"
|
182
188
|
- !ruby/object:Gem::Version
|
183
189
|
version: 1.3.1
|
184
190
|
requirements: []
|
185
|
-
|
186
|
-
rubygems_version: 2.6.12
|
191
|
+
rubygems_version: 3.0.1
|
187
192
|
signing_key:
|
188
193
|
specification_version: 4
|
189
194
|
summary: Generator for Materialize styled Devise Views
|
data/.codeclimate.yml
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
version: "2"
|
2
|
-
|
3
|
-
checks:
|
4
|
-
argument-count:
|
5
|
-
enabled: true
|
6
|
-
config:
|
7
|
-
threshold: 4
|
8
|
-
complex-logic:
|
9
|
-
enabled: true
|
10
|
-
config:
|
11
|
-
threshold: 4
|
12
|
-
file-lines:
|
13
|
-
enabled: true
|
14
|
-
config:
|
15
|
-
threshold: 250
|
16
|
-
method-complexity:
|
17
|
-
enabled: true
|
18
|
-
config:
|
19
|
-
threshold: 5
|
20
|
-
method-count:
|
21
|
-
enabled: true
|
22
|
-
config:
|
23
|
-
threshold: 20
|
24
|
-
method-lines:
|
25
|
-
enabled: true
|
26
|
-
config:
|
27
|
-
threshold: 25
|
28
|
-
nested-control-flow:
|
29
|
-
enabled: true
|
30
|
-
config:
|
31
|
-
threshold: 4
|
32
|
-
return-statements:
|
33
|
-
enabled: true
|
34
|
-
config:
|
35
|
-
threshold: 4
|
36
|
-
similar-code:
|
37
|
-
enabled: true
|
38
|
-
identical-code:
|
39
|
-
enabled: true
|
40
|
-
plugins:
|
41
|
-
rubocop:
|
42
|
-
enabled: true
|
43
|
-
exclude_patterns:
|
44
|
-
- test/rails_app
|
45
|
-
- lib/generators/templates
|
data/.github/CONTRIBUTING.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
## How to contribute to Ruby on Rails
|
2
|
-
|
3
|
-
#### **Did you find a bug?**
|
4
|
-
|
5
|
-
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/techgurupezza/simple_form_materialize/issues).
|
6
|
-
|
7
|
-
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/techgurupezza/simple_form_materialize/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
|
8
|
-
|
9
|
-
#### **Did you write a patch that fixes a bug?**
|
10
|
-
|
11
|
-
* Open a new GitHub pull request with the patch.
|
12
|
-
|
13
|
-
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
|
14
|
-
|
15
|
-
Thanks!
|
16
|
-
|
17
|
-
Repo Owner
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
## Expected Behavior
|
2
|
-
|
3
|
-
|
4
|
-
## Actual Behavior
|
5
|
-
|
6
|
-
|
7
|
-
## Steps to Reproduce
|
8
|
-
|
9
|
-
|
10
|
-
## Browsers Used
|
11
|
-
- [ ] Explorer
|
12
|
-
- [ ] Chrome
|
13
|
-
- [ ] Firefox
|
14
|
-
- [ ] Edge
|
15
|
-
- [ ] Opera
|
16
|
-
|
17
|
-
|
18
|
-
## OS Used
|
19
|
-
- [ ] Linux
|
20
|
-
- [ ] Mac
|
21
|
-
- [ ] Windows
|