gloc 0.3.1 → 0.4.0

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
- SHA1:
3
- metadata.gz: cb9244dd2be37e278104bde4f0204c06f47aeeb6
4
- data.tar.gz: 52d608564c2c687b790727d66bd1c233cddf3357
2
+ SHA256:
3
+ metadata.gz: bd73796e1c759d5340ea4478edab80c3b9bfe05af571a23caaeee56f024564bb
4
+ data.tar.gz: eab787cfeaaa52b9eadee669ddfbbfec46bf517766f9c06ca888d8ed890cf634
5
5
  SHA512:
6
- metadata.gz: 205bc3d6622914c67b52544300850f33df426baeed919cebd21104c6d237feff7e3beeb39b7ae385b9368eb25bfb5501290058e3117cf86da2b965717035350c
7
- data.tar.gz: 35f904fbace4b6c866739cc249e55082dc8bad254ed03eca0a390b00f0802388ff2fa195fa7c0d28f3da637f35c7cb31bce038cf9e3f14a93ddb51fa1a2b6dcf
6
+ metadata.gz: 610cb691e8cba874108f5e8081405f5044a372df81469a71ef0fe03dde46640ffea2ff92a5ef27e27dae4ad818823fcffc145a2a2872e1b0df664b4e7b6558fe
7
+ data.tar.gz: 592969a3042bab78d38b1dc53df591c9362ebc42fff0161e52157f36533e75708cf50ba7280173ae81baa58e4e9b92bbd4871850a52fbd3def3b468f64b90e9d
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/.pryrc ADDED
@@ -0,0 +1,4 @@
1
+ # this loads all of "gloc"
2
+ lib = File.expand_path('lib', __dir__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'gloc'
@@ -0,0 +1,37 @@
1
+ Lint/HandleExceptions:
2
+ Enabled: false
3
+
4
+ Metrics/AbcSize:
5
+ Enabled: false
6
+ Metrics/ClassLength:
7
+ Enabled: false
8
+ Metrics/LineLength:
9
+ Enabled: false
10
+ Metrics/MethodLength:
11
+ Enabled: false
12
+ Metrics/ModuleLength:
13
+ Enabled: false
14
+
15
+ Style/AccessModifierDeclarations:
16
+ Enabled: false
17
+ Style/BlockDelimiters:
18
+ Enabled: false
19
+ Style/Documentation:
20
+ Enabled: false
21
+ Style/FrozenStringLiteralComment:
22
+ Enabled: false
23
+ Style/Lambda:
24
+ Enabled: false
25
+ Style/NestedTernaryOperator:
26
+ Enabled: false
27
+ Style/Semicolon:
28
+ Enabled: true
29
+ AllowAsExpressionSeparator: true
30
+ Style/SingleLineMethods:
31
+ Enabled: false
32
+ Style/TrailingCommaInArguments:
33
+ Enabled: false
34
+ Style/TrailingCommaInArrayLiteral:
35
+ Enabled: false
36
+ Style/TrailingCommaInHashLiteral:
37
+ Enabled: false
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.3.8
@@ -0,0 +1,52 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gloc (0.4.0)
5
+ rainbow (~> 3.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.0)
11
+ coderay (1.1.2)
12
+ interception (0.5)
13
+ jaro_winkler (1.5.2)
14
+ method_source (0.9.2)
15
+ minitest (5.11.3)
16
+ parallel (1.14.0)
17
+ parser (2.6.2.0)
18
+ ast (~> 2.4.0)
19
+ pry (0.12.2)
20
+ coderay (~> 1.1.0)
21
+ method_source (~> 0.9.0)
22
+ pry-rescue (1.5.0)
23
+ interception (>= 0.5)
24
+ pry (>= 0.12.0)
25
+ psych (3.1.0)
26
+ rainbow (3.0.0)
27
+ rake (12.3.2)
28
+ rubocop (0.66.0)
29
+ jaro_winkler (~> 1.5.1)
30
+ parallel (~> 1.10)
31
+ parser (>= 2.5, != 2.5.1.1)
32
+ psych (>= 3.1.0)
33
+ rainbow (>= 2.2.2, < 4.0)
34
+ ruby-progressbar (~> 1.7)
35
+ unicode-display_width (>= 1.4.0, < 1.6)
36
+ ruby-progressbar (1.10.0)
37
+ unicode-display_width (1.5.0)
38
+
39
+ PLATFORMS
40
+ ruby
41
+
42
+ DEPENDENCIES
43
+ bundler
44
+ gloc!
45
+ minitest
46
+ pry
47
+ pry-rescue
48
+ rake
49
+ rubocop
50
+
51
+ BUNDLED WITH
52
+ 2.0.1
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Peter Vandenberk
3
+ Copyright (c) 2016-2019 Peter Vandenberk (pvandenberk@mac.com)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -6,14 +6,14 @@
6
6
  * it doesn't ignore files just because it doesn't recognise them _(ie. cannot correctly guess their language)_
7
7
  * in a git repo, it processes `$( git ls-files )` by default
8
8
  * in a non-git repo, it processes `$( find . -type f)` by default
9
- * it generates human-friendly, `loc`-alike output
9
+ * it generates human-friendly, `(c)loc`-alike output
10
10
  * it is Unix pipeline friendly, by design:
11
11
  * it reads the list of filenames to process from `stdin` if `[ ! -t 0 ]`
12
12
  * it writes machine-parsable JSON output to `stdout` if `[ ! -t 1 ]`
13
13
 
14
14
  ## Example
15
15
 
16
- For the popular Ruby on Rails framework, `gloc` generates the following `loc`-alike output:
16
+ For the popular Ruby on Rails framework, `gloc` generates the following `(c)loc`-alike output:
17
17
 
18
18
  --------------------------------------------------------------------------------
19
19
  Language Files Lines Blank Comment Code
@@ -61,6 +61,10 @@ For various reasons, none of these existing utilities to count lines of code are
61
61
  * [Aaronepower/tokei](https://github.com/Aaronepower/tokei)
62
62
  * [SLOCCount](http://www.dwheeler.com/sloccount/)
63
63
 
64
+ And it **definitely** isn't:
65
+
66
+ * [LocMetrics](http://www.locmetrics.com/)
67
+
64
68
  ## Installation
65
69
 
66
70
  gem install gloc
@@ -95,12 +99,11 @@ The results are sorted by "lines of code" by default _(with "lines of code" defi
95
99
  gloc -comment # sort by the number of comment lines
96
100
  gloc -code # sort by lines of code (default)
97
101
 
98
- ## Known Issues
102
+ ## Known Issues and Possible Enhancements
99
103
 
100
104
  * identify comment-only lines for a lot more languages
101
105
  * support more file encodings (not just `UTF-8` and `ISO-8859-1`)
102
106
  * parse shebang lines for scripts without a file extension
103
-
104
107
  * (?) installation via Homebrew
105
108
  * (?) convert script to Perl for performance
106
109
 
data/Rakefile CHANGED
@@ -1,10 +1,38 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
1
+ # rubocop:disable Style/SymbolArray
2
+ # rubocop:disable Style/HashSyntax
3
+
4
+ require 'bundler/gem_tasks'
5
+
6
+ task :validate_gemspec do
7
+ Bundler.load_gemspec('gloc.gemspec').validate
8
+ end
9
+
10
+ task :version => :validate_gemspec do
11
+ puts GLOC.version
12
+ end
13
+
14
+ require 'rubocop/rake_task'
15
+
16
+ RuboCop::RakeTask.new(:rubocop)
17
+
18
+ require 'rake/testtask'
3
19
 
4
20
  Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
21
+ t.libs << 'test'
22
+ t.libs << 'lib'
7
23
  t.test_files = FileList['test/**/*_test.rb']
8
24
  end
9
25
 
10
- task :default => :test
26
+ task :default => [:version, :rubocop, :test]
27
+
28
+ task :documentation
29
+
30
+ task :ready => :documentation do
31
+ sh('bundle --quiet') # regenerate Gemfile.lock e.g. if version has changed
32
+ sh('git diff-index --quiet HEAD --') # https://stackoverflow.com/a/2659808
33
+ end
34
+
35
+ Rake::Task['build'].enhance([:default, :ready])
36
+
37
+ # rubocop:enable Style/HashSyntax
38
+ # rubocop:enable Style/SymbolArray
@@ -1,14 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "gloc"
3
+ require 'bundler/setup'
4
+ require 'gloc'
5
5
 
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- require "pry"
6
+ require 'pry'
11
7
  Pry.start
12
8
 
13
- # require "irb"
14
- # IRB.start
9
+ # That's all Folks!
data/bin/setup CHANGED
@@ -3,10 +3,13 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
+ [ -f Brewfile ] && brew bundle
7
+
6
8
  rbenv install -s
7
9
  gem install --conservative bundler
8
10
  bundle install
9
11
 
10
12
  set +vxeu
13
+ echo
11
14
 
12
15
  # That's all Folks!
data/exe/gloc CHANGED
@@ -1,10 +1,22 @@
1
1
  #!/usr/bin/env ruby -s
2
2
 
3
+ #
4
+ # rubocop:disable Layout/AlignHash
5
+ # rubocop:disable Layout/ElseAlignment
6
+ # rubocop:disable Layout/EndAlignment
7
+ # rubocop:disable Layout/IndentationWidth
8
+ #
9
+ # rubocop:disable Style/EmptyCaseCondition
10
+ # rubocop:disable Style/GlobalVars
11
+ # rubocop:disable Style/RegexpLiteral
12
+ #
13
+
14
+ require 'English'
3
15
  require 'ostruct'
4
16
 
5
17
  source_files = if STDIN.tty? || $tty
6
18
  `git rev-parse --show-toplevel &> /dev/null`
7
- if $?.success?
19
+ if $CHILD_STATUS.success?
8
20
  # we're inside a git repo so
9
21
  # get list of files from git
10
22
  `git ls-files -z #{ARGV.join(' ')}`.split("\0")
@@ -16,7 +28,7 @@ source_files = if STDIN.tty? || $tty
16
28
  else
17
29
  # assume we're running it in a pipeline
18
30
  # and read list of filenames from STDIN
19
- STDIN.read.split($/).map(&:chomp)
31
+ STDIN.read.split($RS).map(&:chomp)
20
32
  end
21
33
 
22
34
  # exclude binary files from stats
@@ -40,14 +52,14 @@ source_files.delete_if { |file|
40
52
  !File.file?(file) || # skip directories
41
53
  !File.size?(file) || # skip empty files
42
54
  !File.read(file, 16)["\0"].nil? # skip binary files
43
- ) && ( $verbose && warn("SKIPPING #{file}...") ; true )
55
+ ) && ($verbose && warn("SKIPPING #{file}..."); true)
44
56
  }
45
57
 
46
- BLANKS = %r{\A\s*\Z}.freeze
58
+ BLANKS = Hash.new(%r{\A\s*\Z}.freeze) # TODO: ext-specific regex for blanks?
47
59
 
48
60
  COMMENTS = {
49
- # FIXME does not work for multi-line comments
50
- # (for the languages that support them)
61
+ # FIXME: does not work for multi-line comments
62
+ # (for the languages that support them)
51
63
  '*.rb' => %r{\A\s*(#.*)\s*\Z},
52
64
  '*.sh' => %r{\A\s*(#.*)\s*\Z},
53
65
  '*.xml' => %r{\A\s*(<!--.*-->)\s*\Z},
@@ -56,57 +68,71 @@ COMMENTS = {
56
68
  '*.js' => %r{\A\s*(//.*|/\*.*\*/)\s*\Z},
57
69
  }.freeze
58
70
 
59
- source_stats = source_files.each_with_object({}) { |file, stats|
60
- file_ext = '*' + File.extname(file) # e.g. '*.rb' or '*' if no ext!
61
- stats_for_ext = begin
62
- stats[file_ext] ||= OpenStruct.new({
63
- file_count: 0,
64
- line_count: 0,
65
- blank_count: 0,
66
- comment_count: 0,
67
- })
68
- end
69
- file_content = File.read(file, :encoding => 'UTF-8')
71
+ STATS_FOR_FILE = Hash.new do |stats_for_file, (file, blank_re, comment_re)|
72
+ file_content = File.read(file, encoding: 'UTF-8')
70
73
  unless file_content.valid_encoding?
71
- file_content = File.read(file, :encoding => 'ISO-8859-1')
72
- # FIXME what about file encodings other than these two???
74
+ file_content = File.read(file, encoding: 'ISO-8859-1')
75
+ # FIXME: what about file encodings other than these two???
73
76
  end
74
- source_lines = file_content.each_line
75
- stats_for_ext.file_count += 1
76
- stats_for_ext.line_count += source_lines.count
77
- stats_for_ext.blank_count += source_lines.grep(BLANKS).count
78
- next unless COMMENTS[file_ext] # only scan for comments if a regex exists!
79
- stats_for_ext.comment_count += source_lines.grep(COMMENTS[file_ext]).count
80
- }
81
77
 
82
- source_stats.values.each do |stats_for_ext|
83
- stats_for_ext.code_count = stats_for_ext.line_count - (
84
- stats_for_ext.blank_count + stats_for_ext.comment_count
78
+ lines = file_content.each_line
79
+
80
+ stats_for_file[[file, blank_re, comment_re]] = OpenStruct.new(
81
+ line_count: line_count = lines.count,
82
+ blank_count: blank_count = lines.grep(blank_re).count,
83
+ comment_count: comment_count = lines.grep(comment_re).count,
84
+ code_count: (line_count - blank_count - comment_count),
85
85
  )
86
86
  end
87
87
 
88
- sort_metric = case
89
- when $files then :file_count
90
- when $lines then :line_count
91
- when $blank then :blank_count
92
- when $comment then :comment_count
93
- when $code then :code_count
94
- else :code_count
88
+ STATS_FOR = Hash.new do |stats_for_ext, ext|
89
+ stats_for_ext[ext] = OpenStruct.new(
90
+ file_count: 0,
91
+ line_count: 0,
92
+ blank_count: 0,
93
+ comment_count: 0,
94
+ code_count: 0,
95
+ )
95
96
  end
96
97
 
98
+ source_files.each do |file|
99
+ ext = '*' + File.extname(file) # e.g. '*.rb' or '*' if no ext!
100
+
101
+ blank_regex = BLANKS[ext]
102
+ comment_regex = COMMENTS[ext]
103
+
104
+ stats_for_file = STATS_FOR_FILE[[file, blank_regex, comment_regex]]
105
+ stats_for_ext = STATS_FOR[ext]
106
+
107
+ stats_for_ext.file_count += 1
108
+ stats_for_ext.line_count += stats_for_file.line_count
109
+ stats_for_ext.blank_count += stats_for_file.blank_count
110
+ stats_for_ext.comment_count += stats_for_file.comment_count
111
+ stats_for_ext.code_count += stats_for_file.code_count
112
+ end
113
+
114
+ sort_metric = case
115
+ when $files then :file_count
116
+ when $lines then :line_count
117
+ when $blank then :blank_count
118
+ when $comment then :comment_count
119
+ when $code then :code_count
120
+ else :code_count
121
+ end
122
+
97
123
  source_stats = Hash[
98
- source_stats.sort_by { |_, stats|
124
+ STATS_FOR.sort_by { |_, stats|
99
125
  stats.send(sort_metric)
100
126
  }.reverse
101
127
  ]
102
128
 
103
- source_stats["TOTAL"] = OpenStruct.new({
129
+ source_stats['TOTAL'] = OpenStruct.new(
104
130
  file_count: source_stats.values.map(&:file_count).reduce(:+) || 0,
105
131
  line_count: source_stats.values.map(&:line_count).reduce(:+) || 0,
106
132
  blank_count: source_stats.values.map(&:blank_count).reduce(:+) || 0,
107
133
  comment_count: source_stats.values.map(&:comment_count).reduce(:+) || 0,
108
134
  code_count: source_stats.values.map(&:code_count).reduce(:+) || 0,
109
- })
135
+ )
110
136
 
111
137
  #
112
138
  # JSON formatting for non-TTY output
@@ -117,7 +143,7 @@ unless STDOUT.tty? || $tty
117
143
 
118
144
  class OpenStruct
119
145
  def to_json(*args)
120
- self.to_h.to_json(args)
146
+ to_h.to_json(args)
121
147
  end
122
148
  end
123
149
 
@@ -132,7 +158,7 @@ end
132
158
 
133
159
  class String
134
160
  def commify
135
- gsub(/(\d)(?=(\d{3})+(\..*)?$)/,'\1,')
161
+ gsub(/(\d)(?=(\d{3})+(\..*)?$)/, '\1,')
136
162
  end
137
163
  end
138
164
 
@@ -157,19 +183,17 @@ end
157
183
  # widest_comment_count = source_stats.values.map(&:comment_count).map(&:length).max
158
184
  # widest_code_count = source_stats.values.map(&:code_count).map(&:length).max
159
185
 
160
- totals = source_stats.delete("TOTAL").to_h.values
161
-
162
- TEMPLATE = " %-13s %12s %12s %12s %12s %12s".freeze
163
- DIVIDER = ('-' * 80).freeze # `loc` uses 80 columns
186
+ DIVIDER = ('-' * 80) # because loc uses 80 columns
187
+ TEMPLATE = ' %-13s %12s %12s %12s %12s %12s'.freeze
164
188
 
165
- puts format("%s\n#{TEMPLATE}\n%s",
166
- DIVIDER,
167
- *%w(Language Files Lines Blank Comment Code),
168
- DIVIDER,
189
+ puts format(
190
+ "#{DIVIDER}\n#{TEMPLATE}\n#{DIVIDER}",
191
+ 'Language', 'Files', 'Lines', 'Blank', 'Comment', 'Code'
169
192
  )
170
193
 
171
194
  source_stats.each do |file_ext, stats|
172
- puts format(TEMPLATE,
195
+ puts format(
196
+ TEMPLATE,
173
197
  file_ext,
174
198
  stats.file_count,
175
199
  stats.line_count,
@@ -179,10 +203,20 @@ source_stats.each do |file_ext, stats|
179
203
  )
180
204
  end
181
205
 
182
- puts format("%s\n#{TEMPLATE}\n%s",
183
- DIVIDER,
184
- "Total", *totals,
185
- DIVIDER,
206
+ puts format(
207
+ "#{DIVIDER}\n#{TEMPLATE}\n#{DIVIDER}",
208
+ 'Total', *source_stats.delete('TOTAL').to_h.values
186
209
  )
187
210
 
211
+ #
212
+ # rubocop:enable Style/RegexpLiteral
213
+ # rubocop:enable Style/GlobalVars
214
+ # rubocop:enable Style/EmptyCaseCondition
215
+ #
216
+ # rubocop:enable Layout/IndentationWidth
217
+ # rubocop:enable Layout/EndAlignment
218
+ # rubocop:enable Layout/ElseAlignment
219
+ # rubocop:enable Layout/AlignHash
220
+ #
221
+
188
222
  # That's all Folks!
@@ -1,30 +1,33 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'gloc/version'
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "gloc"
6
+ spec.name = GLOC::NAME
8
7
  spec.version = GLOC::VERSION
9
- spec.authors = ["Peter Vandenberk"]
10
- spec.email = ["pvandenberk@mac.com"]
8
+ spec.authors = ['Peter Vandenberk']
9
+ spec.email = ['pvandenberk@mac.com']
11
10
 
12
- spec.summary = %q{Not `loc`, not `cloc`, not `tokei`, not `SLOCCOUNT`, ...}
13
- spec.description = %q{Simple "lines of code" utility, based on file extensions!}
14
- spec.homepage = "https://github.com/pvdb/gloc"
15
- spec.license = "MIT"
11
+ spec.summary = 'Not `loc`, not `cloc`, not `tokei`, not `SLOCCOUNT`, ...'
12
+ spec.description = 'Simple "lines of code" utility, based on file extensions!'
13
+ spec.homepage = 'https://github.com/pvdb/gloc'
14
+ spec.license = 'MIT'
16
15
 
17
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
- f.match(%r{^(test|spec|features)/})
16
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
17
+ `git ls-files -z`
18
+ .split("\x0")
19
+ .reject { |f| f.match(%r{^(test|spec|features)/}) }
19
20
  end
20
- spec.bindir = "exe"
21
+ spec.bindir = 'exe'
21
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
23
+ spec.require_paths = ['lib']
23
24
 
24
- spec.add_development_dependency "bundler", "~> 1.13"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "minitest", "~> 5.0"
25
+ spec.add_dependency 'rainbow', '~> 3.0'
27
26
 
28
- spec.add_development_dependency "pry"
29
- spec.add_development_dependency "pry-rescue"
27
+ spec.add_development_dependency 'bundler'
28
+ spec.add_development_dependency 'minitest'
29
+ spec.add_development_dependency 'pry'
30
+ spec.add_development_dependency 'pry-rescue'
31
+ spec.add_development_dependency 'rake'
32
+ spec.add_development_dependency 'rubocop'
30
33
  end
@@ -1,4 +1,4 @@
1
- require "gloc/version"
1
+ require 'gloc/version'
2
2
 
3
3
  module GLOC
4
4
  # Your code goes here...
@@ -1,3 +1,8 @@
1
1
  module GLOC
2
- VERSION = "0.3.1"
2
+ NAME = 'gloc'.freeze
3
+ VERSION = '0.4.0'.freeze
4
+
5
+ def self.version
6
+ "#{NAME} v#{VERSION}"
7
+ end
3
8
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-11 00:00:00.000000000 Z
11
+ date: 2019-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: rainbow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
20
- type: :development
19
+ version: '3.0'
20
+ type: :runtime
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.13'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '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: '5.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
83
111
  description: Simple "lines of code" utility, based on file extensions!
84
112
  email:
85
113
  - pvandenberk@mac.com
@@ -89,10 +117,12 @@ extensions: []
89
117
  extra_rdoc_files: []
90
118
  files:
91
119
  - ".gitignore"
120
+ - ".pryrc"
121
+ - ".rubocop.yml"
92
122
  - ".ruby-version"
93
123
  - ".travis.yml"
94
- - CODE_OF_CONDUCT.md
95
124
  - Gemfile
125
+ - Gemfile.lock
96
126
  - LICENSE.txt
97
127
  - README.md
98
128
  - Rakefile
@@ -121,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
151
  - !ruby/object:Gem::Version
122
152
  version: '0'
123
153
  requirements: []
124
- rubyforge_project:
125
- rubygems_version: 2.5.2
154
+ rubygems_version: 3.0.2
126
155
  signing_key:
127
156
  specification_version: 4
128
157
  summary: Not `loc`, not `cloc`, not `tokei`, not `SLOCCOUNT`, ...
@@ -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 peter.vandenberk@simplybusiness.co.uk. 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/