new 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/.new +1 -1
- data/Gemfile.lock +25 -20
- data/Guardfile +6 -4
- data/README.md +9 -2
- data/doc/.git +1 -0
- data/doc/Gemfile.html +125 -0
- data/doc/Gemfile_lock.html +198 -0
- data/doc/Guardfile.html +134 -0
- data/doc/InterpolateSpec.html +116 -0
- data/doc/LICENSE_txt.html +132 -0
- data/doc/New/Cli.html +290 -0
- data/doc/New/Dsl.html +185 -0
- data/doc/New/Interpolate.html +238 -0
- data/doc/New/Project.html +171 -0
- data/doc/New/Task/CustomBarTask.html +154 -0
- data/doc/New/Task/FooTask.html +168 -0
- data/doc/New/Task/Gem.html +197 -0
- data/doc/New/Task/TaskSpec.html +168 -0
- data/doc/New/Task.html +380 -0
- data/doc/New/Template.html +234 -0
- data/doc/New/Version.html +277 -0
- data/doc/New.html +377 -0
- data/doc/Object.html +200 -0
- data/doc/README_md.html +292 -0
- data/doc/VersionSpec.html +116 -0
- data/doc/created.rid +47 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/fonts.css +167 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +142 -0
- data/doc/js/darkfish.js +140 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +109 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +580 -0
- data/doc/spec/fixtures/custom/templates/custom_bar_template/custom_bar_txt.html +110 -0
- data/doc/table_of_contents.html +324 -0
- data/doc/tasks/gem/README_md.html +150 -0
- data/doc/templates/js/Gemfile.html +147 -0
- data/doc/templates/js/Guardfile.html +117 -0
- data/doc/templates/js/lib/README_md.html +114 -0
- data/doc/templates/js/spec/spec_helper_js_coffee.html +110 -0
- data/doc/templates/js/spec/vendor/chai_js.html +3864 -0
- data/doc/templates/js/spec/vendor/sinon-chai_js.html +222 -0
- data/doc/templates/js/spec/vendor/sinon_js.html +4358 -0
- data/doc/templates/js/src/README_md.html +125 -0
- data/lib/new/task.rb +2 -4
- data/lib/new/template.rb +1 -1
- data/lib/new/version.rb +27 -19
- data/spec/fixtures/tasks/foo_task/Gemfile +5 -0
- data/spec/lib/new/version_spec.rb +10 -15
- data/spec/spec_helper.rb +22 -1
- data/tasks/gem/gem.rb +44 -8
- data/tasks/gem/gem_spec.rb +139 -0
- metadata +233 -3
data/doc/Object.html
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Object - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="./fonts.css" rel="stylesheet">
|
10
|
+
<link href="./rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "./";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="./js/jquery.js"></script>
|
17
|
+
<script src="./js/navigation.js"></script>
|
18
|
+
<script src="./js/search_index.js"></script>
|
19
|
+
<script src="./js/search.js"></script>
|
20
|
+
<script src="./js/searcher.js"></script>
|
21
|
+
<script src="./js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
<div id="parent-class-section" class="nav-section">
|
61
|
+
<h3>Parent</h3>
|
62
|
+
|
63
|
+
|
64
|
+
<p class="link">BasicObject
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
|
76
|
+
<li ><a href="#method-i-new_task">#new_task</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-root">#root</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-labelledby="class-Object">
|
87
|
+
<h1 id="class-Object" class="class">
|
88
|
+
class Object
|
89
|
+
</h1>
|
90
|
+
|
91
|
+
<section class="description">
|
92
|
+
|
93
|
+
</section>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
109
|
+
<header>
|
110
|
+
<h3>Public Instance Methods</h3>
|
111
|
+
</header>
|
112
|
+
|
113
|
+
|
114
|
+
<div id="method-i-new_task" class="method-detail ">
|
115
|
+
|
116
|
+
<div class="method-heading">
|
117
|
+
<span class="method-name">new_task</span><span
|
118
|
+
class="method-args">(task, options = {})</span>
|
119
|
+
|
120
|
+
<span class="method-click-advice">click to toggle source</span>
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
<div class="method-description">
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<div class="method-source-code" id="new_task-source">
|
133
|
+
<pre><span class="ruby-comment"># File spec/spec_helper.rb, line 28</span>
|
134
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">new_task</span> <span class="ruby-identifier">task</span>, <span class="ruby-identifier">options</span> = {}
|
135
|
+
<span class="ruby-identifier">task_hash</span> = {}
|
136
|
+
<span class="ruby-identifier">task_hash</span>[<span class="ruby-identifier">task</span>] = {}
|
137
|
+
<span class="ruby-identifier">task_class</span> = <span class="ruby-node">"New::Task::#{task.to_s.classify}"</span>.<span class="ruby-identifier">constantize</span>
|
138
|
+
<span class="ruby-identifier">task_class</span>.<span class="ruby-identifier">any_instance</span>.<span class="ruby-identifier">stub</span>(<span class="ruby-value">:get_part</span>).<span class="ruby-identifier">and_return</span>(<span class="ruby-string">'p'</span>)
|
139
|
+
<span class="ruby-identifier">task_options</span> = {
|
140
|
+
<span class="ruby-identifier">tasks</span><span class="ruby-operator">:</span> <span class="ruby-identifier">task_hash</span>,
|
141
|
+
<span class="ruby-identifier">version</span><span class="ruby-operator">:</span> <span class="ruby-string">'1.2.3'</span>
|
142
|
+
}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)
|
143
|
+
|
144
|
+
<span class="ruby-identifier">task_class</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">task_options</span>
|
145
|
+
<span class="ruby-keyword">end</span></pre>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
</div>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
|
156
|
+
<div id="method-i-root" class="method-detail ">
|
157
|
+
|
158
|
+
<div class="method-heading">
|
159
|
+
<span class="method-name">root</span><span
|
160
|
+
class="method-args">(*paths)</span>
|
161
|
+
|
162
|
+
<span class="method-click-advice">click to toggle source</span>
|
163
|
+
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
<div class="method-description">
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
<div class="method-source-code" id="root-source">
|
175
|
+
<pre><span class="ruby-comment"># File spec/spec_helper.rb, line 24</span>
|
176
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">root</span> <span class="ruby-operator">*</span><span class="ruby-identifier">paths</span>
|
177
|
+
<span class="ruby-identifier">paths</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">'../../'</span>, <span class="ruby-keyword">__FILE__</span>)).<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span> <span class="ruby-string">'/'</span>
|
178
|
+
<span class="ruby-keyword">end</span></pre>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
</div>
|
187
|
+
|
188
|
+
|
189
|
+
</section>
|
190
|
+
|
191
|
+
</section>
|
192
|
+
</main>
|
193
|
+
|
194
|
+
|
195
|
+
<footer id="validator-badges" role="contentinfo">
|
196
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
197
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
198
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
199
|
+
</footer>
|
200
|
+
|
data/doc/README_md.html
ADDED
@@ -0,0 +1,292 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>README - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="./fonts.css" rel="stylesheet">
|
10
|
+
<link href="./rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "./";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="./js/jquery.js"></script>
|
17
|
+
<script src="./js/navigation.js"></script>
|
18
|
+
<script src="./js/search_index.js"></script>
|
19
|
+
<script src="./js/search.js"></script>
|
20
|
+
<script src="./js/searcher.js"></script>
|
21
|
+
<script src="./js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="file">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
<div class="nav-section">
|
58
|
+
<h3>Table of Contents</h3>
|
59
|
+
|
60
|
+
<ul class="link-list" role="directory">
|
61
|
+
<li><a href="#label-new">new</a>
|
62
|
+
<li><a href="#label-install">install</a>
|
63
|
+
<li><a href="#label-Create+a+new+project">Create a new project</a>
|
64
|
+
<li><a href="#label-Release+a+new+version">Release a new version</a>
|
65
|
+
<li><a href="#label-Templates">Templates</a>
|
66
|
+
<li><a href="#label-Tasks">Tasks</a>
|
67
|
+
<li><a href="#label-Local+Config%2FTemplates%2FTasks">Local Config/Templates/Tasks</a>
|
68
|
+
<li><a href="#label-Custom+Templates">Custom Templates</a>
|
69
|
+
<li><a href="#label-Interpolation">Interpolation</a>
|
70
|
+
<li><a href="#label-Custom+Tasks">Custom Tasks</a>
|
71
|
+
<li><a href="#label-TODO">TODO</a>
|
72
|
+
<li><a href="#label-Contributing">Contributing</a>
|
73
|
+
</ul>
|
74
|
+
</div>
|
75
|
+
|
76
|
+
|
77
|
+
<div id="project-metadata">
|
78
|
+
<div id="fileindex-section" class="nav-section">
|
79
|
+
<h3>Pages</h3>
|
80
|
+
|
81
|
+
<ul class="link-list">
|
82
|
+
|
83
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
84
|
+
|
85
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
86
|
+
|
87
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
88
|
+
|
89
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
90
|
+
|
91
|
+
<li><a href="./README_md.html">README</a>
|
92
|
+
|
93
|
+
<li><a href="./spec/fixtures/custom/templates/custom_bar_template/custom_bar_txt.html">custom_bar</a>
|
94
|
+
|
95
|
+
<li><a href="./tasks/gem/README_md.html">README</a>
|
96
|
+
|
97
|
+
<li><a href="./templates/js/Gemfile.html">Gemfile</a>
|
98
|
+
|
99
|
+
<li><a href="./templates/js/Guardfile.html">Guardfile</a>
|
100
|
+
|
101
|
+
<li><a href="./templates/js/lib/README_md.html">README</a>
|
102
|
+
|
103
|
+
<li><a href="./templates/js/spec/spec_helper_js_coffee.html">spec_helper.js.coffee</a>
|
104
|
+
|
105
|
+
<li><a href="./templates/js/spec/vendor/chai_js.html">chai.js</a>
|
106
|
+
|
107
|
+
<li><a href="./templates/js/spec/vendor/sinon-chai_js.html">sinon-chai.js</a>
|
108
|
+
|
109
|
+
<li><a href="./templates/js/spec/vendor/sinon_js.html">sinon.js</a>
|
110
|
+
|
111
|
+
<li><a href="./templates/js/src/README_md.html">README</a>
|
112
|
+
|
113
|
+
</ul>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</div>
|
117
|
+
</nav>
|
118
|
+
|
119
|
+
<main role="main" aria-label="Page README.md">
|
120
|
+
|
121
|
+
<h1 id="label-new">new<span><a href="#label-new">¶</a> <a href="#documentation">↑</a></span></h1>
|
122
|
+
|
123
|
+
<h6 id="label-install">install<span><a href="#label-install">¶</a> <a href="#documentation">↑</a></span></h6>
|
124
|
+
|
125
|
+
<pre>gem install new
|
126
|
+
new init</pre>
|
127
|
+
|
128
|
+
<h6 id="label-Create+a+new+project">Create a new project<span><a href="#label-Create+a+new+project">¶</a> <a href="#documentation">↑</a></span></h6>
|
129
|
+
|
130
|
+
<pre>new [TEMPLATE] [NAME]</pre>
|
131
|
+
|
132
|
+
<h6 id="label-Release+a+new+version">Release a new version<span><a href="#label-Release+a+new+version">¶</a> <a href="#documentation">↑</a></span></h6>
|
133
|
+
|
134
|
+
<pre>new release</pre>
|
135
|
+
|
136
|
+
<h4 id="label-Templates">Templates<span><a href="#label-Templates">¶</a> <a href="#documentation">↑</a></span></h4>
|
137
|
+
|
138
|
+
<p>Templates represent a boilerplate directory & file structure
|
139
|
+
preconfigured for a given project type. <em>(eg js, ruby, gem, rails,
|
140
|
+
etc.)</em></p>
|
141
|
+
|
142
|
+
<h4 id="label-Tasks">Tasks<span><a href="#label-Tasks">¶</a> <a href="#documentation">↑</a></span></h4>
|
143
|
+
|
144
|
+
<p>Tasks represent a process associated with releasing new code. Tasks are run
|
145
|
+
in order they are listed in the project <code>.new</code> configuration
|
146
|
+
file.</p>
|
147
|
+
|
148
|
+
<h4 id="label-Local+Config%2FTemplates%2FTasks">Local Config/Templates/Tasks<span><a href="#label-Local+Config%2FTemplates%2FTasks">¶</a> <a href="#documentation">↑</a></span></h4>
|
149
|
+
|
150
|
+
<p>After running <code>new init</code>, you will have <code>.new</code> folder
|
151
|
+
in your home directory. This directory contains:</p>
|
152
|
+
<ul><li>
|
153
|
+
<p><code>.new</code> local configuration file</p>
|
154
|
+
</li><li>
|
155
|
+
<p><code>tasks</code> directory for custom tasks</p>
|
156
|
+
</li><li>
|
157
|
+
<p><code>templates</code> directory for custom templates</p>
|
158
|
+
</li></ul>
|
159
|
+
|
160
|
+
<p>Copy or create custom templates & tasks in these folders. They will
|
161
|
+
take precendence over the default templates included with the gem.</p>
|
162
|
+
|
163
|
+
<p><strong>Make sure to edit your local configuration file!</strong></p>
|
164
|
+
|
165
|
+
<pre># ~/.new/.new
|
166
|
+
|
167
|
+
license: MIT
|
168
|
+
developer:
|
169
|
+
name: Foo Bar
|
170
|
+
email: foo@bar.com
|
171
|
+
templates:
|
172
|
+
foo_template:
|
173
|
+
custom: option
|
174
|
+
tasks:
|
175
|
+
github:
|
176
|
+
username: foouser</pre>
|
177
|
+
|
178
|
+
<h4 id="label-Custom+Templates">Custom Templates<span><a href="#label-Custom+Templates">¶</a> <a href="#documentation">↑</a></span></h4>
|
179
|
+
<ul><li>
|
180
|
+
<p>The directory name will be used for the template name.</p>
|
181
|
+
</li><li>
|
182
|
+
<p>Templates can have a <code>.new</code> file in the root of the folder.
|
183
|
+
These values can be accessed through interpolation.</p>
|
184
|
+
</li></ul>
|
185
|
+
|
186
|
+
<pre># ~/.new/templates/foo_template/.new
|
187
|
+
|
188
|
+
foo: bar
|
189
|
+
tasks:
|
190
|
+
foo_task:
|
191
|
+
bar_task:
|
192
|
+
baz: 'baz'</pre>
|
193
|
+
|
194
|
+
<p><em>Note: the tasks are followed by a colon <code>:</code> whether they
|
195
|
+
have options or not.</em></p>
|
196
|
+
|
197
|
+
<h6 id="label-Interpolation">Interpolation<span><a href="#label-Interpolation">¶</a> <a href="#documentation">↑</a></span></h6>
|
198
|
+
|
199
|
+
<p>Use ERB template syntax in your files to interpolate template options. Make
|
200
|
+
sure to add <code>.erb</code> to the end of the filename.</p>
|
201
|
+
|
202
|
+
<p>You can also access any custom values set in your local configuration file.</p>
|
203
|
+
|
204
|
+
<pre><%# ~/.new/templates/foo_template/foo.txt.erb %>
|
205
|
+
|
206
|
+
<%= license %>
|
207
|
+
<%= developer.name %>
|
208
|
+
<%= developer.email %>
|
209
|
+
<%= type %>
|
210
|
+
<%= project_name %>
|
211
|
+
<%= foo %>
|
212
|
+
<%= tasks.bar_task.baz %></pre>
|
213
|
+
|
214
|
+
<p>You can also interpolate directory and filenames using the syntax
|
215
|
+
<code>foo_[DEVELOPER.NAME].txt</code></p>
|
216
|
+
|
217
|
+
<p><em>Note using the dot notation to access nested attributes.</em></p>
|
218
|
+
|
219
|
+
<h4 id="label-Custom+Tasks">Custom Tasks<span><a href="#label-Custom+Tasks">¶</a> <a href="#documentation">↑</a></span></h4>
|
220
|
+
<ul><li>
|
221
|
+
<p>The directory name will be used for the task name</p>
|
222
|
+
</li><li>
|
223
|
+
<p>A <code>.rb</code> file must be included in the directory with the same
|
224
|
+
name</p>
|
225
|
+
</li><li>
|
226
|
+
<p>The <code>.rb</code> file must contain a class of
|
227
|
+
<code>New::Task::FooTask</code> and inherit from <code>New::Task</code></p>
|
228
|
+
</li><li>
|
229
|
+
<p>The <code>.rb</code> file must have a standard ruby <code>run</code> method
|
230
|
+
that will run when a project is released.</p>
|
231
|
+
</li><li>
|
232
|
+
<p>A Task can have an <code>OPTIONS</code> constant with default options
|
233
|
+
needed for the task to run. These can be further customized in the project
|
234
|
+
or local configuration <code>.new</code> file</p>
|
235
|
+
</li></ul>
|
236
|
+
|
237
|
+
<pre class="ruby"><span class="ruby-comment"># ~/.new/tasks/foo_task/foo_task.rb</span>
|
238
|
+
|
239
|
+
<span class="ruby-keyword">class</span> <span class="ruby-constant">New</span><span class="ruby-operator">::</span><span class="ruby-constant">Task</span><span class="ruby-operator">::</span><span class="ruby-constant">FooTask</span> <span class="ruby-operator"><</span> <span class="ruby-constant">New</span><span class="ruby-operator">::</span><span class="ruby-constant">Test</span>
|
240
|
+
<span class="ruby-identifier">include</span> <span class="ruby-constant">New</span><span class="ruby-operator">::</span><span class="ruby-constant">Interpolate</span> <span class="ruby-comment"># if you need to interpolate files</span>
|
241
|
+
<span class="ruby-identifier">include</span> <span class="ruby-constant">New</span><span class="ruby-operator">::</span><span class="ruby-identifier">version</span> <span class="ruby-comment"># if you need to set & manage a semantic version</span>
|
242
|
+
|
243
|
+
<span class="ruby-comment"># defaults for required options</span>
|
244
|
+
<span class="ruby-constant">OPTION</span> = {
|
245
|
+
<span class="ruby-identifier">foo</span><span class="ruby-operator">:</span> <span class="ruby-string">'bar'</span>
|
246
|
+
}
|
247
|
+
|
248
|
+
<span class="ruby-comment"># required `run` method</span>
|
249
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">run</span>
|
250
|
+
<span class="ruby-comment"># do task stuff here</span>
|
251
|
+
|
252
|
+
<span class="ruby-identifier">access</span>
|
253
|
+
<span class="ruby-comment"># access task options from the `options` object</span>
|
254
|
+
<span class="ruby-comment"># access all project options from the `project_options` object</span>
|
255
|
+
<span class="ruby-keyword">end</span>
|
256
|
+
<span class="ruby-keyword">end</span>
|
257
|
+
</pre>
|
258
|
+
|
259
|
+
<h4 id="label-TODO">TODO<span><a href="#label-TODO">¶</a> <a href="#documentation">↑</a></span></h4>
|
260
|
+
<ul><li>
|
261
|
+
<p>optional scripts when creating a template</p>
|
262
|
+
</li><li>
|
263
|
+
<p>write templates</p>
|
264
|
+
</li><li>
|
265
|
+
<p>write tasks</p>
|
266
|
+
</li></ul>
|
267
|
+
|
268
|
+
<h4 id="label-Contributing">Contributing<span><a href="#label-Contributing">¶</a> <a href="#documentation">↑</a></span></h4>
|
269
|
+
<ol><li>
|
270
|
+
<p>Fork it ( <a
|
271
|
+
href="http://github.com/brewster1134/new/fork">github.com/brewster1134/new/fork</a>
|
272
|
+
)</p>
|
273
|
+
</li><li>
|
274
|
+
<p>Create your feature branch (<code>git checkout -b my-new-feature</code>)</p>
|
275
|
+
</li><li>
|
276
|
+
<p>Commit your changes (<code>git commit -am 'Add some
|
277
|
+
feature'</code>)</p>
|
278
|
+
</li><li>
|
279
|
+
<p>Push to the branch (<code>git push origin my-new-feature</code>)</p>
|
280
|
+
</li><li>
|
281
|
+
<p>Create new Pull Request</p>
|
282
|
+
</li></ol>
|
283
|
+
</main>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
<footer id="validator-badges" role="contentinfo">
|
288
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
289
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
290
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
291
|
+
</footer>
|
292
|
+
|
@@ -0,0 +1,116 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class VersionSpec - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link href="./fonts.css" rel="stylesheet">
|
10
|
+
<link href="./rdoc.css" rel="stylesheet">
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
var rdoc_rel_prefix = "./";
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<script src="./js/jquery.js"></script>
|
17
|
+
<script src="./js/navigation.js"></script>
|
18
|
+
<script src="./js/search_index.js"></script>
|
19
|
+
<script src="./js/search.js"></script>
|
20
|
+
<script src="./js/searcher.js"></script>
|
21
|
+
<script src="./js/darkfish.js"></script>
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="./index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
<div id="parent-class-section" class="nav-section">
|
61
|
+
<h3>Parent</h3>
|
62
|
+
|
63
|
+
|
64
|
+
<p class="link"><a href="Object.html">Object</a>
|
65
|
+
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<div id="includes-section" class="nav-section">
|
69
|
+
<h3>Included Modules</h3>
|
70
|
+
|
71
|
+
<ul class="link-list">
|
72
|
+
|
73
|
+
|
74
|
+
<li><a class="include" href="New/Version.html">New::Version</a>
|
75
|
+
|
76
|
+
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-labelledby="class-VersionSpec">
|
86
|
+
<h1 id="class-VersionSpec" class="class">
|
87
|
+
class VersionSpec
|
88
|
+
</h1>
|
89
|
+
|
90
|
+
<section class="description">
|
91
|
+
|
92
|
+
</section>
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</section>
|
108
|
+
</main>
|
109
|
+
|
110
|
+
|
111
|
+
<footer id="validator-badges" role="contentinfo">
|
112
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
113
|
+
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
|
114
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
115
|
+
</footer>
|
116
|
+
|
data/doc/created.rid
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
Fri, 21 Mar 2014 20:23:32 -0700
|
2
|
+
./bin/new Tue, 31 Dec 2013 12:34:28 -0800
|
3
|
+
./Gemfile Tue, 18 Mar 2014 20:26:27 -0700
|
4
|
+
./Gemfile.lock Tue, 18 Mar 2014 01:02:20 -0700
|
5
|
+
./Guardfile Thu, 20 Mar 2014 01:13:27 -0700
|
6
|
+
./lib/new/cli.rb Mon, 17 Mar 2014 21:41:14 -0700
|
7
|
+
./lib/new/core.rb Mon, 03 Feb 2014 21:09:15 -0800
|
8
|
+
./lib/new/dsl.rb Mon, 03 Feb 2014 21:08:42 -0800
|
9
|
+
./lib/new/interpolate.rb Sun, 16 Mar 2014 23:20:29 -0700
|
10
|
+
./lib/new/project.rb Sun, 16 Mar 2014 13:14:22 -0700
|
11
|
+
./lib/new/task.rb Wed, 19 Mar 2014 20:29:10 -0700
|
12
|
+
./lib/new/template.rb Sun, 16 Mar 2014 23:20:29 -0700
|
13
|
+
./lib/new/version.rb Thu, 20 Mar 2014 01:03:36 -0700
|
14
|
+
./lib/new.rb Sun, 16 Mar 2014 23:20:29 -0700
|
15
|
+
./LICENSE.txt Tue, 31 Dec 2013 11:44:13 -0800
|
16
|
+
./README.md Mon, 17 Mar 2014 10:23:58 -0700
|
17
|
+
./spec/fixtures/custom/tasks/custom_bar_task/custom_bar_task.rb Fri, 31 Jan 2014 22:05:24 -0800
|
18
|
+
./spec/fixtures/custom/templates/custom_bar_template/custom_bar.txt Sat, 04 Jan 2014 20:32:29 -0800
|
19
|
+
./spec/fixtures/tasks/custom_bar_task/custom_bar_task.rb Thu, 23 Jan 2014 21:54:08 -0800
|
20
|
+
./spec/fixtures/tasks/foo_task/foo_task.rb Fri, 31 Jan 2014 22:05:13 -0800
|
21
|
+
./spec/fixtures/templates/foo_template/[FOO.BAR].txt.erb Sat, 01 Feb 2014 01:31:53 -0800
|
22
|
+
./spec/lib/new/cli_spec.rb Fri, 24 Jan 2014 21:56:54 -0800
|
23
|
+
./spec/lib/new/interpolate_spec.rb Sun, 16 Mar 2014 23:20:29 -0700
|
24
|
+
./spec/lib/new/project_spec.rb Sun, 16 Mar 2014 23:20:29 -0700
|
25
|
+
./spec/lib/new/task_spec.rb Tue, 18 Mar 2014 20:27:11 -0700
|
26
|
+
./spec/lib/new/template_spec.rb Sat, 01 Feb 2014 12:35:12 -0800
|
27
|
+
./spec/lib/new/version_spec.rb Mon, 03 Feb 2014 23:30:39 -0800
|
28
|
+
./spec/lib/new_spec.rb Thu, 23 Jan 2014 15:30:11 -0800
|
29
|
+
./spec/spec_helper.rb Thu, 20 Mar 2014 01:28:30 -0700
|
30
|
+
./tasks/gem/gem.rb Thu, 20 Mar 2014 01:27:38 -0700
|
31
|
+
./tasks/gem/gem_spec.rb Thu, 20 Mar 2014 01:29:47 -0700
|
32
|
+
./tasks/gem/README.md Sun, 16 Mar 2014 23:20:29 -0700
|
33
|
+
./templates/js/demo/index.html.erb Sun, 05 Jan 2014 22:53:44 -0800
|
34
|
+
./templates/js/Gemfile Mon, 16 Dec 2013 19:22:04 -0800
|
35
|
+
./templates/js/Guardfile Mon, 16 Dec 2013 19:25:18 -0800
|
36
|
+
./templates/js/lib/README.md Fri, 04 Oct 2013 10:35:32 -0700
|
37
|
+
./templates/js/LICENSE-MIT.erb Mon, 06 Jan 2014 00:00:38 -0800
|
38
|
+
./templates/js/README.md.erb Fri, 24 Jan 2014 01:06:42 -0800
|
39
|
+
./templates/js/spec/[PROJECT_NAME].spec.js.coffee.erb Mon, 06 Jan 2014 00:36:45 -0800
|
40
|
+
./templates/js/spec/index.html.erb Mon, 06 Jan 2014 00:00:38 -0800
|
41
|
+
./templates/js/spec/spec_helper.js.coffee Fri, 04 Oct 2013 10:35:32 -0700
|
42
|
+
./templates/js/spec/vendor/chai.js Fri, 04 Oct 2013 10:35:32 -0700
|
43
|
+
./templates/js/spec/vendor/sinon-chai.js Fri, 04 Oct 2013 10:35:32 -0700
|
44
|
+
./templates/js/spec/vendor/sinon.js Fri, 04 Oct 2013 10:35:32 -0700
|
45
|
+
./templates/js/src/[PROJECT_NAME].js.coffee.erb Thu, 23 Jan 2014 21:30:35 -0800
|
46
|
+
./templates/js/src/README.md Mon, 06 Jan 2014 00:37:06 -0800
|
47
|
+
./templates/js/testem.yml Fri, 04 Oct 2013 10:35:32 -0700
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|