htauth 1.0.3 → 1.1.0

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.
Files changed (52) hide show
  1. checksums.yaml +15 -0
  2. data/CONTRIBUTING.md +46 -0
  3. data/HISTORY.md +36 -0
  4. data/Manifest.txt +45 -0
  5. data/{README → README.md} +21 -22
  6. data/Rakefile +17 -0
  7. data/bin/htpasswd-ruby +5 -5
  8. data/lib/htauth/algorithm.rb +1 -8
  9. data/lib/htauth/crypt.rb +1 -1
  10. data/lib/htauth/digest.rb +5 -2
  11. data/lib/htauth/digest_entry.rb +5 -4
  12. data/lib/htauth/digest_file.rb +1 -1
  13. data/lib/htauth/errors.rb +10 -0
  14. data/lib/htauth/file.rb +1 -1
  15. data/lib/htauth/md5.rb +2 -0
  16. data/lib/htauth/passwd.rb +10 -4
  17. data/lib/htauth/passwd_entry.rb +2 -1
  18. data/lib/htauth/passwd_file.rb +64 -63
  19. data/lib/htauth/plaintext.rb +12 -11
  20. data/lib/htauth/version.rb +8 -9
  21. data/lib/htauth.rb +14 -4
  22. data/spec/crypt_spec.rb +10 -12
  23. data/spec/digest_entry_spec.rb +20 -21
  24. data/spec/digest_file_spec.rb +11 -12
  25. data/spec/digest_spec.rb +23 -23
  26. data/spec/md5_spec.rb +2 -2
  27. data/spec/passwd_entry_spec.rb +47 -48
  28. data/spec/passwd_file_spec.rb +12 -13
  29. data/spec/passwd_spec.rb +37 -38
  30. data/spec/plaintext_spec.rb +4 -7
  31. data/spec/sha1_spec.rb +3 -5
  32. data/spec/spec_helper.rb +8 -4
  33. data/spec/test.add.digest +3 -0
  34. data/spec/test.add.passwd +3 -0
  35. data/spec/test.delete.digest +1 -0
  36. data/spec/test.delete.passwd +1 -0
  37. data/spec/test.original.digest +2 -0
  38. data/spec/test.original.passwd +2 -0
  39. data/spec/test.update.digest +2 -0
  40. data/spec/test.update.passwd +2 -0
  41. data/tasks/default.rake +276 -0
  42. data/tasks/this.rb +214 -0
  43. metadata +131 -75
  44. data/HISTORY +0 -26
  45. data/gemspec.rb +0 -43
  46. data/tasks/announce.rake +0 -38
  47. data/tasks/config.rb +0 -98
  48. data/tasks/distribution.rake +0 -46
  49. data/tasks/documentation.rake +0 -31
  50. data/tasks/rspec.rake +0 -29
  51. data/tasks/rubyforge.rake +0 -59
  52. data/tasks/utils.rb +0 -80
data/tasks/this.rb ADDED
@@ -0,0 +1,214 @@
1
+ require 'pathname'
2
+
3
+ # Public: A Class containing all the metadata and utilities needed to manage a
4
+ # ruby project.
5
+ class ThisProject
6
+ # The name of this project
7
+ attr_accessor :name
8
+
9
+ # The author's name
10
+ attr_accessor :author
11
+
12
+ # The email address of the author(s)
13
+ attr_accessor :email
14
+
15
+ # The homepage of this project
16
+ attr_accessor :homepage
17
+
18
+ # The regex of files to exclude from the manifest
19
+ attr_accessor :exclude_from_manifest
20
+
21
+ # The hash of Gem::Specifications keyed' by platform
22
+ attr_accessor :gemspecs
23
+
24
+ # Public: Initialize ThisProject
25
+ #
26
+ # Yields self
27
+ def initialize(&block)
28
+ @exclude_from_manifest = %r/\.(git|DS_Store)|^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)|^[^\/]+\.gemspec|\.(swp|jar|bundle|so|rvmrc)$|~$/
29
+ @gemspecs = Hash.new
30
+ yield self if block_given?
31
+ end
32
+
33
+ # Public: return the version of ThisProject
34
+ #
35
+ # Search the ruby files in the project looking for the one that has the
36
+ # version string in it. This does not eval any code in the project, it parses
37
+ # the source code looking for the string.
38
+ #
39
+ # Returns a String version
40
+ def version
41
+ [ "lib/#{ name }.rb", "lib/#{ name }/version.rb" ].each do |v|
42
+ path = project_path( v )
43
+ line = path.read[/^\s*VERSION\s*=\s*.*/]
44
+ if line then
45
+ return line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
46
+ end
47
+ end
48
+ end
49
+
50
+ # Internal: Return a section of an RDoc file with the given section name
51
+ #
52
+ # path - the relative path in the project of the file to parse
53
+ # section_name - the section out of the file from which to parse data
54
+ #
55
+ # Retuns the text of the section as an array of paragrphs.
56
+ def section_of( file, section_name )
57
+ re = /^[=#]+ (.*)$/
58
+ sectional = project_path( file )
59
+ parts = sectional.read.split( re )[1..-1]
60
+ parts.map! { |p| p.strip }
61
+
62
+ sections = Hash.new
63
+ Hash[*parts].each do |k,v|
64
+ sections[k] = v.split("\n\n")
65
+ end
66
+ return sections[section_name]
67
+ end
68
+
69
+ # Internal: print out a warning about the give task
70
+ def task_warning( task )
71
+ warn "WARNING: '#{task}' tasks are not defined. Please run 'rake develop'"
72
+ end
73
+
74
+ # Internal: Return the full path to the file that is relative to the project
75
+ # root.
76
+ #
77
+ # path - the relative path of the file from the project root
78
+ #
79
+ # Returns the Pathname of the file
80
+ def project_path( *relative_path )
81
+ project_root.join( *relative_path )
82
+ end
83
+
84
+ # Internal: The absolute path of this file
85
+ #
86
+ # Returns the Pathname of this file.
87
+ def this_file_path
88
+ Pathname.new( __FILE__ ).expand_path
89
+ end
90
+
91
+ # Internal: The root directory of this project
92
+ #
93
+ # This is defined as being the directory that is in the path of this project
94
+ # that has the first Rakefile
95
+ #
96
+ # Returns the Pathname of the directory
97
+ def project_root
98
+ this_file_path.ascend do |p|
99
+ rakefile = p.join( 'Rakefile' )
100
+ return p if rakefile.exist?
101
+ end
102
+ end
103
+
104
+ # Internal: Returns the contents of the Manifest.txt file as an array
105
+ #
106
+ # Returns an Array of strings
107
+ def manifest
108
+ manifest_file = project_path( "Manifest.txt" )
109
+ abort "You need a Manifest.txt" unless manifest_file.readable?
110
+ manifest_file.readlines.map { |l| l.strip }
111
+ end
112
+
113
+ # Internal: Return the files that define the extensions
114
+ #
115
+ # Returns an Array
116
+ def extension_conf_files
117
+ manifest.grep( /extconf.rb\Z/ )
118
+ end
119
+
120
+ # Internal: Returns the gemspace associated with the current ruby platform
121
+ def platform_gemspec
122
+ gemspecs[platform]
123
+ end
124
+
125
+ def core_gemspec
126
+ Gem::Specification.new do |spec|
127
+ spec.name = name
128
+ spec.version = version
129
+ spec.author = author
130
+ spec.email = email
131
+ spec.homepage = homepage
132
+
133
+ spec.summary = summary
134
+ spec.description = description
135
+ spec.license = license
136
+
137
+ spec.files = manifest
138
+ spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
139
+ spec.test_files = spec.files.grep(/^spec/)
140
+
141
+ spec.extra_rdoc_files += spec.files.grep(/(txt|rdoc|md)$/)
142
+ spec.rdoc_options = [ "--main" , 'README.md',
143
+ "--markup", "tomdoc" ]
144
+ end
145
+ end
146
+
147
+ # Internal: Return the gemspec for the ruby platform
148
+ def ruby_gemspec( core = core_gemspec, &block )
149
+ yielding_gemspec( 'ruby', core, &block )
150
+ end
151
+
152
+ # Internal: Return the gemspec for the jruby platform
153
+ def java_gemspec( core = core_gemspec, &block )
154
+ yielding_gemspec( 'java', core, &block )
155
+ end
156
+
157
+ # Internal: give an initial spec and a key, create a new gemspec based off of
158
+ # it.
159
+ #
160
+ # This will force the new gemspecs 'platform' to be that of the key, since the
161
+ # only reason you would have multiple gemspecs at this point is to deal with
162
+ # different platforms.
163
+ def yielding_gemspec( key, core )
164
+ spec = gemspecs[key] ||= core.dup
165
+ spec.platform = key
166
+ yield spec if block_given?
167
+ return spec
168
+ end
169
+
170
+ # Internal: Set the recovery gem development dependency
171
+ #
172
+ # These are dynamically set since they cannot be hard coded as there is
173
+ # no way to ship them correctly in the gemspec
174
+ #
175
+ # Returns nothing.
176
+ def set_coverage_gem
177
+ if RUBY_VERSION < "1.9.0"
178
+ platform_gemspec.add_development_dependency( 'rcov', '~> 1.0.0' )
179
+ else
180
+ platform_gemspec.add_development_dependency( 'simplecov', '~> 0.8.2' )
181
+ end
182
+ end
183
+
184
+ # Internal: Return the platform of ThisProject at the current moment in time.
185
+ def platform
186
+ (RUBY_PLATFORM == "java") ? 'java' : Gem::Platform::RUBY
187
+ end
188
+
189
+ # Internal: Return the DESCRIPTION section of the README.rdoc file
190
+ def description_section
191
+ section_of( 'README.md', 'DESCRIPTION')
192
+ end
193
+
194
+ # Internal: Return the summary text from the README
195
+ def summary
196
+ description_section.first
197
+ end
198
+
199
+ # Internal: Return the full description text from the READEM
200
+ def description
201
+ description_section.join(" ").tr("\n", ' ').gsub(/[{}]/,'').gsub(/\[[^\]]+\]/,'') # strip rdoc
202
+ end
203
+
204
+ def license
205
+ "ISC"
206
+ end
207
+
208
+ # Internal: The path to the gemspec file
209
+ def gemspec_file
210
+ project_path( "#{ name }.gemspec" )
211
+ end
212
+ end
213
+
214
+ This = ThisProject.new
metadata CHANGED
@@ -1,62 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: htauth
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2008-12-21 00:00:00 -07:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
11
+ date: 2014-03-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '10.1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '10.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rdoc
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '4.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
55
+ - !ruby/object:Gem::Dependency
16
56
  name: highline
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
17
62
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
21
66
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: 1.5.0
24
- version:
25
- description: HTAuth is a pure ruby replacement for the Apache support programs htdigest and htpasswd. Command line and API access are provided for access to htdigest and htpasswd files.
67
+ - !ruby/object:Gem::Version
68
+ version: '1.6'
69
+ description: HTAuth is a pure ruby replacement for the Apache support programs htdigest
70
+ and htpasswd. Command line and API access are provided for access to htdigest and
71
+ htpasswd files.
26
72
  email: jeremy@copiousfreetime.org
27
- executables:
73
+ executables:
28
74
  - htdigest-ruby
29
75
  - htpasswd-ruby
30
76
  extensions: []
31
-
32
- extra_rdoc_files:
33
- - README
34
- - HISTORY
77
+ extra_rdoc_files:
78
+ - CONTRIBUTING.md
79
+ - HISTORY.md
80
+ - Manifest.txt
81
+ - README.md
82
+ files:
83
+ - CONTRIBUTING.md
84
+ - HISTORY.md
35
85
  - LICENSE
36
- - lib/htauth/algorithm.rb
37
- - lib/htauth/crypt.rb
38
- - lib/htauth/digest.rb
39
- - lib/htauth/digest_entry.rb
40
- - lib/htauth/digest_file.rb
41
- - lib/htauth/entry.rb
42
- - lib/htauth/file.rb
43
- - lib/htauth/md5.rb
44
- - lib/htauth/passwd.rb
45
- - lib/htauth/passwd_entry.rb
46
- - lib/htauth/passwd_file.rb
47
- - lib/htauth/plaintext.rb
48
- - lib/htauth/sha1.rb
49
- - lib/htauth/version.rb
50
- - lib/htauth.rb
51
- files:
86
+ - Manifest.txt
87
+ - README.md
88
+ - Rakefile
52
89
  - bin/htdigest-ruby
53
90
  - bin/htpasswd-ruby
91
+ - lib/htauth.rb
54
92
  - lib/htauth/algorithm.rb
55
93
  - lib/htauth/crypt.rb
56
94
  - lib/htauth/digest.rb
57
95
  - lib/htauth/digest_entry.rb
58
96
  - lib/htauth/digest_file.rb
59
97
  - lib/htauth/entry.rb
98
+ - lib/htauth/errors.rb
60
99
  - lib/htauth/file.rb
61
100
  - lib/htauth/md5.rb
62
101
  - lib/htauth/passwd.rb
@@ -65,7 +104,6 @@ files:
65
104
  - lib/htauth/plaintext.rb
66
105
  - lib/htauth/sha1.rb
67
106
  - lib/htauth/version.rb
68
- - lib/htauth.rb
69
107
  - spec/crypt_spec.rb
70
108
  - spec/digest_entry_spec.rb
71
109
  - spec/digest_file_spec.rb
@@ -77,45 +115,63 @@ files:
77
115
  - spec/plaintext_spec.rb
78
116
  - spec/sha1_spec.rb
79
117
  - spec/spec_helper.rb
80
- - README
81
- - HISTORY
82
- - LICENSE
83
- - tasks/announce.rake
84
- - tasks/distribution.rake
85
- - tasks/documentation.rake
86
- - tasks/rspec.rake
87
- - tasks/rubyforge.rake
88
- - tasks/config.rb
89
- - tasks/utils.rb
90
- - gemspec.rb
91
- has_rdoc: true
92
- homepage: http://copiousfreetime.rubyforge.org/htauth
118
+ - spec/test.add.digest
119
+ - spec/test.add.passwd
120
+ - spec/test.delete.digest
121
+ - spec/test.delete.passwd
122
+ - spec/test.original.digest
123
+ - spec/test.original.passwd
124
+ - spec/test.update.digest
125
+ - spec/test.update.passwd
126
+ - tasks/default.rake
127
+ - tasks/this.rb
128
+ homepage: http://github.com/copiousfreetime/htauth
129
+ licenses:
130
+ - ISC
131
+ metadata: {}
93
132
  post_install_message:
94
- rdoc_options:
95
- - --line-numbers
96
- - --inline-source
133
+ rdoc_options:
97
134
  - --main
98
- - README
99
- require_paths:
135
+ - README.md
136
+ - --markup
137
+ - tomdoc
138
+ require_paths:
100
139
  - lib
101
- required_ruby_version: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - ">="
104
- - !ruby/object:Gem::Version
105
- version: "0"
106
- version:
107
- required_rubygems_version: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: "0"
112
- version:
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ! '>='
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ required_rubygems_version: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
113
150
  requirements: []
114
-
115
- rubyforge_project: copiousfreetime
116
- rubygems_version: 1.3.1
151
+ rubyforge_project:
152
+ rubygems_version: 2.2.2
117
153
  signing_key:
118
- specification_version: 2
119
- summary: HTAuth is a pure ruby replacement for the Apache support programs htdigest and htpasswd
120
- test_files: []
121
-
154
+ specification_version: 4
155
+ summary: HTAuth is a pure ruby replacement for the Apache support programs htdigest
156
+ and htpasswd. Command line and API access are provided for access to htdigest and
157
+ htpasswd files.
158
+ test_files:
159
+ - spec/crypt_spec.rb
160
+ - spec/digest_entry_spec.rb
161
+ - spec/digest_file_spec.rb
162
+ - spec/digest_spec.rb
163
+ - spec/md5_spec.rb
164
+ - spec/passwd_entry_spec.rb
165
+ - spec/passwd_file_spec.rb
166
+ - spec/passwd_spec.rb
167
+ - spec/plaintext_spec.rb
168
+ - spec/sha1_spec.rb
169
+ - spec/spec_helper.rb
170
+ - spec/test.add.digest
171
+ - spec/test.add.passwd
172
+ - spec/test.delete.digest
173
+ - spec/test.delete.passwd
174
+ - spec/test.original.digest
175
+ - spec/test.original.passwd
176
+ - spec/test.update.digest
177
+ - spec/test.update.passwd
data/HISTORY DELETED
@@ -1,26 +0,0 @@
1
- = Changelog
2
- == Version 1.0.3 2008-12-20
3
-
4
- * update highline dependency
5
-
6
- == Version 1.0.2 2008-11-30
7
-
8
- === Minor enhancement
9
-
10
- * Change project layout
11
-
12
- == Version 1.0.1 2008-02-06
13
-
14
- === Bugfixes
15
-
16
- * fix require dependency chain
17
- * fix gem dependency on rake
18
-
19
- == Version 1.0.0 2008-02-05
20
-
21
- * Initial public release
22
-
23
- === Release Notes
24
-
25
- * Look at 'htpasswd-ruby' and 'htdigest-ruby' to get started.
26
-
data/gemspec.rb DELETED
@@ -1,43 +0,0 @@
1
- require 'rubygems'
2
- require 'htauth/version'
3
- require 'tasks/config'
4
-
5
- HTAuth::GEM_SPEC = Gem::Specification.new do |spec|
6
- proj = Configuration.for('project')
7
- spec.name = proj.name
8
- spec.version = HTAuth::VERSION
9
-
10
- spec.author = proj.author
11
- spec.email = proj.email
12
- spec.homepage = proj.homepage
13
- spec.summary = proj.summary
14
- spec.description = proj.description
15
- spec.platform = Gem::Platform::RUBY
16
-
17
-
18
- pkg = Configuration.for('packaging')
19
- spec.files = pkg.files.all
20
- spec.executables = pkg.files.bin.collect { |b| File.basename(b) }
21
-
22
- # add dependencies here
23
- # spec.add_dependency("rake", ">= 0.8.1")
24
- spec.add_dependency("highline", "~> 1.5.0")
25
-
26
-
27
- if rdoc = Configuration.for_if_exist?('rdoc') then
28
- spec.has_rdoc = true
29
- spec.extra_rdoc_files = pkg.files.rdoc
30
- spec.rdoc_options = rdoc.options + [ "--main" , rdoc.main_page ]
31
- else
32
- spec.has_rdoc = false
33
- end
34
-
35
- if test = Configuration.for_if_exist?('testing') then
36
- spec.test_files = test.files
37
- end
38
-
39
- if rf = Configuration.for_if_exist?('rubyforge') then
40
- spec.rubyforge_project = rf.project
41
- end
42
-
43
- end
data/tasks/announce.rake DELETED
@@ -1,38 +0,0 @@
1
- require 'tasks/config'
2
- #-------------------------------------------------------------------------------
3
- # announcement methods
4
- #-------------------------------------------------------------------------------
5
-
6
- proj_config = Configuration.for('project')
7
- namespace :announce do
8
- desc "create email for ruby-talk"
9
- task :email do
10
- info = Utils.announcement
11
-
12
- File.open("email.txt", "w") do |mail|
13
- mail.puts "From: #{proj_config.author} <#{proj_config.email}>"
14
- mail.puts "To: ruby-talk@ruby-lang.org"
15
- mail.puts "Date: #{Time.now.rfc2822}"
16
- mail.puts "Subject: [ANN] #{info[:subject]}"
17
- mail.puts
18
- mail.puts info[:title]
19
- mail.puts
20
- mail.puts info[:urls]
21
- mail.puts
22
- mail.puts info[:description]
23
- mail.puts
24
- mail.puts "{{ Release notes for Version #{HTAuth::VERSION} }}"
25
- mail.puts
26
- mail.puts info[:release_notes]
27
- mail.puts
28
- mail.puts info[:urls]
29
- end
30
- puts "Created the following as email.txt:"
31
- puts "-" * 72
32
- puts File.read("email.txt")
33
- puts "-" * 72
34
- end
35
-
36
- CLOBBER << "email.txt"
37
- end
38
-
data/tasks/config.rb DELETED
@@ -1,98 +0,0 @@
1
- require 'configuration'
2
-
3
- require 'rake'
4
- require 'tasks/utils'
5
-
6
- #-----------------------------------------------------------------------
7
- # General project configuration
8
- #-----------------------------------------------------------------------
9
- Configuration.for('project') {
10
- name "htauth"
11
- version "1.0.1"
12
- author "Jeremy Hinegardner"
13
- email "jeremy@copiousfreetime.org"
14
- homepage "http://copiousfreetime.rubyforge.org/htauth"
15
- description Utils.section_of("README", "description")
16
- summary description.split(".").first
17
- history "HISTORY"
18
- license FileList["LICENSE", ]
19
- readme "README"
20
- }
21
-
22
- #-----------------------------------------------------------------------
23
- # Packaging
24
- #-----------------------------------------------------------------------
25
- Configuration.for('packaging') {
26
- # files in the project
27
- proj_conf = Configuration.for('project')
28
- files {
29
- bin FileList["bin/*"]
30
- lib FileList["lib/**/*.rb"]
31
- test FileList["spec/**/*.rb", "test/**/*.rb"]
32
- data FileList["data/**/*"]
33
- tasks FileList["tasks/**/*.r{ake,b}"]
34
- rdoc FileList[proj_conf.readme, proj_conf.history,
35
- proj_conf.license] + lib
36
- all bin + lib + test + data + rdoc + tasks
37
- }
38
-
39
- # ways to package the results
40
- formats {
41
- tgz true
42
- zip true
43
- rubygem Configuration::Table.has_key?('rubygem')
44
- }
45
- }
46
-
47
- #-----------------------------------------------------------------------
48
- # Gem packaging
49
- #-----------------------------------------------------------------------
50
- Configuration.for("rubygem") {
51
- spec "gemspec.rb"
52
- Configuration.for('packaging').files.all << spec
53
- }
54
-
55
- #-----------------------------------------------------------------------
56
- # Testing
57
- # - change mode to 'testunit' to use unit testing
58
- #-----------------------------------------------------------------------
59
- Configuration.for('test') {
60
- mode "spec"
61
- files Configuration.for("packaging").files.test
62
- options %w[ --format specdoc --color ]
63
- ruby_opts %w[ ]
64
- }
65
-
66
- #-----------------------------------------------------------------------
67
- # Rcov
68
- #-----------------------------------------------------------------------
69
- Configuration.for('rcov') {
70
- output_dir "coverage"
71
- libs %w[ lib ]
72
- rcov_opts %w[ --html ]
73
- ruby_opts %w[ ]
74
- test_files Configuration.for('packaging').files.test
75
- }
76
-
77
- #-----------------------------------------------------------------------
78
- # Rdoc
79
- #-----------------------------------------------------------------------
80
- Configuration.for('rdoc') {
81
- files Configuration.for('packaging').files.rdoc
82
- main_page files.first
83
- title Configuration.for('project').name
84
- options %w[ --line-numbers --inline-source ]
85
- output_dir "doc"
86
- }
87
-
88
- #-----------------------------------------------------------------------
89
- # Rubyforge
90
- #-----------------------------------------------------------------------
91
- Configuration.for('rubyforge') {
92
- project "copiousfreetime"
93
- user "jjh"
94
- host "rubyforge.org"
95
- rdoc_location "#{user}@#{host}:/var/www/gforge-projects/#{project}/htauth"
96
- }
97
-
98
-