htmldoc_remote_compile_wrapper 0.1

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,20 @@
1
+ bin/
2
+ etc/
3
+ man/
4
+ *.gem
5
+ *.rbc
6
+ .bundle
7
+ .config
8
+ .yardoc
9
+ Gemfile.lock
10
+ InstalledFiles
11
+ _yardoc
12
+ coverage
13
+ doc/
14
+ lib/bundler/man
15
+ pkg
16
+ rdoc
17
+ spec/reports
18
+ test/tmp
19
+ test/version_tmp
20
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in testgem.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Joe Noon
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Compile htmldoc binary
2
+
3
+ Suitable for environments like Heroku. Downloads the htmldoc source and compiles using the native extension hook upon gem installation.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
data/ext/extconf.rb ADDED
@@ -0,0 +1,37 @@
1
+ require 'mkmf'
2
+ require 'fileutils'
3
+ require 'open-uri'
4
+
5
+ root = File.expand_path('../..', __FILE__)
6
+ src_dir = File.join(root, 'src')
7
+ tgz_filename = "htmldoc.tgz"
8
+ tgz_file = File.join(src_dir, tgz_filename)
9
+
10
+ FileUtils.rm_rf src_dir
11
+ FileUtils.mkdir src_dir
12
+
13
+ source_url = "http://ftp.easysw.com/pub/htmldoc/1.8.27/htmldoc-1.8.27-source.tar.gz"
14
+
15
+ puts "===> Downloading: #{source_url} to #{tgz_file}"
16
+
17
+ open(tgz_file, "wb") do |file|
18
+ file.print open(source_url).read
19
+ end
20
+
21
+ Dir.chdir(src_dir) do
22
+ puts "===> Changing to directory: #{src_dir}"
23
+ puts "===> Extracting #{tgz_filename}"
24
+ system "tar xzf #{tgz_filename} --strip-components=1"
25
+ puts "===> Configuring with prefix: #{root}"
26
+ system "./configure --prefix=#{root}"
27
+ puts "===> Building..."
28
+ system "make"
29
+ puts "===> Installing..."
30
+ system "make install"
31
+ puts "===> Cleaning up..."
32
+ system "make clean"
33
+ end
34
+
35
+ FileUtils.rm_rf src_dir
36
+
37
+ puts "===> Done compiling htmldoc."
@@ -0,0 +1,16 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Joe Noon"]
5
+ gem.email = ["joenoon@gmail.com"]
6
+ gem.description = %q{Compile htmldoc binary}
7
+ gem.summary = %q{Suitable for environments like Heroku. Downloads the htmldoc source and compiles using the native extension hook upon gem installation.}
8
+ gem.homepage = ""
9
+
10
+ gem.files = `git ls-files`.split($\)
11
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
12
+ gem.extensions = ['ext/extconf.rb']
13
+ gem.name = "htmldoc_remote_compile_wrapper"
14
+ gem.require_paths = ["lib"]
15
+ gem.version = "0.1"
16
+ end
@@ -0,0 +1,11 @@
1
+ require 'pathname'
2
+
3
+ module HtmldocRemoteCompileWrapper
4
+ Root = Pathname.new(File.expand_path('../..', __FILE__))
5
+ Bin = Root.join('bin')
6
+
7
+ Executables = Bin.children.inject({}) { |h, p|
8
+ h[p.basename.to_s.to_sym] = p.to_s
9
+ h
10
+ }
11
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: htmldoc_remote_compile_wrapper
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ version: "0.1"
9
+ platform: ruby
10
+ authors:
11
+ - Joe Noon
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2012-07-01 00:00:00 -07:00
17
+ default_executable:
18
+ dependencies: []
19
+
20
+ description: Compile htmldoc binary
21
+ email:
22
+ - joenoon@gmail.com
23
+ executables: []
24
+
25
+ extensions:
26
+ - ext/extconf.rb
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - .gitignore
31
+ - Gemfile
32
+ - LICENSE
33
+ - README.md
34
+ - Rakefile
35
+ - ext/extconf.rb
36
+ - htmldoc_remote_compile_wrapper.gemspec
37
+ - lib/htmldoc_remote_compile_wrapper.rb
38
+ has_rdoc: true
39
+ homepage: ""
40
+ licenses: []
41
+
42
+ post_install_message:
43
+ rdoc_options: []
44
+
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ requirements: []
62
+
63
+ rubyforge_project:
64
+ rubygems_version: 1.3.6
65
+ signing_key:
66
+ specification_version: 3
67
+ summary: Suitable for environments like Heroku. Downloads the htmldoc source and compiles using the native extension hook upon gem installation.
68
+ test_files: []
69
+