human_attributes 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +56 -56
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +10 -15
- data/human_attributes.gemspec +1 -1
- data/lib/human_attributes/engine.rb +1 -1
- data/lib/human_attributes/version.rb +1 -1
- data/lib/tasks/human_attributes_tasks.rake +4 -2
- data/spec/dummy/spec/factories/purchases.rb +1 -1
- data/spec/rails_helper.rb +4 -4
- metadata +8 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b27070ab97bccd5ce4642057743308b5e1abad6f07de5b60dce495f1263e821e
|
4
|
+
data.tar.gz: 448077785533b424499086b0d70b569b4d9a5918eea933ddd5fa2b41d56bc983
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22d264ce73f127afbdf0da8c8e4b8a92de5c1f9917dd59f3f21fecc78550fa85b5589b763f8387026f462d0e58e73693a4f88b4face4b339069f69c3b3e45541
|
7
|
+
data.tar.gz: 7c4911f5a43927844512e97b93b2c48371518c3ecda7d41a539fb5418fb5a6539c7a3b5ad0acda5dac98462e96e1a9841129b28dc639fde2fbca2f8ea57689ae
|
data/.rubocop.yml
CHANGED
@@ -10,7 +10,7 @@ AllCops:
|
|
10
10
|
DisplayCopNames: false
|
11
11
|
StyleGuideCopsOnly: false
|
12
12
|
TargetRubyVersion: 2.3
|
13
|
-
|
13
|
+
Layout/AccessModifierIndentation:
|
14
14
|
Description: Check indentation of private/protected visibility modifiers.
|
15
15
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
16
16
|
Enabled: true
|
@@ -18,7 +18,7 @@ Style/AccessModifierIndentation:
|
|
18
18
|
SupportedStyles:
|
19
19
|
- outdent
|
20
20
|
- indent
|
21
|
-
|
21
|
+
Layout/AlignHash:
|
22
22
|
Description: Align the elements of a hash literal if they span more than one line.
|
23
23
|
Enabled: true
|
24
24
|
EnforcedHashRocketStyle: key
|
@@ -29,7 +29,7 @@ Style/AlignHash:
|
|
29
29
|
- always_ignore
|
30
30
|
- ignore_implicit
|
31
31
|
- ignore_explicit
|
32
|
-
|
32
|
+
Layout/AlignParameters:
|
33
33
|
Description: Align the parameters of a method call if they span more than one line.
|
34
34
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
35
35
|
Enabled: true
|
@@ -63,11 +63,11 @@ Style/BracesAroundHashParameters:
|
|
63
63
|
- braces
|
64
64
|
- no_braces
|
65
65
|
- context_dependent
|
66
|
-
|
66
|
+
Layout/CaseIndentation:
|
67
67
|
Description: Indentation of when in a case/when/[else/]end.
|
68
68
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
69
69
|
Enabled: true
|
70
|
-
|
70
|
+
EnforcedStyle: case
|
71
71
|
SupportedStyles:
|
72
72
|
- case
|
73
73
|
- end
|
@@ -108,7 +108,7 @@ Style/CommentAnnotation:
|
|
108
108
|
- OPTIMIZE
|
109
109
|
- HACK
|
110
110
|
- REVIEW
|
111
|
-
|
111
|
+
Layout/DotPosition:
|
112
112
|
Description: Checks the position of the dot in multi-line method calls.
|
113
113
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
114
114
|
Enabled: true
|
@@ -116,26 +116,26 @@ Style/DotPosition:
|
|
116
116
|
SupportedStyles:
|
117
117
|
- leading
|
118
118
|
- trailing
|
119
|
-
|
119
|
+
Layout/EmptyLineBetweenDefs:
|
120
120
|
Description: Use empty lines between defs.
|
121
121
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
122
122
|
Enabled: true
|
123
123
|
AllowAdjacentOneLineDefs: false
|
124
|
-
|
124
|
+
Layout/EmptyLinesAroundBlockBody:
|
125
125
|
Description: Keeps track of empty lines around block bodies.
|
126
126
|
Enabled: true
|
127
127
|
EnforcedStyle: no_empty_lines
|
128
128
|
SupportedStyles:
|
129
129
|
- empty_lines
|
130
130
|
- no_empty_lines
|
131
|
-
|
131
|
+
Layout/EmptyLinesAroundClassBody:
|
132
132
|
Description: Keeps track of empty lines around class bodies.
|
133
133
|
Enabled: true
|
134
134
|
EnforcedStyle: no_empty_lines
|
135
135
|
SupportedStyles:
|
136
136
|
- empty_lines
|
137
137
|
- no_empty_lines
|
138
|
-
|
138
|
+
Layout/EmptyLinesAroundModuleBody:
|
139
139
|
Description: Keeps track of empty lines around module bodies.
|
140
140
|
Enabled: true
|
141
141
|
EnforcedStyle: no_empty_lines
|
@@ -155,7 +155,7 @@ Style/FileName:
|
|
155
155
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
156
156
|
Enabled: false
|
157
157
|
Exclude: []
|
158
|
-
|
158
|
+
Layout/FirstParameterIndentation:
|
159
159
|
Description: Checks the indentation of the first parameter in a method call.
|
160
160
|
Enabled: true
|
161
161
|
EnforcedStyle: special_for_inner_method_call_in_parentheses
|
@@ -206,12 +206,12 @@ Style/IfUnlessModifier:
|
|
206
206
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
207
207
|
Enabled: false
|
208
208
|
MaxLineLength: 80
|
209
|
-
|
209
|
+
Layout/IndentationWidth:
|
210
210
|
Description: Use 2 spaces for indentation.
|
211
211
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
212
212
|
Enabled: true
|
213
213
|
Width: 2
|
214
|
-
|
214
|
+
Layout/IndentHash:
|
215
215
|
Description: Checks the indentation of the first key in a hash literal.
|
216
216
|
Enabled: true
|
217
217
|
EnforcedStyle: special_inside_parentheses
|
@@ -256,7 +256,7 @@ Style/MethodName:
|
|
256
256
|
SupportedStyles:
|
257
257
|
- snake_case
|
258
258
|
- camelCase
|
259
|
-
|
259
|
+
Layout/MultilineOperationIndentation:
|
260
260
|
Description: Checks indentation of binary operations that span more than one line.
|
261
261
|
Enabled: true
|
262
262
|
EnforcedStyle: indented
|
@@ -366,14 +366,14 @@ Style/StringLiteralsInInterpolation:
|
|
366
366
|
SupportedStyles:
|
367
367
|
- single_quotes
|
368
368
|
- double_quotes
|
369
|
-
|
369
|
+
Layout/SpaceAroundBlockParameters:
|
370
370
|
Description: Checks the spacing inside and after block parameters pipes.
|
371
371
|
Enabled: true
|
372
372
|
EnforcedStyleInsidePipes: no_space
|
373
|
-
|
373
|
+
SupportedStylesInsidePipes:
|
374
374
|
- space
|
375
375
|
- no_space
|
376
|
-
|
376
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
377
377
|
Description: Checks that the equals signs in parameter default assignments have
|
378
378
|
or don't have surrounding space depending on configuration.
|
379
379
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
@@ -382,14 +382,14 @@ Style/SpaceAroundEqualsInParameterDefault:
|
|
382
382
|
SupportedStyles:
|
383
383
|
- space
|
384
384
|
- no_space
|
385
|
-
|
385
|
+
Layout/SpaceBeforeBlockBraces:
|
386
386
|
Description: Checks that the left block brace has or doesn't have space before it.
|
387
387
|
Enabled: true
|
388
388
|
EnforcedStyle: space
|
389
389
|
SupportedStyles:
|
390
390
|
- space
|
391
391
|
- no_space
|
392
|
-
|
392
|
+
Layout/SpaceInsideBlockBraces:
|
393
393
|
Description: Checks that block braces have or don't have surrounding space. For
|
394
394
|
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
395
395
|
space.
|
@@ -400,7 +400,7 @@ Style/SpaceInsideBlockBraces:
|
|
400
400
|
- no_space
|
401
401
|
EnforcedStyleForEmptyBraces: no_space
|
402
402
|
SpaceBeforeBlockParameters: true
|
403
|
-
|
403
|
+
Layout/SpaceInsideHashLiteralBraces:
|
404
404
|
Description: Use spaces inside hash literal braces - or don't.
|
405
405
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
406
406
|
Enabled: true
|
@@ -414,7 +414,7 @@ Style/SymbolProc:
|
|
414
414
|
Enabled: true
|
415
415
|
IgnoredMethods:
|
416
416
|
- respond_to
|
417
|
-
|
417
|
+
Layout/TrailingBlankLines:
|
418
418
|
Description: Checks trailing blank lines and final newline.
|
419
419
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
420
420
|
Enabled: true
|
@@ -530,15 +530,15 @@ Lint/AssignmentInCondition:
|
|
530
530
|
Lint/EndAlignment:
|
531
531
|
Description: Align ends correctly.
|
532
532
|
Enabled: true
|
533
|
-
|
534
|
-
|
533
|
+
EnforcedStyleAlignWith: keyword
|
534
|
+
SupportedStylesAlignWith:
|
535
535
|
- keyword
|
536
536
|
- variable
|
537
537
|
Lint/DefEndAlignment:
|
538
538
|
Description: Align ends corresponding to defs correctly.
|
539
539
|
Enabled: true
|
540
|
-
|
541
|
-
|
540
|
+
EnforcedStyleAlignWith: start_of_line
|
541
|
+
SupportedStylesAlignWith:
|
542
542
|
- start_of_line
|
543
543
|
- def
|
544
544
|
Rails/ActionFilter:
|
@@ -589,7 +589,7 @@ Style/SymbolArray:
|
|
589
589
|
Description: Use %i or %I for arrays of symbols.
|
590
590
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
591
591
|
Enabled: false
|
592
|
-
|
592
|
+
Layout/ExtraSpacing:
|
593
593
|
Description: Do not use unnecessary spacing.
|
594
594
|
Enabled: false
|
595
595
|
Style/AccessorMethodName:
|
@@ -599,7 +599,7 @@ Style/Alias:
|
|
599
599
|
Description: Use alias_method instead of alias.
|
600
600
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
601
601
|
Enabled: false
|
602
|
-
|
602
|
+
Layout/AlignArray:
|
603
603
|
Description: Align the elements of an array literal if they span more than one line.
|
604
604
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
605
605
|
Enabled: true
|
@@ -627,7 +627,7 @@ Style/BlockComments:
|
|
627
627
|
Description: Do not use block comments.
|
628
628
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
629
629
|
Enabled: false
|
630
|
-
|
630
|
+
Layout/BlockEndNewline:
|
631
631
|
Description: Put end statement of multiline block on its own line.
|
632
632
|
Enabled: true
|
633
633
|
Style/CaseEquality:
|
@@ -654,7 +654,7 @@ Style/ColonMethodCall:
|
|
654
654
|
Description: 'Do not use :: for method call.'
|
655
655
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
656
656
|
Enabled: false
|
657
|
-
|
657
|
+
Layout/CommentIndentation:
|
658
658
|
Description: Indentation of comments.
|
659
659
|
Enabled: true
|
660
660
|
Style/ConstantName:
|
@@ -679,19 +679,19 @@ Style/DoubleNegation:
|
|
679
679
|
Style/EachWithObject:
|
680
680
|
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
681
681
|
Enabled: false
|
682
|
-
|
682
|
+
Layout/ElseAlignment:
|
683
683
|
Description: Align elses and elsifs correctly.
|
684
684
|
Enabled: true
|
685
685
|
Style/EmptyElse:
|
686
686
|
Description: Avoid empty else-clauses.
|
687
687
|
Enabled: true
|
688
|
-
|
688
|
+
Layout/EmptyLines:
|
689
689
|
Description: Don't use several empty lines in a row.
|
690
690
|
Enabled: true
|
691
|
-
|
691
|
+
Layout/EmptyLinesAroundAccessModifier:
|
692
692
|
Description: Keep blank lines around access modifiers.
|
693
693
|
Enabled: true
|
694
|
-
|
694
|
+
Layout/EmptyLinesAroundMethodBody:
|
695
695
|
Description: Keeps track of empty lines around method bodies.
|
696
696
|
Enabled: true
|
697
697
|
Style/EmptyLiteral:
|
@@ -702,7 +702,7 @@ Style/EndBlock:
|
|
702
702
|
Description: Avoid the use of END blocks.
|
703
703
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
704
704
|
Enabled: true
|
705
|
-
|
705
|
+
Layout/EndOfLine:
|
706
706
|
Description: Use Unix-style line endings.
|
707
707
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
708
708
|
Enabled: true
|
@@ -718,10 +718,10 @@ Style/IfWithSemicolon:
|
|
718
718
|
Description: Do not use if x; .... Use the ternary operator instead.
|
719
719
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
720
720
|
Enabled: false
|
721
|
-
|
721
|
+
Layout/IndentationConsistency:
|
722
722
|
Description: Keep indentation straight.
|
723
723
|
Enabled: true
|
724
|
-
|
724
|
+
Layout/IndentArray:
|
725
725
|
Description: Checks the indentation of the first element in an array literal.
|
726
726
|
Enabled: true
|
727
727
|
Style/InfiniteLoop:
|
@@ -732,7 +732,7 @@ Style/Lambda:
|
|
732
732
|
Description: Use the new lambda literal syntax for single-line blocks.
|
733
733
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
734
734
|
Enabled: false
|
735
|
-
|
735
|
+
Layout/LeadingCommentSpace:
|
736
736
|
Description: Comments should start with a space.
|
737
737
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
738
738
|
Enabled: true
|
@@ -740,7 +740,7 @@ Style/LineEndConcatenation:
|
|
740
740
|
Description: Use \ instead of + or << to concatenate two string literals at line
|
741
741
|
end.
|
742
742
|
Enabled: false
|
743
|
-
Style/
|
743
|
+
Style/MethodCallWithoutArgsParentheses:
|
744
744
|
Description: Do not use parentheses for method calls with no arguments.
|
745
745
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
746
746
|
Enabled: true
|
@@ -752,7 +752,7 @@ Style/MultilineBlockChain:
|
|
752
752
|
Description: Avoid multi-line chains of blocks.
|
753
753
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
754
754
|
Enabled: false
|
755
|
-
|
755
|
+
Layout/MultilineBlockLayout:
|
756
756
|
Description: Ensures newlines after multiline block do statements.
|
757
757
|
Enabled: false
|
758
758
|
Style/MultilineIfThen:
|
@@ -820,56 +820,56 @@ Style/SelfAssignment:
|
|
820
820
|
used.
|
821
821
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
822
822
|
Enabled: false
|
823
|
-
|
823
|
+
Layout/SpaceAfterColon:
|
824
824
|
Description: Use spaces after colons.
|
825
825
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
826
826
|
Enabled: true
|
827
|
-
|
827
|
+
Layout/SpaceAfterComma:
|
828
828
|
Description: Use spaces after commas.
|
829
829
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
830
830
|
Enabled: true
|
831
|
-
|
831
|
+
Layout/SpaceAroundKeyword:
|
832
832
|
Description: Use a space around keywords if appropriate.
|
833
833
|
Enabled: true
|
834
|
-
|
834
|
+
Layout/SpaceAfterMethodName:
|
835
835
|
Description: Do not put a space between a method name and the opening parenthesis
|
836
836
|
in a method definition.
|
837
837
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
838
838
|
Enabled: true
|
839
|
-
|
839
|
+
Layout/SpaceAfterNot:
|
840
840
|
Description: Tracks redundant space after the ! operator.
|
841
841
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
842
842
|
Enabled: true
|
843
|
-
|
843
|
+
Layout/SpaceAfterSemicolon:
|
844
844
|
Description: Use spaces after semicolons.
|
845
845
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
846
846
|
Enabled: true
|
847
|
-
|
847
|
+
Layout/SpaceBeforeComma:
|
848
848
|
Description: No spaces before commas.
|
849
849
|
Enabled: true
|
850
|
-
|
850
|
+
Layout/SpaceBeforeComment:
|
851
851
|
Description: Checks for missing space between code and a comment on the same line.
|
852
852
|
Enabled: true
|
853
|
-
|
853
|
+
Layout/SpaceBeforeFirstArg:
|
854
854
|
Description: Put a space between a method name and the first argument in a method
|
855
855
|
call without parentheses.
|
856
856
|
Enabled: true
|
857
|
-
|
857
|
+
Layout/SpaceBeforeSemicolon:
|
858
858
|
Description: No spaces before semicolons.
|
859
859
|
Enabled: true
|
860
|
-
|
860
|
+
Layout/SpaceAroundOperators:
|
861
861
|
Description: Use spaces around operators.
|
862
862
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
863
863
|
Enabled: true
|
864
|
-
|
864
|
+
Layout/SpaceInsideBrackets:
|
865
865
|
Description: No spaces after [ or before ].
|
866
866
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
867
867
|
Enabled: true
|
868
|
-
|
868
|
+
Layout/SpaceInsideParens:
|
869
869
|
Description: No spaces after ( or before ).
|
870
870
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
871
871
|
Enabled: true
|
872
|
-
|
872
|
+
Layout/SpaceInsideRangeLiteral:
|
873
873
|
Description: No spaces inside range literals.
|
874
874
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
875
875
|
Enabled: true
|
@@ -881,11 +881,11 @@ Style/StructInheritance:
|
|
881
881
|
Description: Checks for inheritance from Struct.new.
|
882
882
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
883
883
|
Enabled: true
|
884
|
-
|
884
|
+
Layout/Tab:
|
885
885
|
Description: No hard tabs.
|
886
886
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
887
887
|
Enabled: true
|
888
|
-
|
888
|
+
Layout/TrailingWhitespace:
|
889
889
|
Description: Avoid trailing whitespace.
|
890
890
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
891
891
|
Enabled: true
|
@@ -955,7 +955,7 @@ Lint/EnsureReturn:
|
|
955
955
|
Description: Do not use return in an ensure block.
|
956
956
|
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
957
957
|
Enabled: true
|
958
|
-
|
958
|
+
Security/Eval:
|
959
959
|
Description: The use of eval represents a serious security risk.
|
960
960
|
Enabled: true
|
961
961
|
Lint/HandleExceptions:
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,13 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
-
###
|
5
|
+
### 0.5.0
|
6
|
+
|
7
|
+
##### Changed
|
8
|
+
|
9
|
+
* Replace FactoryGirl with FactoryBot.
|
10
|
+
|
11
|
+
### 0.4.0
|
6
12
|
|
7
13
|
##### Added
|
8
14
|
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
human_attributes (0.
|
5
|
-
|
4
|
+
human_attributes (0.5.0)
|
5
|
+
factory_bot
|
6
6
|
rails (~> 4.2, >= 4.2.0)
|
7
7
|
|
8
8
|
GEM
|
@@ -62,15 +62,12 @@ GEM
|
|
62
62
|
enumerize (1.1.1)
|
63
63
|
activesupport (>= 3.2)
|
64
64
|
erubis (2.7.0)
|
65
|
-
|
65
|
+
factory_bot (4.8.2)
|
66
66
|
activesupport (>= 3.0.0)
|
67
|
-
factory_girl_rails (4.8.0)
|
68
|
-
factory_girl (~> 4.8.0)
|
69
|
-
railties (>= 3.0.0)
|
70
67
|
ffi (1.9.18)
|
71
68
|
formatador (0.2.5)
|
72
|
-
globalid (0.
|
73
|
-
activesupport (>= 4.
|
69
|
+
globalid (0.4.1)
|
70
|
+
activesupport (>= 4.2.0)
|
74
71
|
guard (2.14.1)
|
75
72
|
formatador (>= 0.2.4)
|
76
73
|
listen (>= 2.7, < 4.0)
|
@@ -94,12 +91,10 @@ GEM
|
|
94
91
|
loofah (2.0.3)
|
95
92
|
nokogiri (>= 1.5.9)
|
96
93
|
lumberjack (1.0.11)
|
97
|
-
mail (2.
|
98
|
-
|
94
|
+
mail (2.7.0)
|
95
|
+
mini_mime (>= 0.1.1)
|
99
96
|
method_source (0.8.2)
|
100
|
-
|
101
|
-
mime-types-data (~> 3.2015)
|
102
|
-
mime-types-data (3.2016.0521)
|
97
|
+
mini_mime (1.0.0)
|
103
98
|
mini_portile2 (2.1.0)
|
104
99
|
minitest (5.10.1)
|
105
100
|
nenv (0.3.0)
|
@@ -178,7 +173,7 @@ GEM
|
|
178
173
|
sprockets (3.7.1)
|
179
174
|
concurrent-ruby (~> 1.0)
|
180
175
|
rack (> 1, < 3)
|
181
|
-
sprockets-rails (3.2.
|
176
|
+
sprockets-rails (3.2.1)
|
182
177
|
actionpack (>= 4.0)
|
183
178
|
activesupport (>= 4.0)
|
184
179
|
sprockets (>= 3.0.0)
|
@@ -206,4 +201,4 @@ DEPENDENCIES
|
|
206
201
|
sqlite3
|
207
202
|
|
208
203
|
BUNDLED WITH
|
209
|
-
1.
|
204
|
+
1.16.1
|
data/human_attributes.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.test_files = Dir["spec/**/*"]
|
21
21
|
|
22
22
|
s.add_dependency "rails", "~> 4.2", ">= 4.2.0"
|
23
|
-
s.add_dependency "
|
23
|
+
s.add_dependency "factory_bot"
|
24
24
|
s.add_development_dependency "enumerize", "~> 1", ">= 1.1.1"
|
25
25
|
s.add_development_dependency "draper", "~> 2.1.0"
|
26
26
|
s.add_development_dependency "pry"
|
@@ -1,12 +1,14 @@
|
|
1
|
-
require "
|
1
|
+
require "factory_bot"
|
2
2
|
|
3
3
|
namespace :human_attrs do
|
4
4
|
desc "Show generated human attributes for ActiveRecord models"
|
5
5
|
task :show, [:model] => [:environment] do |_t, args|
|
6
|
+
FactoryBot.reload
|
6
7
|
model_name = args[:model].tableize.singularize
|
7
8
|
model = args[:model].classify.constantize
|
9
|
+
|
8
10
|
instance = begin
|
9
|
-
|
11
|
+
FactoryBot.build(model_name)
|
10
12
|
rescue
|
11
13
|
nil
|
12
14
|
end
|
data/spec/rails_helper.rb
CHANGED
@@ -24,7 +24,7 @@ abort("The Rails environment is running in production mode!") if Rails.env.produ
|
|
24
24
|
require "pry"
|
25
25
|
require "spec_helper"
|
26
26
|
require "rspec/rails"
|
27
|
-
require "
|
27
|
+
require "factory_bot"
|
28
28
|
|
29
29
|
ActiveRecord::Migration.maintain_test_schema!
|
30
30
|
|
@@ -39,10 +39,10 @@ RSpec.configure do |config|
|
|
39
39
|
config.filter_run :focus
|
40
40
|
config.run_all_when_everything_filtered = true
|
41
41
|
|
42
|
-
|
43
|
-
|
42
|
+
FactoryBot.definition_file_paths = ["#{::Rails.root}/spec/factories"]
|
43
|
+
FactoryBot.find_definitions
|
44
44
|
|
45
|
-
config.include
|
45
|
+
config.include FactoryBot::Syntax::Methods
|
46
46
|
config.include ActionDispatch::TestProcess
|
47
47
|
config.include TestHelpers
|
48
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: human_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Platanus
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -32,19 +32,19 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 4.2.0
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
35
|
+
name: factory_bot
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
type: :runtime
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: enumerize
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,8 +237,6 @@ files:
|
|
237
237
|
- spec/dummy/config/secrets.yml
|
238
238
|
- spec/dummy/db/migrate/20161113032308_create_purchases.rb
|
239
239
|
- spec/dummy/db/schema.rb
|
240
|
-
- spec/dummy/db/test.sqlite3
|
241
|
-
- spec/dummy/log/test.log
|
242
240
|
- spec/dummy/public/404.html
|
243
241
|
- spec/dummy/public/422.html
|
244
242
|
- spec/dummy/public/500.html
|
@@ -270,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
268
|
version: '0'
|
271
269
|
requirements: []
|
272
270
|
rubyforge_project:
|
273
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.7.6
|
274
272
|
signing_key:
|
275
273
|
specification_version: 4
|
276
274
|
summary: Gem to generate human readable ActiveRecord attributes
|
@@ -309,8 +307,6 @@ test_files:
|
|
309
307
|
- spec/dummy/config/secrets.yml
|
310
308
|
- spec/dummy/db/migrate/20161113032308_create_purchases.rb
|
311
309
|
- spec/dummy/db/schema.rb
|
312
|
-
- spec/dummy/db/test.sqlite3
|
313
|
-
- spec/dummy/log/test.log
|
314
310
|
- spec/dummy/public/404.html
|
315
311
|
- spec/dummy/public/422.html
|
316
312
|
- spec/dummy/public/500.html
|