noe 1.0.0
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 +5 -0
- data/LICENCE.txt +20 -0
- data/README.md +117 -0
- data/Rakefile +24 -0
- data/bin/noe +5 -0
- data/lib/noe.rb +39 -0
- data/lib/noe/commons.rb +18 -0
- data/lib/noe/config.rb +60 -0
- data/lib/noe/config.yaml +29 -0
- data/lib/noe/create.rb +77 -0
- data/lib/noe/go.rb +194 -0
- data/lib/noe/help.rb +26 -0
- data/lib/noe/install.rb +89 -0
- data/lib/noe/list.rb +39 -0
- data/lib/noe/main.rb +79 -0
- data/lib/noe/template.rb +144 -0
- data/noe.gemspec +36 -0
- data/spec/noe_spec.rb +8 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/template/entry/relocate_spec.rb +41 -0
- data/spec/template/entry/rename_one_spec.rb +31 -0
- data/templates/ruby/CHANGELOG.md +3 -0
- data/templates/ruby/README.md +24 -0
- data/templates/ruby/noespec.yaml +32 -0
- data/templates/ruby/src/CHANGELOG.md +5 -0
- data/templates/ruby/src/LICENCE.txt +20 -0
- data/templates/ruby/src/README.md +3 -0
- data/templates/ruby/src/Rakefile +42 -0
- data/templates/ruby/src/__lower__.gemspec +31 -0
- data/templates/ruby/src/lib/__lower__.rb +6 -0
- data/templates/ruby/src/spec/__lower___spec.rb +8 -0
- data/templates/ruby/src/spec/spec_helper.rb +4 -0
- metadata +183 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path('../../../spec_helper', __FILE__)
|
2
|
+
module Noe
|
3
|
+
describe "Template::Entry#rename_one" do
|
4
|
+
|
5
|
+
let(:template){
|
6
|
+
Template.new(File.expand_path('../../../../templates/ruby', __FILE__))
|
7
|
+
}
|
8
|
+
let(:vars){
|
9
|
+
{"lower" => "project"}
|
10
|
+
}
|
11
|
+
subject{
|
12
|
+
entry.rename_one(vars)
|
13
|
+
}
|
14
|
+
|
15
|
+
describe "when nothing has to change" do
|
16
|
+
let(:entry){ template.entry("project") }
|
17
|
+
it { should == "project" }
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "when exactly a replacement" do
|
21
|
+
let(:entry){ template.entry("__lower__") }
|
22
|
+
it { should == "project" }
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "when a replacement inside something else" do
|
26
|
+
let(:entry){ template.entry("__lower___spec.rb") }
|
27
|
+
it { should == "project_spec.rb" }
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end # module Noe
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Noe template for ruby projects
|
2
|
+
|
3
|
+
This is my Noe template for ruby projects. Once generated you'll have a fresh new ruby project
|
4
|
+
that works, supports unit and spec tests and so on!
|
5
|
+
|
6
|
+
## Install
|
7
|
+
|
8
|
+
* copy the whole folder in ~/.noe
|
9
|
+
|
10
|
+
## Instantiation
|
11
|
+
|
12
|
+
noe create --ruby foo
|
13
|
+
cd foo
|
14
|
+
edit foo.noespec
|
15
|
+
noe go
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
# Run spec tests
|
20
|
+
rake spec
|
21
|
+
|
22
|
+
# Generate gem
|
23
|
+
rake gem
|
24
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Following entries are maintained by Noe itself. Do not touch if not sure!
|
2
|
+
template-info:
|
3
|
+
name:
|
4
|
+
!{template_name}
|
5
|
+
description:
|
6
|
+
Noe spec for small ruby projects
|
7
|
+
version:
|
8
|
+
1.0.0
|
9
|
+
author:
|
10
|
+
Bernard Lambeau <blambeau@gmail.com>
|
11
|
+
|
12
|
+
# The following entries are template-related variables. Update
|
13
|
+
# to match your own configuration.
|
14
|
+
variables:
|
15
|
+
# A ruby lower case project name
|
16
|
+
lower:
|
17
|
+
hello_world
|
18
|
+
# A ruby upper case project name
|
19
|
+
upper:
|
20
|
+
HelloWorld
|
21
|
+
# Author of the project
|
22
|
+
author:
|
23
|
+
Bernard Lambeau
|
24
|
+
# Email of the author
|
25
|
+
email:
|
26
|
+
blambeau@gmail.com
|
27
|
+
# Project's homepage
|
28
|
+
homepage:
|
29
|
+
http://github.com/blambeau/noe
|
30
|
+
# Project description
|
31
|
+
description:
|
32
|
+
HelloWorld - A simple example for Noe project generator
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) !{Time.now.strftime('%Y')} - !{author}
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# We run tests by default
|
2
|
+
task :default => :spec
|
3
|
+
|
4
|
+
### About project tests
|
5
|
+
begin
|
6
|
+
require "rspec/core/rake_task"
|
7
|
+
|
8
|
+
desc "Run all examples"
|
9
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
10
|
+
t.rspec_opts = %w[--color]
|
11
|
+
t.verbose = false
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
end
|
15
|
+
|
16
|
+
# About project documentation
|
17
|
+
begin
|
18
|
+
require "yard"
|
19
|
+
|
20
|
+
desc "Generate yard documentation"
|
21
|
+
YARD::Rake::YardocTask.new do |t|
|
22
|
+
t.files = ['lib/**/*.rb']
|
23
|
+
t.options = ['--output-dir', 'doc/api', '-', "README.md", "CHANGELOG.md"]
|
24
|
+
end
|
25
|
+
rescue LoadError
|
26
|
+
end
|
27
|
+
|
28
|
+
# About project packaging
|
29
|
+
begin
|
30
|
+
require "rake/gempackagetask"
|
31
|
+
|
32
|
+
# Dynamically load the gem spec
|
33
|
+
spec_file = File.expand_path('../!{lower}.gemspec', __FILE__)
|
34
|
+
spec = Kernel.eval(File.read(spec_file))
|
35
|
+
|
36
|
+
# Everything looks fine, add the gem task
|
37
|
+
desc "Create the .gem package"
|
38
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
39
|
+
pkg.need_tar = true
|
40
|
+
end
|
41
|
+
rescue LoadError
|
42
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path('../lib/!{lower}', __FILE__)
|
2
|
+
spec = Gem::Specification.new do |s|
|
3
|
+
s.name = %q{!{lower}}
|
4
|
+
s.version = !{upper}::VERSION.dup
|
5
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
6
|
+
|
7
|
+
s.author = %q{!{author}}
|
8
|
+
s.email = %q{!{email}}
|
9
|
+
|
10
|
+
s.description = %q{!{description}}
|
11
|
+
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.bindir = 'bin'
|
14
|
+
s.executables = []
|
15
|
+
|
16
|
+
s.has_rdoc = true
|
17
|
+
s.extra_rdoc_files = ["README.md", "CHANGELOG.md"]
|
18
|
+
|
19
|
+
s.files =
|
20
|
+
Dir['lib/**/*'] +
|
21
|
+
Dir['spec/**/*'] +
|
22
|
+
%w{ !{lower}.gemspec Rakefile README.md CHANGELOG.md LICENCE.txt}
|
23
|
+
|
24
|
+
s.add_development_dependency('rake')
|
25
|
+
s.add_development_dependency('rspec', ">= 2.4.0")
|
26
|
+
s.add_development_dependency('yard', ">= 0.6.4")
|
27
|
+
s.add_development_dependency('bluecloth', ">= 0.6.4")
|
28
|
+
|
29
|
+
s.homepage = %q{!{homepage}}
|
30
|
+
end
|
31
|
+
|
metadata
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: noe
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 1.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Bernard Lambeau
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-01-10 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: wlang
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 9
|
31
|
+
- 2
|
32
|
+
version: 0.9.2
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: quickl
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
- 2
|
46
|
+
- 0
|
47
|
+
version: 0.2.0
|
48
|
+
type: :runtime
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rake
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rspec
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 2
|
73
|
+
- 4
|
74
|
+
- 0
|
75
|
+
version: 2.4.0
|
76
|
+
type: :development
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: yard
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
- 6
|
89
|
+
- 4
|
90
|
+
version: 0.6.4
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: bluecloth
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
- 6
|
104
|
+
- 4
|
105
|
+
version: 0.6.4
|
106
|
+
type: :development
|
107
|
+
version_requirements: *id006
|
108
|
+
description: A simple and extensible project generator
|
109
|
+
email: blambeau@gmail.com
|
110
|
+
executables:
|
111
|
+
- noe
|
112
|
+
extensions: []
|
113
|
+
|
114
|
+
extra_rdoc_files:
|
115
|
+
- README.md
|
116
|
+
- CHANGELOG.md
|
117
|
+
files:
|
118
|
+
- bin/noe
|
119
|
+
- lib/noe/commons.rb
|
120
|
+
- lib/noe/config.rb
|
121
|
+
- lib/noe/config.yaml
|
122
|
+
- lib/noe/create.rb
|
123
|
+
- lib/noe/go.rb
|
124
|
+
- lib/noe/help.rb
|
125
|
+
- lib/noe/install.rb
|
126
|
+
- lib/noe/list.rb
|
127
|
+
- lib/noe/main.rb
|
128
|
+
- lib/noe/template.rb
|
129
|
+
- lib/noe.rb
|
130
|
+
- spec/noe_spec.rb
|
131
|
+
- spec/spec_helper.rb
|
132
|
+
- spec/template/entry/relocate_spec.rb
|
133
|
+
- spec/template/entry/rename_one_spec.rb
|
134
|
+
- templates/ruby/CHANGELOG.md
|
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
|
147
|
+
- README.md
|
148
|
+
- CHANGELOG.md
|
149
|
+
- LICENCE.txt
|
150
|
+
has_rdoc: true
|
151
|
+
homepage: http://github.com/blambeau/noe
|
152
|
+
licenses: []
|
153
|
+
|
154
|
+
post_install_message:
|
155
|
+
rdoc_options: []
|
156
|
+
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
none: false
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
segments:
|
165
|
+
- 0
|
166
|
+
version: "0"
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
segments:
|
173
|
+
- 0
|
174
|
+
version: "0"
|
175
|
+
requirements: []
|
176
|
+
|
177
|
+
rubyforge_project:
|
178
|
+
rubygems_version: 1.3.7
|
179
|
+
signing_key:
|
180
|
+
specification_version: 3
|
181
|
+
summary: Noe helps development by providing support for project templates and instantiation.
|
182
|
+
test_files: []
|
183
|
+
|