sinbad 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/sinbad +48 -0
  3. data/sinbad.gemspec +3 -2
  4. metadata +6 -6
  5. data/.Rakefile.swp +0 -0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
data/bin/sinbad ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+ require 'fileutils'
4
+
5
+ def create_directories(root_directory)
6
+ Dir::mkdir(root_directory)
7
+ puts "Created #{root_directory}"
8
+
9
+ Dir::mkdir(root_directory + "/config")
10
+
11
+ Dir::mkdir(root_directory + "/public")
12
+
13
+ Dir::mkdir(root_directory + "/public/images")
14
+
15
+ Dir::mkdir(root_directory + "/public/javascripts")
16
+
17
+ Dir::mkdir(root_directory + "/public/stylesheets")
18
+
19
+ Dir::mkdir(root_directory + "/views")
20
+ end
21
+ OptionParser.new do |options|
22
+ options.banner = "Usage: #{File.basename($0)} [path]"
23
+
24
+ options.on("-h", "--help", "Displays this help info") do
25
+ puts options
26
+ exit 0
27
+ end
28
+
29
+ begin
30
+ options.parse!(ARGV)
31
+ rescue OptionParser::ParseError => e
32
+ warn e.message
33
+ puts options
34
+ exit 1
35
+ end
36
+
37
+ # Quick ARGV check
38
+ if ARGV.empty?
39
+ abort "No directory specified!"
40
+ elsif File.exists?(ARGV.first)
41
+ abort "Directory already exists"
42
+ elsif ARGV.length > 1
43
+ abort "I don't think you meant to do that..."
44
+ end
45
+
46
+ create_directories(ARGV.first)
47
+ end
48
+
data/sinbad.gemspec CHANGED
@@ -5,19 +5,19 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinbad}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Lee Turner}]
12
12
  s.date = %q{2011-08-28}
13
13
  s.description = %q{A simple framework and set of helpers for sinatra projects}
14
14
  s.email = %q{lvturner@gmail.com}
15
+ s.executables = [%q{sinbad}]
15
16
  s.extra_rdoc_files = [
16
17
  "LICENSE.txt",
17
18
  "README.rdoc"
18
19
  ]
19
20
  s.files = [
20
- ".Rakefile.swp",
21
21
  ".document",
22
22
  "Gemfile",
23
23
  "Gemfile.lock",
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  "README.rdoc",
26
26
  "Rakefile",
27
27
  "VERSION",
28
+ "bin/sinbad",
28
29
  "lib/sinbad.rb",
29
30
  "sinbad.gemspec",
30
31
  "test/helper.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinbad
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 0
10
- version: 0.0.0
9
+ - 1
10
+ version: 0.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lee Turner
@@ -126,15 +126,14 @@ dependencies:
126
126
  prerelease: false
127
127
  description: A simple framework and set of helpers for sinatra projects
128
128
  email: lvturner@gmail.com
129
- executables: []
130
-
129
+ executables:
130
+ - sinbad
131
131
  extensions: []
132
132
 
133
133
  extra_rdoc_files:
134
134
  - LICENSE.txt
135
135
  - README.rdoc
136
136
  files:
137
- - .Rakefile.swp
138
137
  - .document
139
138
  - Gemfile
140
139
  - Gemfile.lock
@@ -142,6 +141,7 @@ files:
142
141
  - README.rdoc
143
142
  - Rakefile
144
143
  - VERSION
144
+ - bin/sinbad
145
145
  - lib/sinbad.rb
146
146
  - sinbad.gemspec
147
147
  - test/helper.rb
data/.Rakefile.swp DELETED
Binary file