Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Thanks Daniel

  • Loading branch information...
commit 8e8fb0cd4f24cbef0a7888e8b114728b5e9a3ee8 2 parents 0281b6e + 5001d38
@glejeune authored
View
0  .gemrc
No changes.
View
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in ruby-graphviz.gemspec
+gemspec
View
121 Rakefile
@@ -1,21 +1,15 @@
$:.unshift( "lib" )
require "graphviz/constants"
-require 'rake'
require 'rake/clean'
+require 'bundler'
require 'rubygems/package_task'
require 'rdoc/task'
require 'rake/testtask'
require 'fileutils'
-require 'json/pure'
require 'open-uri'
include FileUtils
-PKG_NAME = "ruby-graphviz"
-PKG_VERS = Constants::RGV_VERSION
-PKG_FILES = %w(COPYING README.rdoc AUTHORS setup.rb) +
- Dir.glob("{bin,examples,lib,test}/**/*")
-
CLEAN.include ['**/.*.sw?', '*.gem', '.config', 'test/test.log']
RDOC_OPTS = ['--quiet', '--title', "Ruby/GraphViz, the Documentation",
"--opname", "index.html",
@@ -26,9 +20,9 @@ desc "Packages up Ruby/GraphViz."
task :default => [:test, :package]
task :package => [:clean]
-task :doc => [:rdoc, :after_doc]
+task :doc => :rdoc
-Rake::RDocTask.new do |rdoc|
+RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.options += RDOC_OPTS
rdoc.main = "README.rdoc"
@@ -47,124 +41,19 @@ Rake::RDocTask.new do |rdoc|
'lib/graphviz/family_tree/sibling.rb']
end
-task :after_doc do
- # sh %{scp -r doc/rdoc/* #{ENV['USER']}@rubyforge.org:/var/www/gforge-projects/ruby-asp/ruby-graphviz}
-end
-
-spec =
- Gem::Specification.new do |s|
- s.name = PKG_NAME
- s.version = PKG_VERS
- s.platform = Gem::Platform::RUBY
-
- s.authors = ["Gregoire Lejeune"]
- s.summary = %q{Interface to the GraphViz graphing tool}
- s.email = %q{gregoire.lejeune@free.fr}
- s.homepage = %q{http://github.com/glejeune/Ruby-Graphviz}
- s.description = %q{Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.}
-
- s.files = PKG_FILES
- s.require_path = "lib"
- s.bindir = "bin"
- s.executables = ['ruby2gv', 'gem2gv', 'dot2ruby', 'git2gv', 'xml2gv']
-
- s.rubyforge_project = 'ruby-asp'
- s.has_rdoc = true
- s.extra_rdoc_files = ["README.rdoc", "COPYING", "AUTHORS"]
- s.rdoc_options = ["--title", "Ruby/GraphViz", "--main", "README.rdoc"]
-
- s.post_install_message = %{
-Since version 0.9.2, Ruby/GraphViz can use Open3.popen3 (or not)
-On Windows, you can install 'win32-open3'
-
-You need to install GraphViz (http://graphviz.org/) to use this Gem.
-
-For more information about Ruby-Graphviz :
-* Doc : http://rdoc.info/projects/glejeune/Ruby-Graphviz
-* Sources : http://github.com/glejeune/Ruby-Graphviz
-* NEW - Mailing List : http://groups.google.com/group/ruby-graphviz
-
-/!\\ Version 0.9.12 introduce a new solution to connect edges to node ports
-For more information, see http://github.com/glejeune/Ruby-Graphviz/issues/#issue/13
-So if you use node ports, maybe you need to change your code.
-
-/!\\ GraphViz::Node#name has been removed!
-
-/!\\ :output and :file options have been removed!
-
-/!\\ The html attribut has been removed!
-You can use the label attribut, as dot do it : :label => '<<html/>>'
-
-/!\\ Version 0.9.17 introduce GraphML (http://graphml.graphdrawing.org/) support and
-graph theory !
-}
- end
-
-Gem::PackageTask.new(spec) do |p|
-# Rake::GemPackageTask.new(spec) do |p|
- p.need_tar = true
- p.gem_spec = spec
-end
-
-task :install do
- sh %{rake package}
- sh %{sudo gem install pkg/#{PKG_NAME}-#{PKG_VERS}}
-end
-
-task :uninstall => [:clean] do
- sh %{sudo gem uninstall #{PKG_NAME}}
-end
-
Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/test_*.rb']
-# t.warning = true
-# t.verbose = true
end
-class Rubygems
- def initialize
- url = "http://rubygems.org/api/v1/gems/#{PKG_NAME}.json"
- @version_at_rubygems = JSON.parse( open(url).read )["version"]
- end
-
- def status
- version == PKG_VERS
- end
- def self.status
- self.new.status
- end
-
- def version
- @version_at_rubygems
- end
- def self.version
- self.new.version
- end
-end
+Bundler::GemHelper.install_tasks
namespace :gemcutter do
- desc "push to gemcutter and tag for github"
- task :push => [:package] do
- unless Rubygems.status
- sh %{gem push pkg/#{PKG_NAME}-#{PKG_VERS}.gem}, :verbose => true
- begin
- sh %{git commit -am "Tag #{PKG_VERS}"}, :verbose => true
- rescue => e
- puts "Nothing to commit !"
- end
- sh %{git tag #{PKG_VERS}}, :verbose => true
- sh %{git push origin master --tags}
- else
- puts "This gem already existe in version #{PKG_VERS}!"
- end
- end
-
desc "check gemcutter status"
task :status do
if Rubygems.status
puts "This gem already existe in version #{PKG_VERS}!"
else
- puts "This gem (#{PKG_VERS}) has not been published! Last version at gemcutter is #{Rubygems.version}"
+ puts "This gem (#{Constants::RGV_VERSION}) has not been published! Last version at gemcutter is #{Rubygems.version}"
end
end
end
View
0  bin/dot2ruby 100644 → 100755
File mode changed
View
0  bin/gem2gv 100644 → 100755
File mode changed
View
0  bin/git2gv 100644 → 100755
File mode changed
View
0  bin/ruby2gv 100644 → 100755
File mode changed
View
0  bin/xml2gv 100644 → 100755
File mode changed
View
2  lib/graphviz/constants.rb
@@ -40,7 +40,7 @@
# C => cluster
#
module Constants
- RGV_VERSION = "1.0.0"
+ RGV_VERSION = "1.0.1"
## Const: Output formats
FORMATS = [
View
56 ruby-graphviz.gemspec
@@ -0,0 +1,56 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+
+require "graphviz/constants"
+
+Gem::Specification.new do |s|
+ s.name = "ruby-graphviz"
+ s.version = Constants::RGV_VERSION
+ s.platform = Gem::Platform::RUBY
+
+ s.authors = ["Gregoire Lejeune"]
+ s.summary = %q{Interface to the GraphViz graphing tool}
+ s.email = %q{gregoire.lejeune@free.fr}
+ s.homepage = %q{http://github.com/glejeune/Ruby-Graphviz}
+ s.description = %q{Ruby/Graphviz provides an interface to layout and generate images of directed graphs in a variety of formats (PostScript, PNG, etc.) using GraphViz.}
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.rubyforge_project = 'ruby-asp'
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.rdoc", "COPYING", "AUTHORS"]
+ s.rdoc_options = ["--title", "Ruby/GraphViz", "--main", "README.rdoc"]
+ s.post_install_message = %{
+Since version 0.9.2, Ruby/GraphViz can use Open3.popen3 (or not)
+On Windows, you can install 'win32-open3'
+
+You need to install GraphViz (http://graphviz.org/) to use this Gem.
+
+For more information about Ruby-Graphviz :
+* Doc : http://rdoc.info/projects/glejeune/Ruby-Graphviz
+* Sources : http://github.com/glejeune/Ruby-Graphviz
+* NEW - Mailing List : http://groups.google.com/group/ruby-graphviz
+
+/!\\ Version 0.9.12 introduce a new solution to connect edges to node ports
+For more information, see http://github.com/glejeune/Ruby-Graphviz/issues/#issue/13
+So if you use node ports, maybe you need to change your code.
+
+/!\\ GraphViz::Node#name has been removed!
+
+/!\\ :output and :file options have been removed!
+
+/!\\ The html attribut has been removed!
+You can use the label attribut, as dot do it : :label => '<<html/>>'
+
+/!\\ Version 0.9.17 introduce GraphML (http://graphml.graphdrawing.org/) support and
+graph theory !
+ }
+
+ # s.add_runtime_dependency("middleman", "~>2.0.0.3")
+
+ s.add_development_dependency 'rake'
+ s.add_development_dependency 'gems'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.