cutagem 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,17 +1,29 @@
1
+ 2007-10-10 SATOH Hiroh <cho45@lowreal.net>
2
+
3
+ * 0.0.5 release:
4
+ * Fixed default template dependecy.
5
+ * Fixed default template README replacement.
6
+
7
+ 2007-10-09 SATOH Hiroh <cho45@lowreal.net>
8
+
9
+ * 0.0.4 release:
10
+ * Add dependency to Resh (resh).
11
+ * Fixed default template dependeny.
12
+
1
13
  2007-10-08 SATOH Hiroh <cho45@lowreal.net>
2
14
 
3
- * 0.0.3 release
4
- * Fix Rakefile for case-sensitive system.
5
- * Output more verbosely.
15
+ * 0.0.3 release:
16
+ * Fix Rakefile for case-sensitive system.
17
+ * Output more verbosely.
6
18
 
7
19
  2007-10-07 SATOH Hiroh <cho45@lowreal.net>
8
20
 
9
- * 0.0.2 release
10
- * use ~/.cutagem/config.yaml as user config.
11
- * Rename ChangeLog
21
+ * 0.0.2 release:
22
+ * use ~/.cutagem/config.yaml as user config.
23
+ * Rename ChangeLog
12
24
 
13
25
  2007-10-07 SATOH Hiroh <cho45@lowreal.net>
14
26
 
15
- * 0.0.1 release
27
+ * 0.0.1 release:
16
28
 
17
29
 
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ include FileUtils
12
12
 
13
13
  AUTHOR = "cho45"
14
14
  EMAIL = "cho45@lowreal.net"
15
- DESCRIPTION = "More safe eval codes."
15
+ DESCRIPTION = "executable for making new gem skelton."
16
16
  RUBYFORGE_PROJECT = "cutagem"
17
17
  HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
18
18
  BIN_FILES = %w( cutagem )
@@ -25,7 +25,8 @@ VERS = CutAGemCommand::VERSION
25
25
  NAME = "cutagem"
26
26
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
27
27
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
28
- RDOC_OPTS = ['--title', "#{NAME} documentation",
28
+ RDOC_OPTS = [
29
+ '--title', "#{NAME} documentation",
29
30
  "--charset", "utf-8",
30
31
  "--opname", "index.html",
31
32
  "--line-numbers",
@@ -38,7 +39,7 @@ task :default => [:test]
38
39
  task :package => [:clean]
39
40
 
40
41
  Rake::TestTask.new("test") { |t|
41
- t.libs << "test"
42
+ t.libs << "test"
42
43
  t.pattern = "test/**/*_test.rb"
43
44
  t.verbose = true
44
45
  }
@@ -62,6 +63,7 @@ spec = Gem::Specification.new do |s|
62
63
  s.autorequire = ""
63
64
  s.test_files = Dir["test/test_*.rb"]
64
65
 
66
+ s.add_dependency('resh')
65
67
  #s.add_dependency('activesupport', '>=1.3.1')
66
68
  #s.required_ruby_version = '>= 1.8.2'
67
69
 
@@ -112,7 +114,7 @@ task :rubyforge => [:rdoc, :package] do
112
114
  end
113
115
 
114
116
  desc 'Package and upload the release to rubyforge.'
115
- task :release => [:clean, :package] do |t|
117
+ task :release => [:clean, :package, :release_local] do |t|
116
118
  v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
117
119
  abort "Versions don't match #{v} vs #{VERS}" unless v == VERS
118
120
  pkg = "pkg/#{NAME}-#{VERS}"
@@ -134,3 +136,9 @@ task :release => [:clean, :package] do |t|
134
136
  puts "Releasing #{NAME} v. #{VERS}"
135
137
  rf.add_release RUBYFORGE_PROJECT, NAME, VERS, *files
136
138
  end
139
+
140
+ desc "Package and upload the release to local gem repos."
141
+ task :release_local => [:clean, :package] do |t|
142
+ name = "#{NAME}-#{VERS}.gem"
143
+ sh %{scp pkg/#{name} c:/srv/www/lab.lowreal.net/public/gems/gems}
144
+ end
data/lib/cutagem.rb CHANGED
@@ -6,7 +6,7 @@ require "erb"
6
6
  require "yaml"
7
7
 
8
8
  class CutAGemCommand
9
- VERSION = "0.0.3"
9
+ VERSION = "0.0.5"
10
10
 
11
11
  include FileUtils
12
12
  def self.run(argv)
@@ -45,13 +45,12 @@ class CutAGemCommand
45
45
  end
46
46
 
47
47
  parser.on("--copy-template NAME", "Copy template to user template dir naming NAME") do |name|
48
- @select = true
49
48
  path = Pathname.new(ENV["HOME"]) + ".cutagem/templates" + name
50
49
  if path.exist?
51
50
  puts "#{path} is already exists."
52
51
  exit 1
53
52
  end
54
- template = select_template()
53
+ template = select_template(true)
55
54
  cp_r template, path, :verbose => true
56
55
  exit
57
56
  end
@@ -82,7 +81,7 @@ class CutAGemCommand
82
81
  }.join("::")
83
82
  description = @description
84
83
 
85
- template = select_template()
84
+ template = select_template(@select)
86
85
 
87
86
  gemdir = pwd + gemname
88
87
 
@@ -135,7 +134,9 @@ class CutAGemCommand
135
134
  end
136
135
  end
137
136
 
138
- def select_template
137
+ # Select template from system templates and user templtes.
138
+ # if +select+ is true, select templates interactively.
139
+ def select_template(select)
139
140
  @templates = Pathname.new(File.dirname(__FILE__)).realpath + '../templates'
140
141
  @user_templates = Pathname.new(ENV["HOME"]).realpath + '.cutagem/templates'
141
142
 
@@ -161,7 +162,7 @@ class CutAGemCommand
161
162
  end
162
163
  templates = u_templates + templates
163
164
 
164
- if @select
165
+ if select
165
166
  puts "Select template:"
166
167
  templates.each_with_index do |item,index|
167
168
  puts "% 2d. %s" % [index+1, item.first]
@@ -24,6 +24,6 @@
24
24
 
25
25
  == Copyright
26
26
 
27
- Author:: <%=ENV['USER']%> <<%=email%>>
28
- Copyright:: Copyright (c) 2007 <%=ENV['USER']%>
27
+ Author:: <%=author%> <<%=email%>>
28
+ Copyright:: Copyright (c) <%=Time.now.strftime("%Y")%> <%=author%>
29
29
  License::
@@ -6,22 +6,24 @@ require 'rake/packagetask'
6
6
  require 'rake/gempackagetask'
7
7
  require 'rake/rdoctask'
8
8
  require 'rake/contrib/rubyforgepublisher'
9
+ require 'rake/contrib/sshpublisher'
9
10
  require 'fileutils'
10
11
  include FileUtils
11
12
 
12
- AUTHOR = "<%=author%>"
13
- EMAIL = "<%=email%>"
14
- DESCRIPTION = "<%=description%>"
15
- RUBYFORGE_PROJECT = "<%=gemid%>"
16
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
17
- BIN_FILES = %w( )
18
- VERS = "0.0.1"
13
+ NAME = "<%=gemname%>"
14
+ AUTHOR = "<%=author%>"
15
+ EMAIL = "<%=email%>"
16
+ DESCRIPTION = "<%=description%>"
17
+ RUBYFORGE_PROJECT = "<%=config['meta_project'] || gemid%>"
18
+ HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
19
+ BIN_FILES = %w( <%=gemname%> )
20
+ VERS = "0.0.1"
19
21
 
20
22
 
21
- NAME = "<%=gemname%>"
22
23
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
23
24
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
24
- RDOC_OPTS = ['--title', "#{NAME} documentation",
25
+ RDOC_OPTS = [
26
+ '--title', "#{NAME} documentation",
25
27
  "--charset", "utf-8",
26
28
  "--opname", "index.html",
27
29
  "--line-numbers",
@@ -29,15 +31,14 @@ RDOC_OPTS = ['--title', "#{NAME} documentation",
29
31
  "--inline-source",
30
32
  ]
31
33
 
32
- desc "Packages up #{NAME} gem."
33
34
  task :default => [:test]
34
35
  task :package => [:clean]
35
36
 
36
- Rake::TestTask.new("test") { |t|
37
- t.libs << "test"
37
+ Rake::TestTask.new("test") do |t|
38
+ t.libs << "test"
38
39
  t.pattern = "test/**/*_test.rb"
39
40
  t.verbose = true
40
- }
41
+ end
41
42
 
42
43
  spec = Gem::Specification.new do |s|
43
44
  s.name = NAME
@@ -102,6 +103,7 @@ end
102
103
 
103
104
  desc "Publish to RubyForge"
104
105
  task :rubyforge => [:rdoc, :package] do
106
+ require 'rubyforge'
105
107
  Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, '<%=ENV['USER']%>').upload
106
108
  end
107
109
 
@@ -24,6 +24,6 @@
24
24
 
25
25
  == Copyright
26
26
 
27
- Author:: <%=ENV['USER']%> <<%=email%>>
28
- Copyright:: Copyright (c) 2007 <%=ENV['USER']%>
27
+ Author:: <%=author%> <<%=email%>>
28
+ Copyright:: Copyright (c) <%=Time.now.strftime("%Y")%> <%=author%>
29
29
  License::
@@ -6,22 +6,23 @@ require 'rake/packagetask'
6
6
  require 'rake/gempackagetask'
7
7
  require 'rake/rdoctask'
8
8
  require 'rake/contrib/rubyforgepublisher'
9
+ require 'rake/contrib/sshpublisher'
9
10
  require 'fileutils'
10
11
  include FileUtils
11
12
 
12
- AUTHOR = "<%=author%>"
13
- EMAIL = "<%=email%>"
14
- DESCRIPTION = "<%=description%>"
15
- RUBYFORGE_PROJECT = "<%=gemid%>"
16
- HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
17
- BIN_FILES = %w( )
18
- VERS = "0.0.1"
13
+ NAME = "<%=gemname%>"
14
+ AUTHOR = "<%=author%>"
15
+ EMAIL = "<%=email%>"
16
+ DESCRIPTION = "<%=description%>"
17
+ RUBYFORGE_PROJECT = "<%=config['meta_project'] || gemid%>"
18
+ HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
19
+ BIN_FILES = %w( )
20
+ VERS = "0.0.1"
19
21
 
20
-
21
- NAME = "<%=gemname%>"
22
22
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
23
23
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
24
- RDOC_OPTS = ['--title', "#{NAME} documentation",
24
+ RDOC_OPTS = [
25
+ '--title', "#{NAME} documentation",
25
26
  "--charset", "utf-8",
26
27
  "--opname", "index.html",
27
28
  "--line-numbers",
@@ -29,15 +30,14 @@ RDOC_OPTS = ['--title', "#{NAME} documentation",
29
30
  "--inline-source",
30
31
  ]
31
32
 
32
- desc "Packages up #{NAME} gem."
33
33
  task :default => [:test]
34
34
  task :package => [:clean]
35
35
 
36
- Rake::TestTask.new("test") { |t|
37
- t.libs << "test"
36
+ Rake::TestTask.new("test") do |t|
37
+ t.libs << "test"
38
38
  t.pattern = "test/**/*_test.rb"
39
39
  t.verbose = true
40
- }
40
+ end
41
41
 
42
42
  spec = Gem::Specification.new do |s|
43
43
  s.name = NAME
@@ -102,6 +102,7 @@ end
102
102
 
103
103
  desc "Publish to RubyForge"
104
104
  task :rubyforge => [:rdoc, :package] do
105
+ require 'rubyforge'
105
106
  Rake::RubyForgePublisher.new(RUBYFORGE_PROJECT, '<%=ENV['USER']%>').upload
106
107
  end
107
108
 
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: cutagem
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.3
7
- date: 2007-10-08 00:00:00 +09:00
8
- summary: More safe eval codes.
6
+ version: 0.0.5
7
+ date: 2007-10-10 00:00:00 +09:00
8
+ summary: executable for making new gem skelton.
9
9
  require_paths:
10
10
  - lib
11
11
  email: cho45@lowreal.net
12
12
  homepage: http://cutagem.rubyforge.org
13
13
  rubyforge_project: cutagem
14
- description: More safe eval codes.
14
+ description: executable for making new gem skelton.
15
15
  autorequire: ''
16
16
  default_executable:
17
17
  bindir: bin
@@ -79,4 +79,14 @@ executables:
79
79
  - cutagem
80
80
  extensions: []
81
81
  requirements: []
82
- dependencies: []
82
+ dependencies:
83
+ - !ruby/object:Gem::Dependency
84
+ name: resh
85
+ version_requirement:
86
+ version_requirements: !ruby/object:Gem::Version::Requirement
87
+ requirements:
88
+ -
89
+ - ">"
90
+ - !ruby/object:Gem::Version
91
+ version: 0.0.0
92
+ version: