vintage 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,34 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
28
+
29
+ namespace :manifest do
30
+ desc 'Recreate Manifest.txt to include ALL files'
31
+ task :refresh do
32
+ `rake check_manifest | patch -p0 > Manifest.txt`
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,9 @@
1
+ # stubs for the website generation
2
+ # To install the website framework:
3
+ # script/generate website
4
+
5
+ task :website_generate
6
+
7
+ task :website_upload
8
+
9
+ task :website => :publish_docs
@@ -0,0 +1,20 @@
1
+ require File.dirname(__FILE__) + '/test_helper'
2
+ require 'fileutils'
3
+
4
+ # Must set before requiring generator libs.
5
+ TMP_ROOT = File.dirname(__FILE__) + "/tmp" unless defined?(TMP_ROOT)
6
+ PROJECT_NAME = "myproject" unless defined?(PROJECT_NAME)
7
+ app_root = File.join(TMP_ROOT, PROJECT_NAME)
8
+ if defined?(APP_ROOT)
9
+ APP_ROOT.replace(app_root)
10
+ else
11
+ APP_ROOT = app_root
12
+ end
13
+
14
+ begin
15
+ require 'rubigen'
16
+ rescue LoadError
17
+ require 'rubygems'
18
+ require 'rubigen'
19
+ end
20
+ require 'rubigen/helpers/generator_test_helper'
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require File.dirname(__FILE__) + '/../lib/vintage'
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestVintage < Test::Unit::TestCase
4
+
5
+ def setup
6
+ end
7
+
8
+ def test_truth
9
+ assert true
10
+ end
11
+ end
@@ -0,0 +1,43 @@
1
+ require File.join(File.dirname(__FILE__), "test_generator_helper.rb")
2
+
3
+ class TestVintageApplicationGenerator < Test::Unit::TestCase
4
+ include RubiGen::GeneratorTestHelper
5
+
6
+ def setup
7
+ bare_setup
8
+ end
9
+
10
+ def teardown
11
+ bare_teardown
12
+ end
13
+
14
+ # Some generator-related assertions:
15
+ # assert_generated_file(name, &block) # block passed the file contents
16
+ # assert_directory_exists(name)
17
+ # assert_generated_class(name, &block)
18
+ # assert_generated_module(name, &block)
19
+ # assert_generated_test_for(name, &block)
20
+ # The assert_generated_(class|module|test_for) &block is passed the body of the class/module within the file
21
+ # assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
22
+ #
23
+ # Other helper methods are:
24
+ # app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
25
+ # bare_setup - place this in setup method to create the APP_ROOT folder for each test
26
+ # bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
27
+
28
+ def test_generator_without_options
29
+ run_generator('vintage_application', [APP_ROOT], sources)
30
+ assert_directory_exists "path/to/included/folder"
31
+ assert_generated_file "path/to/included/folder/some_file"
32
+ end
33
+
34
+ private
35
+ def sources
36
+ [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", generator_path))
37
+ ]
38
+ end
39
+
40
+ def generator_path
41
+ "app_generators"
42
+ end
43
+ end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vintage
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeremy McAnally
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-05 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: A super simple web framework
17
+ email: jeremymcanally@gmail.com
18
+ executables:
19
+ - vintage
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - History.txt
24
+ - License.txt
25
+ - Manifest.txt
26
+ - README.txt
27
+ files:
28
+ - History.txt
29
+ - License.txt
30
+ - Manifest.txt
31
+ - README.txt
32
+ - Rakefile
33
+ - bin/vintage
34
+ - config/hoe.rb
35
+ - config/requirements.rb
36
+ - lib/vintage.rb
37
+ - lib/vintage/version.rb
38
+ - lib/vintage/errors.rb
39
+ - lib/vintage/handler.rb
40
+ - lib/vintage/helpers.rb
41
+ - lib/vintage/log.rb
42
+ - lib/vintage/renderer.rb
43
+ - lib/vintage/request_context.rb
44
+ - lib/vintage/server.rb
45
+ - log/debug.log
46
+ - script/destroy
47
+ - script/generate
48
+ - setup.rb
49
+ - tasks/deployment.rake
50
+ - tasks/environment.rake
51
+ - tasks/website.rake
52
+ - test/test_helper.rb
53
+ - test/test_vintage.rb
54
+ - app_generators/vintage_application/USAGE
55
+ - app_generators/vintage_application/vintage_application_generator.rb
56
+ - app_generators/vintage_application/templates/configuration.yml
57
+ - app_generators/vintage_application/templates/index.erb
58
+ - app_generators/vintage_application/templates/README
59
+ - app_generators/vintage_application/templates/style.css
60
+ - app_generators/vintage_application/templates/vintage.png
61
+ has_rdoc: true
62
+ homepage: http://vintage.rubyforge.org
63
+ post_install_message:
64
+ rdoc_options:
65
+ - --main
66
+ - README.txt
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
81
+ requirements: []
82
+
83
+ rubyforge_project: vintage
84
+ rubygems_version: 1.0.1
85
+ signing_key:
86
+ specification_version: 2
87
+ summary: A super simple web framework
88
+ test_files:
89
+ - test/test_generator_helper.rb
90
+ - test/test_helper.rb
91
+ - test/test_vintage.rb
92
+ - test/test_vintage_application_generator.rb