This repository has been archived by the owner on Jan 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
25 additions
and
1,031 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,14 @@ | ||
# Look in the tasks/setup.rb file for the various options that can be | ||
# configured in this Rakefile. The .rake files in the tasks directory | ||
# are where the options are used. | ||
require 'spec/rake/spectask' | ||
|
||
load 'tasks/setup.rb' | ||
task :default => :spec | ||
|
||
ensure_in_path 'lib' | ||
require 'pingfm' | ||
|
||
task :default => 'spec:run' | ||
|
||
PROJ.name = 'pingfm' | ||
PROJ.authors = ['Krunoslav Husak', 'Dale Campbell', 'Kevin Williams'] | ||
PROJ.email = ['dale@save-state.net', 'kevwil@gmail.com'] | ||
PROJ.url = 'http://pingfm.rubyforge.org/' | ||
PROJ.version = ENV['VERSION'] || Pingfm.version | ||
PROJ.rubyforge.name = 'pingfm' | ||
PROJ.readme_file = 'README' | ||
|
||
PROJ.spec.opts << '--color' | ||
|
||
namespace :gem do | ||
desc 'create a gemspec file to support github gems' | ||
task :gemspec => 'gem:prereqs' do | ||
File.open("#{PROJ.name}.gemspec", 'w+') do |f| | ||
f.write PROJ.gem._spec.to_ruby | ||
end | ||
end | ||
desc 'Run the specs' | ||
Spec::Rake::SpecTask.new(:spec) do |t| | ||
t.spec_opts = ['--color'] | ||
t.spec_files = FileList['spec/**/*_spec.rb'] | ||
end | ||
|
||
# EOF | ||
desc 'Start a console loaded with the library' | ||
task :console do | ||
sh "irb -I ./lib -r 'pingfm'" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,8 @@ | ||
# $Id$ | ||
$LOAD_PATH.unshift File.dirname(__FILE__) | ||
|
||
# Equivalent to a header guard in C/C++ | ||
# Used to prevent the class/module from being loaded more than once | ||
unless defined? Pingfm | ||
require 'pingfm/client' | ||
require 'pingfm/keyloader' | ||
|
||
module Pingfm | ||
|
||
# :stopdoc: | ||
VERSION = '1.0.2' | ||
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR | ||
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR | ||
# :startdoc: | ||
|
||
# Returns the version string for the library. | ||
# | ||
def self.version | ||
VERSION | ||
end | ||
|
||
# Returns the library path for the module. If any arguments are given, | ||
# they will be joined to the end of the libray path using | ||
# <tt>File.join</tt>. | ||
# | ||
def self.libpath( *args ) | ||
args.empty? ? LIBPATH : ::File.join(LIBPATH, *args) | ||
end | ||
|
||
# Returns the lpath for the module. If any arguments are given, | ||
# they will be joined to the end of the path using | ||
# <tt>File.join</tt>. | ||
# | ||
def self.path( *args ) | ||
args.empty? ? PATH : ::File.join(PATH, *args) | ||
end | ||
|
||
# Utility method used to rquire all files ending in .rb that lie in the | ||
# directory below this file that has the same name as the filename passed | ||
# in. Optionally, a specific _directory_ name can be passed in such that | ||
# the _filename_ does not have to be equivalent to the directory. | ||
# | ||
def self.require_all_libs_relative_to( fname, dir = nil ) | ||
dir ||= ::File.basename(fname, '.*') | ||
search_me = ::File.expand_path( | ||
::File.join(::File.dirname(fname), dir, '**', '*.rb')) | ||
|
||
Dir.glob(search_me).sort.each {|rb| require rb} | ||
end | ||
|
||
end # module Pingfm | ||
|
||
Pingfm.require_all_libs_relative_to __FILE__ | ||
|
||
end # unless defined? | ||
|
||
# EOF | ||
end # Pingfm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.