linter 0.1.8 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d37fc2c12261ce9fc63abee6bc787ae37fceb65591e8d77daf4d363d3b5e237
4
- data.tar.gz: 72fe17fd2674c5fb5b7f280c4b122f79e0b5f28d30bb054cee844d348392bf67
3
+ metadata.gz: 0e18d58bd1828f3c3f8ba86432970357bfa98eecef826783c6b530a36486192f
4
+ data.tar.gz: e1a9311dd4e62bbea7e79bb5a9dd4433bbd647d04fe5b65f98da014cc63bcfc7
5
5
  SHA512:
6
- metadata.gz: 4f3c1029a82a2e886080341d60573a1a89397ae6561254ff07d06e7a2100adc7ee39efdc8dd47318bee85a1342797b7c3263d1059ff0bac8bd11c125e46ea937
7
- data.tar.gz: 914afdd6cf0a6d3a2d1f1e7f409fa754c8d7238079404ebb29dbea626ae12672e60fe75d1699d446cc0cae8b631f7d0e887a84207d6c1e156378a453f0d104b1
6
+ metadata.gz: cde22b0954462871f997d9a2c897d9279329bf933191fb260ec4e4dee35624ff5a76f5cde83439f2665c1e04753ebd568be941341310129b68b9571a76492854
7
+ data.tar.gz: c49e01b6c056e94e9ed4f363f3b7041cde91552a326211927a05baf862bb45eca52a9de447ef3b22b583eaa5085faad41d52d264bf4e403345531ccbcbdf2738
data/README.md CHANGED
@@ -23,18 +23,46 @@ Or install it yourself as:
23
23
 
24
24
  ## Usage
25
25
 
26
+ If you want to perform all of the inclusiveness checks we currently offer, you can run:
27
+
28
+ ```ruby
29
+ text = 'your text here'
30
+ response = Linter.analyze(text)
31
+ ```
32
+
33
+ If you want to include the checks specifically for job ads as well, run it like this:
34
+
35
+ ```ruby
36
+ text = 'your text here'
37
+ response = Linter.analyze(text, job_ad: true)
38
+ ```
39
+
40
+ You can also use the checks individually:
41
+
26
42
  ```ruby
27
43
  text = 'Collaborate closely with the manager. Analytics all the way.'
28
44
  Linter::GenderAssociation.analyze(text)
29
45
  # #<OpenStruct feminine_coded_word_counts={"collaborate" => 1}, masculine_coded_word_counts={"analytics" => 1}, trend="neutral">
46
+
30
47
  text = 'He was working at the bar.'
31
48
  Linter::PronounAssociation.analyze(text)
49
+ #<OpenStruct trend="masculine-coded", feminine_coded_word_counts={}, masculine_coded_word_counts={"he"=>1}>
50
+
51
+ text = 'You are my spirit animal'
52
+ Linter::MisusedWords.analyze(text)
53
+ #<OpenStruct misused_words=[{"word"=>"spirit animal", "reason"=>"The problem is that spirit animals are an important part of the belief\nsystem of some cultures and refer to a spirit that “helps guide or protect\na person on a journey and whose characteristics that person shares or\nembodies.” Referring to something as your spirit animal is cultural\nappropriation. Avoid using it.\n", "replace_with"=>["kindred spirit", "raison d'etre"]}], trend="">
32
54
  ```
33
55
 
34
- ## CLI Usage -> currently broken
56
+ You'll notice that the `association` checks do a comparison of the whole text and will determine a _trend_ for your text. When your text uses a lot of
57
+ masculine-coded language, the text will be marked as such. The regular checks (like `MisusedWords`) will return all the misused words, a reason why and if possible, we provide some suggestions to replace the word.
58
+
59
+ We've also included a `recommendation` where possible. This is to help guide people what to do with the results from the
60
+ trend.
61
+
62
+ ## CLI Usage
35
63
 
36
64
  ```console
37
- linter example.md
65
+ linter path/to_file/example.md
38
66
  #<OpenStruct feminine_coded_word_counts={}, masculine_coded_word_counts={"analytical"=>1}, trend="strongly masculine-coded">
39
67
  #<OpenStruct feminine_coded_word_counts={}, masculine_coded_word_counts={"he"=>1}, trend="masculine-coded">
40
68
  ```
@@ -47,7 +75,15 @@ To install this gem onto your local machine, run `bundle exec rake install`.
47
75
 
48
76
  ## Contributing
49
77
 
50
- Bug reports and pull requests are welcome on GitLab at https://gitlab.com/lienvdsteen/linter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
78
+ Bug reports and merge requests are welcome on GitLab at https://gitlab.com/lienvdsteen/linter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
79
+
80
+ We are looking for different types of contributions:
81
+ - additional checks
82
+ - adding/editing words to the existing wordlists
83
+ - support for other languages besides English
84
+ - ...
85
+
86
+ If you add any checks or words, please also add the sources used to the `sources.yml` file.
51
87
 
52
88
  ## License
53
89
 
@@ -7,6 +7,7 @@ words:
7
7
  - collab
8
8
  - commit
9
9
  - communal
10
+ - community
10
11
  - compassion
11
12
  - connect
12
13
  - considerate
@@ -33,6 +34,7 @@ words:
33
34
  - nurtur
34
35
  - pleasant
35
36
  - polite
37
+ - provide
36
38
  - quiet*
37
39
  - respon
38
40
  - sensitiv
@@ -73,6 +75,7 @@ words:
73
75
  - decisive
74
76
  - defend
75
77
  - determin
78
+ - direct
76
79
  - domina
77
80
  - dominant
78
81
  - driven
@@ -109,5 +112,6 @@ words:
109
112
  - selfrelian
110
113
  - selfsufficien
111
114
  - stubborn
115
+ - strong
112
116
  - superior
113
117
  - unreasonab
@@ -2,15 +2,18 @@ words:
2
2
  growth_coded:
3
3
  - striving
4
4
  - driven
5
+ - commit
5
6
  - highly motivated
6
7
  - improvement
7
8
  - learn
8
9
  - strive
10
+ - serve
9
11
  - grow
10
12
  - persevere
11
13
  - determined
12
14
 
13
15
  fixed_coded:
16
+ - ability
14
17
  - est
15
18
  - brightest
16
19
  - smart
@@ -20,7 +23,9 @@ words:
20
23
  - superhero
21
24
  - genius
22
25
  - expert
26
+ - strong
27
+ - take
23
28
  - brilliant
24
29
  - natural
25
30
  - talent
26
- - overachieve
31
+ - overachieve
@@ -0,0 +1,53 @@
1
+ - type: gender
2
+ trends:
3
+ - result: neutral
4
+ recommendation: |
5
+ Either you aren't using any gender-coded words or you found a good balance between using gender-coded words.
6
+ There could still be other factors that make this text less inclusive.
7
+ - result: masculine-coded
8
+ recommendation: |
9
+ You're using more masculine-coded words than feminine coded-words. Try to replace some of the words listed as masculine-coded.
10
+ This will result in a more balanced and inclusive text. If this happens to be a job ad, note that according to
11
+ <a href='http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf'>this study</a>
12
+ it risks putting women off and encourage men to apply.
13
+ - result: strongly masculine-coded
14
+ recommendation: |
15
+ You're using more masculine-coded words than feminine coded-words. Try to replace some of the words listed as masculine-coded.
16
+ This will result in a more balanced and inclusive text. If this happens to be a job ad, note that according to
17
+ <a href='http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf'>this study</a>
18
+ it risks putting women off and encourage men to apply.
19
+ - result: feminine-coded
20
+ recommendation: |
21
+ You're using more feminine coded-words than masculine-coded. You could replace some words however, a feminine-coded text only
22
+ has a slight effect on the inclusiveness of your text. For example, if this is a job ad, it will encourage women to apply
23
+ but the effect on men is minimal. See <a href='http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf'>this study</a>.
24
+ - result: strongly feminine-coded
25
+ recommendation: |
26
+ You're using more feminine coded-words than masculine-coded. You could replace some words however, a feminine-coded text only
27
+ has a slight effect on the inclusiveness of your text. For example, if this is a job ad, it will encourage women to apply
28
+ but the effect on men is minimal. See <a href='http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf'>this study</a>.
29
+ - type: mindset
30
+ trends:
31
+ - result: neutral
32
+ recommendation: |
33
+ Although it is marked as neutral, it might be good to look into changing the text a little bit. Growth mindset terms imply abilities and
34
+ talents can be developed. Recruiting content that uses growth mindset language can lead to faster hiring times
35
+ and more hires being made from underrepresented groups.
36
+ - result: growth-coded
37
+ recommendation: |
38
+ Growth mindset terms imply abilities and talents can be developed. Recruiting content that uses growth mindset language can lead to faster hiring times
39
+ and more hires being made from underrepresented groups. This text is a great start to make sure you're inclusive on a mindset-level.
40
+ - result: fixed-coded
41
+ recommendation: |
42
+ Fixed-mindset implies that talents and traits are innate and static. Recruiting content that uses growth mindset language can lead to faster hiring times
43
+ and more hires being made from underrepresented groups. We'd recommend you replace some of the words listed as fixed. You can find some more
44
+ information in <a href='https://medium.com/textio/growth-mindset-language-41d51c91432'>this medium post</a>.
45
+ - result: strongly growth-coded
46
+ recommendation: |
47
+ Growth mindset terms imply abilities and talents can be developed. Recruiting content that uses growth mindset language can lead to faster hiring times
48
+ and more hires being made from underrepresented groups. This text is a great start to make sure you're inclusive on a mindset-level.
49
+ - result: strongly fixed-coded
50
+ recommendation: |
51
+ Fixed-mindset implies that talents and traits are innate and static. Recruiting content that uses growth mindset language can lead to faster hiring times
52
+ and more hires being made from underrepresented groups. We'd recommend you replace some of the words listed as fixed. You can find some more
53
+ information in <a href='https://medium.com/textio/growth-mindset-language-41d51c91432'>this medium post</a>.
@@ -0,0 +1,7 @@
1
+ # List any source used here. We will make sure this is listed and credit is given.
2
+ - title: Gender Decoder Tool by Kat Matfield
3
+ url: http://gender-decoder.katmatfield.com/
4
+ - title: Evidence That Gendered Wording in Job Advertisements Exists and Sustains Gender Inequality
5
+ url: http://gender-decoder.katmatfield.com/static/documents/Gaucher-Friesen-Kay-JPSP-Gendered-Wording-in-Job-ads.pdf
6
+ - title: Want to hire faster? Write about “learning,” not “brilliance”
7
+ url: https://medium.com/textio/growth-mindset-language-41d51c91432
@@ -16,8 +16,19 @@ module Linter
16
16
  class Error < StandardError; end
17
17
 
18
18
  class << self
19
- def cli_analyze(file_name)
20
- Linter::CLI.analyze(file_name)
19
+ def analyze(text, job_ad: false)
20
+ response = {
21
+ gender_association_analysis: Linter::GenderAssociation.analyze(text),
22
+ pronoun_analysis: Linter::PronounAssociation.analyze(text),
23
+ misused_words_analysis: Linter::MisusedWords.analyze(text)
24
+ }
25
+ response[:mindset_association_analysis] = Linter::MindsetAssociation.analyze(text) if job_ad
26
+ response
27
+ end
28
+
29
+ def sources
30
+ file_path = File.join(__dir__, '../data/sources.yml')
31
+ YAML.load_file(file_path)
21
32
  end
22
33
  end
23
34
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module Linter
4
4
  class BaseAssociation
5
+ SKIP_WORDS = ['directory'].freeze
6
+
5
7
  def self.analyze(text)
6
8
  result = OpenStruct.new(trend: '')
7
9
 
@@ -14,6 +16,7 @@ module Linter
14
16
  end
15
17
 
16
18
  result.trend = calculate_trend(result)
19
+ result.recommendation = add_recommendation(result)
17
20
  result
18
21
  end
19
22
 
@@ -30,9 +33,19 @@ module Linter
30
33
  matches
31
34
  .flatten
32
35
  .map(&:downcase)
36
+ .reject { |m| SKIP_WORDS.include? m}
33
37
  .group_by { |v| v }
34
38
  .transform_values(&:size)
35
39
  .to_h
36
40
  end
41
+
42
+ def self.recommendation_file
43
+ file_path = File.join(__dir__, '../../data/recommendations.yml')
44
+ @recommendation_file ||= YAML.load_file(file_path)
45
+ end
46
+
47
+ def self.add_recommendation(_result)
48
+ false
49
+ end
37
50
  end
38
51
  end
@@ -25,5 +25,9 @@ module Linter
25
25
  'masculine-coded'
26
26
  end
27
27
  end
28
+
29
+ def self.add_recommendation(result)
30
+ recommendation_file.find { |rec| rec['type'] == 'gender' }&.dig('trends')&.find { |trend| trend['result'] == result.trend }&.dig('recommendation')
31
+ end
28
32
  end
29
33
  end
@@ -11,7 +11,7 @@ module Linter
11
11
  end
12
12
 
13
13
  def self.calculate_trend(result)
14
- case result.fixed_coded_word_counts.values.sum - result.growth_coded_word_counts.values.sum
14
+ case result.growth_coded_word_counts.values.sum - result.fixed_coded_word_counts.values.sum
15
15
  when 0
16
16
  'neutral'
17
17
  when 1..3
@@ -24,5 +24,9 @@ module Linter
24
24
  'fixed-coded'
25
25
  end
26
26
  end
27
+
28
+ def self.add_recommendation(result)
29
+ recommendation_file.find { |rec| rec['type'] == 'mindset' }&.dig('trends')&.find { |trend| trend['result'] == result.trend }&.dig('recommendation')
30
+ end
27
31
  end
28
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Linter
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.13'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - lien van den steen
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-11 00:00:00.000000000 Z
11
+ date: 2020-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '2.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.85'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-packaging
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.1'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rubocop-rspec
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -108,33 +122,23 @@ dependencies:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0.8'
111
- description:
125
+ description:
112
126
  email:
113
127
  - lienvandensteen@gmail.com
114
- executables: []
128
+ executables:
129
+ - linter
115
130
  extensions: []
116
131
  extra_rdoc_files: []
117
132
  files:
118
- - ".gitignore"
119
- - ".gitlab-ci.yml"
120
- - ".rspec"
121
- - ".rubocop.yml"
122
- - ".rubocop_todo.yml"
123
- - ".ruby-version"
124
- - ".travis.yml"
125
- - CODE_OF_CONDUCT.md
126
- - Gemfile
127
- - Gemfile.lock
128
133
  - LICENSE.txt
129
134
  - README.md
130
- - Rakefile
131
- - bin/console
132
135
  - bin/linter
133
- - bin/setup
134
136
  - data/gender_association_wordlist.yml
135
137
  - data/mindset_wordlist.yml
136
138
  - data/misused_wordlist.yml
137
139
  - data/pronoun_association_wordlist.yml
140
+ - data/recommendations.yml
141
+ - data/sources.yml
138
142
  - lib/linter.rb
139
143
  - lib/linter/base_association.rb
140
144
  - lib/linter/cli.rb
@@ -143,14 +147,13 @@ files:
143
147
  - lib/linter/misused_words.rb
144
148
  - lib/linter/pronoun_association.rb
145
149
  - lib/linter/version.rb
146
- - linter.gemspec
147
150
  homepage: https://gitlab.com/lienvdsteen/linter
148
151
  licenses:
149
152
  - MIT
150
153
  metadata:
151
154
  homepage_uri: https://gitlab.com/lienvdsteen/linter
152
155
  source_code_uri: https://gitlab.com/lienvdsteen/linter
153
- post_install_message:
156
+ post_install_message:
154
157
  rdoc_options: []
155
158
  require_paths:
156
159
  - lib
@@ -166,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
169
  version: '0'
167
170
  requirements: []
168
171
  rubygems_version: 3.0.3
169
- signing_key:
172
+ signing_key:
170
173
  specification_version: 4
171
174
  summary: Library to check a text for gender coded language
172
175
  test_files: []
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
@@ -1,18 +0,0 @@
1
- rspec:
2
- stage: test
3
- only:
4
- - merge_requests
5
- script:
6
- - bundle install
7
- - bundle exec rspec
8
-
9
- rubocop:
10
- stage: test
11
- only:
12
- - merge_requests
13
- script:
14
- - bundle install
15
- - bundle exec rubocop
16
-
17
- include:
18
- template: Dependency-Scanning.gitlab-ci.yml
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1,70 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- require:
4
- - rubocop-rspec
5
- AllCops:
6
- TargetRubyVersion: 2.6
7
- # Cop names are displayed in offense messages by default. Change behavior
8
- # by overriding DisplayCopNames, or by giving the `--no-display-cop-names`
9
- # option.
10
- DisplayCopNames: true
11
- # Style guide URLs are not displayed in offense messages by default. Change
12
- # behavior by overriding DisplayStyleGuide, or by giving the
13
- # -S/--display-style-guide option.
14
- DisplayStyleGuide: false
15
- # Exclude some GitLab files
16
- Exclude:
17
- - '.gitlab/**/*'
18
-
19
- Style/NumericLiteralPrefix:
20
- Enabled: false
21
- Metrics/BlockLength:
22
- Enabled: false
23
- Layout/LineLength:
24
- Enabled: false
25
- Style/Documentation:
26
- Enabled: false
27
- RSpec/FilePath:
28
- Enabled: false
29
- Metrics/AbcSize:
30
- Max: 60
31
- Metrics/MethodLength:
32
- Max: 30
33
- RSpec/ExampleLength:
34
- Enabled: false
35
- RSpec/MultipleExpectations:
36
- Max: 2
37
- RSpec/NestedGroups:
38
- Max: 5
39
- Layout/SpaceInsideHashLiteralBraces:
40
- Enabled: false
41
- Layout/EmptyLinesAroundAttributeAccessor:
42
- Enabled: true
43
- Layout/SpaceAroundMethodCallOperator:
44
- Enabled: true
45
- Layout/SpaceInsideBlockBraces:
46
- Enabled: false
47
- Style/SlicingWithRange:
48
- Enabled: true
49
- Style/ConditionalAssignment:
50
- EnforcedStyle: assign_inside_condition
51
- Lint/DeprecatedOpenSSLConstant:
52
- Enabled: true
53
- Lint/MixedRegexpCaptureTypes:
54
- Enabled: true
55
- Lint/RaiseException:
56
- Enabled: true
57
- Lint/StructNewOverride:
58
- Enabled: true
59
- Style/ExponentialNotation:
60
- Enabled: true
61
- Style/HashEachMethods:
62
- Enabled: true
63
- Style/HashTransformKeys:
64
- Enabled: true
65
- Style/HashTransformValues:
66
- Enabled: true
67
- Style/RedundantRegexpCharacterClass:
68
- Enabled: true
69
- Style/RedundantRegexpEscape:
70
- Enabled: true
@@ -1,60 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2020-06-06 22:58:53 +0200 using RuboCop version 0.85.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Cop supports --auto-correct.
11
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
12
- Layout/ExtraSpacing:
13
- Exclude:
14
- - 'linter.gemspec'
15
-
16
- # Offense count: 3
17
- # Cop supports --auto-correct.
18
- Layout/SpaceAfterComma:
19
- Exclude:
20
- - 'lib/linter/gender_association.rb'
21
- - 'lib/linter/misused_words.rb'
22
- - 'lib/linter/pronoun_association.rb'
23
-
24
- # Offense count: 1
25
- # Cop supports --auto-correct.
26
- # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
27
- # SupportedStylesForExponentOperator: space, no_space
28
- Layout/SpaceAroundOperators:
29
- Exclude:
30
- - 'linter.gemspec'
31
-
32
- # Offense count: 4
33
- Lint/IneffectiveAccessModifier:
34
- Exclude:
35
- - 'lib/linter/gender_association.rb'
36
- - 'lib/linter/misused_words.rb'
37
- - 'lib/linter/pronoun_association.rb'
38
-
39
- # Offense count: 3
40
- # Cop supports --auto-correct.
41
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
42
- Lint/UselessAccessModifier:
43
- Exclude:
44
- - 'lib/linter/gender_association.rb'
45
- - 'lib/linter/misused_words.rb'
46
- - 'lib/linter/pronoun_association.rb'
47
-
48
- # Offense count: 2
49
- # Cop supports --auto-correct.
50
- Style/ExpandPathArguments:
51
- Exclude:
52
- - 'linter.gemspec'
53
-
54
- # Offense count: 1
55
- # Cop supports --auto-correct.
56
- # Configuration parameters: EnforcedStyle.
57
- # SupportedStyles: always, always_true, never
58
- Style/FrozenStringLiteralComment:
59
- Exclude:
60
- - 'linter.gemspec'
@@ -1 +0,0 @@
1
- 2.6.5
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.2.5
7
- before_install: gem install bundler -v 1.17.1
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at lienvandensteen@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- group :development do
6
- gem 'pry'
7
- gem 'rb-readline' # TODO: fix
8
- end
9
-
10
- # Specify your gem's dependencies in linter.gemspec
11
- gemspec
@@ -1,69 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- linter (0.1.8)
5
- colorize (~> 0.8)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.4.0)
11
- coderay (1.1.3)
12
- colorize (0.8.1)
13
- diff-lcs (1.3)
14
- method_source (1.0.0)
15
- parallel (1.19.1)
16
- parser (2.7.1.3)
17
- ast (~> 2.4.0)
18
- pry (0.13.1)
19
- coderay (~> 1.1)
20
- method_source (~> 1.0)
21
- rainbow (3.0.0)
22
- rake (10.5.0)
23
- rb-readline (0.5.5)
24
- regexp_parser (1.7.0)
25
- rexml (3.2.4)
26
- rspec (3.9.0)
27
- rspec-core (~> 3.9.0)
28
- rspec-expectations (~> 3.9.0)
29
- rspec-mocks (~> 3.9.0)
30
- rspec-core (3.9.2)
31
- rspec-support (~> 3.9.3)
32
- rspec-expectations (3.9.2)
33
- diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.9.0)
35
- rspec-mocks (3.9.1)
36
- diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.9.0)
38
- rspec-support (3.9.3)
39
- rubocop (0.85.0)
40
- parallel (~> 1.10)
41
- parser (>= 2.7.0.1)
42
- rainbow (>= 2.2.2, < 4.0)
43
- regexp_parser (>= 1.7)
44
- rexml
45
- rubocop-ast (>= 0.0.3)
46
- ruby-progressbar (~> 1.7)
47
- unicode-display_width (>= 1.4.0, < 2.0)
48
- rubocop-ast (0.0.3)
49
- parser (>= 2.7.0.1)
50
- rubocop-rspec (1.39.0)
51
- rubocop (>= 0.68.1)
52
- ruby-progressbar (1.10.1)
53
- unicode-display_width (1.7.0)
54
-
55
- PLATFORMS
56
- ruby
57
-
58
- DEPENDENCIES
59
- bundler (~> 1.17)
60
- linter!
61
- pry
62
- rake (~> 10.0)
63
- rb-readline
64
- rspec (~> 3.0)
65
- rubocop (~> 0.85)
66
- rubocop-rspec (~> 1.39)
67
-
68
- BUNDLED WITH
69
- 1.17.2
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task default: :spec
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'linter'
6
- require 'pry'
7
-
8
- # You can add fixtures and/or initialization code here to make experimenting
9
- # with your gem easier. You can also use a different console, if you like.
10
-
11
- # (If you use this, don't forget to add pry to your Gemfile!)
12
- # require 'pry'
13
- # Pry.start
14
-
15
- require 'irb'
16
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,47 +0,0 @@
1
- lib = File.expand_path('../lib', __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'linter/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'linter'
7
- spec.version = Linter::VERSION
8
- spec.authors = ['lien van den steen']
9
- spec.email = ['lienvandensteen@gmail.com']
10
-
11
- spec.summary = 'Library to check a text for gender coded language'
12
- # spec.description = %q{TODO: Write a longer description or delete this line.}
13
- spec.homepage = 'https://gitlab.com/lienvdsteen/linter'
14
- spec.license = 'MIT'
15
-
16
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
17
- # to allow pushing to a single host or delete this section to allow pushing to any host.
18
- if spec.respond_to?(:metadata)
19
- # spec.metadata["allowed_push_host"] = "TODO: Set to "http://mygemserver.com"
20
-
21
- spec.metadata['homepage_uri'] = 'https://gitlab.com/lienvdsteen/linter'
22
- spec.metadata['source_code_uri'] = 'https://gitlab.com/lienvdsteen/linter'
23
- # spec.metadata['changelog_uri'] = 'TODO: Put your gem's CHANGELOG.md URL here.'
24
- else
25
- raise 'RubyGems 2.0 or newer is required to protect against ' \
26
- 'public gem pushes.'
27
- end
28
-
29
- # Specify which files should be added to the gem when it is released.
30
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
31
- # Use expand_path(__dir__) instead of expand_path('..', __FILE__).
32
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
34
- end
35
- spec.bindir = 'exe'
36
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
- spec.require_paths = ['lib']
38
-
39
- spec.add_development_dependency 'bundler', '~> 1.17'
40
- spec.add_development_dependency 'pry', '~> 0.13'
41
- spec.add_development_dependency 'rake', '~> 10.0'
42
- spec.add_development_dependency 'rspec', '~> 3.0'
43
- spec.add_development_dependency 'rubocop', '~> 0.85'
44
- spec.add_development_dependency 'rubocop-rspec', '~> 1.39'
45
-
46
- spec.add_dependency('colorize', '~> 0.8')
47
- end