file-tail 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .*.sw[pon]
2
+ Gemfile.lock
3
+ pkg
data/CHANGES CHANGED
@@ -1,3 +1,4 @@
1
+ 2011-07-15 * 1.0.7 * Use gem_hadar to shorten Rakefile.
1
2
  2011-06-25 * 1.0.6 * Create a gem spec file again.
2
3
  * Added a File::Tail::Group to tail multiple files more easily.
3
4
  2010-03-25 * 1.0.5 * Added rtail executable, a nice app to supervise logfiles
data/Gemfile CHANGED
@@ -2,9 +2,4 @@
2
2
 
3
3
  source :rubygems
4
4
 
5
- gem 'spruz', '~>0.2'
6
-
7
- group :development do
8
- gem 'sdoc'
9
- gem 'rcov'
10
- end
5
+ gemspec
data/Rakefile CHANGED
@@ -1,118 +1,35 @@
1
1
  # vim: set filetype=ruby et sw=2 ts=2:
2
2
 
3
- begin
4
- require 'rubygems/package_task'
5
- rescue LoadError
6
- end
7
- require 'rake/clean'
8
- require 'rbconfig'
9
- include Config
10
-
11
- PKG_NAME = 'file-tail'
12
- PKG_VERSION = File.read('VERSION').chomp
13
- PKG_FILES = FileList["**/*"].exclude(/^(pkg|coverage|doc|\..*|Gemfile.lock)/)
14
- CLEAN.include 'coverage', 'doc'
15
-
16
- desc "Install executable/library into site_ruby directories"
17
- task :install do
18
- cd 'lib' do
19
- libdir = CONFIG["sitelibdir"]
20
-
21
- dest = File.join(libdir, 'file')
22
- mkdir_p(dest)
23
- file = File.join('file', 'tail.rb')
24
- install(file, dest, :verbose => true)
25
-
26
- dest = File.join(dest, 'tail')
27
- mkdir_p(dest)
28
- for file in Dir[File.join('file', 'tail', '*.rb')]
29
- install(file, dest, :verbose => true)
30
- end
31
- end
32
- bindir = CONFIG["bindir"]
33
- install('bin/rtail', bindir, :verbose => true, :mode => 0755)
34
- end
35
-
36
- desc "Create documentation"
37
- task :doc do
38
- sh "sdoc -m README.rdoc -t 'File::Tail - Tailing files in Ruby' README.rdoc #{Dir['lib/**/*.rb'] * ' '}"
39
- end
40
-
41
- desc "Testing library"
42
- task :test do
43
- ruby %{-Ilib tests/test_file-tail*.rb}
44
- end
45
-
46
- desc "Testing library with rcov"
47
- task :coverage do
48
- sh %{rcov -x '\\b/gems\/' -x '\\btests\/' -Ilib tests/test_file-tail*.rb}
49
- end
50
-
51
- namespace :gems do
52
- desc "Install all gems from the Gemfile"
53
- task :install do
54
- sh 'bundle install'
55
- end
56
- end
57
-
58
- if defined? Gem
59
- spec = Gem::Specification.new do |s|
60
- s.name = PKG_NAME
61
- s.version = PKG_VERSION
62
- s.summary = "File::Tail for Ruby"
63
- s.description = "Library to tail files in Ruby"
64
-
65
- s.executables = 'rtail'
66
- s.files = PKG_FILES
67
-
68
- s.require_path = 'lib'
69
-
70
- s.add_dependency 'spruz', '~>0.2'
71
-
72
- s.rdoc_options << '--main' << 'README.rdoc' << '--title' << 'File::Tail - Tailing files in Ruby'
73
- s.extra_rdoc_files << 'README.rdoc'
74
- s.test_files.concat Dir['tests/test_*.rb']
75
-
76
- s.author = "Florian Frank"
77
- s.email = "flori@ping.de"
78
- s.homepage = "http://flori.github.com/#{PKG_NAME}"
79
- s.rubyforge_project = PKG_NAME
80
- end
81
-
82
- desc 'Create a gemspec file'
83
- task :gemspec => :version do
84
- File.open('file-tail.gemspec', 'w') do |gemspec|
85
- gemspec.write spec.to_ruby
3
+ require 'gem_hadar'
4
+
5
+ GemHadar do
6
+ name 'file-tail'
7
+ path_name 'file/tail'
8
+ author 'Florian Frank'
9
+ email 'flori@ping.de'
10
+ homepage "http://github.com/flori/#{name}"
11
+ summary "#{path_name.camelize} for Ruby"
12
+ description 'Library to tail files in Ruby'
13
+ test_dir 'tests'
14
+ ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock'
15
+ readme 'README.rdoc'
16
+
17
+ dependency 'tins', '~>0.3'
18
+
19
+ install_library do
20
+ cd 'lib' do
21
+ libdir = CONFIG["sitelibdir"]
22
+
23
+ dest = File.join(libdir, 'file')
24
+ mkdir_p(dest)
25
+ dest = File.join(libdir, path_name)
26
+ install(path_name + '.rb', dest + '.rb', :verbose => true)
27
+ mkdir_p(dest)
28
+ for file in Dir[File.join(path_name, '*.rb')]
29
+ install(file, dest, :verbose => true)
30
+ end
86
31
  end
87
- end
88
-
89
- Gem::PackageTask.new(spec) do |pkg|
90
- pkg.need_tar = true
91
- pkg.package_files += PKG_FILES
92
- end
93
- end
94
-
95
- desc m = "Writing version information for #{PKG_VERSION}"
96
- task :version do
97
- puts m
98
- File.open(File.join('lib', 'file', 'tail', 'version.rb'), 'w') do |v|
99
- v.puts <<EOT
100
- class File
101
- module Tail
102
- # File::Tail version
103
- VERSION = '#{PKG_VERSION}'
104
- VERSION_ARRAY = VERSION.split(/\\./).map { |x| x.to_i } # :nodoc:
105
- VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
106
- VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
107
- VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
32
+ bindir = CONFIG["bindir"]
33
+ install('bin/rtail', bindir, :verbose => true, :mode => 0755)
108
34
  end
109
35
  end
110
- EOT
111
- end
112
- end
113
-
114
- desc "Run the tests by default"
115
- task :default => [ :version, :test ]
116
-
117
- desc "Prepare release of the library"
118
- task :release => [ :clean, :gemspec, :package ]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
data/bin/rtail CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'file/tail'
4
- require 'spruz/go'
5
- include Spruz::GO
4
+ require 'tins/go'
5
+ include Tins::GO
6
6
  require 'thread'
7
7
  Thread.abort_on_exception = true
8
8
 
data/file-tail.gemspec CHANGED
@@ -1,34 +1,35 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = %q{file-tail}
5
- s.version = "1.0.6"
4
+ s.name = "file-tail"
5
+ s.version = "1.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = [%q{Florian Frank}]
9
- s.date = %q{2011-06-25}
10
- s.description = %q{Library to tail files in Ruby}
11
- s.email = %q{flori@ping.de}
12
- s.executables = [%q{rtail}]
13
- s.extra_rdoc_files = [%q{README.rdoc}]
14
- s.files = [%q{tests}, %q{tests/test_file-tail_group.rb}, %q{tests/test_file-tail.rb}, %q{examples}, %q{examples/tail.rb}, %q{examples/pager.rb}, %q{COPYING}, %q{file-tail.gemspec}, %q{Rakefile}, %q{lib}, %q{lib/file}, %q{lib/file/tail.rb}, %q{lib/file/tail}, %q{lib/file/tail/version.rb}, %q{lib/file/tail/line_extension.rb}, %q{lib/file/tail/tailer.rb}, %q{lib/file/tail/group.rb}, %q{lib/file/tail/logfile.rb}, %q{lib/file-tail.rb}, %q{Gemfile}, %q{README.rdoc}, %q{CHANGES}, %q{bin}, %q{bin/rtail}, %q{VERSION}]
15
- s.homepage = %q{http://flori.github.com/file-tail}
16
- s.rdoc_options = [%q{--main}, %q{README.rdoc}, %q{--title}, %q{File::Tail - Tailing files in Ruby}]
17
- s.require_paths = [%q{lib}]
18
- s.rubyforge_project = %q{file-tail}
19
- s.rubygems_version = %q{1.8.5}
20
- s.summary = %q{File::Tail for Ruby}
21
- s.test_files = [%q{tests/test_file-tail_group.rb}, %q{tests/test_file-tail.rb}]
8
+ s.authors = ["Florian Frank"]
9
+ s.date = "2011-09-25"
10
+ s.description = "Library to tail files in Ruby"
11
+ s.email = "flori@ping.de"
12
+ s.extra_rdoc_files = ["README.rdoc", "lib/file/tail.rb", "lib/file/tail/version.rb", "lib/file/tail/line_extension.rb", "lib/file/tail/tailer.rb", "lib/file/tail/group.rb", "lib/file/tail/logfile.rb", "lib/file-tail.rb"]
13
+ s.files = [".gitignore", "CHANGES", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "VERSION", "bin/rtail", "examples/pager.rb", "examples/tail.rb", "file-tail.gemspec", "lib/file-tail.rb", "lib/file/tail.rb", "lib/file/tail/group.rb", "lib/file/tail/line_extension.rb", "lib/file/tail/logfile.rb", "lib/file/tail/tailer.rb", "lib/file/tail/version.rb", "tests/test_file-tail.rb", "tests/test_file-tail_group.rb"]
14
+ s.homepage = "http://github.com/flori/file-tail"
15
+ s.rdoc_options = ["--title", "File-tail - File::Tail for Ruby", "--main", "README.rdoc"]
16
+ s.require_paths = ["lib"]
17
+ s.rubygems_version = "1.8.10"
18
+ s.summary = "File::Tail for Ruby"
19
+ s.test_files = ["tests/test_file-tail_group.rb", "tests/test_file-tail.rb"]
22
20
 
23
21
  if s.respond_to? :specification_version then
24
22
  s.specification_version = 3
25
23
 
26
24
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_runtime_dependency(%q<spruz>, ["~> 0.2"])
25
+ s.add_development_dependency(%q<gem_hadar>, ["~> 0.1.0"])
26
+ s.add_runtime_dependency(%q<tins>, ["~> 0.3"])
28
27
  else
29
- s.add_dependency(%q<spruz>, ["~> 0.2"])
28
+ s.add_dependency(%q<gem_hadar>, ["~> 0.1.0"])
29
+ s.add_dependency(%q<tins>, ["~> 0.3"])
30
30
  end
31
31
  else
32
- s.add_dependency(%q<spruz>, ["~> 0.2"])
32
+ s.add_dependency(%q<gem_hadar>, ["~> 0.1.0"])
33
+ s.add_dependency(%q<tins>, ["~> 0.3"])
33
34
  end
34
35
  end
@@ -58,7 +58,7 @@ class File
58
58
  # Iterate over all tailers in this group yielding to +block+ for each of
59
59
  # them.
60
60
  def each_tailer(&block)
61
- @tailers.list.map { |t| t }.map(&block)
61
+ @tailers.list.map(&block)
62
62
  end
63
63
 
64
64
  # Stop all tailers in this group at once.
@@ -1,10 +1,8 @@
1
- class File
2
- module Tail
3
- # File::Tail version
4
- VERSION = '1.0.6'
5
- VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
- VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
- VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
8
- VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
9
- end
1
+ module File::Tail
2
+ # File::Tail version
3
+ VERSION = '1.0.7'
4
+ VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
+ VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
+ VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
7
+ VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
10
8
  end
metadata CHANGED
@@ -1,44 +1,44 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: file-tail
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.7
4
5
  prerelease:
5
- version: 1.0.6
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Florian Frank
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-06-25 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: spruz
12
+ date: 2011-09-25 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: gem_hadar
16
+ requirement: &2160366040 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.1.0
22
+ type: :development
17
23
  prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ version_requirements: *2160366040
25
+ - !ruby/object:Gem::Dependency
26
+ name: tins
27
+ requirement: &2160365480 !ruby/object:Gem::Requirement
19
28
  none: false
20
- requirements:
29
+ requirements:
21
30
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "0.2"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.3'
24
33
  type: :runtime
25
- version_requirements: *id001
34
+ prerelease: false
35
+ version_requirements: *2160365480
26
36
  description: Library to tail files in Ruby
27
37
  email: flori@ping.de
28
- executables:
29
- - rtail
38
+ executables: []
30
39
  extensions: []
31
-
32
- extra_rdoc_files:
40
+ extra_rdoc_files:
33
41
  - README.rdoc
34
- files:
35
- - tests/test_file-tail_group.rb
36
- - tests/test_file-tail.rb
37
- - examples/tail.rb
38
- - examples/pager.rb
39
- - COPYING
40
- - file-tail.gemspec
41
- - Rakefile
42
42
  - lib/file/tail.rb
43
43
  - lib/file/tail/version.rb
44
44
  - lib/file/tail/line_extension.rb
@@ -46,41 +46,55 @@ files:
46
46
  - lib/file/tail/group.rb
47
47
  - lib/file/tail/logfile.rb
48
48
  - lib/file-tail.rb
49
+ files:
50
+ - .gitignore
51
+ - CHANGES
52
+ - COPYING
49
53
  - Gemfile
50
54
  - README.rdoc
51
- - CHANGES
52
- - bin/rtail
55
+ - Rakefile
53
56
  - VERSION
54
- homepage: http://flori.github.com/file-tail
57
+ - bin/rtail
58
+ - examples/pager.rb
59
+ - examples/tail.rb
60
+ - file-tail.gemspec
61
+ - lib/file-tail.rb
62
+ - lib/file/tail.rb
63
+ - lib/file/tail/group.rb
64
+ - lib/file/tail/line_extension.rb
65
+ - lib/file/tail/logfile.rb
66
+ - lib/file/tail/tailer.rb
67
+ - lib/file/tail/version.rb
68
+ - tests/test_file-tail.rb
69
+ - tests/test_file-tail_group.rb
70
+ homepage: http://github.com/flori/file-tail
55
71
  licenses: []
56
-
57
72
  post_install_message:
58
- rdoc_options:
73
+ rdoc_options:
74
+ - --title
75
+ - File-tail - File::Tail for Ruby
59
76
  - --main
60
77
  - README.rdoc
61
- - --title
62
- - File::Tail - Tailing files in Ruby
63
- require_paths:
78
+ require_paths:
64
79
  - lib
65
- required_ruby_version: !ruby/object:Gem::Requirement
80
+ required_ruby_version: !ruby/object:Gem::Requirement
66
81
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
87
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: "0"
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
77
92
  requirements: []
78
-
79
- rubyforge_project: file-tail
80
- rubygems_version: 1.8.5
93
+ rubyforge_project:
94
+ rubygems_version: 1.8.10
81
95
  signing_key:
82
96
  specification_version: 3
83
97
  summary: File::Tail for Ruby
84
- test_files:
98
+ test_files:
85
99
  - tests/test_file-tail_group.rb
86
100
  - tests/test_file-tail.rb