gemstub 0.0.1 → 1.0.0
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/bin/gemstub +19 -3
- metadata +2 -2
    
        data/bin/gemstub
    CHANGED
    
    | @@ -28,6 +28,7 @@ File.open("#{app}/Rakefile", "w") do |file| | |
| 28 28 | 
             
            require 'rake'
         | 
| 29 29 | 
             
            require 'rake/gempackagetask'
         | 
| 30 30 | 
             
            require 'rake/clean'
         | 
| 31 | 
            +
            require 'rake/testtask'
         | 
| 31 32 | 
             
            require 'find'
         | 
| 32 33 |  | 
| 33 34 | 
             
            gem_spec = Gem::Specification.new do |s|
         | 
| @@ -63,6 +64,13 @@ Rake::GemPackageTask.new(gem_spec) do |pkg| | |
| 63 64 | 
             
              pkg.need_tar = false
         | 
| 64 65 | 
             
              rm_f FileList['pkg/**/*.*']
         | 
| 65 66 | 
             
            end
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            desc "Run test code"
         | 
| 69 | 
            +
            Rake::TestTask.new(:default) do |t|
         | 
| 70 | 
            +
              t.libs << "test"
         | 
| 71 | 
            +
              t.pattern = 'test/**/*_test.rb'
         | 
| 72 | 
            +
              t.verbose = true
         | 
| 73 | 
            +
            end
         | 
| 66 74 | 
             
              }.strip
         | 
| 67 75 | 
             
            end
         | 
| 68 76 |  | 
| @@ -80,8 +88,8 @@ File.open("#{app}/lib/#{app}.rb", "w") do |file| | |
| 80 88 | 
             
              file << ""
         | 
| 81 89 | 
             
            end
         | 
| 82 90 |  | 
| 83 | 
            -
            puts "creating #{app}/test | 
| 84 | 
            -
            File.open("#{app}/test | 
| 91 | 
            +
            puts "creating #{app}/test/#{app}_test.rb"
         | 
| 92 | 
            +
            File.open("#{app}/test/#{app}_test.rb", "w") do |file|
         | 
| 85 93 | 
             
              file << %{
         | 
| 86 94 | 
             
            require File.dirname(__FILE__) + '/test_helper.rb'
         | 
| 87 95 |  | 
| @@ -89,7 +97,11 @@ class #{app.classify}Test < Test::Unit::TestCase | |
| 89 97 |  | 
| 90 98 | 
             
              def setup
         | 
| 91 99 | 
             
              end
         | 
| 92 | 
            -
             | 
| 100 | 
            +
              
         | 
| 101 | 
            +
              def teardown
         | 
| 102 | 
            +
              end
         | 
| 103 | 
            +
              
         | 
| 104 | 
            +
              # replace this with tests of your own.
         | 
| 93 105 | 
             
              def test_truth
         | 
| 94 106 | 
             
                assert true
         | 
| 95 107 | 
             
              end
         | 
| @@ -101,5 +113,9 @@ puts "creating #{app}/test/test_helper.rb" | |
| 101 113 | 
             
            File.open("#{app}/test/test_helper.rb", "w") do |file|
         | 
| 102 114 | 
             
              file << %{
         | 
| 103 115 | 
             
            require "test/unit"
         | 
| 116 | 
            +
             | 
| 117 | 
            +
            # place common methods, assertions, and other type things in this file so
         | 
| 118 | 
            +
            # other tests will have access to them.
         | 
| 119 | 
            +
             | 
| 104 120 | 
             
              }.strip
         | 
| 105 121 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -3,8 +3,8 @@ rubygems_version: 0.9.2 | |
| 3 3 | 
             
            specification_version: 1
         | 
| 4 4 | 
             
            name: gemstub
         | 
| 5 5 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 6 | 
            -
              version: 0.0 | 
| 7 | 
            -
            date: 2007-02- | 
| 6 | 
            +
              version: 1.0.0
         | 
| 7 | 
            +
            date: 2007-02-28 00:00:00 -05:00
         | 
| 8 8 | 
             
            summary: "Gemstub is a very simple tool for creating the stub code you need to build a gem.  Usage: at a command prompt simply type: gemstub your_gem_name_here  That's it, after that, you all you have to do is the actual coding of your gem! Enjoy!"
         | 
| 9 9 | 
             
            require_paths: 
         | 
| 10 10 | 
             
            - lib
         |