noe 1.5.0 → 1.5.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.
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -2
- data/Gemfile.lock +3 -2
- data/lib/noe.rbc +393 -0
- data/lib/noe/commons.rbc +1012 -0
- data/lib/noe/config.rbc +1534 -0
- data/lib/noe/ext/array.rbc +330 -0
- data/lib/noe/ext/hash.rbc +1193 -0
- data/lib/noe/go.rbc +5618 -0
- data/lib/noe/help.rbc +473 -0
- data/lib/noe/install.rbc +1521 -0
- data/lib/noe/list.rbc +1692 -0
- data/lib/noe/loader.rb +1 -1
- data/lib/noe/loader.rbc +85 -0
- data/lib/noe/main.rbc +1323 -0
- data/lib/noe/prepare.rb +14 -7
- data/lib/noe/prepare.rbc +1622 -0
- data/lib/noe/show_spec.rbc +627 -0
- data/lib/noe/template.rbc +4256 -0
- data/lib/noe/version.rb +5 -5
- data/lib/noe/version.rbc +350 -0
- data/noe.gemspec +25 -25
- data/noe.noespec +3 -3
- data/spec/fixtures/test.noespec +19 -0
- data/spec/integration/go/go_spec.rbc +236 -0
- data/spec/integration/spaces_spec.rb +30 -0
- data/spec/integration/spaces_spec.rbc +996 -0
- data/spec/integration/spec_helper.rbc +143 -0
- data/spec/unit/config/new_spec.rbc +1590 -0
- data/spec/unit/config/templates_dir_spec.rbc +1398 -0
- data/spec/unit/ext/hash/methodize_spec.rbc +851 -0
- data/spec/unit/ext/hash/noe_merge_spec.rbc +1544 -0
- data/spec/unit/noe_spec.rbc +309 -0
- data/spec/unit/spec_helper.rbc +143 -0
- data/spec/unit/template/entry/infer_wlang_dialect_spec.rbc +1236 -0
- data/spec/unit/template/entry/relocate_spec.rbc +1584 -0
- data/spec/unit/template/entry/rename_one_spec.rbc +1114 -0
- data/tasks/debug_mail.rake +13 -13
- data/tasks/gem.rake +13 -13
- data/tasks/spec_test.rake +10 -10
- data/tasks/unit_test.rake +9 -10
- data/tasks/yard.rake +13 -13
- data/templates/ruby/CHANGELOG.md +5 -0
- data/templates/ruby/README.md +13 -13
- data/templates/ruby/noespec.yaml +48 -48
- data/templates/ruby/short.yaml +10 -10
- data/templates/ruby/src/Gemfile +1 -2
- data/templates/ruby/src/Manifest.txt +1 -1
- data/templates/ruby/src/README.md +0 -1
- data/templates/ruby/src/__lower__.gemspec +24 -24
- data/templates/ruby/src/lib/__lower__.rb +1 -1
- data/templates/ruby/src/lib/__lower__/loader.rb +1 -1
- data/templates/ruby/src/lib/__lower__/version.rb +4 -4
- data/templates/ruby/src/spec/test___lower__.rb +2 -2
- data/templates/ruby/src/tasks/debug_mail.rake +13 -13
- data/templates/ruby/src/tasks/gem.rake +13 -13
- data/templates/ruby/src/tasks/spec_test.rake +9 -9
- data/templates/ruby/src/tasks/unit_test.rake +9 -10
- data/templates/ruby/src/tasks/yard.rake +13 -13
- metadata +125 -75
data/templates/ruby/short.yaml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Don't remove this entry!
|
5
5
|
template-info:
|
6
6
|
name: "!{template_name}"
|
7
|
-
version: 1.5.
|
7
|
+
version: 1.5.1
|
8
8
|
links:
|
9
9
|
source: https://github.com/blambeau/noe/tree/master/templates/ruby
|
10
10
|
documentation: https://github.com/blambeau/noe/blob/master/templates/ruby/README.md
|
@@ -12,17 +12,17 @@ template-info:
|
|
12
12
|
# Update to match your own configuration.
|
13
13
|
variables:
|
14
14
|
# A ruby lower case project name.
|
15
|
-
lower:
|
15
|
+
lower:
|
16
16
|
hello_world
|
17
17
|
|
18
|
-
# A ruby upper case project name.
|
18
|
+
# A ruby upper case project name.
|
19
19
|
upper:
|
20
20
|
HelloWorld
|
21
21
|
|
22
22
|
# Version of your library
|
23
23
|
version:
|
24
24
|
1.0.0
|
25
|
-
|
25
|
+
|
26
26
|
# Project summary (~ 1 line).
|
27
27
|
summary: |-
|
28
28
|
A simple "Hello World" example
|
@@ -32,22 +32,22 @@ variables:
|
|
32
32
|
description: |-
|
33
33
|
This hello_world example provides you all you need to build a ruby gem library
|
34
34
|
while applying skeleton-driven coding with Noe (see http://revision-zero.org/noe)
|
35
|
-
|
36
|
-
# Authors of the project (- {name: Bob, email: bob@gmail.com}, ...)
|
35
|
+
|
36
|
+
# Authors of the project (- {name: Bob, email: bob@gmail.com}, ...)
|
37
37
|
authors: []
|
38
38
|
|
39
|
-
# Web links for the project (- http://..., - http://...).
|
39
|
+
# Web links for the project (- http://..., - http://...).
|
40
40
|
links: []
|
41
41
|
|
42
42
|
# Gem dependencies. (- {name: ..., version: ..., groups: [...]}, ...)
|
43
|
-
dependencies:
|
43
|
+
dependencies:
|
44
44
|
# Rake is required for developers, as usual
|
45
45
|
- {name: rake, version: "~> 0.9.2", groups: [development]}
|
46
46
|
# Bundler is required for developers and is used by the Rakefile
|
47
47
|
- {name: bundler, version: "~> 1.0", groups: [development]}
|
48
|
-
# RSpec is required to run 'rake spec'. See tasks/spec.rake
|
48
|
+
# RSpec is required to run 'rake spec'. See tasks/spec.rake
|
49
49
|
- {name: rspec, version: "~> 2.6.0", groups: [development]}
|
50
|
-
# YARD and BlueCloth are required to run 'rake yard'. See tasks/yard.rake
|
50
|
+
# YARD and BlueCloth are required to run 'rake yard'. See tasks/yard.rake
|
51
51
|
- {name: yard, version: "~> 0.7.2", groups: [development]}
|
52
52
|
- {name: bluecloth, version: "~> 2.1.0", groups: [development]}
|
53
53
|
# wlang is required to run 'rake debug_mail'. See tasks/debug_mail.rake
|
data/templates/ruby/src/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# We require your library, mainly to have access to the VERSION number.
|
1
|
+
# We require your library, mainly to have access to the VERSION number.
|
2
2
|
# Feel free to set $version manually.
|
3
3
|
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
4
|
require "!{lower}/version"
|
@@ -9,15 +9,15 @@ $version = !{upper}::Version.to_s
|
|
9
9
|
# should be correctly packaged given what you have described in the .noespec file.
|
10
10
|
#
|
11
11
|
Gem::Specification.new do |s|
|
12
|
-
|
12
|
+
|
13
13
|
################################################################### ABOUT YOUR GEM
|
14
|
-
|
15
|
-
# Gem name (required)
|
14
|
+
|
15
|
+
# Gem name (required)
|
16
16
|
s.name = +{lower}
|
17
|
-
|
17
|
+
|
18
18
|
# Gem version (required)
|
19
19
|
s.version = $version
|
20
|
-
|
20
|
+
|
21
21
|
# A short summary of this gem
|
22
22
|
#
|
23
23
|
# This is displayed in `gem list -d`.
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
# The description should be more detailed than the summary. For example,
|
29
29
|
# you might wish to copy the entire README into the description.
|
30
30
|
s.description = +{description}
|
31
|
-
|
31
|
+
|
32
32
|
# The URL of this gem home page (optional)
|
33
33
|
s.homepage = +{links.first}
|
34
34
|
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
# you know what you do!
|
39
39
|
#
|
40
40
|
# s.date = Time.now.strftime('%Y-%m-%d')
|
41
|
-
|
41
|
+
|
42
42
|
# The license(s) for the library. Each license must be a short name, no
|
43
43
|
# more than 64 characters.
|
44
44
|
#
|
@@ -49,35 +49,35 @@ Gem::Specification.new do |s|
|
|
49
49
|
# s.rubyforge_project = nil
|
50
50
|
|
51
51
|
################################################################### ABOUT THE AUTHORS
|
52
|
-
|
52
|
+
|
53
53
|
# The list of author names who wrote this gem.
|
54
54
|
#
|
55
55
|
# If you are providing multiple authors and multiple emails they should be
|
56
56
|
# in the same order.
|
57
|
-
#
|
57
|
+
#
|
58
58
|
s.authors = +{authors.collect{|a| a.name}}
|
59
|
-
|
59
|
+
|
60
60
|
# Contact emails for this gem
|
61
61
|
#
|
62
62
|
# If you are providing multiple authors and multiple emails they should be
|
63
63
|
# in the same order.
|
64
64
|
#
|
65
|
-
# NOTE: Somewhat strangly this attribute is always singular!
|
65
|
+
# NOTE: Somewhat strangly this attribute is always singular!
|
66
66
|
# Don't replace by s.emails = ...
|
67
67
|
s.email = +{authors.collect{|a| a.email}}
|
68
68
|
|
69
69
|
################################################################### PATHS, FILES, BINARIES
|
70
|
-
|
71
|
-
# Paths in the gem to add to $LOAD_PATH when this gem is
|
70
|
+
|
71
|
+
# Paths in the gem to add to $LOAD_PATH when this gem is
|
72
72
|
# activated (required).
|
73
73
|
#
|
74
74
|
# The default 'lib' is typically sufficient.
|
75
75
|
s.require_paths = +{gemspec.require_paths}
|
76
|
-
|
76
|
+
|
77
77
|
# Files included in this gem.
|
78
78
|
#
|
79
79
|
# By default, we take all files included in the Manifest.txt file on root
|
80
|
-
# of the project. Entries of the manifest are interpreted as Dir[...]
|
80
|
+
# of the project. Entries of the manifest are interpreted as Dir[...]
|
81
81
|
# patterns so that lazy people may use wilcards like lib/**/*
|
82
82
|
#
|
83
83
|
here = File.expand_path(File.dirname(__FILE__))
|
@@ -107,7 +107,7 @@ Gem::Specification.new do |s|
|
|
107
107
|
# <= Less than or equal to
|
108
108
|
# ~> Approximately greater than
|
109
109
|
#
|
110
|
-
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
110
|
+
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
111
111
|
# for setting your gem version.
|
112
112
|
#
|
113
113
|
# For your requirements to other gems, remember that
|
@@ -119,7 +119,7 @@ Gem::Specification.new do |s|
|
|
119
119
|
|
120
120
|
#
|
121
121
|
# One call to add_dependency('gem_name', 'gem version requirement') for each
|
122
|
-
# runtime dependency. These gems will be installed with your gem.
|
122
|
+
# runtime dependency. These gems will be installed with your gem.
|
123
123
|
# One call to add_development_dependency('gem_name', 'gem version requirement')
|
124
124
|
# for each development dependency. These gems are required for developers
|
125
125
|
#
|
@@ -140,18 +140,18 @@ Gem::Specification.new do |s|
|
|
140
140
|
#
|
141
141
|
# s.platform = nil
|
142
142
|
|
143
|
-
# Extensions to build when installing the gem.
|
143
|
+
# Extensions to build when installing the gem.
|
144
144
|
#
|
145
|
-
# Valid types of extensions are extconf.rb files, configure scripts
|
145
|
+
# Valid types of extensions are extconf.rb files, configure scripts
|
146
146
|
# and rakefiles or mkrf_conf files.
|
147
147
|
#
|
148
148
|
s.extensions = +{gemspec.extensions}
|
149
|
-
|
150
|
-
# External (to RubyGems) requirements that must be met for this gem to work.
|
149
|
+
|
150
|
+
# External (to RubyGems) requirements that must be met for this gem to work.
|
151
151
|
# It’s simply information for the user.
|
152
152
|
#
|
153
153
|
s.requirements = +{gemspec.requirements}
|
154
|
-
|
154
|
+
|
155
155
|
# A message that gets displayed after the gem is installed
|
156
156
|
#
|
157
157
|
# Uncomment and set this if you want to say something to the user
|
@@ -169,7 +169,7 @@ Gem::Specification.new do |s|
|
|
169
169
|
# details.
|
170
170
|
#
|
171
171
|
# s.cert_chain = []
|
172
|
-
|
172
|
+
|
173
173
|
################################################################### RDOC
|
174
174
|
|
175
175
|
# An ARGV style array of options to RDoc
|
@@ -1 +1 @@
|
|
1
|
-
*{dependencies.select{|dep| dep.groups.include?('runtime')} as dep}{require +{dep.name}}{!{"\n"}}
|
1
|
+
*{dependencies.select{|dep| dep.groups.include?('runtime')} as dep}{require +{dep.name}}{!{"\n"}}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module !{upper}
|
2
2
|
module Version
|
3
|
-
|
3
|
+
|
4
4
|
MAJOR = +{version.split('.')[0].to_i}
|
5
5
|
MINOR = +{version.split('.')[1].to_i}
|
6
6
|
TINY = +{version.split('.')[2].to_i}
|
7
|
-
|
7
|
+
|
8
8
|
def self.to_s
|
9
9
|
[ MAJOR, MINOR, TINY ].join('.')
|
10
10
|
end
|
11
|
-
|
12
|
-
end
|
11
|
+
|
12
|
+
end
|
13
13
|
VERSION = Version.to_s
|
14
14
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs a rake task for debuging the announcement mail.
|
2
2
|
#
|
3
3
|
# This file installs the 'rake debug_mail' that flushes an announcement mail
|
4
|
-
# for your library on the standard output. It is automatically generated
|
5
|
-
# by Noe from your .noespec file, and should therefore be configured there,
|
4
|
+
# for your library on the standard output. It is automatically generated
|
5
|
+
# by Noe from your .noespec file, and should therefore be configured there,
|
6
6
|
# under the variables/rake_tasks/debug_mail entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -12,9 +12,9 @@
|
|
12
12
|
# nb_changelog_sections: 1
|
13
13
|
# ...
|
14
14
|
#
|
15
|
-
# If you have specific needs requiring manual intervention on this file,
|
15
|
+
# If you have specific needs requiring manual intervention on this file,
|
16
16
|
# don't forget to set safe-override to false in your noe specification:
|
17
|
-
#
|
17
|
+
#
|
18
18
|
# template-info:
|
19
19
|
# manifest:
|
20
20
|
# tasks/debug_mail.rake:
|
@@ -22,8 +22,8 @@
|
|
22
22
|
#
|
23
23
|
# The mail template used can be found in debug_mail.txt. That file may be
|
24
24
|
# changed to tune the mail you want to send. If you do so, don't forget to
|
25
|
-
# add a manifest entry in your .noespec file to avoid overriding you
|
26
|
-
# changes. The mail template uses wlang, with parentheses for block
|
25
|
+
# add a manifest entry in your .noespec file to avoid overriding you
|
26
|
+
# changes. The mail template uses wlang, with parentheses for block
|
27
27
|
# delimiters.
|
28
28
|
#
|
29
29
|
# template-info:
|
@@ -34,20 +34,20 @@
|
|
34
34
|
begin
|
35
35
|
require 'wlang'
|
36
36
|
require 'yaml'
|
37
|
-
|
37
|
+
|
38
38
|
desc "Debug the release announcement mail"
|
39
|
-
task :debug_mail do
|
39
|
+
task :debug_mail do
|
40
40
|
# Check that a .noespec file exists
|
41
41
|
noespec_file = File.expand_path('../../!{lower}.noespec', __FILE__)
|
42
42
|
unless File.exists?(noespec_file)
|
43
43
|
raise "Unable to find .noespec project file, sorry."
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
# Load it as well as variables and options
|
47
47
|
noespec = YAML::load(File.read(noespec_file))
|
48
48
|
vars = noespec['variables'] || {}
|
49
49
|
|
50
|
-
# Changes are taken from CHANGELOG
|
50
|
+
# Changes are taken from CHANGELOG
|
51
51
|
logs = Dir[File.expand_path("../../CHANGELOG.*", __FILE__)]
|
52
52
|
unless logs.size == 1
|
53
53
|
abort "Unable to find a changelog file"
|
@@ -63,15 +63,15 @@ begin
|
|
63
63
|
changes << line
|
64
64
|
}
|
65
65
|
vars['changes'] = changes.join
|
66
|
-
|
66
|
+
|
67
67
|
# WLang template
|
68
68
|
template = File.expand_path('../debug_mail.txt', __FILE__)
|
69
|
-
|
69
|
+
|
70
70
|
# Let's go!
|
71
71
|
$stdout << WLang::file_instantiate(template, vars, "wlang/active-text")
|
72
72
|
end
|
73
73
|
|
74
|
-
rescue LoadError
|
74
|
+
rescue LoadError
|
75
75
|
task :debug_mail do
|
76
76
|
abort "wlang is not available. Try 'gem install wlang'"
|
77
77
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs rake tasks for gemming and packaging
|
2
2
|
#
|
3
|
-
# This file installs the 'rake package', 'rake gem' tasks and associates
|
4
|
-
# (clobber_package, repackage, ...). It is automatically generated by Noe
|
5
|
-
# from your .noespec file, and should therefore be configured there, under
|
3
|
+
# This file installs the 'rake package', 'rake gem' tasks and associates
|
4
|
+
# (clobber_package, repackage, ...). It is automatically generated by Noe
|
5
|
+
# from your .noespec file, and should therefore be configured there, under
|
6
6
|
# the variables/rake_tasks/gem entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -15,9 +15,9 @@
|
|
15
15
|
# need_zip: false
|
16
16
|
# ...
|
17
17
|
#
|
18
|
-
# If you have specific needs requiring manual intervention on this file,
|
18
|
+
# If you have specific needs requiring manual intervention on this file,
|
19
19
|
# don't forget to set safe-override to false in your noe specification:
|
20
|
-
#
|
20
|
+
#
|
21
21
|
# template-info:
|
22
22
|
# manifest:
|
23
23
|
# tasks/gem.rake:
|
@@ -32,28 +32,28 @@ begin
|
|
32
32
|
|
33
33
|
# Version of the package
|
34
34
|
t.version = $gemspec.version
|
35
|
-
|
35
|
+
|
36
36
|
# Directory used to store the package files
|
37
37
|
t.package_dir = +{rake_tasks.gem.package_dir}
|
38
|
-
|
38
|
+
|
39
39
|
# True if a gzipped tar file (tgz) should be produced
|
40
40
|
t.need_tar = +{rake_tasks.gem.need_tar}
|
41
|
-
|
41
|
+
|
42
42
|
# True if a gzipped tar file (tar.gz) should be produced
|
43
43
|
t.need_tar_gz = +{rake_tasks.gem.need_tar_gz}
|
44
|
-
|
44
|
+
|
45
45
|
# True if a bzip2'd tar file (tar.bz2) should be produced
|
46
46
|
t.need_tar_bz2 = +{rake_tasks.gem.need_tar_bz2}
|
47
|
-
|
47
|
+
|
48
48
|
# True if a zip file should be produced (default is false)
|
49
49
|
t.need_zip = +{rake_tasks.gem.need_zip}
|
50
|
-
|
50
|
+
|
51
51
|
# List of files to be included in the package.
|
52
52
|
t.package_files = $gemspec.files
|
53
|
-
|
53
|
+
|
54
54
|
# Tar command for gzipped or bzip2ed archives.
|
55
55
|
t.tar_command = +{rake_tasks.gem.tar_command}
|
56
|
-
|
56
|
+
|
57
57
|
# Zip command for zipped archives.
|
58
58
|
t.zip_command = +{rake_tasks.gem.zip_command}
|
59
59
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs a rake task for for running examples written using rspec.
|
2
2
|
#
|
3
3
|
# This file installs the 'rake spec_test' (aliased as 'rake spec') as well as
|
4
|
-
# extends 'rake test' to run spec tests, if any. It is automatically generated
|
5
|
-
# by Noe from your .noespec file, and should therefore be configured there,
|
4
|
+
# extends 'rake test' to run spec tests, if any. It is automatically generated
|
5
|
+
# by Noe from your .noespec file, and should therefore be configured there,
|
6
6
|
# under the variables/rake_tasks/spec_test entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -13,16 +13,16 @@
|
|
13
13
|
# rspec_opts: [--color, --backtrace]
|
14
14
|
# ...
|
15
15
|
#
|
16
|
-
# If you have specific needs requiring manual intervention on this file,
|
16
|
+
# If you have specific needs requiring manual intervention on this file,
|
17
17
|
# don't forget to set safe-override to false in your noe specification:
|
18
|
-
#
|
18
|
+
#
|
19
19
|
# template-info:
|
20
20
|
# manifest:
|
21
21
|
# tasks/spec_test.rake:
|
22
22
|
# safe-override: false
|
23
23
|
#
|
24
|
-
# This file has been written to conform to RSpec v2.4.0. More information about
|
25
|
-
# rspec and options of the rake task defined below can be found on
|
24
|
+
# This file has been written to conform to RSpec v2.4.0. More information about
|
25
|
+
# rspec and options of the rake task defined below can be found on
|
26
26
|
# http://relishapp.com/rspec
|
27
27
|
#
|
28
28
|
begin
|
@@ -33,14 +33,14 @@ begin
|
|
33
33
|
t.pattern = +{rake_tasks.spec_test.pattern}
|
34
34
|
|
35
35
|
# By default, if there is a Gemfile, the generated command will include
|
36
|
-
# 'bundle exec'. Set this to true to ignore the presence of a Gemfile,
|
36
|
+
# 'bundle exec'. Set this to true to ignore the presence of a Gemfile,
|
37
37
|
# and not add 'bundle exec' to the command.
|
38
38
|
t.skip_bundler = +{rake_tasks.spec_test.skip_bundler}
|
39
39
|
|
40
40
|
# Name of Gemfile to use
|
41
41
|
t.gemfile = +{rake_tasks.spec_test.gemfile}
|
42
42
|
|
43
|
-
# Whether or not to fail Rake when an error occurs (typically when
|
43
|
+
# Whether or not to fail Rake when an error occurs (typically when
|
44
44
|
# examples fail).
|
45
45
|
t.fail_on_error = +{rake_tasks.spec_test.fail_on_error}
|
46
46
|
|
@@ -60,7 +60,7 @@ begin
|
|
60
60
|
# Command line options to pass to rcov. See 'rcov --help' about this
|
61
61
|
t.rcov_opts = +{rake_tasks.spec_test.rcov_opts}
|
62
62
|
|
63
|
-
# Command line options to pass to ruby. See 'ruby --help' about this
|
63
|
+
# Command line options to pass to ruby. See 'ruby --help' about this
|
64
64
|
t.ruby_opts = +{rake_tasks.spec_test.ruby_opts}
|
65
65
|
|
66
66
|
# Path to rspec
|