added rails_env
This commit is contained in:
@@ -7,6 +7,27 @@ module Xgrep
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update_pathspec ( pathspec )
|
def update_pathspec ( pathspec )
|
||||||
|
files = %w{Capfile Gemfile Rakefile}
|
||||||
|
dirs = %w{app config db lib}
|
||||||
|
specs = %w{spec}
|
||||||
|
|
||||||
|
if pathspec.empty?
|
||||||
|
@pathspec = files + dirs + specs
|
||||||
|
elsif pathspec.include? :core
|
||||||
|
@pathspec = files + dirs
|
||||||
|
else
|
||||||
|
@pathspec += %w{app/assets} if pathspec.include? :asset
|
||||||
|
@pathspec += %w{app/helpers} if pathspec.include? :helper
|
||||||
|
@pathspec += %w{app/mailers} if pathspec.include? :mailer
|
||||||
|
@pathspec += %w{app/models} if pathspec.include? :models
|
||||||
|
@pathspec += %w{app/views} if pathspec.include? :views
|
||||||
|
@pathspec += %w{app/controllers} if pathspec.include? :controllers
|
||||||
|
@pathspec += %w{app/services} if pathspec.include? :services
|
||||||
|
@pathspec += %w{config} if pathspec.include? :config
|
||||||
|
@pathspec += %w{db} if pathspec.include? :db
|
||||||
|
@pathspec += %w{lib} if pathspec.include? :lib
|
||||||
|
@pathspec += %w{spec} if pathspec.include? :spec
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user