gemstub 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +0 -0
  2. data/bin/gemstub +105 -0
  3. metadata +48 -0
data/README ADDED
File without changes
data/bin/gemstub ADDED
@@ -0,0 +1,105 @@
1
+ require 'fileutils'
2
+ require "active_support"
3
+
4
+ app = ARGV[0]
5
+ raise "You must specify a name for this gem!" if app.nil?
6
+
7
+ app = app.downcase.gsub(" ", "_")
8
+
9
+ puts "create directory: #{app}"
10
+ Dir.mkdir app
11
+
12
+ puts "create directory: #{app}/bin"
13
+ Dir.mkdir "#{app}/bin"
14
+
15
+ puts "create directory: #{app}/docs"
16
+ Dir.mkdir "#{app}/docs"
17
+
18
+ puts "create directory: #{app}/lib"
19
+ Dir.mkdir "#{app}/lib"
20
+
21
+ puts "create directory: #{app}/test"
22
+ Dir.mkdir "#{app}/test"
23
+
24
+ puts "creating Rakefile"
25
+ File.open("#{app}/Rakefile", "w") do |file|
26
+ user = (ENV["USERNAME"] || ENV["USER"])
27
+ file << %{
28
+ require 'rake'
29
+ require 'rake/gempackagetask'
30
+ require 'rake/clean'
31
+ require 'find'
32
+
33
+ gem_spec = Gem::Specification.new do |s|
34
+ s.name = '#{app}'
35
+ s.version = '0.0.1'
36
+ s.summary = %{#{app}}
37
+ s.description = %{#{app} was developed by: #{user}}
38
+ s.author = "#{user}"
39
+ #s.email = ""
40
+ #s.homepage = ""
41
+
42
+ s.test_files = FileList['test/**/*']
43
+
44
+ s.files = FileList['lib/**/*.rb', 'README', 'doc/**/*.*']
45
+ s.require_paths << 'lib'
46
+ s.autorequire = ['#{app}']
47
+ s.bindir = "bin"
48
+ #s.default_executable = ""
49
+ #s.add_dependency("", "")
50
+ #s.add_dependency("", "")
51
+ #s.extensions << ""
52
+ #s.extra_rdoc_files = ["README"]
53
+ #s.has_rdoc = true
54
+ #s.platform = "Gem::Platform::Ruby"
55
+ #s.required_ruby_version = ">= 1.8.5"
56
+ #s.requirements << "An ice cold beer"
57
+ #s.requirements << "Some free time!"
58
+ #s.rubyforge_project = "#{app}"
59
+ end
60
+
61
+ Rake::GemPackageTask.new(gem_spec) do |pkg|
62
+ pkg.need_zip = false
63
+ pkg.need_tar = false
64
+ rm_f FileList['pkg/**/*.*']
65
+ end
66
+ }.strip
67
+ end
68
+
69
+ puts "creating README"
70
+ File.open("#{app}/README", "w") do |file|
71
+ file << %{
72
+ README
73
+ ========================================================================
74
+ #{app}
75
+ }.strip
76
+ end
77
+
78
+ puts "creating #{app}/lib/#{app}.rb"
79
+ File.open("#{app}/lib/#{app}.rb", "w") do |file|
80
+ file << ""
81
+ end
82
+
83
+ puts "creating #{app}/test/test_#{app}.rb"
84
+ File.open("#{app}/test/test_#{app}.rb", "w") do |file|
85
+ file << %{
86
+ require File.dirname(__FILE__) + '/test_helper.rb'
87
+
88
+ class #{app.classify}Test < Test::Unit::TestCase
89
+
90
+ def setup
91
+ end
92
+
93
+ def test_truth
94
+ assert true
95
+ end
96
+ end
97
+ }.strip
98
+ end
99
+
100
+ puts "creating #{app}/test/test_helper.rb"
101
+ File.open("#{app}/test/test_helper.rb", "w") do |file|
102
+ file << %{
103
+ require "test/unit"
104
+ }.strip
105
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.2
3
+ specification_version: 1
4
+ name: gemstub
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2007-02-27 00:00:00 -05:00
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
+ require_paths:
10
+ - lib
11
+ - lib
12
+ email:
13
+ homepage:
14
+ rubyforge_project:
15
+ description:
16
+ autorequire:
17
+ - gemstub
18
+ default_executable:
19
+ bindir: bin
20
+ has_rdoc: false
21
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
22
+ requirements:
23
+ - - ">"
24
+ - !ruby/object:Gem::Version
25
+ version: 0.0.0
26
+ version:
27
+ platform: ruby
28
+ signing_key:
29
+ cert_chain:
30
+ post_install_message:
31
+ authors: []
32
+
33
+ files:
34
+ - README
35
+ test_files: []
36
+
37
+ rdoc_options: []
38
+
39
+ extra_rdoc_files: []
40
+
41
+ executables:
42
+ - gemstub
43
+ extensions: []
44
+
45
+ requirements: []
46
+
47
+ dependencies: []
48
+