start_project 0.0.6 → 0.0.7
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.
- data/lib/start_project/config.yaml +3 -1
- data/lib/start_project/options.rb +18 -9
- metadata +7 -12
@@ -1,4 +1,6 @@
|
|
1
1
|
---
|
2
2
|
!ruby/sym html5: 'https://github.com/h5bp/html5-boilerplate/zipball/master'
|
3
3
|
!ruby/sym bootstrap: 'https://github.com/twitter/bootstrap/zipball/master'
|
4
|
-
|
4
|
+
!ruby/sym gs960: 'https://github.com/nathansmith/960-Grid-System/zipball/master'
|
5
|
+
!ruby/sym andup320: 'https://github.com/malarkey/320andup/zipball/master'
|
6
|
+
!ruby/sym mass: 'https://github.com/RubyLouvre/mass-Framework/zipball/master'
|
@@ -3,21 +3,26 @@ require 'yaml'
|
|
3
3
|
|
4
4
|
module StartProject
|
5
5
|
class Options
|
6
|
-
# TODO
|
7
|
-
# 1. Create a class to store/read from YAML, all the different frameworks possible
|
8
|
-
# 2. Clean up the unpacking - Done
|
9
|
-
# 3. Create Tests
|
10
|
-
# 4. Write documentation
|
11
6
|
|
7
|
+
# Read the arguments from the command line and parse them out
|
12
8
|
|
13
|
-
|
9
|
+
# project_uri stores the url of the framework
|
14
10
|
attr_reader :project_uri
|
11
|
+
|
12
|
+
# project_name stores the name of the folder that the final project will live in
|
15
13
|
attr_reader :project_name
|
14
|
+
|
15
|
+
# frameworks stores the framework details loaded from the config.yaml
|
16
16
|
attr_reader :frameworks
|
17
|
-
|
17
|
+
|
18
|
+
|
19
|
+
# = initialize
|
20
|
+
# Initializes the options object, loads the config.yaml that stores all the frameworks available
|
21
|
+
# and sets a default framework: html5 boilerplate.
|
22
|
+
# Finally, it calls the parse method.
|
18
23
|
def initialize(argv)
|
19
24
|
@frameworks = begin
|
20
|
-
|
25
|
+
YAML.load_file(File.join(File.dirname(__FILE__),'config.yaml'))
|
21
26
|
rescue ArgumentError => e
|
22
27
|
puts "Could not parse YAML #{e.message}"
|
23
28
|
end
|
@@ -26,7 +31,11 @@ module StartProject
|
|
26
31
|
parse(argv)
|
27
32
|
end
|
28
33
|
|
29
|
-
|
34
|
+
# = parse
|
35
|
+
# This method reads the options from the command line and acts apropriately.
|
36
|
+
# If the user specifies a type (-t or --type), it sets the @project_uri to the location of the framework on the Internet.
|
37
|
+
# If the user specifies a name (-n or --name), it sets the @project_name.
|
38
|
+
private
|
30
39
|
def parse(argv)
|
31
40
|
OptionParser.new do |opts|
|
32
41
|
opts.banner = "Usage: ProjectStart -t [ html5 | bootstrap] -n projectName"
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: start_project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
8
|
+
- 7
|
9
|
+
version: 0.0.7
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Aonghus Flynn
|
@@ -15,17 +14,16 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2012-08-28 00:00:00
|
17
|
+
date: 2012-08-28 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rubyzip
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 3
|
29
27
|
segments:
|
30
28
|
- 0
|
31
29
|
version: "0"
|
@@ -55,6 +53,7 @@ files:
|
|
55
53
|
- lib/start_project/runner.rb
|
56
54
|
- bin/ProjectStart
|
57
55
|
- lib/start_project/config.yaml
|
56
|
+
has_rdoc: true
|
58
57
|
homepage: http://rubygems.org/gems/start_project
|
59
58
|
licenses: []
|
60
59
|
|
@@ -64,29 +63,25 @@ rdoc_options: []
|
|
64
63
|
require_paths:
|
65
64
|
- lib
|
66
65
|
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
66
|
requirements:
|
69
67
|
- - ">="
|
70
68
|
- !ruby/object:Gem::Version
|
71
|
-
hash: 57
|
72
69
|
segments:
|
73
70
|
- 1
|
74
71
|
- 8
|
75
72
|
- 7
|
76
73
|
version: 1.8.7
|
77
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
75
|
requirements:
|
80
76
|
- - ">="
|
81
77
|
- !ruby/object:Gem::Version
|
82
|
-
hash: 3
|
83
78
|
segments:
|
84
79
|
- 0
|
85
80
|
version: "0"
|
86
81
|
requirements: []
|
87
82
|
|
88
83
|
rubyforge_project:
|
89
|
-
rubygems_version: 1.
|
84
|
+
rubygems_version: 1.3.6
|
90
85
|
signing_key:
|
91
86
|
specification_version: 3
|
92
87
|
summary: Create html projects
|