jem 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +0 -0
- data/LICENCE +0 -0
- data/README.markdown +26 -0
- data/Rakefile +35 -0
- data/VERSION +0 -0
- data/bin/jem +14 -0
- data/jem.gemspec +32 -0
- data/lib/jem.rb +11 -0
- data/lib/jem/build.rb +45 -0
- metadata +88 -0
data/CHANGELOG
ADDED
File without changes
|
data/LICENCE
ADDED
File without changes
|
data/README.markdown
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Jem: Really simple Ruby project file structure generator.
|
2
|
+
================
|
3
|
+
|
4
|
+
Set up directory in one command.
|
5
|
+
|
6
|
+
Installation
|
7
|
+
------------
|
8
|
+
gem install jem
|
9
|
+
|
10
|
+
Use
|
11
|
+
---
|
12
|
+
Build:
|
13
|
+
jem --build project_name
|
14
|
+
jem -b project_name
|
15
|
+
|
16
|
+
Help:
|
17
|
+
jem -h
|
18
|
+
jem --help
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
Bugs
|
24
|
+
----
|
25
|
+
|
26
|
+
<http://github.com/jbw/jem/issues>
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rake/gempackagetask'
|
2
|
+
|
3
|
+
spec = Gem::Specification.new do |s|
|
4
|
+
s.name = 'jem'
|
5
|
+
s.version = '0.0.1'
|
6
|
+
s.date = '2010-07-08'
|
7
|
+
s.description = "Quick and simple generic Ruby project (i.e. making gems) directory and file structure generator."
|
8
|
+
s.summary = s.description
|
9
|
+
|
10
|
+
s.authors = ["Jason Watson"]
|
11
|
+
s.email = "jbw@bw.cc"
|
12
|
+
|
13
|
+
s.files = %w[
|
14
|
+
CHANGELOG
|
15
|
+
LICENCE
|
16
|
+
README.markdown
|
17
|
+
Rakefile
|
18
|
+
VERSION
|
19
|
+
bin/
|
20
|
+
docs/
|
21
|
+
lib/jem.rb
|
22
|
+
lib/jem/build.rb
|
23
|
+
test/
|
24
|
+
jem.gemspec
|
25
|
+
]
|
26
|
+
s.add_development_dependency 'trollop'
|
27
|
+
s.homepage = "http://github.com/jbw/jem/"
|
28
|
+
s.require_paths = %w[lib]
|
29
|
+
s.rubyforge_project = 'jem'
|
30
|
+
s.executables = %w(jem)
|
31
|
+
end
|
32
|
+
|
33
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
34
|
+
pkg.need_tar = true
|
35
|
+
end
|
data/VERSION
ADDED
File without changes
|
data/bin/jem
ADDED
data/jem.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
Gem::Specification.new do |s|
|
3
|
+
s.name = 'jem'
|
4
|
+
s.version = '0.0.1'
|
5
|
+
s.date = '2010-07-08'
|
6
|
+
s.description = "Quick and simple generic Ruby project (i.e. making gems) directory and file structure generator."
|
7
|
+
s.summary = s.description
|
8
|
+
|
9
|
+
s.authors = ["Jason Watson"]
|
10
|
+
s.email = "jbw@bw.cc"
|
11
|
+
|
12
|
+
s.files = %w[
|
13
|
+
CHANGELOG
|
14
|
+
LICENCE
|
15
|
+
README
|
16
|
+
Rakefile
|
17
|
+
VERSION
|
18
|
+
bin/
|
19
|
+
docs/
|
20
|
+
lib/jem.rb
|
21
|
+
lib/jem/build.rb
|
22
|
+
test/
|
23
|
+
jem.gemspec
|
24
|
+
]
|
25
|
+
s.add_development_dependency 'trollop'
|
26
|
+
s.homepage = "http://github.com/jbw/jem/"
|
27
|
+
s.require_paths = %w[lib]
|
28
|
+
s.rubyforge_project = 'jem'
|
29
|
+
s.executables = %w(jem)
|
30
|
+
|
31
|
+
|
32
|
+
end
|
data/lib/jem.rb
ADDED
data/lib/jem/build.rb
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'trollop'
|
2
|
+
require 'FileUtils'
|
3
|
+
|
4
|
+
module Jem
|
5
|
+
|
6
|
+
module Build
|
7
|
+
|
8
|
+
def Build.execute project_name
|
9
|
+
build project_name[0] if command_line_options[:build]
|
10
|
+
end
|
11
|
+
|
12
|
+
def Build.build project_name
|
13
|
+
return puts "Please specify a project name." if project_name == nil
|
14
|
+
|
15
|
+
if !File.exists? project_name
|
16
|
+
print "* Building structure in directory: ./#{project_name}/\n"
|
17
|
+
options = {:verbose => true}
|
18
|
+
print "\t=> "
|
19
|
+
FileUtils.mkdir_p './' + project_name+ '/lib/' + project_name, options
|
20
|
+
FileUtils.cd project_name
|
21
|
+
print "\t=> "
|
22
|
+
FileUtils.mkdir %w(test docs examples bin), options
|
23
|
+
print "\t=> "
|
24
|
+
FileUtils.touch %w(LICENCE README CHANGELOG VERSION Rakefile), options
|
25
|
+
print "\t=> "
|
26
|
+
FileUtils.touch project_name + '.gemspec', options
|
27
|
+
FileUtils.cd 'lib'
|
28
|
+
print "\t=> "
|
29
|
+
FileUtils.touch project_name + '.rb', options
|
30
|
+
puts "* Done."
|
31
|
+
else
|
32
|
+
print "Directory \"#{project_name}\" already exists.\n"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def Build.command_line_options
|
37
|
+
opts = Trollop::options do
|
38
|
+
opt :build, "Initialise directory structure.E.g. jem --build project_name."
|
39
|
+
opt :help, "You're here."
|
40
|
+
end
|
41
|
+
return opts
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jason Watson
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-07-08 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: trollop
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
description: Quick and simple generic Ruby project (i.e. making gems) directory and file structure generator.
|
36
|
+
email: jbw@bw.cc
|
37
|
+
executables:
|
38
|
+
- jem
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files: []
|
42
|
+
|
43
|
+
files:
|
44
|
+
- CHANGELOG
|
45
|
+
- LICENCE
|
46
|
+
- README.markdown
|
47
|
+
- Rakefile
|
48
|
+
- VERSION
|
49
|
+
- lib/jem.rb
|
50
|
+
- lib/jem/build.rb
|
51
|
+
- jem.gemspec
|
52
|
+
- bin/jem
|
53
|
+
has_rdoc: true
|
54
|
+
homepage: http://github.com/jbw/jem/
|
55
|
+
licenses: []
|
56
|
+
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
hash: 3
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
version: "0"
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
requirements: []
|
81
|
+
|
82
|
+
rubyforge_project: jem
|
83
|
+
rubygems_version: 1.3.7
|
84
|
+
signing_key:
|
85
|
+
specification_version: 3
|
86
|
+
summary: Quick and simple generic Ruby project (i.e. making gems) directory and file structure generator.
|
87
|
+
test_files: []
|
88
|
+
|