architecture-js 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
data/HELP ADDED
@@ -0,0 +1,41 @@
1
+ create Creates a new architecture-js application in the
2
+ current working directory or sub directory within.
3
+
4
+ Arguments:
5
+ application name - Name of the architecture-js application
6
+ subdirectory* - Directory where the application will be
7
+ installed (created if nonexistent)
8
+
9
+ examples:
10
+ architect create myapp
11
+ architect create myapp subdirectory
12
+
13
+ compile Compiles the architecture-js project in the current working directory.
14
+
15
+ Options:
16
+ -c, --compress - Compress output with JsMin
17
+
18
+ example:
19
+ architect compile
20
+
21
+ generate Generates scoffolding from a template.
22
+
23
+ Arguments:
24
+ name - Name of the template to generate
25
+
26
+ Options:
27
+ *Options are arbitrary (optional) arguments specific to templates
28
+ There are two types of options: boolean and named attributes
29
+
30
+ examples:
31
+ architect generate mytemplate -f (boolean arguments use a single "-")
32
+ architect generate mytemplate foo:"Hello" (named arguments can be boolean by passing no value)
33
+ architect genreate mymodule -f foo:"Hello" (combined to generate complex templates)
34
+
35
+ watch Watches the current working directory for file
36
+ changes and compiles when changes are detected.
37
+
38
+ example:
39
+ architect watch
40
+
41
+ * optional argument
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.15
1
+ 0.1.16
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "architecture-js"
8
- s.version = "0.1.15"
8
+ s.version = "0.1.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dayton Nolan"]
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  ".travis.yml",
24
24
  "Gemfile",
25
25
  "Gemfile.lock",
26
+ "HELP",
26
27
  "LICENSE.txt",
27
28
  "README.md",
28
29
  "Rakefile",
@@ -26,7 +26,8 @@ module Architect
26
26
 
27
27
  def run
28
28
  parse_options
29
- self.send(@command)
29
+ self.send(@command) if @command and not @options[:help]
30
+ help unless @command or @options[:help]
30
31
  end
31
32
 
32
33
  def create
@@ -61,7 +62,7 @@ module Architect
61
62
  project.config[:output] = 'compressed' if options[:c] || options[:compress]
62
63
  project.update
63
64
  end
64
-
65
+ #compile
65
66
  def watch
66
67
  require "fssm"
67
68
  path ||= Dir.getwd
@@ -107,7 +108,7 @@ module Architect
107
108
  end
108
109
  end
109
110
  end
110
-
111
+ #watch
111
112
  private
112
113
  def parse_options
113
114
  @options = {}
@@ -130,7 +131,8 @@ module Architect
130
131
  end
131
132
 
132
133
  opts.on('-h', '--help', 'Display help') do
133
- puts 'Show help'
134
+ @options[:help] = true
135
+ help
134
136
  end
135
137
  end.parse!
136
138
 
@@ -139,71 +141,10 @@ module Architect
139
141
  @args.shift # remove command
140
142
  end
141
143
 
142
- def help(command = nil)
143
- help = command || [*@commands, :footer]
144
- [*help].each do |command|
145
- puts @help[command]
146
- end
144
+ def help
145
+ puts File.read("#{ArchitectureJS::base_directory}/HELP")
147
146
  end
148
147
 
149
- def create_help
150
- help = {}
151
- help[:create] = <<-CREATE
152
- create Creates a new architecture-js application in the current working
153
- directory or sub directory within.
154
-
155
- Arguments:
156
- application name - Name of the architecture-js application
157
- subdirectory* - Directory where the application will be
158
- installed (created if nonexistent)
159
-
160
- examples:
161
- architect create myapp
162
- architect create myapp subdirectory
163
- CREATE
164
-
165
- help[:generate] = <<-GEN
166
- generate Generates scoffolding from a template.
167
-
168
- Arguments:
169
- name - Name of the template to generate
170
-
171
- Options:
172
- *Options are arbitrary (optional) arguments specific to templates
173
- There are two types of options: boolean and named attributes
174
-
175
- examples:
176
- architect generate mytemplate -f (boolean arguments use a single "-")
177
- architect generate mytemplate foo:"Hello" (named arguments can be boolean by passing no value)
178
- architect genreate mymodule -f foo:"Hello" (combined to generate complex templates)
179
- GEN
180
-
181
- help[:compile] = <<-COMP
182
- compile Compiles the architecture-js project in the current working directory.
183
-
184
- Options:
185
- -c, --compress - Compress output with JsMin
186
-
187
- example:
188
- architect compile
189
- COMP
190
-
191
- help[:watch] = <<-WATCH
192
- watch Watches the current working directory for file changes and
193
- compiles when changes are detected.
194
-
195
- example:
196
- architect watch
197
- WATCH
198
-
199
- help[:footer] = <<-FOOTER
200
-
201
- * optional argument
202
-
203
- FOOTER
204
-
205
- help
206
- end
207
148
  end
208
149
 
209
150
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: architecture-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fssm
16
- requirement: &70333067834460 !ruby/object:Gem::Requirement
16
+ requirement: &70355134243020 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.2.8.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70333067834460
24
+ version_requirements: *70355134243020
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jsmin
27
- requirement: &70333067830500 !ruby/object:Gem::Requirement
27
+ requirement: &70355134242540 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70333067830500
35
+ version_requirements: *70355134242540
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70333067829920 !ruby/object:Gem::Requirement
38
+ requirement: &70355134242060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.8.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70333067829920
46
+ version_requirements: *70355134242060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70333067829320 !ruby/object:Gem::Requirement
49
+ requirement: &70355134241580 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.0.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70333067829320
57
+ version_requirements: *70355134241580
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70333067828740 !ruby/object:Gem::Requirement
60
+ requirement: &70355134241080 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.8.3
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70333067828740
68
+ version_requirements: *70355134241080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ZenTest
71
- requirement: &70333067828140 !ruby/object:Gem::Requirement
71
+ requirement: &70355134227260 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 4.6.2
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70333067828140
79
+ version_requirements: *70355134227260
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: autotest-growl
82
- requirement: &70333067827600 !ruby/object:Gem::Requirement
82
+ requirement: &70355134226780 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.2.16
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70333067827600
90
+ version_requirements: *70355134226780
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: jsmin
93
- requirement: &70333067827080 !ruby/object:Gem::Requirement
93
+ requirement: &70355134226300 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70333067827080
101
+ version_requirements: *70355134226300
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: fssm
104
- requirement: &70333067826480 !ruby/object:Gem::Requirement
104
+ requirement: &70355134225820 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70333067826480
112
+ version_requirements: *70355134225820
113
113
  description: Architecture.js helps you generate scaffolding, manage third-party packages,
114
114
  compile, and compress your application.
115
115
  email: daytonn@gmail.com
@@ -125,6 +125,7 @@ files:
125
125
  - .travis.yml
126
126
  - Gemfile
127
127
  - Gemfile.lock
128
+ - HELP
128
129
  - LICENSE.txt
129
130
  - README.md
130
131
  - Rakefile
@@ -222,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
222
223
  version: '0'
223
224
  segments:
224
225
  - 0
225
- hash: -3085181538377814237
226
+ hash: 2002242504186936963
226
227
  required_rubygems_version: !ruby/object:Gem::Requirement
227
228
  none: false
228
229
  requirements: