noe 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +27 -0
- data/Gemfile +2 -0
- data/LICENCE.md +22 -0
- data/README.md +111 -45
- data/Rakefile +18 -20
- data/bin/noe +1 -1
- data/lib/noe.rb +7 -21
- data/lib/noe/commons.rb +23 -0
- data/lib/noe/config.yaml +2 -2
- data/lib/noe/ext/array.rb +18 -0
- data/lib/noe/ext/hash.rb +48 -0
- data/lib/noe/go.rb +158 -40
- data/lib/noe/install.rb +13 -7
- data/lib/noe/list.rb +34 -10
- data/lib/noe/loader.rb +67 -0
- data/lib/noe/main.rb +15 -15
- data/lib/noe/prepare.rb +121 -0
- data/lib/noe/show_spec.rb +45 -0
- data/lib/noe/template.rb +84 -4
- data/noe.gemspec +186 -30
- data/spec/ext/hash/methodize_spec.rb +30 -0
- data/spec/noe_spec.rb +4 -0
- data/spec/spec_helper.rb +0 -2
- data/spec/template/entry/infer_wlang_dialect_spec.rb +31 -0
- data/tasks/gem.rake +44 -0
- data/tasks/spec_test.rake +61 -0
- data/tasks/unit_test.rake +56 -0
- data/tasks/yard.rake +36 -0
- data/templates/ruby/CHANGELOG.md +9 -1
- data/templates/ruby/README.md +47 -10
- data/templates/ruby/noespec.yaml +195 -26
- data/templates/ruby/short.yaml +33 -0
- data/templates/ruby/src/Gemfile +2 -0
- data/templates/ruby/src/LICENCE.md +22 -0
- data/templates/ruby/src/Manifest.txt +11 -0
- data/templates/ruby/src/README.md +6 -1
- data/templates/ruby/src/Rakefile +16 -36
- data/templates/ruby/src/__lower__.gemspec +178 -23
- data/templates/ruby/src/lib/__lower__.rb +5 -2
- data/templates/ruby/src/lib/__lower__/loader.rb +65 -0
- data/templates/ruby/src/spec/spec_helper.rb +0 -2
- data/templates/ruby/src/tasks/gem.rake +44 -0
- data/templates/ruby/src/tasks/spec_test.rake +61 -0
- data/templates/ruby/src/tasks/unit_test.rake +56 -0
- data/templates/ruby/src/tasks/yard.rake +36 -0
- metadata +349 -79
- data/LICENCE.txt +0 -20
- data/lib/noe/create.rb +0 -77
- data/templates/ruby/src/LICENCE.txt +0 -20
@@ -0,0 +1,61 @@
|
|
1
|
+
#
|
2
|
+
# Install a rake task for running examples written using rspec.
|
3
|
+
#
|
4
|
+
# More information about rspec: http://relishapp.com/rspec
|
5
|
+
# This file has been written to conform to RSpec v2.4.0
|
6
|
+
#
|
7
|
+
begin
|
8
|
+
require "rspec/core/rake_task"
|
9
|
+
desc "Run RSpec code examples"
|
10
|
+
RSpec::Core::RakeTask.new(:spec_test) do |t|
|
11
|
+
# Glob pattern to match files.
|
12
|
+
t.pattern = 'spec/**/*_spec.rb'
|
13
|
+
|
14
|
+
# By default, if there is a Gemfile, the generated command will include
|
15
|
+
# 'bundle exec'. Set this to true to ignore the presence of a Gemfile,
|
16
|
+
# and not add 'bundle exec' to the command.
|
17
|
+
t.skip_bundler = false
|
18
|
+
|
19
|
+
# Name of Gemfile to use
|
20
|
+
t.gemfile = 'Gemfile'
|
21
|
+
|
22
|
+
# Whether or not to fail Rake when an error occurs (typically when
|
23
|
+
# examples fail).
|
24
|
+
t.fail_on_error = true
|
25
|
+
|
26
|
+
# A message to print to stderr when there are failures.
|
27
|
+
t.failure_message = nil
|
28
|
+
|
29
|
+
# Use verbose output. If this is set to true, the task will print the
|
30
|
+
# executed spec command to stdout.
|
31
|
+
t.verbose = true
|
32
|
+
|
33
|
+
# Use rcov for code coverage?
|
34
|
+
t.rcov = false
|
35
|
+
|
36
|
+
# Path to rcov.
|
37
|
+
t.rcov_path = 'rcov'
|
38
|
+
|
39
|
+
# Command line options to pass to rcov.
|
40
|
+
# See 'rcov --help' about this
|
41
|
+
t.rcov_opts = %w{}
|
42
|
+
|
43
|
+
# Command line options to pass to ruby.
|
44
|
+
# See 'ruby --help' about this
|
45
|
+
t.ruby_opts = %w{}
|
46
|
+
|
47
|
+
# Path to rspec
|
48
|
+
t.rspec_path = 'rspec'
|
49
|
+
|
50
|
+
# Command line options to pass to rspec.
|
51
|
+
# See 'rspec --help' about this
|
52
|
+
t.rspec_opts = %w{--color --backtrace}
|
53
|
+
end
|
54
|
+
rescue LoadError => ex
|
55
|
+
task :spec_test do
|
56
|
+
abort 'rspec is not available. In order to run spec, you must: gem install rspec'
|
57
|
+
end
|
58
|
+
ensure
|
59
|
+
task :spec => [:spec_test]
|
60
|
+
task :test => [:spec_test]
|
61
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#
|
2
|
+
# Install a rake task for running examples written using rspec.
|
3
|
+
#
|
4
|
+
# More information about rspec: http://relishapp.com/rspec
|
5
|
+
# This file has been written to conform to RSpec v2.4.0
|
6
|
+
#
|
7
|
+
begin
|
8
|
+
desc "Lauches unit tests"
|
9
|
+
require 'rake/testtask'
|
10
|
+
Rake::TestTask.new(:unit_test) do |t|
|
11
|
+
|
12
|
+
# List of directories to added to $LOAD_PATH before running the
|
13
|
+
# tests. (default is 'lib')
|
14
|
+
t.libs = %w{ lib }
|
15
|
+
|
16
|
+
# True if verbose test output desired. (default is false)
|
17
|
+
t.verbose = false
|
18
|
+
|
19
|
+
# Test options passed to the test suite. An explicit TESTOPTS=opts
|
20
|
+
# on the command line will override this. (default is NONE)
|
21
|
+
t.options = []
|
22
|
+
|
23
|
+
# Request that the tests be run with the warning flag set.
|
24
|
+
# E.g. warning=true implies "ruby -w" used to run the tests.
|
25
|
+
t.warning = false
|
26
|
+
|
27
|
+
# Glob pattern to match test files. (default is 'test/test*.rb')
|
28
|
+
t.pattern = 'test/test*.rb'
|
29
|
+
|
30
|
+
# Style of test loader to use. Options are:
|
31
|
+
#
|
32
|
+
# * :rake -- Rake provided test loading script (default).
|
33
|
+
# * :testrb -- Ruby provided test loading script.
|
34
|
+
# * :direct -- Load tests using command line loader.
|
35
|
+
#
|
36
|
+
t.loader = :rake
|
37
|
+
|
38
|
+
# Array of commandline options to pass to ruby when running test
|
39
|
+
# loader.
|
40
|
+
t.ruby_opts = []
|
41
|
+
|
42
|
+
# Explicitly define the list of test files to be included in a
|
43
|
+
# test. +list+ is expected to be an array of file names (a
|
44
|
+
# FileList is acceptable). If both +pattern+ and +test_files+ are
|
45
|
+
# used, then the list of test files is the union of the two.
|
46
|
+
t.test_files = nil
|
47
|
+
|
48
|
+
end
|
49
|
+
rescue LoadError => ex
|
50
|
+
task :unit_test do
|
51
|
+
abort 'rspec is not available. In order to run spec, you must: gem install rspec'
|
52
|
+
end
|
53
|
+
ensure
|
54
|
+
task :test => [:unit_test]
|
55
|
+
end
|
56
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# Install a rake task to generate API documentation using
|
3
|
+
# yard.
|
4
|
+
#
|
5
|
+
# More information about yard: http://yardoc.org/
|
6
|
+
# This file has been written to conform to yard v0.6.4
|
7
|
+
#
|
8
|
+
# About project documentation
|
9
|
+
begin
|
10
|
+
require "yard"
|
11
|
+
desc "Generate yard documentation"
|
12
|
+
YARD::Rake::YardocTask.new(:yard) do |t|
|
13
|
+
# Array of options passed to the commandline utility
|
14
|
+
# See 'yardoc --help' about this
|
15
|
+
t.options = %w{--output-dir doc/api - README.md CHANGELOG.md LICENCE.md}
|
16
|
+
|
17
|
+
# Array of ruby source files (and any extra documentation files
|
18
|
+
# separated by '-')
|
19
|
+
t.files = ['lib/**/*.rb']
|
20
|
+
|
21
|
+
# A proc to call before running the task
|
22
|
+
# t.before = proc{ }
|
23
|
+
|
24
|
+
# A proc to call after running the task
|
25
|
+
# r.after = proc{ }
|
26
|
+
|
27
|
+
# An optional lambda to run against all objects being generated.
|
28
|
+
# Any object that the lambda returns false for will be excluded
|
29
|
+
# from documentation.
|
30
|
+
# t.verifier = lambda{|obj| true}
|
31
|
+
end
|
32
|
+
rescue LoadError
|
33
|
+
task :yard do
|
34
|
+
abort 'yard is not available. In order to run yard, you must: gem install yard'
|
35
|
+
end
|
36
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 1
|
8
|
+
- 1
|
7
9
|
- 0
|
8
|
-
|
9
|
-
version: 1.0.0
|
10
|
+
version: 1.1.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Bernard Lambeau
|
@@ -14,99 +15,323 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-15 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: wlang
|
22
22
|
prerelease: false
|
23
|
-
|
23
|
+
name: rake
|
24
|
+
type: :development
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
26
|
none: false
|
25
27
|
requirements:
|
26
|
-
- -
|
28
|
+
- - ~>
|
27
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 49
|
28
31
|
segments:
|
29
32
|
- 0
|
30
|
-
-
|
31
|
-
-
|
32
|
-
version: 0.
|
33
|
-
|
34
|
-
version_requirements: *id001
|
33
|
+
- 8
|
34
|
+
- 7
|
35
|
+
version: 0.8.7
|
36
|
+
requirement: *id001
|
35
37
|
- !ruby/object:Gem::Dependency
|
36
|
-
name: quickl
|
37
38
|
prerelease: false
|
38
|
-
|
39
|
+
name: bundler
|
40
|
+
type: :development
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
42
|
none: false
|
40
43
|
requirements:
|
41
|
-
- -
|
44
|
+
- - ~>
|
42
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 15
|
43
47
|
segments:
|
48
|
+
- 1
|
44
49
|
- 0
|
50
|
+
version: "1.0"
|
51
|
+
requirement: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
prerelease: false
|
54
|
+
name: rspec
|
55
|
+
type: :development
|
56
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 31
|
62
|
+
segments:
|
45
63
|
- 2
|
64
|
+
- 4
|
46
65
|
- 0
|
47
|
-
version:
|
48
|
-
|
49
|
-
version_requirements: *id002
|
66
|
+
version: 2.4.0
|
67
|
+
requirement: *id003
|
50
68
|
- !ruby/object:Gem::Dependency
|
51
|
-
name: rake
|
52
69
|
prerelease: false
|
53
|
-
|
70
|
+
name: yard
|
71
|
+
type: :development
|
72
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
54
73
|
none: false
|
55
74
|
requirements:
|
56
|
-
- -
|
75
|
+
- - ~>
|
57
76
|
- !ruby/object:Gem::Version
|
77
|
+
hash: 15
|
58
78
|
segments:
|
59
79
|
- 0
|
60
|
-
|
61
|
-
|
62
|
-
|
80
|
+
- 6
|
81
|
+
- 4
|
82
|
+
version: 0.6.4
|
83
|
+
requirement: *id004
|
63
84
|
- !ruby/object:Gem::Dependency
|
64
|
-
name: rspec
|
65
85
|
prerelease: false
|
66
|
-
|
86
|
+
name: bluecloth
|
87
|
+
type: :development
|
88
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
67
89
|
none: false
|
68
90
|
requirements:
|
69
|
-
- -
|
91
|
+
- - ~>
|
70
92
|
- !ruby/object:Gem::Version
|
93
|
+
hash: 29
|
71
94
|
segments:
|
72
95
|
- 2
|
73
|
-
- 4
|
74
96
|
- 0
|
75
|
-
|
76
|
-
|
77
|
-
|
97
|
+
- 9
|
98
|
+
version: 2.0.9
|
99
|
+
requirement: *id005
|
78
100
|
- !ruby/object:Gem::Dependency
|
79
|
-
name: yard
|
80
101
|
prerelease: false
|
81
|
-
|
102
|
+
name: wlang
|
103
|
+
type: :runtime
|
104
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
82
105
|
none: false
|
83
106
|
requirements:
|
84
|
-
- -
|
107
|
+
- - ~>
|
85
108
|
- !ruby/object:Gem::Version
|
109
|
+
hash: 55
|
86
110
|
segments:
|
87
111
|
- 0
|
88
|
-
-
|
89
|
-
-
|
90
|
-
version: 0.
|
91
|
-
|
92
|
-
version_requirements: *id005
|
112
|
+
- 10
|
113
|
+
- 0
|
114
|
+
version: 0.10.0
|
115
|
+
requirement: *id006
|
93
116
|
- !ruby/object:Gem::Dependency
|
94
|
-
name: bluecloth
|
95
117
|
prerelease: false
|
96
|
-
|
118
|
+
name: quickl
|
119
|
+
type: :runtime
|
120
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
97
121
|
none: false
|
98
122
|
requirements:
|
99
|
-
- -
|
123
|
+
- - ~>
|
100
124
|
- !ruby/object:Gem::Version
|
125
|
+
hash: 23
|
101
126
|
segments:
|
102
127
|
- 0
|
128
|
+
- 2
|
129
|
+
- 0
|
130
|
+
version: 0.2.0
|
131
|
+
requirement: *id007
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
prerelease: false
|
134
|
+
name: highline
|
135
|
+
type: :runtime
|
136
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
hash: 15
|
142
|
+
segments:
|
143
|
+
- 1
|
103
144
|
- 6
|
104
|
-
-
|
105
|
-
version:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
145
|
+
- 0
|
146
|
+
version: 1.6.0
|
147
|
+
requirement: *id008
|
148
|
+
description: |
|
149
|
+
# Noe - A simple and extensible project generator
|
150
|
+
|
151
|
+
Noe is a tool that generates projects from predefined skeletons (aka project/application
|
152
|
+
templates). Skeletons are designed for building specific products (a ruby library, a static
|
153
|
+
or dynamic web site, ...). Noe instantiates them and helps you maintaining your product
|
154
|
+
via meta-information provided by a .noespec yaml file.
|
155
|
+
|
156
|
+
Noe comes bundled with a skeleton for creating and maintaining a ruby gem. This skeleton
|
157
|
+
is written and maintained to follow ruby best practices and may also be tuned for your own
|
158
|
+
needs. Read more about it and related projects as well as the underlying philosophy in the
|
159
|
+
sections below.
|
160
|
+
|
161
|
+
## Getting started
|
162
|
+
|
163
|
+
[sudo] gem install noe
|
164
|
+
[noe --help]
|
165
|
+
[noe help install]
|
166
|
+
noe install
|
167
|
+
|
168
|
+
Have a loot at ~/.noerc and ~/.noe for configuration and a default ruby template. To
|
169
|
+
instantiate a ruby project simply execute the following commands in turn:
|
170
|
+
|
171
|
+
# Given a template ruby under ~/.noe/ruby, install by default
|
172
|
+
noe prepare --template=ruby foo
|
173
|
+
cd foo
|
174
|
+
|
175
|
+
# Edit the template configuration foo/foo.noespec
|
176
|
+
edit foo/foo.noespec
|
177
|
+
|
178
|
+
# Launch template instantiation
|
179
|
+
noe go
|
180
|
+
|
181
|
+
That's it! But also have a look at 'noe help prepare' and 'not help go' for additional
|
182
|
+
options.
|
183
|
+
|
184
|
+
## Philosophy
|
185
|
+
|
186
|
+
Noe is designed to follow a certain number of good principles and helps you following
|
187
|
+
them as well.
|
188
|
+
|
189
|
+
### Separation of concerns
|
190
|
+
|
191
|
+
Noe maintains a strong separation of concerns. In particular one has to make the distinction
|
192
|
+
between a) Noe itself, b) a skeleton and c) an instantiated product. This fact has two
|
193
|
+
main consequences:
|
194
|
+
|
195
|
+
* Noe itself **is not dedicated to specific products** (like a ruby library). Even if Noe
|
196
|
+
comes bundled with a default skeleton for ruby projects, writing skeletons for something
|
197
|
+
else should not be a problem. In other words, Noe itself is agnostic: the semantics of
|
198
|
+
generated products is the secret of the skeleton, under the responsibility of it's
|
199
|
+
maintainer.
|
200
|
+
|
201
|
+
* Noe **should not be a runtime dependency** of the product. Good skeletons maintain this
|
202
|
+
separation. As an example the default ruby skeleton is strictly independent of Noe itself.
|
203
|
+
Principles discussed below explain why this is important.
|
204
|
+
|
205
|
+
### Master the tools YOU use
|
206
|
+
|
207
|
+
The separation of concerns described previously also drives what you have to learn and what
|
208
|
+
tools you have to master:
|
209
|
+
|
210
|
+
* As an ordinary Noe user (vs. skeleton maintainer) and because Noe itself (unlike skeletons
|
211
|
+
is project agnostic, you only have to know **basic Noe commands** (see 'noe --help') and
|
212
|
+
should never have to study Noe's API and internals. In contrast, you have to **master the
|
213
|
+
tools and best practices of your product's ecosystem**. A good skeleton should help you
|
214
|
+
along this task. As an example, the default ruby skeleton is fully documented to help you
|
215
|
+
gaining understanding of ***rake*, *spec*, *yard*, *bundler*** and so on but **not noe
|
216
|
+
itself**.
|
217
|
+
|
218
|
+
* This explains why Noe itself is not a runtime dependency. Using a particular skeleton
|
219
|
+
already means learning a lot, at least in the long run (see the section about Magic below).
|
220
|
+
Noe avoids interfering with generated products to avoid making the learning curve even
|
221
|
+
worse.
|
222
|
+
|
223
|
+
* Being a skeleton creator/maintainer is another story of course. To write a skeleton you'll
|
224
|
+
also have to learn **Noe's API and internals**. To write a good/reusable one, you'll
|
225
|
+
certainly have to **master the full ecosystem and best practices of the targetted product**,
|
226
|
+
which is a good opportunity for learning and sharing it!
|
227
|
+
|
228
|
+
### Magic Only If Flexible
|
229
|
+
|
230
|
+
"Don't Repeat Yourself" and "Convention over Configuration" are certainly good principles.
|
231
|
+
However tuning, configuration and options exist, are useful and should certainly not be
|
232
|
+
hidden to the user. Instead configuration and options should come with default values,
|
233
|
+
and should be fully documented. Providing magic is great if there is a user-centric way
|
234
|
+
(in contrast to a developer one) of understanding and controlling the magic and underlying
|
235
|
+
assumptions.
|
236
|
+
|
237
|
+
As an example, the default ruby template comes with some magic: you can create a project
|
238
|
+
and immediately invoke 'rake test', 'rake yard', ... and not investigating further. You
|
239
|
+
can also have a look at the _tasks_ folder to understand and control the rake tasks that
|
240
|
+
your project will use... In fact, you **must** investigate: the generated product is yours,
|
241
|
+
not mine and YOU have to master your build chain!
|
242
|
+
|
243
|
+
## Ruby skeleton and Related projects
|
244
|
+
|
245
|
+
Noe is inspired by existing projects, mostly from the ruby community. In particular, the
|
246
|
+
default ruby template has been heavily influenced by the projects below as well as feedback
|
247
|
+
of their authors:
|
248
|
+
|
249
|
+
* [hoe](http://seattlerb.rubyforge.org/hoe/), Ryan Davis and Eric Hodel
|
250
|
+
* [echoe](https://github.com/fauna/echoe), Evan Weaver
|
251
|
+
* [bones](https://github.com/TwP/bones), Tim Pease
|
252
|
+
|
253
|
+
These projects help you generating and maintaining ruby projects (generally gem libraries,
|
254
|
+
in fact). All provide powerful tools that supports you along the different steps of your
|
255
|
+
ruby software lifecycle (creating, testing, releasing, announcing, and so on.). They mostly
|
256
|
+
differ in the way you can tune/configure the generated project for specific needs.
|
257
|
+
|
258
|
+
These projects differ from the Ruby skeleton proposed by Noe in that they use a control
|
259
|
+
approach (rake tasks installed in your project via a development/runtime dependency) while
|
260
|
+
Noe uses a generative approach (the generated ruby project and rake tasks do not depend on
|
261
|
+
Noe at all).
|
262
|
+
|
263
|
+
You'll find more information about the Noe's ruby skeleton in it's own
|
264
|
+
[README](https://github.com/blambeau/noe/blob/master/templates/ruby/README.md).
|
265
|
+
|
266
|
+
## Short guide for template maintainers
|
267
|
+
|
268
|
+
Under ~/.noe, a valid template folder (say xxx) has the following structure
|
269
|
+
|
270
|
+
xxx # Template name
|
271
|
+
README(.md|.txt|...) # Information about the template and it's usage
|
272
|
+
CHANGELOG(.md|.txt|...) # Change information
|
273
|
+
noespec.yaml # Template specification
|
274
|
+
src # Source folder, contains files to be instantiated
|
275
|
+
... # [everything that will be instantiated]
|
276
|
+
|
277
|
+
### noespec.yaml
|
278
|
+
|
279
|
+
The noespec.yaml file of a template is used to formally describe the template. When a
|
280
|
+
project (say foo) is created (see 'noe prepare') using a template (say ruby) the file
|
281
|
+
~/.noe/ruby/noespec.yaml is used to generate foo/foo.noespec. The later is then used
|
282
|
+
by 'noe go' to instantiate the project.
|
283
|
+
|
284
|
+
The noespec.yaml file should ressemble something like this:
|
285
|
+
|
286
|
+
# DO NOT TOUCH 'name' entry and specify the other
|
287
|
+
template-info:
|
288
|
+
name: !{template_name}
|
289
|
+
summary: ...
|
290
|
+
description: ...
|
291
|
+
version: ...
|
292
|
+
author: ...
|
293
|
+
|
294
|
+
#
|
295
|
+
# The following is a hash of template-related variables. They are
|
296
|
+
# used to provide dynamic file names and instantiate file contents.
|
297
|
+
#
|
298
|
+
# Current version of Noe only supports variable names matching /[a-z]+/
|
299
|
+
#
|
300
|
+
variables:
|
301
|
+
...
|
302
|
+
|
303
|
+
Have a look at ~/.noe/ruby/noespec.yaml and ~/.noe/ruby/src for an example.
|
304
|
+
|
305
|
+
### Instantiation process
|
306
|
+
|
307
|
+
The instantiation process is really simple. Given the variables described in the
|
308
|
+
noespec.yaml file (for which values are specified in your .noespec file) templates
|
309
|
+
can use the following meta-constructions:
|
310
|
+
|
311
|
+
* Template files and directories containing `__variable__` in their name are automatically
|
312
|
+
renamed (`__variable__` is replaced by the corresponding value).
|
313
|
+
* All template files are instantiated by [wlang](https://github.com/blambeau/wlang). You
|
314
|
+
don't have to know wlang in depth. You simply have to know that `!{ruby_expression}` in
|
315
|
+
a file is replaced by the expression evaluation. Variables are automatically in scope
|
316
|
+
of such expressions, so that `!{variable}` is replaced by its value.
|
317
|
+
|
318
|
+
## Contributing
|
319
|
+
|
320
|
+
Fork Noe on github! I'm particularly interested in the following enhancements:
|
321
|
+
|
322
|
+
* Extend test coverage, which is ugly so far.
|
323
|
+
* Enhance the default ruby template, but remember "documentation matters, not magic!"
|
324
|
+
* Add support for other generators than _wlang_
|
325
|
+
* Add support for multi-generated files from arrays in .noespec files
|
326
|
+
* ...
|
327
|
+
|
328
|
+
If you think that your template is worth considering for (ruby, rails, js, latex, or
|
329
|
+
anything else) please let me known and I'll add it to the list below.
|
330
|
+
|
331
|
+
* ...
|
332
|
+
|
333
|
+
email:
|
334
|
+
- blambeau@gmail.com
|
110
335
|
executables:
|
111
336
|
- noe
|
112
337
|
extensions: []
|
@@ -114,44 +339,82 @@ extensions: []
|
|
114
339
|
extra_rdoc_files:
|
115
340
|
- README.md
|
116
341
|
- CHANGELOG.md
|
342
|
+
- LICENCE.md
|
117
343
|
files:
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
- lib/noe/
|
123
|
-
- lib/noe/
|
124
|
-
- lib/noe/
|
125
|
-
- lib/noe/
|
126
|
-
- lib/noe/
|
127
|
-
- lib/noe/
|
128
|
-
- lib/noe/
|
129
|
-
- lib/noe.rb
|
344
|
+
- ./noe.gemspec
|
345
|
+
- ./CHANGELOG.md
|
346
|
+
- ./Gemfile
|
347
|
+
- ./bin/noe
|
348
|
+
- ./lib/noe/commons.rb
|
349
|
+
- ./lib/noe/config.rb
|
350
|
+
- ./lib/noe/config.yaml
|
351
|
+
- ./lib/noe/ext/array.rb
|
352
|
+
- ./lib/noe/ext/hash.rb
|
353
|
+
- ./lib/noe/go.rb
|
354
|
+
- ./lib/noe/help.rb
|
355
|
+
- ./lib/noe/install.rb
|
356
|
+
- ./lib/noe/list.rb
|
357
|
+
- ./lib/noe/loader.rb
|
358
|
+
- ./lib/noe/main.rb
|
359
|
+
- ./lib/noe/prepare.rb
|
360
|
+
- ./lib/noe/show_spec.rb
|
361
|
+
- ./lib/noe/template.rb
|
362
|
+
- ./lib/noe.rb
|
363
|
+
- ./LICENCE.md
|
364
|
+
- ./Rakefile
|
365
|
+
- ./README.md
|
366
|
+
- ./spec/ext/hash/methodize_spec.rb
|
367
|
+
- ./spec/noe_spec.rb
|
368
|
+
- ./spec/spec_helper.rb
|
369
|
+
- ./spec/template/entry/infer_wlang_dialect_spec.rb
|
370
|
+
- ./spec/template/entry/relocate_spec.rb
|
371
|
+
- ./spec/template/entry/rename_one_spec.rb
|
372
|
+
- ./tasks/gem.rake
|
373
|
+
- ./tasks/spec_test.rake
|
374
|
+
- ./tasks/unit_test.rake
|
375
|
+
- ./tasks/yard.rake
|
376
|
+
- ./templates/ruby/CHANGELOG.md
|
377
|
+
- ./templates/ruby/noespec.yaml
|
378
|
+
- ./templates/ruby/README.md
|
379
|
+
- ./templates/ruby/short.yaml
|
380
|
+
- ./templates/ruby/src/__lower__.gemspec
|
381
|
+
- ./templates/ruby/src/CHANGELOG.md
|
382
|
+
- ./templates/ruby/src/Gemfile
|
383
|
+
- ./templates/ruby/src/lib/__lower__/loader.rb
|
384
|
+
- ./templates/ruby/src/lib/__lower__.rb
|
385
|
+
- ./templates/ruby/src/LICENCE.md
|
386
|
+
- ./templates/ruby/src/Manifest.txt
|
387
|
+
- ./templates/ruby/src/Rakefile
|
388
|
+
- ./templates/ruby/src/README.md
|
389
|
+
- ./templates/ruby/src/spec/__lower___spec.rb
|
390
|
+
- ./templates/ruby/src/spec/spec_helper.rb
|
391
|
+
- ./templates/ruby/src/tasks/gem.rake
|
392
|
+
- ./templates/ruby/src/tasks/spec_test.rake
|
393
|
+
- ./templates/ruby/src/tasks/unit_test.rake
|
394
|
+
- ./templates/ruby/src/tasks/yard.rake
|
395
|
+
- spec/ext/hash/methodize_spec.rb
|
130
396
|
- spec/noe_spec.rb
|
131
397
|
- spec/spec_helper.rb
|
398
|
+
- spec/template/entry/infer_wlang_dialect_spec.rb
|
132
399
|
- spec/template/entry/relocate_spec.rb
|
133
400
|
- spec/template/entry/rename_one_spec.rb
|
134
|
-
-
|
135
|
-
- templates/ruby/noespec.yaml
|
136
|
-
- templates/ruby/README.md
|
137
|
-
- templates/ruby/src/__lower__.gemspec
|
138
|
-
- templates/ruby/src/CHANGELOG.md
|
139
|
-
- templates/ruby/src/lib/__lower__.rb
|
140
|
-
- templates/ruby/src/LICENCE.txt
|
141
|
-
- templates/ruby/src/Rakefile
|
142
|
-
- templates/ruby/src/README.md
|
143
|
-
- templates/ruby/src/spec/__lower___spec.rb
|
144
|
-
- templates/ruby/src/spec/spec_helper.rb
|
145
|
-
- noe.gemspec
|
146
|
-
- Rakefile
|
401
|
+
- bin/noe
|
147
402
|
- README.md
|
148
403
|
- CHANGELOG.md
|
149
|
-
- LICENCE.
|
404
|
+
- LICENCE.md
|
150
405
|
has_rdoc: true
|
151
406
|
homepage: http://github.com/blambeau/noe
|
152
407
|
licenses: []
|
153
408
|
|
154
|
-
post_install_message:
|
409
|
+
post_install_message: |
|
410
|
+
Noe successfully installed!
|
411
|
+
|
412
|
+
What's next?
|
413
|
+
- 'noe help install' for configuration and default templates
|
414
|
+
- 'noe prepare --template=ruby hello_world'
|
415
|
+
|
416
|
+
Thank you for using Noe, enjoy!
|
417
|
+
|
155
418
|
rdoc_options: []
|
156
419
|
|
157
420
|
require_paths:
|
@@ -161,6 +424,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
424
|
requirements:
|
162
425
|
- - ">="
|
163
426
|
- !ruby/object:Gem::Version
|
427
|
+
hash: 3
|
164
428
|
segments:
|
165
429
|
- 0
|
166
430
|
version: "0"
|
@@ -169,15 +433,21 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
433
|
requirements:
|
170
434
|
- - ">="
|
171
435
|
- !ruby/object:Gem::Version
|
436
|
+
hash: 3
|
172
437
|
segments:
|
173
438
|
- 0
|
174
439
|
version: "0"
|
175
440
|
requirements: []
|
176
441
|
|
177
442
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.
|
443
|
+
rubygems_version: 1.4.2
|
179
444
|
signing_key:
|
180
445
|
specification_version: 3
|
181
|
-
summary: Noe
|
182
|
-
test_files:
|
183
|
-
|
446
|
+
summary: Noe is a tool that generates projects from predefined skeletons (aka project/application templates). Skeletons are designed for building specific products (a ruby library, a static or dynamic web site, ...). Noe instantiates them and helps you maintaining your product via meta-information provided by a .noespec yaml file.
|
447
|
+
test_files:
|
448
|
+
- spec/ext/hash/methodize_spec.rb
|
449
|
+
- spec/noe_spec.rb
|
450
|
+
- spec/spec_helper.rb
|
451
|
+
- spec/template/entry/infer_wlang_dialect_spec.rb
|
452
|
+
- spec/template/entry/relocate_spec.rb
|
453
|
+
- spec/template/entry/rename_one_spec.rb
|