lib/lucid/parser.rb in lucid-0.0.3 vs lib/lucid/parser.rb in lucid-0.0.4

- old
+ new

@@ -4,17 +4,14 @@ def initialize(options) @options = options end def specs - #puts "[Parser.specs] Is @options[:pattern] nil? #{@options[:pattern].nil?}" return [] if @options[:pattern].nil? set_of_specs = gather_specs_by_glob - #puts "[Parser.specs] Were there any specs? #{set_of_specs.any?}" - return set_of_specs.any? ? set_of_specs : nil end def tags tags = { @@ -88,12 +85,10 @@ specs_to_include = [] specs_to_exclude = [] pattern = @options[:pattern].dup - #puts "[Parser.gather_specs_by_glob] The pattern is: #{pattern}" - # Determine if some specs were indicated to be excluded # and mark those separately. This also handles when only # specific specs are to be executed. pattern.split(',').each do |f| if f[0].chr == '~' @@ -107,34 +102,23 @@ # gathered by default. Unless, that is, the command # indicates that only certain specs should be run. pattern = '**/*' if except.any? pattern = nil if only.any? - #puts "[Parser.gather_specs_by_glob] Is the pattern after only/except nil?: #{pattern.nil?}" - #puts "[Parser.gather_specs_by_glob] The @options[:spec_path] is: #{@options[:spec_path]}" - if only.any? only.each do |f| - #puts "[Parser.gather_specs_by_glob] There is an only and it is: #{f}" - #specs_to_include += Dir.glob("#{@options[:spec_path]}/#{f}.feature") specs_to_include += Dir.glob("#{f}") end else - #puts "[Parser.gather_specs_by_glob] There is no only so pattern is: #{pattern}" specs_to_include += Dir.glob("#{@options[:spec_path]}/#{pattern}.feature") end - #puts "[Parser.gather_specs_by_glob] After checking only, specs_to_include is: #{specs_to_include}" - if except.any? except.each do |f| - #puts "[Parser.gather_specs_by_glob] There is an except and it is: #{f}" specs_to_exclude = Dir.glob("#{@options[:spec_path]}/#{f}.feature") end end - - #puts "[Parser.gather_specs_by_glob] Returning #{specs_to_include - specs_to_exclude}" (specs_to_include - specs_to_exclude).uniq end end # class: Parser