Permalink
Browse files

* Prepared library for GEM packaging

  • Loading branch information...
1 parent e19b108 commit afe8c6d7345a913d65e434222bbeac98c4e5220e @weppos committed Aug 16, 2008
Showing with 1,751 additions and 16 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +1 −0 LICENSE.rdoc
  3. +16 −0 Manifest
  4. +67 −0 README.rdoc
  5. +54 −0 Rakefile
  6. +7 −4 lib/apache_log_regex.rb
  7. +4 −3 lib/apache_log_regex/version.rb
  8. +1,585 −0 setup.rb
  9. +4 −3 test/helper.rb
  10. +4 −3 test/test_all.rb
  11. +4 −3 test/unit/apache_log_regex_test.rb
View
@@ -0,0 +1,5 @@
+= Changelog
+
+== development
+
+* Initial public release.
View
@@ -0,0 +1 @@
+= License
View
@@ -0,0 +1,16 @@
+CHANGELOG.rdoc
+lib/apache_log_regex/version.rb
+lib/apache_log_regex.rb
+LICENSE.rdoc
+nbproject/private/config.properties
+nbproject/private/private.properties
+nbproject/private/private.xml
+nbproject/project.properties
+nbproject/project.xml
+Rakefile
+README.rdoc
+setup.rb
+test/helper.rb
+test/test_all.rb
+test/unit/apache_log_regex_test.rb
+Manifest
View
@@ -0,0 +1,67 @@
+= Apache Log Regex
+
+Apache Log Regex is a Ruby port of Peter Hickman's Apache::LogRegex 1.4 Perl module,
+available at http://cpan.uwinnipeg.ca/~peterhi/Apache-LogRegex.
+It provides functionalities to parse a line from an Apache log file into a hash.
+
+
+== Authors
+
+{Simone Carletti}[http://www.simonecarletti.com/] <weppos@weppos.net>
+
+If you like this software, consider to {recommend me}[http://www.workingwithrails.com/person/11967-simone-carletti] at Working with Rails.
+
+
+== Website
+
+* {Homepage}[http://code.simonecarletti.com/apachelogregex]
+* {API}[http://apachelogregex.rubyforge.org/]
+
+
+== Source
+
+* {at GitHub}[http://github.com/weppos/apachelogregex/]
+* {at RubyForge}[http://rubyforge.org/projects/apachelogregex/]
+
+
+== Dependencies
+
+* Ruby >= 1.8.6 (not tested with previous versions)
+
+
+== Overview
+
+FIXME: missing docs
+
+
+== Usage
+
+FIXME: missing docs
+
+
+== Acknowledgments
+
+This library is essentially a Ruby port of Apache::LogRegex Perl library.
+A big thanks goes to Peter Hickman, the author of the original package. This Ruby GEM would probably not exists without your contribution!
+
+I also want to thank you Harry Fuecks and [FIXME:missing name],
+the authors of the Python[http://code.google.com/p/apachelog/] and PHP[FIXME: missing link] ports.
+First of all they gave me the inspiration to translate the original Perl code to Ruby,
+as soon as I discovered nobody did it before me.
+Last but not least, their library have been extremely useful to help me understand some obscure Perl statements
+from the original package.
+
+
+== FeedBack and Bug reports
+
+Feel free to email {Simone Carletti}[mailto:weppos@weppos.net]
+with any questions or feedback.
+
+Please submit your bug reports to the Redmine installation for WWW::Delicious
+available at http://code.simonecarletti.com/www-delicious.
+
+
+== Changelog
+
+See CHANGELOG for details.
+
View
@@ -0,0 +1,54 @@
+require 'rubygems'
+require 'echoe'
+
+$LOAD_PATH.unshift(File.dirname(__FILE__) + "/lib")
+require 'apache_log_regex'
+
+
+# Common package properties
+PKG_NAME = ENV['PKG_NAME'] || ApacheLogRegex::GEM
+PKG_VERSION = ENV['PKG_VERSION'] || ApacheLogRegex::VERSION
+PKG_SUMMARY = "Ruby parser for Apache log files based on regular expressions."
+PKG_FILES = FileList.new("{lib,test}/**/*.rb") do |fl|
+ fl.exclude 'TODO'
+ fl.include %w(README.rdoc CHANGELOG.rdoc LICENSE.rdoc)
+ fl.include %w(Rakefile setup.rb)
+end
+RUBYFORGE_PROJECT = 'apachelogregex'
+
+if ENV['SNAPSHOT'].to_i == 1
+ PKG_VERSION << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
+end
+
+
+Echoe.new(PKG_NAME, PKG_VERSION) do |p|
+ p.author = "Simone Carletti"
+ p.email = "weppos@weppos.net"
+ p.summary = PKG_SUMMARY
+ p.description = <<-EOF
+ Apache Log Regex is a Ruby port \
+ of Peter Hickman's Apache::LogRegex 1.4 Perl module. \
+ It provides functionalities to parse a line from an Apache log file into a hash.
+ EOF
+ p.url = "http://code.simonecarletti.com/apachelogregex"
+ p.project = RUBYFORGE_PROJECT
+
+ p.need_zip = true
+ p.rcov_options = ["-x Rakefile -x rcov"]
+ p.rdoc_pattern = /^(lib|CHANGELOG.rdoc|README.rdoc)/
+
+ p.development_dependencies = ["rake >=0.8",
+ "echoe >=3"]
+end
+
+
+begin
+ require 'code_statistics'
+ desc "Show library's code statistics"
+ task :stats do
+ CodeStatistics.new(["ApacheLogRegex", "lib"],
+ ["Tests", "test"]).to_s
+ end
+rescue LoadError
+ puts "CodeStatistics (Rails) is not available"
+end
View
@@ -3,9 +3,10 @@
#
# Ruby parser for Apache log files based on regular expressions.
#
-# Category::
-# Package:: ApacheLogRegex
-# Author:: Simone Carletti <weppos@weppos.net>
+# Category::
+# Package:: ApacheLogRegex
+# Author:: Simone Carletti <weppos@weppos.net>
+# License::
#
#--
# SVN: $Id$
@@ -18,10 +19,12 @@
#
# = Apache Log Regex
#
-# Parse a line from an Apache logfile into a hash.
+# Parse a line from an Apache log file into a hash.
#
# This is a Ruby port of Peter Hickman's Apache::LogRegex 1.4 Perl module,
# available at http://cpan.uwinnipeg.ca/~peterhi/Apache-LogRegex.
+#
+# FIXME: missing some basic usage docs
#
class ApacheLogRegex
@@ -3,9 +3,10 @@
#
# Ruby parser for Apache log files based on regular expressions.
#
-# Category::
-# Package:: ApacheLogRegex
-# Author:: Simone Carletti <weppos@weppos.net>
+# Category::
+# Package:: ApacheLogRegex
+# Author:: Simone Carletti <weppos@weppos.net>
+# License::
#
#--
# SVN: $Id$
Oops, something went wrong.

0 comments on commit afe8c6d

Please sign in to comment.