feedtools 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/README +13 -0
- data/install.rb +30 -0
- data/lib/feed_tools.rb +1126 -0
- data/lib/feed_tools/vendor/builder.rb +13 -0
- data/lib/feed_tools/vendor/builder/blankslate.rb +53 -0
- data/lib/feed_tools/vendor/builder/xmlbase.rb +143 -0
- data/lib/feed_tools/vendor/builder/xmlevents.rb +63 -0
- data/lib/feed_tools/vendor/builder/xmlmarkup.rb +297 -0
- data/rakefile +111 -0
- metadata +62 -0
data/rakefile
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/testtask'
|
4
|
+
require 'rake/rdoctask'
|
5
|
+
require 'rake/packagetask'
|
6
|
+
require 'rake/gempackagetask'
|
7
|
+
require 'rake/contrib/rubyforgepublisher'
|
8
|
+
|
9
|
+
PKG_NAME = 'feedtools'
|
10
|
+
PKG_VERSION = '0.1.0'
|
11
|
+
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
12
|
+
|
13
|
+
RELEASE_NAME = "REL #{PKG_VERSION}"
|
14
|
+
|
15
|
+
RUBY_FORGE_PROJECT = "feedtools"
|
16
|
+
RUBY_FORGE_USER = "vacindak"
|
17
|
+
|
18
|
+
PKG_FILES = FileList[
|
19
|
+
"lib/**/*", "test/**/*", "examples/**/*", "doc/**/*", "[A-Z]*", "install.rb", "rakefile"
|
20
|
+
].exclude(/\bCVS\b|~$/).exclude(/database\.yml/)
|
21
|
+
|
22
|
+
desc "Default Task"
|
23
|
+
task :default => [ :test_all ]
|
24
|
+
|
25
|
+
# Run the unit tests
|
26
|
+
|
27
|
+
Rake::TestTask.new("test_all") { |t|
|
28
|
+
t.libs << "test"
|
29
|
+
t.pattern = 'test/*_test.rb'
|
30
|
+
t.verbose = true
|
31
|
+
}
|
32
|
+
|
33
|
+
# Generate the RDoc documentation
|
34
|
+
|
35
|
+
Rake::RDocTask.new { |rdoc|
|
36
|
+
rdoc.rdoc_dir = 'doc'
|
37
|
+
rdoc.title = "Feed Tools -- caching system for xml news feeds"
|
38
|
+
rdoc.options << '--line-numbers --inline-source --accessor cattr_accessor=object'
|
39
|
+
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
40
|
+
rdoc.rdoc_files.include('README', 'CHANGELOG')
|
41
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
42
|
+
}
|
43
|
+
|
44
|
+
# Create compressed packages
|
45
|
+
|
46
|
+
dist_dirs = [ "lib", "test" ]
|
47
|
+
|
48
|
+
spec = Gem::Specification.new do |s|
|
49
|
+
s.name = PKG_NAME
|
50
|
+
s.version = PKG_VERSION
|
51
|
+
s.summary = "Parsing, generation, and caching system for xml news feeds."
|
52
|
+
s.description = "Implements a simple system for handling xml news feeds with caching."
|
53
|
+
|
54
|
+
s.files = [ "rakefile", "install.rb", "README", "CHANGELOG" ]
|
55
|
+
dist_dirs.each do |dir|
|
56
|
+
s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if do |item|
|
57
|
+
item.include?( "\.svn" ) || item.include?( "database\.yml" )
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
s.add_dependency('activerecord', '= 1.10.1')
|
62
|
+
|
63
|
+
s.require_path = 'lib'
|
64
|
+
s.autorequire = 'feed_tools'
|
65
|
+
|
66
|
+
s.has_rdoc = true
|
67
|
+
s.extra_rdoc_files = %w( README )
|
68
|
+
s.rdoc_options.concat ['--main', 'README']
|
69
|
+
|
70
|
+
s.author = "Bob Aman"
|
71
|
+
s.email = "bob@sporkmonger.com"
|
72
|
+
s.homepage = "http://sporkmonger.com/projects/feedtools"
|
73
|
+
s.rubyforge_project = "feedtools"
|
74
|
+
end
|
75
|
+
|
76
|
+
Rake::GemPackageTask.new(spec) do |p|
|
77
|
+
p.gem_spec = spec
|
78
|
+
p.need_tar = true
|
79
|
+
p.need_zip = true
|
80
|
+
end
|
81
|
+
|
82
|
+
task :lines do
|
83
|
+
lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
|
84
|
+
|
85
|
+
for file_name in FileList["lib/**/*.rb"]
|
86
|
+
f = File.open(file_name)
|
87
|
+
|
88
|
+
while line = f.gets
|
89
|
+
lines += 1
|
90
|
+
next if line =~ /^\s*$/
|
91
|
+
next if line =~ /^\s*#/
|
92
|
+
codelines += 1
|
93
|
+
end
|
94
|
+
puts "L: #{sprintf("%4d", lines)}, LOC #{sprintf("%4d", codelines)} | #{file_name}"
|
95
|
+
|
96
|
+
total_lines += lines
|
97
|
+
total_codelines += codelines
|
98
|
+
|
99
|
+
lines, codelines = 0, 0
|
100
|
+
end
|
101
|
+
|
102
|
+
puts "Total: Lines #{total_lines}, LOC #{total_codelines}"
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
# Publishing ------------------------------------------------------
|
107
|
+
|
108
|
+
desc "Publish the API documentation"
|
109
|
+
task :pdoc => [:rdoc] do
|
110
|
+
Rake::SshDirPublisher.new("vacindak@sporkmonger.com", "public_html/projects/feedtools/api", "doc").upload
|
111
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.10
|
3
|
+
specification_version: 1
|
4
|
+
name: feedtools
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.1.0
|
7
|
+
date: 2005-07-30
|
8
|
+
summary: "Parsing, generation, and caching system for xml news feeds."
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: bob@sporkmonger.com
|
12
|
+
homepage: http://sporkmonger.com/projects/feedtools
|
13
|
+
rubyforge_project: feedtools
|
14
|
+
description: Implements a simple system for handling xml news feeds with caching.
|
15
|
+
autorequire: feed_tools
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
-
|
22
|
+
- ">"
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: 0.0.0
|
25
|
+
version:
|
26
|
+
platform: ruby
|
27
|
+
authors:
|
28
|
+
- Bob Aman
|
29
|
+
files:
|
30
|
+
- rakefile
|
31
|
+
- install.rb
|
32
|
+
- README
|
33
|
+
- CHANGELOG
|
34
|
+
- lib/feed_tools
|
35
|
+
- lib/feed_tools.rb
|
36
|
+
- lib/feed_tools/vendor
|
37
|
+
- lib/feed_tools/vendor/builder
|
38
|
+
- lib/feed_tools/vendor/builder.rb
|
39
|
+
- lib/feed_tools/vendor/builder/blankslate.rb
|
40
|
+
- lib/feed_tools/vendor/builder/xmlbase.rb
|
41
|
+
- lib/feed_tools/vendor/builder/xmlevents.rb
|
42
|
+
- lib/feed_tools/vendor/builder/xmlmarkup.rb
|
43
|
+
test_files: []
|
44
|
+
rdoc_options:
|
45
|
+
- "--main"
|
46
|
+
- README
|
47
|
+
extra_rdoc_files:
|
48
|
+
- README
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
requirements: []
|
52
|
+
dependencies:
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: activerecord
|
55
|
+
version_requirement:
|
56
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
57
|
+
requirements:
|
58
|
+
-
|
59
|
+
- "="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.10.1
|
62
|
+
version:
|