aspen 0.1.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.
- checksums.yaml +15 -0
- data/bin/aspen +4 -0
- data/lib/aspen.rb +56 -0
- metadata +63 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YTA5N2Q5NWMzMTZhMTcyYzdmOTJkZjFmMDQ4OWYwZWQ0MzQ1YzA3NA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OTg4MzNjY2MwMzU5MzQ3YWU1NWI1ZWRmMGI1NzQwYzAyZmI4YjAxZQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTk0NTAwMmRkMDRkZjhmMTI2M2UyMjUxMzhlNjM4Yzg1MzY2YzRkZTYxMWMy
|
10
|
+
OGQ0OGNiZTE0YjAwZDM2NTE1MWVhOWM5MGVmNzA1MjdjNGE4MTM5MGNlYTcy
|
11
|
+
Zjg1YzQ4ZDg5NDRkZjY2NzAxZTg3MzE3YjJlOGFmYTBmOTFlMmE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MTU0ZjYzMTMwN2JjMDAzNjI3Zjk1MDcwYzg3YTAwNDZlZWYwOWNiYTY3NjUw
|
14
|
+
NDFkYjhmMjY4Mjc1MWJlNWU0MGQ5YmRjZGY3MWNhN2I1OWRjNTcxMWQ5ODNk
|
15
|
+
YWI2NWQ3YjUxZjcwNzZlYTQ4ZGY4OTllYTc1NjdkNzgyMjBiZDU=
|
data/bin/aspen
ADDED
data/lib/aspen.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'rspec'
|
3
|
+
|
4
|
+
class Aspen
|
5
|
+
|
6
|
+
# Aspen.run("roman numerals -s")
|
7
|
+
# Aspen.run("roman_numerals -s")
|
8
|
+
|
9
|
+
def self.method_missing(method, *args, &block)
|
10
|
+
puts "Invalid command - try again."
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.run(args)
|
14
|
+
return method_missing(:run, args) if args == nil
|
15
|
+
@@root_name = sterilize_project_name(args.join(" "))
|
16
|
+
return if @@root_name == nil
|
17
|
+
FileUtils.mkdir_p("#{@@root_name}", :verbose => true)
|
18
|
+
FileUtils.mkdir_p("#{@@root_name}/lib/models", :verbose => true) # models go here!
|
19
|
+
FileUtils.mkdir_p("#{@@root_name}/lib/concerns", :verbose => true) # modules go here!
|
20
|
+
FileUtils.mkdir_p("#{@@root_name}/bin", :verbose => true)
|
21
|
+
#FileUtils.mkdir_p("#{@@root_name}/spec", :verbose => true)
|
22
|
+
FileUtils.mkdir_p("#{@@root_name}/config", :verbose => true)
|
23
|
+
rspec_init
|
24
|
+
make_files
|
25
|
+
successful_creation
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.rspec_init
|
29
|
+
current = FileUtils.pwd()
|
30
|
+
FileUtils.cd("#{@@root_name}")
|
31
|
+
system('rspec --init')
|
32
|
+
FileUtils.cd(current)
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.successful_creation
|
36
|
+
puts "Project successfully created at: #{Dir.pwd}/#{@@root_name}"
|
37
|
+
# puts "Would you like to navigate into #{@@root_name}? [y/n] "
|
38
|
+
# response = $stdin.gets.strip.downcase
|
39
|
+
# if response == "y"
|
40
|
+
# system ruby -e "Dir.chdir(#{@@root_name}); system 'bash'"
|
41
|
+
# end
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.make_files
|
45
|
+
FileUtils.touch("#{@@root_name}/README.md") #README
|
46
|
+
FileUtils.touch("#{@@root_name}/config/environment.rb") #environment
|
47
|
+
end
|
48
|
+
|
49
|
+
def self.sterilize_project_name(string)
|
50
|
+
if string.match(/[^\w|\s|\-|.]|\d/)
|
51
|
+
puts "Invalid project name"
|
52
|
+
else
|
53
|
+
string.strip.downcase.gsub(" ", "-").gsub("_", "-")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aspen
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Logan Hasson
|
8
|
+
- Josh Scaglione
|
9
|
+
- Ivan Brennan
|
10
|
+
- Matt Campbell
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2013-10-16 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rspec
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Sets up a simple directory tree for Ruby projects
|
31
|
+
email: teamevalruby@gmail.com
|
32
|
+
executables:
|
33
|
+
- aspen
|
34
|
+
extensions: []
|
35
|
+
extra_rdoc_files: []
|
36
|
+
files:
|
37
|
+
- lib/aspen.rb
|
38
|
+
- bin/aspen
|
39
|
+
homepage: http://rubygems.org/gems/aspen
|
40
|
+
licenses:
|
41
|
+
- MIT
|
42
|
+
metadata: {}
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ! '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubyforge_project:
|
59
|
+
rubygems_version: 2.0.7
|
60
|
+
signing_key:
|
61
|
+
specification_version: 4
|
62
|
+
summary: aspen gem
|
63
|
+
test_files: []
|