Skip to content

Commit fd7303b

Browse files
committed
Use Bundler gem tasks.
1 parent fb80e66 commit fd7303b

File tree

5 files changed

+41
-414
lines changed

5 files changed

+41
-414
lines changed

Rakefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
require "bundler/gem_tasks"
2+
require "rspec/core/rake_task"
3+
14
Dir[File.dirname(__FILE__) + "/tasks/*.rake"].each { |file| load(file) }
25

3-
# Create rake tasks for a gem manages by github. The tasks are created in the
4-
# gem namespace
5-
GithubGem::RakeTasks.new(:gem)
6+
RSpec::Core::RakeTask.new(:spec) do |task|
7+
task.pattern = "./spec/**/*_spec.rb"
8+
task.rspec_opts = ['--color']
9+
end
610

7-
# Set the RSpec runner with specdoc output as default task.
8-
task :default => "spec:specdoc"
11+
task :default => :spec

lib/request_log_analyzer.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
# The {RequestLogAnalyzer::VERSION} constant can be used to determine what version of request-log-analyzer
99
# is running.
1010
module RequestLogAnalyzer
11-
12-
# The current version of request-log-analyzer.
13-
# Do not change the value by hand; it will be updated automatically by the gem release script.
14-
VERSION = "1.12.8"
1511

1612
# Convert a string/symbol in camelcase ({RequestLogAnalyzer::Controller}) to underscores
1713
# (<tt>request_log_analyzer/controller</tt>). This function can be used to load the file (using
@@ -34,6 +30,7 @@ def self.to_camelcase(str)
3430
end
3531
end
3632

33+
require 'request_log_analyzer/version'
3734
require 'request_log_analyzer/controller'
3835
require 'request_log_analyzer/aggregator'
3936
require 'request_log_analyzer/file_format'

lib/request_log_analyzer/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module RequestLogAnalyzer
2+
VERSION = "1.12.8"
3+
end

request-log-analyzer.gemspec

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
Gem::Specification.new do |s|
2-
s.name = "request-log-analyzer"
3-
4-
# Do not set the version and date field manually, this is done by the release script
5-
s.version = "1.12.8"
6-
s.date = "2013-01-22"
1+
# -*- encoding: utf-8 -*-
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'request_log_analyzer/version'
5+
6+
Gem::Specification.new do |gem|
7+
gem.name = "request-log-analyzer"
8+
gem.rubyforge_project = 'r-l-a'
79

8-
s.rubyforge_project = 'r-l-a'
10+
gem.version = RequestLogAnalyzer::VERSION
911

10-
s.bindir = 'bin'
11-
s.executables = ['request-log-analyzer']
12-
s.default_executable = 'request-log-analyzer'
12+
gem.authors = ['Willem van Bergen', 'Bart ten Brinke']
13+
14+
gem.homepage = 'http://railsdoctors.com'
1315

14-
s.summary = "A command line tool to analyze request logs for Apache, Rails, Merb, MySQL and other web application servers"
15-
s.description = <<-eos
16+
gem.summary = "A command line tool to analyze request logs for Apache, Rails, Merb, MySQL and other web application servers"
17+
gem.description = <<-eos
1618
Request log analyzer's purpose is to find out how your web application is being used, how it performs and to
1719
focus your optimization efforts. This tool will parse all requests in the application's log file and aggregate the
1820
information. Once it is finished parsing the log file(s), it will show the requests that take op most server time
@@ -22,29 +24,25 @@ Gem::Specification.new do |s|
2224
easy to write log file format definition.
2325
eos
2426

25-
s.rdoc_options << '--title' << s.name << '--main' << 'README.rdoc' << '--line-numbers' << '--inline-source'
26-
s.extra_rdoc_files = ['README.rdoc']
27-
28-
s.requirements << "To use the database inserter, ActiveRecord and an appropriate database adapter are required."
29-
30-
s.add_development_dependency('rake')
31-
s.add_development_dependency('rspec', '~> 2.8')
32-
33-
s.add_development_dependency('activerecord')
27+
gem.rdoc_options << '--title' << gem.name << '--main' << 'README.rdoc' << '--line-numbers' << '--inline-source'
28+
gem.extra_rdoc_files = ['README.rdoc']
3429

30+
gem.requirements << "To use the database inserter, ActiveRecord and an appropriate database adapter are required."
31+
gem.add_development_dependency('rake')
32+
gem.add_development_dependency('rspec', '~> 2.13')
33+
gem.add_development_dependency('activerecord')
3534
if defined?(JRUBY_VERSION)
36-
s.add_development_dependency('jdbc-sqlite3')
37-
s.add_development_dependency('activerecord-jdbcsqlite3-adapter')
35+
gem.add_development_dependency('jdbc-sqlite3')
36+
gem.add_development_dependency('activerecord-jdbcsqlite3-adapter')
3837
else
39-
s.add_development_dependency('sqlite3')
38+
gem.add_development_dependency('sqlite3')
4039
end
4140

42-
s.authors = ['Willem van Bergen', 'Bart ten Brinke']
43-
44-
s.homepage = 'http://railsdoctors.com'
41+
gem.files = `git ls-files`.split($/)
42+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
4543

46-
# The files and test_files directives are set automatically by the release script.
47-
# Do not change them by hand, but make sure to add the files to the git repository.
48-
s.files = %w(.gitignore .infinity_test .travis.yml DESIGN.rdoc Gemfile LICENSE README.rdoc Rakefile bin/request-log-analyzer lib/cli/command_line_arguments.rb lib/cli/database_console.rb lib/cli/database_console_init.rb lib/cli/progressbar.rb lib/cli/tools.rb lib/other/ordered_hash.rb lib/request_log_analyzer.rb lib/request_log_analyzer/aggregator.rb lib/request_log_analyzer/aggregator/database_inserter.rb lib/request_log_analyzer/aggregator/echo.rb lib/request_log_analyzer/aggregator/summarizer.rb lib/request_log_analyzer/controller.rb lib/request_log_analyzer/database.rb lib/request_log_analyzer/database/base.rb lib/request_log_analyzer/database/connection.rb lib/request_log_analyzer/database/request.rb lib/request_log_analyzer/database/source.rb lib/request_log_analyzer/database/warning.rb lib/request_log_analyzer/file_format.rb lib/request_log_analyzer/file_format/amazon_s3.rb lib/request_log_analyzer/file_format/apache.rb lib/request_log_analyzer/file_format/delayed_job.rb lib/request_log_analyzer/file_format/delayed_job2.rb lib/request_log_analyzer/file_format/delayed_job21.rb lib/request_log_analyzer/file_format/delayed_job3.rb lib/request_log_analyzer/file_format/haproxy.rb lib/request_log_analyzer/file_format/merb.rb lib/request_log_analyzer/file_format/mysql.rb lib/request_log_analyzer/file_format/nginx.rb lib/request_log_analyzer/file_format/oink.rb lib/request_log_analyzer/file_format/postgresql.rb lib/request_log_analyzer/file_format/rack.rb lib/request_log_analyzer/file_format/rails.rb lib/request_log_analyzer/file_format/rails3.rb lib/request_log_analyzer/file_format/rails_development.rb lib/request_log_analyzer/file_format/w3c.rb lib/request_log_analyzer/filter.rb lib/request_log_analyzer/filter/anonymize.rb lib/request_log_analyzer/filter/field.rb lib/request_log_analyzer/filter/timespan.rb lib/request_log_analyzer/line_definition.rb lib/request_log_analyzer/log_processor.rb lib/request_log_analyzer/mailer.rb lib/request_log_analyzer/output.rb lib/request_log_analyzer/output/fixed_width.rb lib/request_log_analyzer/output/html.rb lib/request_log_analyzer/request.rb lib/request_log_analyzer/source.rb lib/request_log_analyzer/source/log_parser.rb lib/request_log_analyzer/tracker.rb lib/request_log_analyzer/tracker/duration.rb lib/request_log_analyzer/tracker/frequency.rb lib/request_log_analyzer/tracker/hourly_spread.rb lib/request_log_analyzer/tracker/numeric_value.rb lib/request_log_analyzer/tracker/timespan.rb lib/request_log_analyzer/tracker/traffic.rb request-log-analyzer.gemspec spec/database.yml spec/fixtures/apache_combined.log spec/fixtures/apache_common.log spec/fixtures/decompression.log spec/fixtures/decompression.log.bz2 spec/fixtures/decompression.log.gz spec/fixtures/decompression.log.zip spec/fixtures/decompression.tar.gz spec/fixtures/decompression.tgz spec/fixtures/header_and_footer.log spec/fixtures/merb.log spec/fixtures/merb_prefixed.log spec/fixtures/multiple_files_1.log spec/fixtures/multiple_files_2.log spec/fixtures/mysql_slow_query.log spec/fixtures/oink_22.log spec/fixtures/oink_22_failure.log spec/fixtures/postgresql.log spec/fixtures/rails.db spec/fixtures/rails_1x.log spec/fixtures/rails_22.log spec/fixtures/rails_22_cached.log spec/fixtures/rails_3_partials.log spec/fixtures/rails_unordered.log spec/fixtures/s3_logs/2012-10-05-16-18-11-F9AAC5D1A55AEBAD spec/fixtures/s3_logs/2012-10-05-16-26-06-15314AF7F0651839 spec/fixtures/sinatra.log spec/fixtures/syslog_1x.log spec/fixtures/test_file_format.log spec/fixtures/test_language_combined.log spec/fixtures/test_order.log spec/integration/command_line_usage_spec.rb spec/integration/mailer_spec.rb spec/integration/munin_plugins_rails_spec.rb spec/integration/scout_spec.rb spec/lib/helpers.rb spec/lib/macros.rb spec/lib/matchers.rb spec/lib/mocks.rb spec/lib/testing_format.rb spec/spec_helper.rb spec/unit/aggregator/database_inserter_spec.rb spec/unit/aggregator/summarizer_spec.rb spec/unit/controller/controller_spec.rb spec/unit/controller/log_processor_spec.rb spec/unit/database/base_class_spec.rb spec/unit/database/connection_spec.rb spec/unit/database/database_spec.rb spec/unit/file_format/amazon_s3_format_spec.rb spec/unit/file_format/apache_format_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/delayed_job21_format_spec.rb spec/unit/file_format/delayed_job2_format_spec.rb spec/unit/file_format/delayed_job3_format_spec.rb spec/unit/file_format/delayed_job_format_spec.rb spec/unit/file_format/file_format_api_spec.rb spec/unit/file_format/format_autodetection_spec.rb spec/unit/file_format/haproxy_format_spec.rb spec/unit/file_format/line_definition_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/mysql_format_spec.rb spec/unit/file_format/oink_format_spec.rb spec/unit/file_format/postgresql_format_spec.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/rails3_format_spec.rb spec/unit/file_format/rails_format_spec.rb spec/unit/file_format/w3c_format_spec.rb spec/unit/filter/anonymize_filter_spec.rb spec/unit/filter/field_filter_spec.rb spec/unit/filter/filter_spec.rb spec/unit/filter/timespan_filter_spec.rb spec/unit/mailer_spec.rb spec/unit/request_spec.rb spec/unit/source/log_parser_spec.rb spec/unit/tracker/duration_tracker_spec.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/tracker/numeric_value_tracker_spec.rb spec/unit/tracker/timespan_tracker_spec.rb spec/unit/tracker/tracker_api_spec.rb spec/unit/tracker/traffic_tracker_spec.rb tasks/github-gem.rake tasks/request_log_analyzer.rake)
49-
s.test_files = %w(spec/integration/command_line_usage_spec.rb spec/integration/mailer_spec.rb spec/integration/munin_plugins_rails_spec.rb spec/integration/scout_spec.rb spec/unit/aggregator/database_inserter_spec.rb spec/unit/aggregator/summarizer_spec.rb spec/unit/controller/controller_spec.rb spec/unit/controller/log_processor_spec.rb spec/unit/database/base_class_spec.rb spec/unit/database/connection_spec.rb spec/unit/database/database_spec.rb spec/unit/file_format/amazon_s3_format_spec.rb spec/unit/file_format/apache_format_spec.rb spec/unit/file_format/common_regular_expressions_spec.rb spec/unit/file_format/delayed_job21_format_spec.rb spec/unit/file_format/delayed_job2_format_spec.rb spec/unit/file_format/delayed_job3_format_spec.rb spec/unit/file_format/delayed_job_format_spec.rb spec/unit/file_format/file_format_api_spec.rb spec/unit/file_format/format_autodetection_spec.rb spec/unit/file_format/haproxy_format_spec.rb spec/unit/file_format/line_definition_spec.rb spec/unit/file_format/merb_format_spec.rb spec/unit/file_format/mysql_format_spec.rb spec/unit/file_format/oink_format_spec.rb spec/unit/file_format/postgresql_format_spec.rb spec/unit/file_format/rack_format_spec.rb spec/unit/file_format/rails3_format_spec.rb spec/unit/file_format/rails_format_spec.rb spec/unit/file_format/w3c_format_spec.rb spec/unit/filter/anonymize_filter_spec.rb spec/unit/filter/field_filter_spec.rb spec/unit/filter/filter_spec.rb spec/unit/filter/timespan_filter_spec.rb spec/unit/mailer_spec.rb spec/unit/request_spec.rb spec/unit/source/log_parser_spec.rb spec/unit/tracker/duration_tracker_spec.rb spec/unit/tracker/frequency_tracker_spec.rb spec/unit/tracker/hourly_spread_spec.rb spec/unit/tracker/numeric_value_tracker_spec.rb spec/unit/tracker/timespan_tracker_spec.rb spec/unit/tracker/tracker_api_spec.rb spec/unit/tracker/traffic_tracker_spec.rb)
44+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
45+
gem.default_executable = 'request-log-analyzer'
46+
gem.bindir = 'bin'
47+
gem.require_paths = ["lib"]
5048
end

0 commit comments

Comments
 (0)