peterhoeg-railroad 0.5.6 → 0.5.7

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/.document CHANGED
@@ -1,7 +1,7 @@
1
1
  README.rdoc
2
2
  CHANGELOG.rdoc
3
3
  AUTHORS.rdoc
4
+ LICENSE.rdoc
4
5
  lib/**/*.rb
5
6
  bin/*
6
7
  features/**/*.feature
7
- LICENSE
data/CHANGELOG.rdoc CHANGED
@@ -1,6 +1,9 @@
1
1
  = Changes
2
2
 
3
- == Version 0.5.1 to 0.5.6 (may 15 2009)
3
+ == Version 0.5.7 (May 16 2009)
4
+ - Load the version automatically from VERSION.yml
5
+
6
+ == Version 0.5.1 to 0.5.6 (May 15 2009)
4
7
  - Make sure the proper version tag is set everywhere
5
8
  - Support showing belongs_to relationships when generating models
6
9
  - Transitioned to using Jeweler for gem management
File without changes
data/Rakefile CHANGED
@@ -5,10 +5,14 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "railroad"
8
+ gem.executables = "railroad"
8
9
  gem.email = ['peter@hoeg.com', 'p.hoeg@northwind.sg', 'javier@smaldone.com.ar']
9
10
  gem.homepage = "http://github.com/peterhoeg/RailRoad"
10
11
  gem.authors = ["Peter Hoeg", "Javier Smaldone"]
11
12
  gem.summary = "A DOT diagram generator for Ruby on Rail applications"
13
+ gem.description = gem.summary
14
+ gem.files = FileList["[A-Z]*", "{autotest,bin,lib,spec}/**/*", ".document"]
15
+ gem.extra_rdoc_files = FileList["*.rdoc"]
12
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
17
  end
14
18
 
@@ -31,16 +35,10 @@ end
31
35
  task :default => :spec
32
36
 
33
37
  require 'rake/rdoctask'
38
+ require 'lib/version'
34
39
  Rake::RDocTask.new do |rdoc|
35
- if File.exist?('VERSION.yml')
36
- config = YAML.load(File.read('VERSION.yml'))
37
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
38
- else
39
- version = ""
40
- end
41
-
42
40
  rdoc.rdoc_dir = 'rdoc'
43
- rdoc.title = "railroad #{version}"
41
+ rdoc.title = "railroad #{RailRoad::VERSION::STRING}"
44
42
  rdoc.rdoc_files.include('README*')
45
43
  rdoc.rdoc_files.include('CHANGELOG*')
46
44
  rdoc.rdoc_files.include('AUTHORS*')
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 6
4
+ :patch: 7
data/bin/railroad CHANGED
@@ -14,11 +14,18 @@
14
14
  # (at your option) any later version.
15
15
  #
16
16
 
17
+ require File.dirname(__FILE__) + '/../lib/version'
18
+
17
19
  APP_NAME = "railroad"
18
20
  APP_HUMAN_NAME = "RailRoad"
19
- APP_VERSION = [0,5,6]
21
+ APP_VERSION = [RailRoad::VERSION::MAJOR, RailRoad::VERSION::MINOR, RailRoad::VERSION::PATCH]
20
22
  COPYRIGHT = "Copyright (C) 2007-2008 Javier Smaldone, 2009 Peter Hoeg"
21
23
 
24
+ if ARGV.first == '--version'
25
+ puts "#{APP_HUMAN_NAME} v#{RailRoad::VERSION::STRING}"
26
+ exit(0)
27
+ end
28
+
22
29
  require 'options_struct'
23
30
  require 'models_diagram'
24
31
  require 'controllers_diagram'
@@ -39,8 +46,9 @@ elsif options.command == 'controllers'
39
46
  elsif options.command == 'aasm'
40
47
  diagram = AasmDiagram.new options
41
48
  else
42
- STDERR.print "Error: You must supply a command\n" +
43
- " (try #{APP_NAME} -h)\n\n"
49
+ STDERR.print "#{APP_HUMAN_NAME} v#{RailRoad::VERSION::STRING}\n" +
50
+ "Error: You must supply a command\n" +
51
+ " (try #{APP_NAME} -h)\n\n"
44
52
  exit 1
45
53
  end
46
54
 
data/lib/version.rb ADDED
@@ -0,0 +1,13 @@
1
+ module RailRoad
2
+ module VERSION #:nodoc:
3
+ if File.exist?('../VERSION.yml')
4
+ config = YAML.load(File.read('../VERSION.yml'))
5
+ MAJOR = config[:major]
6
+ MINOR = config[:minor]
7
+ PATCH = config[:patch]
8
+ else
9
+ MAJOR = MINOR = PATCH = 0
10
+ end
11
+ STRING = [MAJOR, MINOR, PATCH].join('.')
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peterhoeg-railroad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Hoeg
@@ -10,11 +10,11 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-05-15 00:00:00 -07:00
13
+ date: 2009-05-16 00:00:00 -07:00
14
14
  default_executable: railroad
15
15
  dependencies: []
16
16
 
17
- description:
17
+ description: A DOT diagram generator for Ruby on Rail applications
18
18
  email:
19
19
  - peter@hoeg.com
20
20
  - p.hoeg@northwind.sg
@@ -24,14 +24,15 @@ executables:
24
24
  extensions: []
25
25
 
26
26
  extra_rdoc_files:
27
- - LICENSE
27
+ - AUTHORS.rdoc
28
+ - CHANGELOG.rdoc
29
+ - LICENSE.rdoc
28
30
  - README.rdoc
29
31
  files:
30
32
  - .document
31
- - .gitignore
32
33
  - AUTHORS.rdoc
33
34
  - CHANGELOG.rdoc
34
- - LICENSE
35
+ - LICENSE.rdoc
35
36
  - README.rdoc
36
37
  - Rakefile
37
38
  - VERSION.yml
@@ -42,7 +43,7 @@ files:
42
43
  - lib/diagram_graph.rb
43
44
  - lib/models_diagram.rb
44
45
  - lib/options_struct.rb
45
- - railroad.gemspec
46
+ - lib/version.rb
46
47
  - spec/app_diagram_spec.rb
47
48
  - spec/railroad_spec.rb
48
49
  - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- rdoc
5
- pkg
6
- *.gem
7
- nbproject
data/railroad.gemspec DELETED
@@ -1,59 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{railroad}
5
- s.version = "0.5.6"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Peter Hoeg", "Javier Smaldone"]
9
- s.date = %q{2009-05-15}
10
- s.default_executable = %q{railroad}
11
- s.email = ["peter@hoeg.com", "p.hoeg@northwind.sg", "javier@smaldone.com.ar"]
12
- s.executables = ["railroad"]
13
- s.extra_rdoc_files = [
14
- "LICENSE",
15
- "README.rdoc"
16
- ]
17
- s.files = [
18
- ".document",
19
- ".gitignore",
20
- "AUTHORS.rdoc",
21
- "CHANGELOG.rdoc",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION.yml",
26
- "bin/railroad",
27
- "lib/aasm_diagram.rb",
28
- "lib/app_diagram.rb",
29
- "lib/controllers_diagram.rb",
30
- "lib/diagram_graph.rb",
31
- "lib/models_diagram.rb",
32
- "lib/options_struct.rb",
33
- "railroad.gemspec",
34
- "spec/app_diagram_spec.rb",
35
- "spec/railroad_spec.rb",
36
- "spec/spec_helper.rb"
37
- ]
38
- s.has_rdoc = true
39
- s.homepage = %q{http://github.com/peterhoeg/RailRoad}
40
- s.rdoc_options = ["--charset=UTF-8"]
41
- s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.1}
43
- s.summary = %q{A DOT diagram generator for Ruby on Rail applications}
44
- s.test_files = [
45
- "spec/spec_helper.rb",
46
- "spec/app_diagram_spec.rb",
47
- "spec/railroad_spec.rb"
48
- ]
49
-
50
- if s.respond_to? :specification_version then
51
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
- s.specification_version = 2
53
-
54
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
- else
56
- end
57
- else
58
- end
59
- end