Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove various typos #24

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/envied/cli.rb
Original file line number Diff line number Diff line change
@@ -25,10 +25,10 @@ def version
def extract
globs = options[:globs]
globs << "{test,spec}/*" if options[:tests]
var_occurences = ENVied::EnvVarExtractor.new(globs: globs).extract
var_occurrences = ENVied::EnvVarExtractor.new(globs: globs).extract

puts "Found %d occurrences of %d variables:" % [var_occurences.values.flatten.size, var_occurences.size]
var_occurences.sort.each do |var, occs|
puts "Found %d occurrences of %d variables:" % [var_occurrences.values.flatten.size, var_occurrences.size]
var_occurrences.sort.each do |var, occs|
puts var
occs.sort_by{|i| i[:path].size }.each do |occ|
puts "* %s:%s" % occ.values_at(:path, :line)
2 changes: 1 addition & 1 deletion lib/envied/env_var_extractor.rb
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ def capture_variables(line)
end

# Extract all keys recursively from files found via `globs`.
# Any occurence of `ENV['A']` or `ENV.fetch('A')` in code (not in comments), will result
# Any occurrence of `ENV['A']` or `ENV.fetch('A')` in code (not in comments), will result
# in 'A' being extracted.
#
# @param globs [Array<String>] the collection of globs