gemstub 1.7.0 → 2.0.0.pre

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 CHANGED
@@ -6,7 +6,8 @@ require 'optparse/time'
6
6
  require 'ostruct'
7
7
  require 'pp'
8
8
  require 'genosaurus'
9
- require 'mack-facets'
9
+ require 'active_support'
10
+ require 'mark_facets'
10
11
  require 'erb'
11
12
 
12
13
  app = ARGV[0]
@@ -6,6 +6,16 @@ app_rake_file:
6
6
  type: file
7
7
  template_path: <%= File.join(templates_directory_path, "Rakefile.template") %>
8
8
  output_path: <%= File.join(app, "Rakefile") %>
9
+
10
+ rvm_file:
11
+ type: file
12
+ template_path: <%= File.join(templates_directory_path, "rvmrc.template") %>
13
+ output_path: <%= File.join(app, ".rvmrc") %>
14
+
15
+ gemfile_file:
16
+ type: file
17
+ template_path: <%= File.join(templates_directory_path, "Gemfile.template") %>
18
+ output_path: <%= File.join(app, "Gemfile") %>
9
19
 
10
20
  app_readme_file:
11
21
  type: file
@@ -38,11 +48,6 @@ spec_helper_file:
38
48
  template_path: <%= File.join(templates_directory_path, "spec", "spec_helper.rb.template") %>
39
49
  output_path: <%= File.join(app, "spec", "spec_helper.rb") %>
40
50
 
41
- spec_opts_file:
42
- type: file
43
- template_path: <%= File.join(templates_directory_path, "spec", "spec.opts.template") %>
44
- output_path: <%= File.join(app, "spec", "spec.opts") %>
45
-
46
51
  spec_file:
47
52
  type: file
48
53
  template_path: <%= File.join(templates_directory_path, "spec", "app_spec.rb.template") %>
@@ -0,0 +1,5 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem "rspec", ">= 2.0.0.beta.19"
5
+ gem 'gemstub', ">= 2.0.0.pre"
@@ -1,5 +1,18 @@
1
1
  require 'rubygems'
2
- require 'gemstub'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
14
+
15
+ Bundler.require
3
16
 
4
17
  <% if rspec? -%>
5
18
  Gemstub.test_framework = :rspec
@@ -0,0 +1 @@
1
+ rvm use ruby-1.9.2-rc2@<%= app -%>
@@ -1,5 +1,9 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe "<%= app.camelcase %>" do
4
4
 
5
+ it "should do something" do
6
+ pending
7
+ end
8
+
5
9
  end
@@ -1,9 +1,9 @@
1
1
  require 'rubygems'
2
- require 'spec'
2
+ require 'rspec'
3
3
 
4
4
  require File.join(File.dirname(__FILE__), '..', 'lib', '<%= app %>')
5
5
 
6
- Spec::Runner.configure do |config|
6
+ Rspec.configure do |config|
7
7
 
8
8
  config.before(:all) do
9
9
 
data/lib/gemstub.rb CHANGED
@@ -12,8 +12,8 @@ require 'find'
12
12
  # require 'rubyforge'
13
13
  require 'rubygems'
14
14
  require 'rubygems/gem_runner'
15
- require 'spec'
16
- require 'spec/rake/spectask'
15
+ # require 'spec'
16
+ # require 'spec/rake/spectask'
17
17
  require 'fileutils'
18
18
 
19
19
  module Gemstub
@@ -34,11 +34,14 @@ module Gemstub
34
34
  @test_framework = framework
35
35
  if rspec?
36
36
  # rake
37
+ require 'rspec/core'
38
+ require 'rspec/core/rake_task'
37
39
  desc 'Run specifications'
38
- Spec::Rake::SpecTask.new(:default) do |t|
39
- opts = File.join('spec', 'spec.opts')
40
- t.spec_opts << '--options' << opts if File.exists?(opts)
41
- t.spec_files = Dir.glob('spec/**/*_spec.rb')
40
+ Rspec::Core::RakeTask.new(:default) do |t|
41
+ # opts = File.join('spec', 'spec.opts')
42
+ # t.spec_opts << '--options' << opts if File.exists?(opts)
43
+ # t.spec_files = Dir.glob('spec/**/*_spec.rb')
44
+ t.pattern = 'spec/**/*_spec.rb'
42
45
  end
43
46
  elsif test_unit?
44
47
  task :default => :test
@@ -91,35 +94,6 @@ module Gemstub
91
94
  task :release => :install do |t|
92
95
  gem_pkg = File.join("pkg", "#{@gem_spec.name}-#{@gem_spec.version}.gem")
93
96
  system "gem push #{gem_pkg}"
94
- # begin
95
- # ac_path = File.join(ENV["HOME"], ".rubyforge", "auto-config.yml")
96
- # if File.exists?(ac_path)
97
- # fixed = File.open(ac_path).read.gsub(" ~: {}\n\n", '')
98
- # fixed.gsub!(/ !ruby\/object:Gem::Version \? \n.+\n.+\n\n/, '')
99
- # puts "Fixing #{ac_path}..."
100
- # File.open(ac_path, "w") {|f| f.puts fixed}
101
- # end
102
- # begin
103
- # rf = RubyForge.new
104
- # rf.configure
105
- # rf.login
106
- # rf.add_release(@gem_spec.rubyforge_project, @gem_spec.name, @gem_spec.version, gem_pkg)
107
- # rescue Exception => e
108
- # if e.message.match("Invalid package_id") || e.message.match("no <package_id> configured for")
109
- # puts "You need to create the package!"
110
- # rf.create_package(@gem_spec.rubyforge_project, @gem_spec.name)
111
- # rf.add_release(@gem_spec.rubyforge_project, @gem_spec.name, @gem_spec.version, gem_pkg)
112
- # else
113
- # raise e
114
- # end
115
- # end
116
- # rescue Exception => e
117
- # if e.message == "You have already released this version."
118
- # puts e
119
- # else
120
- # raise e
121
- # end
122
- # end
123
97
  end
124
98
 
125
99
  task :readme do
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemstub
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
- - 1
7
- - 7
6
+ - 2
7
+ - 0
8
8
  - 0
9
- version: 1.7.0
9
+ - pre
10
+ version: 2.0.0.pre
10
11
  platform: ruby
11
12
  authors:
12
13
  - Mark Bates
@@ -14,25 +15,30 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-08 00:00:00 -05:00
18
+ date: 2010-08-12 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: activesupport
22
- prerelease: false
22
+ name: rspec
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
24
25
  requirements:
25
26
  - - ">="
26
27
  - !ruby/object:Gem::Version
27
28
  segments:
29
+ - 2
28
30
  - 0
29
- version: "0"
31
+ - 0
32
+ - beta
33
+ - 19
34
+ version: 2.0.0.beta.19
30
35
  type: :runtime
36
+ prerelease: false
31
37
  version_requirements: *id001
32
38
  - !ruby/object:Gem::Dependency
33
- name: genosaurus
34
- prerelease: false
39
+ name: activesupport
35
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
36
42
  requirements:
37
43
  - - ">="
38
44
  - !ruby/object:Gem::Version
@@ -40,11 +46,12 @@ dependencies:
40
46
  - 0
41
47
  version: "0"
42
48
  type: :runtime
49
+ prerelease: false
43
50
  version_requirements: *id002
44
51
  - !ruby/object:Gem::Dependency
45
- name: rubyforge
46
- prerelease: false
52
+ name: mark_facets
47
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
48
55
  requirements:
49
56
  - - ">="
50
57
  - !ruby/object:Gem::Version
@@ -52,7 +59,21 @@ dependencies:
52
59
  - 0
53
60
  version: "0"
54
61
  type: :runtime
62
+ prerelease: false
55
63
  version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: genosaurus
66
+ requirement: &id004 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ type: :runtime
75
+ prerelease: false
76
+ version_requirements: *id004
56
77
  description: "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!"
57
78
  email: mark@markbates.com
58
79
  executables:
@@ -66,16 +87,18 @@ files:
66
87
  - lib/gemstub/gem_generator/manifest.yml
67
88
  - lib/gemstub/gem_generator/templates/app_gem.rb.template
68
89
  - lib/gemstub/gem_generator/templates/app_init.rb.template
90
+ - lib/gemstub/gem_generator/templates/Gemfile.template
69
91
  - lib/gemstub/gem_generator/templates/LICENSE.template
70
92
  - lib/gemstub/gem_generator/templates/Rakefile.template
71
93
  - lib/gemstub/gem_generator/templates/README.template
94
+ - lib/gemstub/gem_generator/templates/rvmrc.template
72
95
  - lib/gemstub/gem_generator/templates/spec/app_spec.rb.template
73
- - lib/gemstub/gem_generator/templates/spec/spec.opts.template
74
96
  - lib/gemstub/gem_generator/templates/spec/spec_helper.rb.template
75
97
  - lib/gemstub/gem_generator/templates/test/test_app.rb.template
76
98
  - lib/gemstub/gem_generator/templates/test/test_helper.rb.template
77
99
  - lib/gemstub.rb
78
100
  - README
101
+ - bin/gemstub
79
102
  has_rdoc: true
80
103
  homepage: http://www.mackframework.com
81
104
  licenses: []
@@ -86,23 +109,28 @@ rdoc_options: []
86
109
  require_paths:
87
110
  - lib
88
111
  required_ruby_version: !ruby/object:Gem::Requirement
112
+ none: false
89
113
  requirements:
90
114
  - - ">="
91
115
  - !ruby/object:Gem::Version
116
+ hash: -2722186290854069499
92
117
  segments:
93
118
  - 0
94
119
  version: "0"
95
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
96
122
  requirements:
97
- - - ">="
123
+ - - ">"
98
124
  - !ruby/object:Gem::Version
99
125
  segments:
100
- - 0
101
- version: "0"
126
+ - 1
127
+ - 3
128
+ - 1
129
+ version: 1.3.1
102
130
  requirements: []
103
131
 
104
132
  rubyforge_project: gemstub
105
- rubygems_version: 1.3.6
133
+ rubygems_version: 1.3.7
106
134
  signing_key:
107
135
  specification_version: 3
108
136
  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!"
@@ -1,2 +0,0 @@
1
- --format specdoc
2
- --colour