raggi-srvany_manager 0.1.1 → 0.1.3

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.
@@ -1,14 +1,14 @@
1
1
  History.txt
2
2
  Manifest.txt
3
- README.txt
3
+ README.rdoc
4
4
  Rakefile
5
5
  lib/srvany_manager.rb
6
6
  spec/.bacon
7
7
  spec/helper.rb
8
8
  spec/runner
9
9
  spec/spec_srvany_manager.rb
10
- tasks/ann.rake
11
10
  tasks/autospec.rake
11
+ tasks/bacon.rake
12
12
  tasks/bones.rake
13
13
  tasks/gem.rake
14
14
  tasks/git.rake
@@ -1,4 +1,4 @@
1
- srvany_manager
1
+ = srvany_manager
2
2
  by James Tucker
3
3
  http://ra66i.org
4
4
  http://github.com/raggi/srvany_manager
data/Rakefile CHANGED
@@ -13,16 +13,9 @@ PROJ.name = 'srvany_manager'
13
13
  PROJ.authors = 'James Tucker'
14
14
  PROJ.email = 'raggi@rubyforge.org'
15
15
  PROJ.url = 'http://github.com/raggi/srvany_manager'
16
- PROJ.rubyforge.name = 'raggi'
16
+ PROJ.rubyforge.name = 'libraggi'
17
17
  PROJ.version = SrvanyManager.version
18
18
  PROJ.gem.dependencies = %(win32-service) # TODO where does win32/registry come from?
19
19
 
20
20
  PROJ.exclude = %w(tmp$ bak$ ~$ CVS \.git \.hg \.svn ^pkg ^doc \.DS_Store
21
21
  \.cvs \.svn \.hgignore \.gitignore \.dotest \.swp$ ~$)
22
-
23
- namespace :gem do
24
- file 'srvany_manager.gemspec' => (`git ls-files`.split - ['srvany_manager.gemspec']) do |t|
25
- open(t.name, 'w') { |f| f.write PROJ.gem._spec.to_ruby }
26
- end
27
- task :spec => 'srvany_manager.gemspec'
28
- end
@@ -1,6 +1,6 @@
1
1
  class SrvanyManager
2
2
 
3
- Version = VERSION = '0.1.1'
3
+ Version = VERSION = '0.1.3'
4
4
  def self.version
5
5
  Version
6
6
  end
@@ -7,7 +7,7 @@ $TESTING=true
7
7
  $:.push File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
8
8
  $:.uniq!
9
9
 
10
- %w[rubygems facon bacon].each { |r| require r }
10
+ %w[rubygems bacon].each { |r| require r }
11
11
 
12
12
  # Bacon doesn't do any automagic, so lets tell it to!
13
13
  Bacon.summary_on_exit
@@ -0,0 +1,7 @@
1
+ desc "Run the executable test specifications"
2
+ task :spec do
3
+ ruby 'spec/runner'
4
+ end
5
+
6
+ desc "Run the executable test specifications"
7
+ task :test => :spec
@@ -18,6 +18,9 @@ namespace :gem do
18
18
  PROJ.gem.dependencies.each do |dep|
19
19
  s.add_dependency(*dep)
20
20
  end
21
+ PROJ.gem.development_dependencies.each do |dep|
22
+ s.add_development_dependency(*dep)
23
+ end
21
24
 
22
25
  s.files = PROJ.gem.files
23
26
  s.executables = PROJ.gem.executables.map {|fn| File.basename(fn)}
@@ -114,6 +117,15 @@ namespace :gem do
114
117
  sh "#{SUDO} #{GEM} cleanup #{PROJ.gem._spec.name}"
115
118
  end
116
119
 
120
+ file "#{PROJ.name}.gemspec" => PROJ.gem._spec.files do |t|
121
+ open(t.name, 'w') { |f| f.write PROJ.gem._spec.to_ruby }
122
+ end
123
+ CLOBBER.include("#{PROJ.name}.gemspec")
124
+
125
+ desc 'Generate gemspec'
126
+ task :spec => "#{PROJ.name}.gemspec"
127
+ task :release => :spec
128
+
117
129
  end # namespace :gem
118
130
 
119
131
  desc 'Alias to gem:package'
@@ -3,9 +3,11 @@
3
3
  # This file does not define any rake tasks. It is used to load some project
4
4
  # settings if they are not defined by the user.
5
5
 
6
+ PROJ.rdoc.main ||= PROJ.readme_file
7
+ PROJ.rdoc.dir ||= File.join('doc', PROJ.name)
8
+
6
9
  PROJ.rdoc.exclude << "^#{Regexp.escape(PROJ.manifest_file)}$"
7
- PROJ.exclude << ["^#{Regexp.escape(PROJ.ann.file)}$",
8
- "^#{Regexp.escape(PROJ.rdoc.dir)}/",
10
+ PROJ.exclude << ["^#{Regexp.escape(PROJ.rdoc.dir)}/",
9
11
  "^#{Regexp.escape(PROJ.rcov.dir)}/"]
10
12
 
11
13
  flatten_arrays = lambda do |this,os|
@@ -34,6 +36,4 @@ PROJ.gem.files ||=
34
36
 
35
37
  PROJ.gem.executables ||= PROJ.gem.files.find_all {|fn| fn =~ %r/^bin/}
36
38
 
37
- PROJ.rdoc.main ||= PROJ.readme_file
38
-
39
39
  # EOF
@@ -46,7 +46,7 @@ namespace :doc do
46
46
  host = "#{config['username']}@rubyforge.org"
47
47
  remote_dir = "/var/www/gforge-projects/#{PROJ.rubyforge.name}/"
48
48
  remote_dir << PROJ.rdoc.remote_dir if PROJ.rdoc.remote_dir
49
- local_dir = PROJ.rdoc.dir
49
+ local_dir = File.dirname(PROJ.rdoc.dir)
50
50
 
51
51
  Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
52
52
  end
@@ -18,7 +18,8 @@ PROJ = OpenStruct.new(
18
18
  :email => nil,
19
19
  :url => "\000",
20
20
  :version => ENV['VERSION'] || '0.0.0',
21
- :exclude => %w(tmp$ bak$ ~$ CVS \.svn/ \.git/ ^pkg/),
21
+ :exclude => %w(tmp$ bak$ ~$ CVS \.git/ \.hg/ \.svn/ ^pkg/ ^doc/ \.DS_Store
22
+ \.hgignore \.gitignore \.dotest \.swp$ .*\.gemspec$),
22
23
  :release_name => ENV['RELEASE'],
23
24
 
24
25
  # System Defaults
@@ -26,28 +27,12 @@ PROJ = OpenStruct.new(
26
27
  :libs => [],
27
28
  :history_file => 'History.txt',
28
29
  :manifest_file => 'Manifest.txt',
29
- :readme_file => 'README.txt',
30
-
31
- # Announce
32
- :ann => OpenStruct.new(
33
- :file => 'announcement.txt',
34
- :text => nil,
35
- :paragraphs => [],
36
- :email => {
37
- :from => nil,
38
- :to => %w(ruby-talk@ruby-lang.org),
39
- :server => 'localhost',
40
- :port => 25,
41
- :domain => ENV['HOSTNAME'],
42
- :acct => nil,
43
- :passwd => nil,
44
- :authtype => :plain
45
- }
46
- ),
30
+ :readme_file => 'README.rdoc',
47
31
 
48
32
  # Gem Packaging
49
33
  :gem => OpenStruct.new(
50
34
  :dependencies => [],
35
+ :development_dependencies => ['rake', 'bones', 'bacon'],
51
36
  :executables => nil,
52
37
  :extensions => FileList['ext/**/extconf.rb'],
53
38
  :files => nil,
@@ -59,7 +44,7 @@ PROJ = OpenStruct.new(
59
44
  # File Annotations
60
45
  :notes => OpenStruct.new(
61
46
  :exclude => %w(^tasks/setup\.rb$),
62
- :extensions => %w(.txt .rb .erb) << '',
47
+ :extensions => %w(.txt .rb .erb .rdoc) << '',
63
48
  :tags => %w(FIXME OPTIMIZE TODO)
64
49
  ),
65
50
 
@@ -74,10 +59,10 @@ PROJ = OpenStruct.new(
74
59
  # Rdoc
75
60
  :rdoc => OpenStruct.new(
76
61
  :opts => [],
77
- :include => %w(^lib/ ^bin/ ^ext/ \.txt$),
62
+ :include => %w(^lib/ ^bin/ ^ext/ \.txt$ \.rdoc$),
78
63
  :exclude => %w(extconf\.rb$),
79
64
  :main => nil,
80
- :dir => 'doc',
65
+ :dir => nil,
81
66
  :remote_dir => nil
82
67
  ),
83
68
 
@@ -86,25 +71,10 @@ PROJ = OpenStruct.new(
86
71
  :name => "\000"
87
72
  ),
88
73
 
89
- # Rspec
90
- :spec => OpenStruct.new(
91
- :files => FileList['spec/**/*_spec.rb'],
92
- :opts => []
93
- ),
94
-
95
- # Subversion Repository
96
- :svn => OpenStruct.new(
97
- :root => nil,
98
- :path => '',
99
- :trunk => 'trunk',
100
- :tags => 'tags',
101
- :branches => 'branches'
102
- ),
103
-
104
- # Test::Unit
74
+ # Tests
105
75
  :test => OpenStruct.new(
106
- :files => FileList['test/**/test_*.rb'],
107
- :file => 'test/all.rb',
76
+ :files => FileList['{test,spec}/{{test,spec}_*.rb,*_spec.rb}'],
77
+ :file => '',
108
78
  :opts => []
109
79
  )
110
80
  )
@@ -166,7 +136,7 @@ HAVE_GIT = (Dir.entries(Dir.pwd).include?('.git') and
166
136
  # specified.
167
137
  #
168
138
  # changes = paragraphs_of('History.txt', 0..1).join("\n\n")
169
- # summary, *description = paragraphs_of('README.txt', 3, 3..8)
139
+ # summary, *description = paragraphs_of('README.rdoc', 3, 3..8)
170
140
  #
171
141
  def paragraphs_of( path, *paragraphs )
172
142
  title = String === paragraphs.first ? paragraphs.shift : nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raggi-srvany_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Tucker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-20 00:00:00 -08:00
12
+ date: 2009-01-16 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -21,6 +21,33 @@ dependencies:
21
21
  - !ruby/object:Gem::Version
22
22
  version: "0"
23
23
  version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: rake
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: "0"
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: bones
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: "0"
41
+ version:
42
+ - !ruby/object:Gem::Dependency
43
+ name: bacon
44
+ version_requirement:
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
24
51
  description: A quick and simple manager for running programs as services on win32. Makes use of / requires the SRVANY.exe from the Windows Resource Kit.
25
52
  email: raggi@rubyforge.org
26
53
  executables: []
@@ -29,19 +56,19 @@ extensions: []
29
56
 
30
57
  extra_rdoc_files:
31
58
  - History.txt
32
- - README.txt
59
+ - README.rdoc
33
60
  files:
34
61
  - History.txt
35
62
  - Manifest.txt
36
- - README.txt
63
+ - README.rdoc
37
64
  - Rakefile
38
65
  - lib/srvany_manager.rb
39
66
  - spec/.bacon
40
67
  - spec/helper.rb
41
68
  - spec/runner
42
69
  - spec/spec_srvany_manager.rb
43
- - tasks/ann.rake
44
70
  - tasks/autospec.rake
71
+ - tasks/bacon.rake
45
72
  - tasks/bones.rake
46
73
  - tasks/gem.rake
47
74
  - tasks/git.rake
@@ -56,7 +83,7 @@ homepage: http://github.com/raggi/srvany_manager
56
83
  post_install_message:
57
84
  rdoc_options:
58
85
  - --main
59
- - README.txt
86
+ - README.rdoc
60
87
  require_paths:
61
88
  - lib
62
89
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -73,10 +100,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
100
  version:
74
101
  requirements: []
75
102
 
76
- rubyforge_project: raggi
103
+ rubyforge_project: libraggi
77
104
  rubygems_version: 1.2.0
78
105
  signing_key:
79
106
  specification_version: 2
80
107
  summary: A quick and simple manager for running programs as services on win32
81
- test_files: []
82
-
108
+ test_files:
109
+ - spec/spec_srvany_manager.rb
@@ -1,81 +0,0 @@
1
- # $Id$
2
-
3
- begin
4
- require 'bones/smtp_tls'
5
- rescue LoadError
6
- require 'net/smtp'
7
- end
8
- require 'time'
9
-
10
- namespace :ann do
11
-
12
- # A prerequisites task that all other tasks depend upon
13
- task :prereqs
14
-
15
- file PROJ.ann.file do
16
- ann = PROJ.ann
17
- puts "Generating #{ann.file}"
18
- File.open(ann.file,'w') do |fd|
19
- fd.puts("#{PROJ.name} version #{PROJ.version}")
20
- fd.puts(" by #{Array(PROJ.authors).first}") if PROJ.authors
21
- fd.puts(" #{PROJ.url}") if PROJ.url.valid?
22
- fd.puts(" (the \"#{PROJ.release_name}\" release)") if PROJ.release_name
23
- fd.puts
24
- fd.puts("== DESCRIPTION")
25
- fd.puts
26
- fd.puts(PROJ.description)
27
- fd.puts
28
- fd.puts(PROJ.changes.sub(%r/^.*$/, '== CHANGES'))
29
- fd.puts
30
- ann.paragraphs.each do |p|
31
- fd.puts "== #{p.upcase}"
32
- fd.puts
33
- fd.puts paragraphs_of(PROJ.readme_file, p).join("\n\n")
34
- fd.puts
35
- end
36
- fd.puts ann.text if ann.text
37
- end
38
- end
39
-
40
- desc "Create an announcement file"
41
- task :announcement => ['ann:prereqs', PROJ.ann.file]
42
-
43
- desc "Send an email announcement"
44
- task :email => ['ann:prereqs', PROJ.ann.file] do
45
- ann = PROJ.ann
46
- from = ann.email[:from] || PROJ.email
47
- to = Array(ann.email[:to])
48
-
49
- ### build a mail header for RFC 822
50
- rfc822msg = "From: #{from}\n"
51
- rfc822msg << "To: #{to.join(',')}\n"
52
- rfc822msg << "Subject: [ANN] #{PROJ.name} #{PROJ.version}"
53
- rfc822msg << " (#{PROJ.release_name})" if PROJ.release_name
54
- rfc822msg << "\n"
55
- rfc822msg << "Date: #{Time.new.rfc822}\n"
56
- rfc822msg << "Message-Id: "
57
- rfc822msg << "<#{"%.8f" % Time.now.to_f}@#{ann.email[:domain]}>\n\n"
58
- rfc822msg << File.read(ann.file)
59
-
60
- params = [:server, :port, :domain, :acct, :passwd, :authtype].map do |key|
61
- ann.email[key]
62
- end
63
-
64
- params[3] = PROJ.email if params[3].nil?
65
-
66
- if params[4].nil?
67
- STDOUT.write "Please enter your e-mail password (#{params[3]}): "
68
- params[4] = STDIN.gets.chomp
69
- end
70
-
71
- ### send email
72
- Net::SMTP.start(*params) {|smtp| smtp.sendmail(rfc822msg, from, to)}
73
- end
74
- end # namespace :ann
75
-
76
- desc 'Alias to ann:announcement'
77
- task :ann => 'ann:announcement'
78
-
79
- CLOBBER << PROJ.ann.file
80
-
81
- # EOF