falsework 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ pkg
2
+ html
data/Rakefile CHANGED
@@ -1,21 +1,12 @@
1
1
  # -*-ruby-*-
2
2
 
3
- require 'rake'
4
3
  require 'rake/clean'
5
4
  require 'rake/testtask'
6
- require 'rubygems/package_task'
7
-
5
+ require 'bundler/gem_tasks'
8
6
  gem 'rdoc'
9
7
  require 'rdoc/task'
10
8
 
11
- require_relative 'lib/falsework/meta'
12
- include Falsework
13
-
14
- require_relative 'test/rake_git'
15
-
16
- #
17
9
  # Generate dynamic targets
18
- #
19
10
  require_relative 'test/rake_erb_templates'
20
11
 
21
12
  ERB_DYN_SKELETON = erb_skeletons(Meta::NAME, 'ruby-cli')
@@ -25,57 +16,29 @@ ERB_DYN_SKELETON.each {|k, v|
25
16
  end
26
17
  }
27
18
 
28
- desc "Generate some erb templates for ruby-cli template"
29
- task cli: ERB_DYN_SKELETON.keys
19
+ desc "Generate ruby-cli dynamic files"
20
+ file 'dynamic.ruby-cli' => ERB_DYN_SKELETON.keys do |t|
21
+ File.open(t.name, 'w+') {|fp|
22
+ ERB_DYN_SKELETON.keys.map {|i|
23
+ fp.puts i.sub(/#{Dir.pwd}\//, '')
24
+ }
25
+ }
26
+ end
30
27
 
28
+ # add rubi-cli dynamic files to a clobber target
31
29
  CLOBBER.concat ERB_DYN_SKELETON.keys
32
- #pp CLOBBER
33
-
34
- #
35
- # Gem staff
36
- #
37
-
38
- rdoc_task_excl = 'lib/**/templates/**/*'
39
- rdoc_spec_excl = 'lib/.+/templates/'
40
- rdoc_main = 'doc/README.rdoc'
41
-
42
- spec = Gem::Specification.new {|i|
43
- i.name = Meta::NAME
44
- i.version = `bin/#{i.name} -V`
45
- i.summary = "A primitive scaffold generator for writing CLI programs in Ruby"
46
- i.description = i.summary + '.'
47
- i.author = Meta::AUTHOR
48
- i.email = Meta::EMAIL
49
- i.homepage = Meta::HOMEPAGE
50
-
51
- i.platform = Gem::Platform::RUBY
52
- i.required_ruby_version = '>= 1.9.2'
53
- i.files = git_ls('.')
54
- i.files.concat ERB_DYN_SKELETON.keys.map {|i| i.sub(/#{Dir.pwd}\//, '') }
55
-
56
- i.executables = FileList['bin/*'].gsub(/^bin\//, '')
57
-
58
- i.test_files = FileList['test/test_*.rb']
59
-
60
- i.rdoc_options << '-m' << rdoc_main << '-x' << rdoc_spec_excl
61
- i.extra_rdoc_files = FileList['doc/*']
62
-
63
- i.add_dependency('git', '>= 1.2.5')
64
- i.add_dependency('open4', '>= 1.3.0')
65
- }
66
-
67
- Gem::PackageTask.new(spec).define
68
30
 
69
- task default: [:cli, :repackage]
31
+ task default: [:test]
70
32
 
71
33
  RDoc::Task.new('html') do |i|
72
- i.main = rdoc_main
34
+ i.main = 'doc/README.rdoc'
73
35
  i.rdoc_files = FileList['doc/*', 'lib/**/*.rb']
74
- i.rdoc_files.exclude rdoc_task_excl
36
+ i.rdoc_files.exclude 'lib/**/templates/**/*'
75
37
  end
76
38
 
77
39
  Rake::TestTask.new do |i|
78
40
  i.test_files = FileList['test/test_*.rb']
79
41
  end
80
42
 
81
- task test: [:cli]
43
+ task test: ['dynamic.ruby-cli']
44
+ task build: ['dynamic.ruby-cli']
data/doc/NEWS.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ === 2.1.0
2
+
3
+ Mon Apr 23 16:17:18 EEST 2012
4
+
5
+ * 'ruby-cli' uses bundler for bulding gem.
6
+
7
+ * CliConfig#optParse allows user to set a banner.
8
+
1
9
  === 2.0.0
2
10
 
3
11
  Fri Jan 27 22:11:06 EET 2012
data/dynamic.ruby-cli ADDED
@@ -0,0 +1,3 @@
1
+ lib/falsework/templates/ruby-cli/lib/%%@project%%/cliconfig.rb
2
+ lib/falsework/templates/ruby-cli/lib/%%@project%%/cliutils.rb
3
+ lib/falsework/templates/ruby-cli/test/helper_cliutils.rb
data/falsework.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # -*-ruby-*-
2
+ require File.expand_path('../lib/falsework/meta', __FILE__)
3
+ include Falsework
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.authors = [Meta::AUTHOR]
7
+ gem.email = [Meta::EMAIL]
8
+ gem.description = 'A primitive scaffold generator for writing CLI programs in Ruby'
9
+ gem.summary = gem.description + '.'
10
+ gem.homepage = Meta::HOMEPAGE
11
+
12
+ gem.files = `git ls-files`.split($\)
13
+ gem.files.concat File.read('dynamic.ruby-cli').split("\n")
14
+
15
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.test_files = gem.files.grep(%r{^test/test_.+\.rb})
17
+ gem.name = Meta::NAME
18
+ gem.version = Meta::VERSION
19
+
20
+ gem.required_ruby_version = '>= 1.9.2'
21
+ gem.extra_rdoc_files = gem.files.grep(%r{^doc/})
22
+ gem.rdoc_options << '-m' << 'doc/README.rdoc' << '-x' << 'lib/.+/templates/'
23
+
24
+ gem.add_dependency "open4", "~> 1.3.0"
25
+ gem.add_dependency "rdoc", "~> 3.12"
26
+ gem.add_dependency "bundler", "~> 1.1.3"
27
+ end
@@ -65,10 +65,10 @@ module Falsework
65
65
  return false unless file
66
66
 
67
67
  CliUtils::veputs(2, "Loading #{File.basename(file)}... " + CliUtils::NNL_MARK)
68
- myconf = YAML.load_file(file) rescue CliUtils.errx(1, "cannot parse config #{file}: #{$!}")
68
+ myconf = YAML.load_file(file) rescue CliUtils.errx(EX_CONFIG, "cannot parse config #{file}: #{$!}")
69
69
  # preserve existing values
70
70
  @conf.merge!(myconf) {|key, oldval, newval| oldval }
71
- CliUtils::veputs(2, "OK")
71
+ CliUtils::veputs 2, "OK"
72
72
  return true
73
73
  end
74
74
 
@@ -76,7 +76,7 @@ module Falsework
76
76
  def requiredOptions?(opts)
77
77
  opts.each {|idx|
78
78
  if !@conf.key?(idx.to_sym) || !@conf[idx.to_sym]
79
- CliUtils.errx(1, "option #{idx} is either nil or missing")
79
+ CliUtils.errx EX_CONFIG, "option #{idx} is either nil or missing"
80
80
  end
81
81
  }
82
82
  end
@@ -84,15 +84,13 @@ module Falsework
84
84
  # Parse CLO and env variable. If block is given it is passed with
85
85
  # OptionParser object as a parameter.
86
86
  def optParse
87
- o = OptionParser.new do |o|
88
- o.banner = @conf[:banner]
89
- o.banner = @conf[:banner]
87
+ OptionParser.new do |o|
90
88
  o.on('-v', 'Be more verbose.') { |i|
91
89
  self[:verbose] += 1
92
90
  }
93
91
  o.on('-V', '--version', 'Show version & exit.') { |i|
94
92
  puts Meta::VERSION
95
- exit 0
93
+ exit EX_OK
96
94
  }
97
95
  o.on('--config NAME',
98
96
  "Set a config name or file",
@@ -110,14 +108,20 @@ module Falsework
110
108
  puts " #{f}"
111
109
  end
112
110
  }
113
- exit 0
111
+ exit EX_OK
114
112
  }
115
113
 
116
114
  yield o if block_given?
115
+ o.banner = @conf[:banner]
117
116
 
118
117
  env = nil
119
118
  env = ENV[@conf[:config_env]].shellsplit if ENV.key?(@conf[:config_env])
120
- [env, ARGV].each { |i| o.parse!(i) if i }
119
+
120
+ begin
121
+ [env, ARGV].each { |i| o.parse!(i) if i }
122
+ rescue
123
+ CliUtils.errx EX_USAGE, $!.to_s
124
+ end
121
125
  end
122
126
  end
123
127
 
@@ -126,7 +130,7 @@ module Falsework
126
130
  # [reqOpts] an array of requied options
127
131
  # [&block] a optional block for OptionParser
128
132
  def load(reqOpts = [], &block)
129
- optParse &block
133
+ optParse(&block)
130
134
  loadFile
131
135
  requiredOptions?(reqOpts)
132
136
  end
@@ -1,8 +1,7 @@
1
- # :include: ../../README.rdoc
2
1
  module Falsework
3
2
  module Meta # :nodoc:
4
3
  NAME = 'falsework'
5
- VERSION = '2.0.0'
4
+ VERSION = '2.1.0'
6
5
  AUTHOR = 'Alexander Gromnitsky'
7
6
  EMAIL = 'alexander.gromnitsky@gmail.com'
8
7
  HOMEPAGE = 'http://github.com/gromnitsky/' + NAME
@@ -0,0 +1,26 @@
1
+ # -*-ruby-*-
2
+
3
+ require File.expand_path('../lib/<%= @project %>/meta', __FILE__)
4
+ include <%= @camelcase %>
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.authors = [Meta::AUTHOR]
8
+ gem.email = [Meta::EMAIL]
9
+ gem.description = 'TO DO: write a description'
10
+ gem.summary = gem.description + '.'
11
+ gem.homepage = Meta::HOMEPAGE
12
+
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^test/test_.+\.rb})
16
+ gem.name = Meta::NAME
17
+ gem.version = Meta::VERSION
18
+
19
+ gem.required_ruby_version = '>= 1.9.2'
20
+ gem.extra_rdoc_files = gem.files.grep(%r{^doc/})
21
+ gem.rdoc_options << '-m' << 'doc/README.rdoc'
22
+
23
+ gem.add_dependency "open4", "~> 1.3.0"
24
+ gem.add_dependency "rdoc", "~> 3.12"
25
+ gem.add_dependency "bundler", "~> 1.1.3"
26
+ end
@@ -0,0 +1,4 @@
1
+ cliconfig.rb
2
+ cliutils.rb
3
+ helper_cliutils.rb
4
+
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
- gem "open4", "~>1.3.0"
4
- gem "git", "~>1.2.5"
3
+ # Specify your gem's dependencies in <%= @project %>.gemspec
4
+ gemspec
@@ -1,45 +1,12 @@
1
1
  # -*-ruby-*-
2
2
 
3
- require 'rake'
4
3
  require 'rake/clean'
5
4
  require 'rake/testtask'
6
- require 'rubygems/package_task'
7
-
5
+ require 'bundler/gem_tasks'
8
6
  gem 'rdoc'
9
7
  require 'rdoc/task'
10
8
 
11
- require_relative 'lib/<%= @project %>/meta'
12
- include <%= @camelcase %>
13
-
14
- require_relative 'test/rake_git'
15
-
16
- spec = Gem::Specification.new {|i|
17
- i.name = Meta::NAME
18
- i.version = `bin/#{i.name} -V`
19
- i.summary = 'TO DO: fill this variable'
20
- i.description = i.summary + '.'
21
- i.author = Meta::AUTHOR
22
- i.email = Meta::EMAIL
23
- i.homepage = Meta::HOMEPAGE
24
-
25
- i.platform = Gem::Platform::RUBY
26
- i.required_ruby_version = '>= <%= RUBY_VERSION %>'
27
- i.files = git_ls('.')
28
-
29
- i.executables = FileList['bin/*'].gsub(/^bin\//, '')
30
-
31
- i.test_files = FileList['test/test_*.rb']
32
-
33
- i.rdoc_options << '-m' << 'doc/README.rdoc'
34
- i.extra_rdoc_files = FileList['doc/*']
35
-
36
- i.add_dependency('open4', '>= 1.1.0')
37
- i.add_development_dependency('git', '>= 1.2.5')
38
- }
39
-
40
- Gem::PackageTask.new(spec).define
41
-
42
- task default: [:repackage]
9
+ task default: [:test]
43
10
 
44
11
  RDoc::Task.new('html') do |i|
45
12
  i.main = 'doc/README.rdoc'
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- # -*-ruby-*-
3
2
 
4
3
  require_relative '../lib/<%= @project %>/cliconfig'
5
4
 
@@ -65,10 +65,10 @@ module <%= @camelcase %>
65
65
  return false unless file
66
66
 
67
67
  CliUtils::veputs(2, "Loading #{File.basename(file)}... " + CliUtils::NNL_MARK)
68
- myconf = YAML.load_file(file) rescue CliUtils.errx(1, "cannot parse config #{file}: #{$!}")
68
+ myconf = YAML.load_file(file) rescue CliUtils.errx(EX_CONFIG, "cannot parse config #{file}: #{$!}")
69
69
  # preserve existing values
70
70
  @conf.merge!(myconf) {|key, oldval, newval| oldval }
71
- CliUtils::veputs(2, "OK")
71
+ CliUtils::veputs 2, "OK"
72
72
  return true
73
73
  end
74
74
 
@@ -76,7 +76,7 @@ module <%= @camelcase %>
76
76
  def requiredOptions?(opts)
77
77
  opts.each {|idx|
78
78
  if !@conf.key?(idx.to_sym) || !@conf[idx.to_sym]
79
- CliUtils.errx(1, "option #{idx} is either nil or missing")
79
+ CliUtils.errx EX_CONFIG, "option #{idx} is either nil or missing"
80
80
  end
81
81
  }
82
82
  end
@@ -84,15 +84,13 @@ module <%= @camelcase %>
84
84
  # Parse CLO and env variable. If block is given it is passed with
85
85
  # OptionParser object as a parameter.
86
86
  def optParse
87
- o = OptionParser.new do |o|
88
- o.banner = @conf[:banner]
89
- o.banner = @conf[:banner]
87
+ OptionParser.new do |o|
90
88
  o.on('-v', 'Be more verbose.') { |i|
91
89
  self[:verbose] += 1
92
90
  }
93
91
  o.on('-V', '--version', 'Show version & exit.') { |i|
94
92
  puts Meta::VERSION
95
- exit 0
93
+ exit EX_OK
96
94
  }
97
95
  o.on('--config NAME',
98
96
  "Set a config name or file",
@@ -110,14 +108,20 @@ module <%= @camelcase %>
110
108
  puts " #{f}"
111
109
  end
112
110
  }
113
- exit 0
111
+ exit EX_OK
114
112
  }
115
113
 
116
114
  yield o if block_given?
115
+ o.banner = @conf[:banner]
117
116
 
118
117
  env = nil
119
118
  env = ENV[@conf[:config_env]].shellsplit if ENV.key?(@conf[:config_env])
120
- [env, ARGV].each { |i| o.parse!(i) if i }
119
+
120
+ begin
121
+ [env, ARGV].each { |i| o.parse!(i) if i }
122
+ rescue
123
+ CliUtils.errx EX_USAGE, $!.to_s
124
+ end
121
125
  end
122
126
  end
123
127
 
@@ -126,7 +130,7 @@ module <%= @camelcase %>
126
130
  # [reqOpts] an array of requied options
127
131
  # [&block] a optional block for OptionParser
128
132
  def load(reqOpts = [], &block)
129
- optParse &block
133
+ optParse(&block)
130
134
  loadFile
131
135
  requiredOptions?(reqOpts)
132
136
  end
@@ -134,4 +138,4 @@ module <%= @camelcase %>
134
138
  end
135
139
  end
136
140
 
137
- # Don't remove this: falsework/2.0.0/ruby-cli/2012-03-05T05:04:11+02:00
141
+ # Don't remove this: falsework/2.1.0/ruby-cli/2012-04-23T16:09:03+03:00
@@ -111,4 +111,4 @@ module <%= @camelcase %>
111
111
 
112
112
  end
113
113
 
114
- # Don't remove this: falsework/2.0.0/ruby-cli/2012-03-05T05:04:11+02:00
114
+ # Don't remove this: falsework/2.1.0/ruby-cli/2012-04-23T16:09:03+03:00
@@ -1,4 +1,3 @@
1
- # :include: ../../README.rdoc
2
1
  module <%= @camelcase %>
3
2
  module Meta # :nodoc:
4
3
  NAME = '<%= @project %>'
@@ -31,4 +31,4 @@ def cmd(c)
31
31
  File.absolute_path('../bin/' + c)
32
32
  end
33
33
 
34
- # Don't remove this: falsework/2.0.0/ruby-cli/2012-03-05T05:04:11+02:00
34
+ # Don't remove this: falsework/2.1.0/ruby-cli/2012-04-23T16:09:03+03:00
@@ -1,12 +1,12 @@
1
1
  require_relative 'helper'
2
2
 
3
- class Test<%= @camelcase %>_<%= rand 2**32 %> < MiniTest::Unit::TestCase
3
+ class Test<%= rand 2**32 %> < MiniTest::Unit::TestCase
4
4
  def setup
5
5
  # this runs every time before test_*
6
6
  @cmd = cmd('<%= @project %>') # get path to the exe & cd to tests directory
7
7
  end
8
8
 
9
9
  def test_foobar
10
- fail "\u0430\u0439\u043D\u044D\u043D\u044D".encode(Encoding.default_external, 'UTF-8')
10
+ flunk
11
11
  end
12
12
  end
@@ -0,0 +1,2 @@
1
+ foo
2
+ c_glib
data/test/test_cl.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require_relative 'helper'
2
2
  require_relative '../lib/falsework/mould'
3
3
 
4
- class TestFalsework_3867654745 < MiniTest::Unit::TestCase
4
+ class Test3867654745 < MiniTest::Unit::TestCase
5
5
  def setup
6
6
  # this runs every time before test_*
7
7
  @cmd = cmd('falsework') # get path to the exe & cd to tests directory
data/test/test_exe.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require_relative 'helper'
2
2
 
3
- class TestFalsework < MiniTest::Unit::TestCase
3
+ class TestExecution < MiniTest::Unit::TestCase
4
4
  def setup
5
5
  # this runs every time before test_*
6
6
  @cmd = cmd('falsework') # get path to the exe & cd to tests directory
@@ -42,6 +42,7 @@ class TestFalsework < MiniTest::Unit::TestCase
42
42
  "templates/foo/doc/README.rdoc",
43
43
  "templates/foo/etc",
44
44
  "templates/foo/etc/foo.yaml",
45
+ "templates/foo/foo.gemspec",
45
46
  "templates/foo/lib",
46
47
  "templates/foo/lib/foo",
47
48
  "templates/foo/lib/foo/cliconfig.rb",
@@ -50,7 +51,6 @@ class TestFalsework < MiniTest::Unit::TestCase
50
51
  "templates/foo/test",
51
52
  "templates/foo/test/helper.rb",
52
53
  "templates/foo/test/helper_cliutils.rb",
53
- "templates/foo/test/rake_git.rb",
54
54
  "templates/foo/test/test_foo.rb"]
55
55
 
56
56
  assert_equal(tree,
@@ -59,6 +59,10 @@ class TestFalsework < MiniTest::Unit::TestCase
59
59
  })
60
60
 
61
61
  Dir.chdir('templates/foo') {
62
+ # check rake
63
+ r = CliUtils.exec "rake -T"
64
+ assert_equal 0, r[0]
65
+
62
66
  # add files
63
67
  r = CliUtils.exec "#{@cmd} exe qqq"
64
68
  assert_equal(0, r[0])
@@ -76,7 +80,7 @@ class TestFalsework < MiniTest::Unit::TestCase
76
80
  # upgrade
77
81
  r = CliUtils.exec "#{@cmd} upgrade -b"
78
82
  assert_equal(0, r[0])
79
- rm ['test/helper_cliutils.rb', 'test/rake_git.rb']
83
+ rm ['test/helper_cliutils.rb']
80
84
  r = CliUtils.exec "#{@cmd} upgrade -b"
81
85
  assert_equal(0, r[0])
82
86
  sed 'test/helper_cliutils.rb',
data/test/test_mould.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require_relative 'helper'
2
2
  require_relative '../lib/falsework/mould'
3
3
 
4
- class TestFalsework_3673712978 < MiniTest::Unit::TestCase
4
+ class TestMould < MiniTest::Unit::TestCase
5
5
  def setup
6
6
  # this runs every time before test_*
7
7
  @cmd = cmd('falsework') # get path to the exe & cd to tests directory
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falsework
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,42 +9,70 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-05 00:00:00.000000000 Z
12
+ date: 2012-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: git
16
- requirement: &74400880 !ruby/object:Gem::Requirement
15
+ name: open4
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.2.5
21
+ version: 1.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *74400880
25
- - !ruby/object:Gem::Dependency
26
- name: open4
27
- requirement: &74400650 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
- - - ! '>='
27
+ - - ~>
31
28
  - !ruby/object:Gem::Version
32
29
  version: 1.3.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rdoc
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '3.12'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '3.12'
46
+ - !ruby/object:Gem::Dependency
47
+ name: bundler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.1.3
33
54
  type: :runtime
34
55
  prerelease: false
35
- version_requirements: *74400650
36
- description: A primitive scaffold generator for writing CLI programs in Ruby.
37
- email: alexander.gromnitsky@gmail.com
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.3
62
+ description: A primitive scaffold generator for writing CLI programs in Ruby
63
+ email:
64
+ - alexander.gromnitsky@gmail.com
38
65
  executables:
39
66
  - falsework
40
67
  extensions: []
41
68
  extra_rdoc_files:
42
- - doc/TODO.org
43
- - doc/NEWS.rdoc
44
69
  - doc/LICENSE
45
- - doc/template-tutorial.rdoc
70
+ - doc/NEWS.rdoc
46
71
  - doc/README.rdoc
72
+ - doc/TODO.org
73
+ - doc/template-tutorial.rdoc
47
74
  files:
75
+ - .gitignore
48
76
  - Gemfile
49
77
  - Gemfile.lock
50
78
  - README.rdoc
@@ -55,7 +83,9 @@ files:
55
83
  - doc/README.rdoc
56
84
  - doc/TODO.org
57
85
  - doc/template-tutorial.rdoc
86
+ - dynamic.ruby-cli
58
87
  - etc/falsework.yaml
88
+ - falsework.gemspec
59
89
  - lib/falsework/cliconfig.rb
60
90
  - lib/falsework/cliutils.rb
61
91
  - lib/falsework/meta.rb
@@ -82,6 +112,8 @@ files:
82
112
  - lib/falsework/templates/c-glib/test/semis/text/empty.txt
83
113
  - lib/falsework/templates/c-glib/test/test_utils.c
84
114
  - lib/falsework/templates/ruby-cli/#config.yaml
115
+ - lib/falsework/templates/ruby-cli/%%@project%%.gemspec
116
+ - lib/falsework/templates/ruby-cli/.gitignore
85
117
  - lib/falsework/templates/ruby-cli/.gitignore.#erb
86
118
  - lib/falsework/templates/ruby-cli/Gemfile
87
119
  - lib/falsework/templates/ruby-cli/README.rdoc
@@ -98,7 +130,7 @@ files:
98
130
  - test/helper.rb
99
131
  - test/helper_cliutils.rb
100
132
  - test/rake_erb_templates.rb
101
- - test/rake_git.rb
133
+ - test/templates/.gitignore
102
134
  - test/templates/config-01.yaml
103
135
  - test/templates/config-02.yaml
104
136
  - test/test_cl.rb
@@ -107,7 +139,6 @@ files:
107
139
  - lib/falsework/templates/ruby-cli/lib/%%@project%%/cliconfig.rb
108
140
  - lib/falsework/templates/ruby-cli/lib/%%@project%%/cliutils.rb
109
141
  - lib/falsework/templates/ruby-cli/test/helper_cliutils.rb
110
- - lib/falsework/templates/ruby-cli/test/rake_git.rb
111
142
  homepage: http://github.com/gromnitsky/falsework
112
143
  licenses: []
113
144
  post_install_message:
@@ -132,11 +163,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
163
  version: '0'
133
164
  requirements: []
134
165
  rubyforge_project:
135
- rubygems_version: 1.8.10
166
+ rubygems_version: 1.8.23
136
167
  signing_key:
137
168
  specification_version: 3
138
- summary: A primitive scaffold generator for writing CLI programs in Ruby
169
+ summary: A primitive scaffold generator for writing CLI programs in Ruby.
139
170
  test_files:
140
- - test/test_mould.rb
141
171
  - test/test_cl.rb
142
172
  - test/test_exe.rb
173
+ - test/test_mould.rb
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*-ruby-*-
3
- # :erb: ruby-cli
4
-
5
- # This is a helper for your Rakefile. Read the comments for each
6
- # function.
7
-
8
- require 'git'
9
- require 'pp'
10
-
11
- # Return a list of files in a git repository _repdir_.
12
- #
13
- # Add this to your gem spec:
14
- #
15
- # spec = Gem::Specification.new {|i|
16
- # i.files = git_ls('.')
17
- # }
18
- #
19
- # What it does is just collecting the list of the files from the git
20
- # repository. The idea is to use that list for the gem spec. No more
21
- # missing or redundant files in gems!
22
- def git_ls(repdir, ignore_some = true)
23
- ignore = ['/?\.gitignore$']
24
-
25
- r = []
26
- g = Git.open repdir
27
- g.ls_files.each {|i, v|
28
- next if ignore_some && ignore.index {|ign| i.match(/#{ign}/) }
29
- r << i
30
- }
31
- r
32
- end
33
-
34
- pp git_ls('.') if __FILE__ == $0
35
-
36
- # Don't remove this: falsework/2.0.0/ruby-cli/2012-03-05T05:04:11+02:00
data/test/rake_git.rb DELETED
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*-ruby-*-
3
- # :erb: ruby-cli
4
-
5
- # This is a helper for your Rakefile. Read the comments for each
6
- # function.
7
-
8
- require 'git'
9
- require 'pp'
10
-
11
- # Return a list of files in a git repository _repdir_.
12
- #
13
- # Add this to your gem spec:
14
- #
15
- # spec = Gem::Specification.new {|i|
16
- # i.files = git_ls('.')
17
- # }
18
- #
19
- # What it does is just collecting the list of the files from the git
20
- # repository. The idea is to use that list for the gem spec. No more
21
- # missing or redundant files in gems!
22
- def git_ls(repdir, ignore_some = true)
23
- ignore = ['/?\.gitignore$']
24
-
25
- r = []
26
- g = Git.open repdir
27
- g.ls_files.each {|i, v|
28
- next if ignore_some && ignore.index {|ign| i.match(/#{ign}/) }
29
- r << i
30
- }
31
- r
32
- end
33
-
34
- pp git_ls('.') if __FILE__ == $0