Skip to content

Commit

Permalink
Line Endings ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Franklin Webber committed Dec 11, 2010
1 parent 0418e4f commit e3f7864
Show file tree
Hide file tree
Showing 15 changed files with 339 additions and 333 deletions.
36 changes: 18 additions & 18 deletions .autotest
@@ -1,18 +1,18 @@
begin
require 'autotest/growl'
rescue Exception
puts %{
Autotest/Autospec can use Growl (growl.info|growlforwindows.com) to assist with reporting errors.
This would require Growl for the appropriate platform (MAC|Windows) and the Ruby gem 'karl-autotest-growl'
}
sleep 4
end

Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git} # ignore Version Control System
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again...
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
Dir['spec/**/*.rb']
}
nil
}
begin
require 'autotest/growl'
rescue Exception
puts %{
Autotest/Autospec can use Growl (growl.info|growlforwindows.com) to assist with reporting errors.
This would require Growl for the appropriate platform (MAC|Windows) and the Ruby gem 'karl-autotest-growl'
}
sleep 4
end
Autotest.add_hook(:initialize) {|at|
at.add_exception %r{^\.git} # ignore Version Control System
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again...
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _|
Dir['spec/**/*.rb']
}
nil
}
10 changes: 5 additions & 5 deletions cucumber.yml
@@ -1,6 +1,6 @@
## YAML Template.
---
default: -p base
base: --format rerun --out rerun.txt --format pretty
autotest: --format pretty --color
## YAML Template.
---
default: -p base
base: --format rerun --out rerun.txt --format pretty
autotest: --format pretty --color
autotest-all: --format pretty --color
1 change: 1 addition & 0 deletions features/find_by_application.feature
@@ -1,3 +1,4 @@
@application
Feature: Finding log entries by application
As an Indy user I am able to create an instance and find all logs related to a particular application.

Expand Down
1 change: 1 addition & 0 deletions features/find_by_exact_log_level.feature
@@ -1,3 +1,4 @@
@log_level
Feature: Finding log entries at an exact log level
As an Indy user I am able to create an instance and find all logs at the various standard log levels.

Expand Down
1 change: 1 addition & 0 deletions features/find_by_exact_message.feature
@@ -1,3 +1,4 @@
@message
Feature: Finding log entries exactly matching a message
As an Indy user I am able to create an instance and find all logs that exactly match a message.

Expand Down
1 change: 1 addition & 0 deletions features/find_by_exact_time.feature
@@ -1,3 +1,4 @@
@time
Feature: Finding log messages at a particular time
As an Indy user I am able to create an instance and find all logs at an exact time.

Expand Down
1 change: 1 addition & 0 deletions features/find_by_log_levels.feature
@@ -1,3 +1,4 @@
@log_level
Feature: Finding log entries at various log levels
As an Indy user I am able to create an instance and find all logs at or above the log level.

Expand Down
1 change: 1 addition & 0 deletions features/find_by_message.feature
@@ -1,3 +1,4 @@
@message
Feature: Finding log messages by message
As an Indy user I am able to create an instance and find all logs related to a particular message or portion of a message.

Expand Down
108 changes: 54 additions & 54 deletions features/step_definitions/find_by.steps.rb
@@ -1,55 +1,55 @@

When /^searching the log for the application '([^']+)'$/ do |name|
@results = Indy.search(@log_source).with(:default).for(:application => name)
end

When /^searching the log for the log severity (\w+)$/ do |severity|
@results = Indy.search(@log_source).with(:default).for(:severity => severity)
end

When /^searching the log for the log severity (\w+) and lower$/ do |severity|
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_below)
end

When /^searching the log for the log severity (\w+) and higher$/ do |severity|
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_above)
end

When /^searching the log for the exact match of the message "([^"]+)"$/ do |message|
@results = Indy.search(@log_source).with(:default).for(:message => message)
end

When /^searching the log for matches of the message "([^"]+)"$/ do |message|
@results = Indy.search(@log_source).with(:default).like(:message => message)
end

When /^searching the log for the time (.+)$/ do |time|
@results = Indy.search(@log_source).with(:default).for(:time => time)
end

Transform /^no$/ do |no|
0
end

Transform /^(\d+)$/ do |number|
number.to_i
end

Then /^I expect to have found (no|\d+) log entr(?:y|ies)$/ do |count|
@results.size.should == count
end

Transform /^first$/ do |order|
0
end
Transform /^last$/ do |order|
-1
end

Transform /^(\d+)(?:st|nd|rd|th)$/ do |order|
order.to_i - 1
end

Then /^I expect the (first|last|\d+(?:st|nd|rd|th)) entry to be:$/ do |position,expected|
@results[position].line.should == expected

When /^searching the log for the application '([^']+)'$/ do |name|
@results = Indy.search(@log_source).with(:default).for(:application => name)
end

When /^searching the log for the log severity (\w+)$/ do |severity|
@results = Indy.search(@log_source).with(:default).for(:severity => severity)
end

When /^searching the log for the log severity (\w+) and lower$/ do |severity|
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_below)
end

When /^searching the log for the log severity (\w+) and higher$/ do |severity|
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_above)
end

When /^searching the log for the exact match of the message "([^"]+)"$/ do |message|
@results = Indy.search(@log_source).with(:default).for(:message => message)
end

When /^searching the log for matches of the message "([^"]+)"$/ do |message|
@results = Indy.search(@log_source).with(:default).like(:message => message)
end

When /^searching the log for the time (.+)$/ do |time|
@results = Indy.search(@log_source).with(:default).for(:time => time)
end

Transform /^no$/ do |no|
0
end

Transform /^(\d+)$/ do |number|
number.to_i
end

Then /^I expect to have found (no|\d+) log entr(?:y|ies)$/ do |count|
@results.size.should == count
end

Transform /^first$/ do |order|
0
end
Transform /^last$/ do |order|
-1
end

Transform /^(\d+)(?:st|nd|rd|th)$/ do |order|
order.to_i - 1
end

Then /^I expect the (first|last|\d+(?:st|nd|rd|th)) entry to be:$/ do |position,expected|
@results[position].line.should == expected
end
6 changes: 3 additions & 3 deletions features/step_definitions/log_file.steps.rb
@@ -1,4 +1,4 @@

Given /^the following log:$/ do |string|
@log_source = string

Given /^the following log:$/ do |string|
@log_source = string
end
10 changes: 5 additions & 5 deletions lib/indy.rb
@@ -1,6 +1,6 @@
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

require 'indy/indy'
require 'indy/result_set'
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

require 'indy/indy'
require 'indy/result_set'
require 'indy/result'

0 comments on commit e3f7864

Please sign in to comment.