gator 0.0.7.pre → 0.0.8.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gator.gemspec +3 -3
- data/lib/__legacy/default/generators/as3_class_generator.rb +1 -1
- data/lib/gator.rb +2 -1
- data/lib/gator/{command.rb → commands/command.rb} +1 -1
- data/lib/gator/{project.rb → commands/project_command.rb} +13 -6
- data/lib/gator/runner.rb +0 -5
- data/lib/gator/util.rb +0 -2
- metadata +14 -14
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8.pre
|
data/gator.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gator}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8.pre"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dominic Graefen"]
|
@@ -47,8 +47,8 @@ Gem::Specification.new do |s|
|
|
47
47
|
"lib/__legacy/default/generators/as3_class_generator.rb",
|
48
48
|
"lib/__legacy/gator.rb",
|
49
49
|
"lib/gator.rb",
|
50
|
-
"lib/gator/command.rb",
|
51
|
-
"lib/gator/
|
50
|
+
"lib/gator/commands/command.rb",
|
51
|
+
"lib/gator/commands/project_command.rb",
|
52
52
|
"lib/gator/runner.rb",
|
53
53
|
"lib/gator/util.rb",
|
54
54
|
"spec/core/command/command_spec.rb",
|
data/lib/gator.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require "thor"
|
2
2
|
require "thor/actions"
|
3
3
|
require "fileutils"
|
4
|
-
require File.dirname(__FILE__) + '
|
4
|
+
require File.dirname(__FILE__) + '/../util'
|
5
5
|
require File.dirname(__FILE__) + '/command'
|
6
6
|
|
7
7
|
module Gator
|
8
|
-
class
|
8
|
+
class ProjectCommand < Command
|
9
9
|
include Thor::Actions
|
10
10
|
|
11
|
-
register_command "project", "project TASK", "Set of tasks to manage project templates.", [
|
11
|
+
register_command "project", "project TASK", "Set of tasks to manage project templates.", ["p"]
|
12
12
|
|
13
13
|
def self.source_root
|
14
14
|
Gator::Util.project_template_root
|
@@ -20,6 +20,7 @@ module Gator
|
|
20
20
|
template ||= File.expand_path( File.dirname(entries.first) ).split(File::SEPARATOR).last
|
21
21
|
empty_directory template_dir(template)
|
22
22
|
FileUtils.cp_r entries, template_dir(template)
|
23
|
+
create_empty_directory_files template_dir(template)
|
23
24
|
end
|
24
25
|
|
25
26
|
desc "project uninstall TEMPLATE_NAME", "Uninstall a project template."
|
@@ -34,7 +35,7 @@ module Gator
|
|
34
35
|
|
35
36
|
desc "project wipe", "Delete all project templates."
|
36
37
|
def wipe
|
37
|
-
template_root_entries.each { |e| FileUtils.rm_r e }
|
38
|
+
template_root_entries(true).each { |e| FileUtils.rm_r e }
|
38
39
|
end
|
39
40
|
|
40
41
|
desc "project list [SEARCH]", "Lists project templates."
|
@@ -47,6 +48,12 @@ module Gator
|
|
47
48
|
|
48
49
|
private
|
49
50
|
|
51
|
+
def create_empty_directory_files( dir )
|
52
|
+
Dir.glob( File.join( dir, "**", "*" ) ).each {|f|
|
53
|
+
create_file File.join(f,".empty_directory"), ".empty_directory" if File.directory?(f) && Dir.entries(f).length == 2
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
50
57
|
def template_dir( template )
|
51
58
|
File.join( Gator::Util.project_template_root, template )
|
52
59
|
end
|
@@ -59,8 +66,8 @@ module Gator
|
|
59
66
|
entries
|
60
67
|
end
|
61
68
|
|
62
|
-
def template_root_entries
|
63
|
-
directory_entries Gator::Util.project_template_root,
|
69
|
+
def template_root_entries( join_with_dir=false )
|
70
|
+
directory_entries Gator::Util.project_template_root, join_with_dir
|
64
71
|
end
|
65
72
|
|
66
73
|
end
|
data/lib/gator/runner.rb
CHANGED
data/lib/gator/util.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ default_executable: gator
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
17
|
-
requirement: &
|
17
|
+
requirement: &2157177140 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.14.6
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2157177140
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &2157176660 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 2.3.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2157176660
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: bundler
|
39
|
-
requirement: &
|
39
|
+
requirement: &2157176180 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 1.0.0
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2157176180
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: jeweler
|
50
|
-
requirement: &
|
50
|
+
requirement: &2157175680 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 1.6.2
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2157175680
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rcov
|
61
|
-
requirement: &
|
61
|
+
requirement: &2157175140 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2157175140
|
70
70
|
description: gator - the friendly code-generator
|
71
71
|
email: dominic.graefen@gmail.com
|
72
72
|
executables:
|
@@ -104,8 +104,8 @@ files:
|
|
104
104
|
- lib/__legacy/default/generators/as3_class_generator.rb
|
105
105
|
- lib/__legacy/gator.rb
|
106
106
|
- lib/gator.rb
|
107
|
-
- lib/gator/command.rb
|
108
|
-
- lib/gator/
|
107
|
+
- lib/gator/commands/command.rb
|
108
|
+
- lib/gator/commands/project_command.rb
|
109
109
|
- lib/gator/runner.rb
|
110
110
|
- lib/gator/util.rb
|
111
111
|
- spec/core/command/command_spec.rb
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash:
|
130
|
+
hash: 886414708621088271
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|