mizuho 0.9.18 → 0.9.19

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJRfZGvAAoJECrHRaUKISqMZA0H/2pCwpt1nTW5DD/1qT36IEmX
6
- NnRePYM6El9Ccd7ZyhcThTTMpm6yp2Ao3hZMXGNh1UNdLwjvkaAoJBJC8Cvq5ckZ
7
- rJlvPrVJPoxlT3JSnp8J59siWIBWQwkXqskHUGXWBYJ1sjvoTXw7svNwj0HIvZwP
8
- d9qV1uOmCxCMiWt6HQjCa+74avVXAPQRzwqBfBBIxVRG2IqhRq+XdeyAWZ2qasVi
9
- /t6eUR5EamygYbABgYWdSoOmP0E6ZVF3uti+ihiZ/KFr574s9+o7J35DByrZwTj8
10
- JO167i04pKm1Ot2Unmi+bjTD8BGtom7VqQOZBATS16Z4Hvef52ul6cpxKADHZeM=
11
- =0j4v
5
+ iQEcBAABAgAGBQJRgSgWAAoJECrHRaUKISqMkckH/1t5KU4rDgkQ1QmsRcdIMLTQ
6
+ M3SAW5nABxs4lPT4iJL0YZmh19oJOcmFQRx/v2dYImv0/R8Q3LLs5gqFWG+Nwow9
7
+ caW87HKLB51KIImXxYMc9rB3Gp6jB+VKgW8uVAdv5ENTaDf72ldJJFNZbzzHrD6F
8
+ 6hpuDKhvbHeBIFawjdmYlKMZUACKqglCtXkxGxqhXp78IMrR+X31imAZTDj0TdXO
9
+ qak10qS4OLHBLZtNYIpVj0m5lAD2uiX64/CgaolnbqIYXJLIgT0snUrueaRuPRaH
10
+ ryM7sASE6WYeEdavInfjE98Q7h5qfVThT/bgmB8wMHhWBMfauB6M631ZWrxGuHE=
11
+ =KT1Y
12
12
  -----END PGP SIGNATURE-----
@@ -28,9 +28,9 @@ that.
28
28
  to install this yourself; we've bundled a precompiled source-highlight
29
29
  binary for OS X for your convenience.
30
30
 
31
- ## Installation
31
+ ## Installation with RubyGems
32
32
 
33
- Run the following command as root:
33
+ Run:
34
34
 
35
35
  gem install mizuho
36
36
 
@@ -38,6 +38,24 @@ This gem is signed using PGP with the [Phusion Software Signing key](http://www.
38
38
 
39
39
  You can verify the authenticity of the gem by following [The Complete Guide to Verifying Gems with rubygems-openpgp](http://www.rubygems-openpgp-ca.org/blog/the-complete-guide-to-verifying-gems-with-rubygems-openpgp.html).
40
40
 
41
+ ## Installation on Ubuntu
42
+
43
+ Use our [PPA](https://launchpad.net/~phusion.nl/+archive/misc):
44
+
45
+ sudo add-apt-repository ppa:user/ppa-name
46
+ sudo apt-get update
47
+ sudo apt-get install mizuho
48
+
49
+ ## Installation on Debian
50
+
51
+ Our Ubuntu Lucid packages are compatible with Debian 6.
52
+
53
+ sudo sh -c 'echo deb http://ppa.launchpad.net/phusion.nl/misc/ubuntu lucid main > /etc/apt/sources.list.d/mizuho.list'
54
+ sudo sh -c 'echo deb-src http://ppa.launchpad.net/phusion.nl/misc/ubuntu lucid main >> /etc/apt/sources.list.d/mizuho.list'
55
+ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C324F5BB38EEB5A0
56
+ sudo apt-get update
57
+ sudo apt-get install mizuho
58
+
41
59
  ## Usage
42
60
 
43
61
  First, read [the Asciidoc manual](http://www.methods.co.nz/asciidoc/userguide.html)
data/Rakefile CHANGED
@@ -1,6 +1,62 @@
1
1
  $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/lib"))
2
2
  require 'mizuho'
3
3
 
4
+ PACKAGE_NAME = "mizuho"
5
+ PACKAGE_VERSION = Mizuho::VERSION_STRING
6
+ PACKAGE_SIGNING_KEY = "0x0A212A8C"
7
+ MAINTAINER_NAME = "Hongli Lai"
8
+ MAINTAINER_EMAIL = "hongli@phusion.nl"
9
+
10
+ desc "Run unit tests"
11
+ task :test do
12
+ ruby "-S spec -f s -c test/*_spec.rb"
13
+ end
14
+
15
+ desc "Build, sign & upload gem"
16
+ task 'package:release' do
17
+ sh "git tag -s release-#{PACKAGE_VERSION}"
18
+ sh "gem build #{PACKAGE_NAME}.gemspec --sign --key #{PACKAGE_SIGNING_KEY}"
19
+ puts "Proceed with pushing tag to Github and uploading the gem? [y/n]"
20
+ if STDIN.readline == "y\n"
21
+ sh "git push origin release-#{PACKAGE_VERSION}"
22
+ sh "gem push #{PACKAGE_NAME}-#{PACKAGE_VERSION}.gem"
23
+ else
24
+ puts "Did not upload the gem."
25
+ end
26
+ end
27
+
28
+
29
+ ##### Utilities #####
30
+
31
+ def string_option(name, default_value = nil)
32
+ value = ENV[name]
33
+ if value.nil? || value.empty?
34
+ return default_value
35
+ else
36
+ return value
37
+ end
38
+ end
39
+
40
+ def boolean_option(name, default_value = false)
41
+ value = ENV[name]
42
+ if value.nil? || value.empty?
43
+ return default_value
44
+ else
45
+ return value == "yes" || value == "on" || value == "true" || value == "1"
46
+ end
47
+ end
48
+
49
+
50
+ ##### Debian packaging support #####
51
+
52
+ PKG_DIR = string_option('PKG_DIR', "pkg")
53
+ DEBIAN_NAME = PACKAGE_NAME
54
+ ALL_DISTRIBUTIONS = ["raring", "precise", "lucid"]
55
+ ORIG_TARBALL_FILES = lambda do
56
+ require 'mizuho/packaging'
57
+ Dir[*MIZUHO_FILES] - Dir[*MIZUHO_DEBIAN_EXCLUDE_FILES]
58
+ end
59
+
4
60
  # Implements a simple preprocessor language:
5
61
  #
6
62
  # Today
@@ -155,6 +211,7 @@ private
155
211
  "saucy" => "13.10"
156
212
  }
157
213
 
214
+ # Provides the DSL that's accessible within.
158
215
  class Evaluator
159
216
  def _infer_distro_table(name)
160
217
  if UBUNTU_DISTRIBUTIONS.has_key?(name)
@@ -268,24 +325,6 @@ private
268
325
  end
269
326
  end
270
327
 
271
- def string_option(name, default_value = nil)
272
- value = ENV[name]
273
- if value.nil? || value.empty?
274
- return default_value
275
- else
276
- return value
277
- end
278
- end
279
-
280
- def boolean_option(name, default_value = false)
281
- value = ENV[name]
282
- if value.nil? || value.empty?
283
- return default_value
284
- else
285
- return value == "yes" || value == "on" || value == "true" || value == "1"
286
- end
287
- end
288
-
289
328
  def recursive_copy_files(files, destination_dir, preprocess = false, variables = {})
290
329
  require 'fileutils' if !defined?(FileUtils)
291
330
  files.each_with_index do |filename, i|
@@ -294,8 +333,8 @@ def recursive_copy_files(files, destination_dir, preprocess = false, variables =
294
333
  FileUtils.mkdir_p("#{destination_dir}/#{dir}")
295
334
  end
296
335
  if !File.directory?(filename)
297
- if preprocess && filename =~ /\.pp$/
298
- real_filename = filename.sub(/\.pp$/, '')
336
+ if preprocess && filename =~ /\.template$/
337
+ real_filename = filename.sub(/\.template$/, '')
299
338
  FileUtils.install(filename, "#{destination_dir}/#{real_filename}")
300
339
  Preprocessor.new.start(filename, "#{destination_dir}/#{real_filename}",
301
340
  variables)
@@ -310,80 +349,55 @@ def recursive_copy_files(files, destination_dir, preprocess = false, variables =
310
349
  end
311
350
 
312
351
  def create_debian_package_dir(distribution)
313
- require 'mizuho/packaging'
314
352
  require 'time'
315
353
 
316
354
  variables = {
317
355
  :distribution => distribution
318
356
  }
319
357
 
320
- sh "rm -rf #{PKG_DIR}/#{distribution}"
321
- sh "mkdir -p #{PKG_DIR}/#{distribution}"
322
- recursive_copy_files(Dir[*MIZUHO_FILES] - Dir[*MIZUHO_DEBIAN_EXCLUDE_FILES],
323
- "#{PKG_DIR}/#{distribution}")
324
- recursive_copy_files(Dir["debian/**/*"], "#{PKG_DIR}/#{distribution}",
358
+ root = "#{PKG_DIR}/#{distribution}"
359
+ sh "rm -rf #{root}"
360
+ sh "mkdir -p #{root}"
361
+ recursive_copy_files(ORIG_TARBALL_FILES.call, root)
362
+ recursive_copy_files(Dir["debian.template/**/*"], root,
325
363
  true, variables)
326
- changelog = File.read("#{PKG_DIR}/#{distribution}/debian/changelog")
364
+ sh "mv #{root}/debian.template #{root}/debian"
365
+ changelog = File.read("#{root}/debian/changelog")
327
366
  changelog =
328
- "mizuho (#{Mizuho::VERSION_STRING}-1~#{distribution}1) #{distribution}; urgency=low\n" +
367
+ "#{DEBIAN_NAME} (#{PACKAGE_VERSION}-1~#{distribution}1) #{distribution}; urgency=low\n" +
329
368
  "\n" +
330
369
  " * Package built.\n" +
331
370
  "\n" +
332
- " -- Hongli Lai <hongli@phusion.nl> #{Time.now.rfc2822}\n\n" +
371
+ " -- #{MAINTAINER_NAME} <#{MAINTAINER_EMAIL}> #{Time.now.rfc2822}\n\n" +
333
372
  changelog
334
- File.open("#{PKG_DIR}/#{distribution}/debian/changelog", "w") do |f|
373
+ File.open("#{root}/debian/changelog", "w") do |f|
335
374
  f.write(changelog)
336
375
  end
337
376
  end
338
377
 
339
- PKG_DIR = string_option('PKG_DIR', "pkg")
340
- BASENAME = "mizuho_#{Mizuho::VERSION_STRING}"
341
- DISTRIBUTIONS = ["raring", "precise", "lucid"]
342
-
343
-
344
- desc "Run unit tests"
345
- task :test do
346
- ruby "-S spec -f s -c test/*_spec.rb"
347
- end
348
-
349
- desc "Build, sign & upload gem"
350
- task 'package:release' do
351
- sh "git tag -s release-#{Mizuho::VERSION_STRING}"
352
- sh "gem build mizuho.gemspec --sign --key 0x0A212A8C"
353
- puts "Proceed with pushing tag to Github and uploading the gem? [y/n]"
354
- if STDIN.readline == "y\n"
355
- sh "git push origin release-#{Mizuho::VERSION_STRING}"
356
- sh "gem push mizuho-#{Mizuho::VERSION_STRING}.gem"
357
- else
358
- puts "Did not upload the gem."
359
- end
360
- end
361
-
362
378
  task 'debian:orig_tarball' do
363
- if File.exist?("#{PKG_DIR}/mizuho_#{Mizuho::VERSION_STRING}.orig.tar.gz")
364
- puts "Debian orig tarball #{PKG_DIR}/mizuho_#{Mizuho::VERSION_STRING}.orig.tar.gz already exists."
379
+ if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}.orig.tar.gz")
380
+ puts "Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists."
365
381
  else
366
- require 'mizuho/packaging'
367
-
368
- sh "rm -rf #{PKG_DIR}/#{BASENAME}"
369
- sh "mkdir -p #{PKG_DIR}/#{BASENAME}"
370
- recursive_copy_files(
371
- Dir[*MIZUHO_FILES] - Dir[*MIZUHO_DEBIAN_EXCLUDE_FILES],
372
- "#{PKG_DIR}/#{BASENAME}"
373
- )
374
- sh "cd #{PKG_DIR} && tar -c #{BASENAME} | gzip --best > #{BASENAME}.orig.tar.gz"
382
+ sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
383
+ sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}"
384
+ recursive_copy_files(ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}")
385
+ sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
375
386
  end
376
387
  end
377
388
 
378
- desc "Build a Debian package for local testing"
389
+ desc "Build Debian source and binary package(s) for local testing"
379
390
  task 'debian:dev' do
380
- sh "rm -f #{PKG_DIR}/mizuho_#{Mizuho::VERSION_STRING}.orig.tar.gz"
391
+ sh "rm -f #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz"
381
392
  Rake::Task["debian:clean"].invoke
382
393
  Rake::Task["debian:orig_tarball"].invoke
383
- if distro = string_option('DISTRO')
384
- distributions = [distro]
394
+ case distro = string_option('DISTRO', 'current')
395
+ when 'current'
396
+ distributions = [File.read("/etc/lsb-release").scan(/^DISTRIB_CODENAME=(.+)/).first.first]
397
+ when 'all'
398
+ distributions = ALL_DISTRIBUTIONS
385
399
  else
386
- distributions = DISTRIBUTIONS
400
+ distributions = distro.split(',')
387
401
  end
388
402
  distributions.each do |distribution|
389
403
  create_debian_package_dir(distribution)
@@ -394,14 +408,14 @@ task 'debian:dev' do
394
408
  end
395
409
  end
396
410
 
397
- desc "Build Debian multiple source packages to be uploaded to repositories"
411
+ desc "Build Debian source packages to be uploaded to repositories"
398
412
  task 'debian:production' => 'debian:orig_tarball' do
399
- DISTRIBUTIONS.each do |distribution|
413
+ ALL_DISTRIBUTIONS.each do |distribution|
400
414
  create_debian_package_dir(distribution)
401
415
  sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps"
402
416
  end
403
- DISTRIBUTIONS.each do |distribution|
404
- sh "cd #{PKG_DIR}/#{distribution} && debuild -S -k0x0A212A8C"
417
+ ALL_DISTRIBUTIONS.each do |distribution|
418
+ sh "cd #{PKG_DIR}/#{distribution} && debuild -S -k#{PACKAGE_SIGNING_KEY}"
405
419
  end
406
420
  end
407
421
 
@@ -410,7 +424,7 @@ task 'debian:clean' do
410
424
  files = Dir["#{PKG_DIR}/*.{changes,build,deb,dsc,upload}"]
411
425
  sh "rm -f #{files.join(' ')}"
412
426
  sh "rm -rf #{PKG_DIR}/dev"
413
- DISTRIBUTIONS.each do |distribution|
427
+ ALL_DISTRIBUTIONS.each do |distribution|
414
428
  sh "rm -rf #{PKG_DIR}/#{distribution}"
415
429
  end
416
430
  sh "rm -rf #{PKG_DIR}/*.debian.tar.gz"
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  Source: mizuho
2
2
  Section: text
3
- Priority: optional
3
+ Priority: extra
4
4
  Maintainer: Hongli Lai <hongli@phusion.nl>
5
5
  Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.0~), sed (>= 1.0.0)
6
6
  Standards-Version: 3.9.3
File without changes
File without changes
@@ -19,7 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Mizuho
22
- VERSION_STRING = "0.9.18"
22
+ VERSION_STRING = "0.9.19"
23
23
  NATIVELY_PACKAGED = false
24
24
 
25
25
  if NATIVELY_PACKAGED
@@ -22,7 +22,7 @@ MIZUHO_FILES = [
22
22
  "README.markdown", "LICENSE.txt", "Rakefile",
23
23
  "bin/*",
24
24
  "lib/**/*",
25
- "debian/**/*",
25
+ "debian.template/**/*",
26
26
  "test/*",
27
27
  "templates/*",
28
28
  "asciidoc/**/*",
@@ -31,6 +31,6 @@ MIZUHO_FILES = [
31
31
 
32
32
  MIZUHO_DEBIAN_EXCLUDE_FILES = [
33
33
  "Rakefile",
34
- "debian/**/*",
34
+ "debian.template/**/*",
35
35
  "source-highlight/**/*",
36
36
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mizuho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.18
4
+ version: 0.9.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-28 00:00:00.000000000 Z
12
+ date: 2013-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -46,7 +46,7 @@ dependencies:
46
46
  description: A documentation formatting tool. Mizuho converts Asciidoc input files
47
47
  into nicely outputted HTML, possibly one file per chapter. Multiple templates are
48
48
  supported, so you can write your own.
49
- email: hongli@phusion.nl
49
+ email: software-signing@phusion.nl
50
50
  executables:
51
51
  - mizuho
52
52
  - mizuho-asciidoc
@@ -65,13 +65,13 @@ files:
65
65
  - lib/mizuho/source_highlight.rb
66
66
  - lib/mizuho/utils.rb
67
67
  - lib/mizuho.rb
68
- - debian/changelog
69
- - debian/compat
70
- - debian/control.pp
71
- - debian/copyright
72
- - debian/mizuho.install.pp
73
- - debian/rules
74
- - debian/source/format
68
+ - debian.template/changelog
69
+ - debian.template/compat
70
+ - debian.template/control.template
71
+ - debian.template/copyright
72
+ - debian.template/mizuho.install.template
73
+ - debian.template/rules
74
+ - debian.template/source/format
75
75
  - test/generator_spec.rb
76
76
  - test/id_map_spec.rb
77
77
  - test/parser_spec.rb
@@ -397,7 +397,8 @@ files:
397
397
  - source-highlight/xml.lang
398
398
  - source-highlight/xorg.lang
399
399
  homepage: https://github.com/FooBarWidget/mizuho
400
- licenses: []
400
+ licenses:
401
+ - MIT
401
402
  post_install_message:
402
403
  rdoc_options: []
403
404
  require_paths:
metadata.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJRfZGvAAoJECrHRaUKISqMbMIH/2nKsOHJx3cpvpm4TDYBu1bH
6
- /3/JWQl5p7XatzxntKWce7WyGDFk3+lfmYRfu+WDGC8AEqlq4Vo/wctVwgx48HWp
7
- 8GP89+2VUEBaMynFNkxH2Uq4fzs95AZGWUDOq35BN7i1JkcPdjJIt5341ak7UPLr
8
- x096QNFUwqH5b/Fnd7hVog9eR8zA1pokKWf2FPKNv7XWrsvPr3iTVd9L2Uui2Bzn
9
- DzbuaRWMkt7naJlHLoahEdUhuZFWmjFRmTVsI+ZsC/y7hHz+KaFL7n++Um3dasSn
10
- Wl+NKEtqZ5wis0Rgvb7cPeb08Mm6j36qxFCQMFqleTTR+91vzyfiD3HLB4jBHyo=
11
- =FC1H
5
+ iQEcBAABAgAGBQJRgSgWAAoJECrHRaUKISqM0KoIALYyey+TmESUUVaI4bANXCmv
6
+ 8IEOPmzmzLgddEbEE+4Sgm9neu9lBPCTLTIJQCNxcET2CkmfvhcqCYpWj6ewQIPS
7
+ W49y/TF5iMCeLrbtyehCivE7/IatPKZ5Q+hmcQzb/9k3Vq+Pvxr8KIFrDgaKM8eB
8
+ prQw+g5TBEok4H0Sp0YwkKT3utx4Oj9XpvdlpXzFUlL7sYGylbKeJWGfr8uK/jxC
9
+ XIJzkTiWHRf7fbKEHVn5Wvka4DgLXGqNZiVgPb4/5MZykGQMqrPgdvVmVRb7DCW4
10
+ Xsqk0j0qfaxRVWgEs1rdOwwMtzFpmJ+OkDA9XrIoDHCDyCnFZlao7UjCJC6bwCc=
11
+ =i2ql
12
12
  -----END PGP SIGNATURE-----