shlauncher 0.1.3 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,16 @@
1
+ == 0.2.1 / 2009-11-18
2
+
3
+ * added: preserve option to FileUtils#cp
4
+ * removed : gemspec file
5
+
6
+ == 0.2.0 / 2009-10-30
7
+
8
+ * modified: make tractor'd launcher depend on shlauncher gem
9
+
10
+ == 0.1.3 / 2009-10-06
11
+
12
+ * added: Windows support
13
+
1
14
  == 0.1.1 / 2009-10-06
2
15
 
3
16
  * added: ignore `no comment' task
@@ -1,5 +1,5 @@
1
1
 
2
- = Shlauncher - A shell script launcher
2
+ = Shlauncher - A shell script launcher inspired by Rake
3
3
 
4
4
  Scaffold your custom launcher. Launch from your shell script ( and also Ruby script ) collection.
5
5
 
@@ -11,7 +11,8 @@ Scaffold your custom launcher. Launch from your shell script ( and also Ruby scr
11
11
 
12
12
  === Gem Installation
13
13
 
14
- gem install wtnabe-shlauncher
14
+ gem sources -a http://gemcutter.org/
15
+ gem install shlauncher
15
16
 
16
17
  == Features/Problems
17
18
 
@@ -20,7 +21,7 @@ Scaffold your custom launcher. Launch from your shell script ( and also Ruby scr
20
21
  * exec all tasks in some scope
21
22
  * generate gem
22
23
 
23
- * On Windows, only Ruby scripts can be executed.
24
+ * On Windows, ONLY RUBY SCRIPTS can be executed.
24
25
 
25
26
  == Synopsis
26
27
 
@@ -41,8 +42,11 @@ Run your launcher.
41
42
 
42
43
  LAUNCHER_NAME sample # script sample
43
44
 
45
+ NOTE: Or type `ruby bin\LAUNCHER_NAME' if you use Windows.
46
+
44
47
  Generate gem from your launcher.
45
48
 
49
+ $ rake gemspec
46
50
  $ rake gem
47
51
  $ ls pkg
48
52
 
data/Rakefile CHANGED
@@ -10,8 +10,7 @@ require 'rake/rdoctask'
10
10
  require 'rake/contrib/rubyforgepublisher'
11
11
  require 'rake/contrib/sshpublisher'
12
12
  require 'fileutils'
13
- require 'lib/tractor'
14
- require 'templates/lib/shlauncher'
13
+ require 'lib/shlauncher'
15
14
  include FileUtils
16
15
 
17
16
  NAME = "shlauncher"
@@ -22,7 +21,7 @@ RUBYFORGE_PROJECT = ""
22
21
  HOMEPATH = ""
23
22
  BIN_FILES = %w( tractor )
24
23
 
25
- VERS = Shlauncher_Tractor::VERSION
24
+ VERS = Shlauncher::VERSION
26
25
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
27
26
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
28
27
  RDOC_OPTS = [
@@ -1,20 +1,8 @@
1
- #! /usr/bin/env rake -f
2
- # -*- mode: ruby; coding: utf-8 -*-
1
+ #! /usr/bin/env ruby
2
+ # -*- coding: utf-8 -*-
3
3
 
4
- require File.dirname( __FILE__ ) + '/../templates/lib/shlauncher'
4
+ require File.dirname( __FILE__ ) + '/../lib/shlauncher/shlauncher'
5
5
 
6
- launcher = Shlauncher.new( File.dirname( __FILE__ ) + '/../test/script' )
6
+ SHLAUNCHER_VER = Shlauncher::VERSION
7
7
 
8
- launcher.tasks.each { |t|
9
- desc launcher.desc( t )
10
- task t do
11
- launcher.launch( t )
12
- end
13
- }
14
-
15
- task :default do
16
- app = Rake.application
17
- app.name = File.basename( __FILE__ )
18
- app.options.show_task_pattern = Regexp.new('')
19
- app.display_tasks_and_comments
20
- end
8
+ launcher = Shlauncher::Shlauncher.new( File.dirname( __FILE__ ) + '/../test/script' ).run
@@ -1,5 +1,5 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- require File.dirname( __FILE__ ) + '/../lib/tractor'
3
+ require File.dirname( __FILE__ ) + '/../lib/shlauncher/tractor'
4
4
 
5
- Shlauncher_Tractor.new(ARGV).run
5
+ Shlauncher::Tractor.new(ARGV).run
@@ -0,0 +1,2 @@
1
+ require File.dirname( __FILE__ ) + '/shlauncher/tractor'
2
+ require File.dirname( __FILE__ ) + '/shlauncher/shlauncher'
@@ -0,0 +1,3 @@
1
+ module Shlauncher
2
+ VERSION = '0.2.1'
3
+ end
@@ -1,7 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ require File.dirname( __FILE__ ) + '/base'
4
+
5
+ module Shlauncher
3
6
  class Shlauncher
4
- VERSION = '0.0.1'
7
+ include Object::Shlauncher
5
8
 
6
9
  LINEBREAK = /(?:\r\n|[\r\n])/
7
10
  IGNORE_PATTERNS = %w( *~ *.bak CVS .svn )
@@ -48,7 +51,7 @@ class Shlauncher
48
51
  end
49
52
 
50
53
  def version
51
- return "#{File.basename( $0 )} ver. #{VERSION}"
54
+ return "#{File.basename( $0 )} ver. #{SHLAUNCHER_VER}"
52
55
  end
53
56
 
54
57
  def usage
@@ -245,3 +248,4 @@ EOD
245
248
  end
246
249
  end
247
250
  end
251
+ end
@@ -3,10 +3,11 @@
3
3
  require 'optparse'
4
4
  require 'fileutils'
5
5
  require 'erb'
6
+ require File.dirname( __FILE__ ) + '/base'
6
7
 
7
- class Shlauncher_Tractor
8
- VERSION = "0.1.3"
9
-
8
+ module Shlauncher
9
+ class Tractor
10
+ include Object::Shlauncher
10
11
  include FileUtils::Verbose
11
12
  class RakeNotFound < StandardError; end
12
13
 
@@ -34,8 +35,9 @@ class Shlauncher_Tractor
34
35
  end
35
36
 
36
37
  def deploy_template
37
- cp_r( File.expand_path( File.dirname( __FILE__ ) + '/../templates/' ),
38
- launcher_dir )
38
+ cp_r( File.expand_path( File.dirname( __FILE__ ) + '/../../templates/' ),
39
+ launcher_dir,
40
+ :preserve => true )
39
41
  Dir.chdir( launcher_dir ) {
40
42
  mkdir( 'script' )
41
43
  mv( 'bin/shlauncher', "bin/#{launcher}" )
@@ -86,3 +88,4 @@ EOD
86
88
  end
87
89
  end
88
90
  end
91
+ end
@@ -6,7 +6,8 @@ require 'rake/clean'
6
6
  require 'rake/packagetask'
7
7
  require 'rake/gempackagetask'
8
8
  require 'fileutils'
9
- require 'lib/shlauncher'
9
+ require 'shlauncher'
10
+ require 'lib/version'
10
11
  include FileUtils
11
12
 
12
13
  NAME = "<%=launcher%>"
@@ -15,7 +16,7 @@ EMAIL = "<%=email%>"
15
16
  DESCRIPTION = "<%=description%>"
16
17
  BIN_FILES = %w( <%=launcher%> )
17
18
 
18
- VERS = Shlauncher::VERSION
19
+ VERS = SHLAUNCHER_VER
19
20
  REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
20
21
  CLEAN.include ['**/.*.sw?', '*.gem', '.config']
21
22
 
@@ -44,6 +45,7 @@ spec = Gem::Specification.new do |s|
44
45
  #s.autorequire = ""
45
46
 
46
47
  s.add_dependency('rake', '>= 0')
48
+ s.add_dependency('shlauncher', '>= 0')
47
49
  #s.required_ruby_version = '>= 1.8.2'
48
50
 
49
51
  s.files = %w(README ChangeLog Rakefile) +
@@ -1,5 +1,7 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- require File.dirname( __FILE__ ) + '/../lib/shlauncher'
3
+ require 'rubygems'
4
+ require 'shlauncher/shlauncher'
5
+ require File.dirname( __FILE__ ) + '/../lib/version'
4
6
 
5
- Shlauncher.new( File.dirname( __FILE__ ) + '/../script' ).run
7
+ Shlauncher::Shlauncher.new( File.dirname( __FILE__ ) + '/../script' ).run
@@ -0,0 +1 @@
1
+ SHLAUNCHER_VER = '0.0.1'
@@ -1,11 +1,11 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  require "test/unit"
4
- require File.dirname(__FILE__) + '/../templates/lib/shlauncher'
4
+ require File.dirname(__FILE__) + '/../lib/shlauncher/shlauncher'
5
5
 
6
6
  class ShlauncherTest < Test::Unit::TestCase
7
7
  def setup
8
- @obj = Shlauncher.new( File.dirname( __FILE__ ) + '/script' )
8
+ @obj = Shlauncher::Shlauncher.new( File.dirname( __FILE__ ) + '/script' )
9
9
  end
10
10
 
11
11
  def test_tasks
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  require "test/unit"
4
- require File.dirname(__FILE__) + '/../lib/tractor'
4
+ require File.dirname(__FILE__) + '/../lib/shlauncher/tractor'
5
5
 
6
6
  class Shlauncher_TractorTest < Test::Unit::TestCase
7
7
  def test_Shlauncher_Tractor
@@ -9,6 +9,6 @@ class Shlauncher_TractorTest < Test::Unit::TestCase
9
9
  end
10
10
 
11
11
  def setup
12
- @obj = Shlauncher_Tractor.new( ARGV )
12
+ @obj = Shlauncher::Tractor.new( ARGV )
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shlauncher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - wtnabe
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-06 00:00:00 +09:00
12
+ date: 2009-11-18 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -37,6 +37,7 @@ files:
37
37
  - Rakefile
38
38
  - bin/shlauncher_test
39
39
  - bin/tractor
40
+ - test/script/README
40
41
  - test/script/example
41
42
  - test/script/example.bak
42
43
  - test/script/example~
@@ -44,15 +45,17 @@ files:
44
45
  - test/script/foo/bar~
45
46
  - test/script/foo/baz
46
47
  - test/script/nocomment
47
- - test/script/README
48
48
  - test/shlauncher_test.rb
49
49
  - test/tractor_test.rb
50
- - lib/tractor.rb
51
- - templates/bin/shlauncher
50
+ - lib/shlauncher/tractor.rb
51
+ - lib/shlauncher/shlauncher.rb
52
+ - lib/shlauncher/base.rb
53
+ - lib/shlauncher.rb
52
54
  - templates/ChangeLog
53
- - templates/lib/shlauncher.rb
54
- - templates/Rakefile
55
55
  - templates/README
56
+ - templates/Rakefile
57
+ - templates/bin/shlauncher
58
+ - templates/lib/version.rb
56
59
  has_rdoc: true
57
60
  homepage: ""
58
61
  licenses: []
@@ -88,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
91
  requirements: []
89
92
 
90
93
  rubyforge_project: ""
91
- rubygems_version: 1.3.4
94
+ rubygems_version: 1.3.5
92
95
  signing_key:
93
96
  specification_version: 3
94
97
  summary: Scaffold your custom launcher. Launch from your shell script ( and also Ruby script ) collection.