new 0.0.15 → 0.1.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.
- checksums.yaml +4 -4
- data/.new +5 -2
- data/Gemfile.lock +1 -1
- data/Guardfile +1 -1
- data/README.md +1 -1
- data/lib/new/template.rb +4 -2
- data/spec/fixtures/custom/.new +2 -0
- data/spec/lib/new/template_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/tasks/gem/gem.rb +2 -2
- data/tasks/gem/gem_spec.rb +6 -7
- data/templates/js/.new.erb +11 -0
- data/templates/js/LICENSE-MIT.erb +1 -1
- data/templates/js/README.md.erb +2 -2
- data/templates/js/bower.json.erb +1 -1
- data/templates/js/{.new → demo/[PROJECT.FILENAME]_demo.coffee} +0 -0
- data/templates/js/demo/{[PROJECT_FILENAME]_demo.css.sass → [PROJECT.FILENAME]_demo.sass} +0 -0
- data/templates/js/demo/index.html.erb +5 -5
- data/templates/js/spec/[PROJECT.FILENAME]_spec.coffee.erb +1 -0
- data/templates/js/{demo/[PROJECT_FILENAME]_demo.js.coffee → spec/[PROJECT.FILENAME]_spec.sass} +0 -0
- data/templates/js/spec/index.html.erb +4 -4
- data/templates/js/src/{[PROJECT_FILENAME].js.coffee.erb → [PROJECT.FILENAME].coffee.erb} +4 -4
- data/templates/js/src/{[PROJECT_FILENAME].css.sass → [PROJECT.FILENAME].sass} +0 -0
- data/templates/js/testem.yml +8 -6
- data/templates/js/yuyi_menu +1 -1
- metadata +9 -11
- data/templates/js/spec/[PROJECT_FILENAME].spec.js.coffee.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49de7a525567990df4a73895129d9016fd6cb025
|
4
|
+
data.tar.gz: a7187f5f73de9b3ccc126306e8243c8ad3377cde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ee8c15e70e71526ba0681e8d81686e06c80eab051470938e26d89d3dbe6d37ea64ed996bb3da5baf065a48df299aadfddd7b80af946726112b21358d9f8221
|
7
|
+
data.tar.gz: f2784493ad68df62dc988f31d98b5045c1fdebf39b8f1442f3d975903d1d9470e9de1ca43444bb335d9d25d1e3f870da53a7c07c75848e852a802fcc02a01f76
|
data/.new
CHANGED
@@ -3,6 +3,8 @@ license: MIT
|
|
3
3
|
developer:
|
4
4
|
name: Ryan Brewster
|
5
5
|
email: brewster1134@gmail.com
|
6
|
+
github:
|
7
|
+
username: brewster1134
|
6
8
|
tasks:
|
7
9
|
gem:
|
8
10
|
gemspec:
|
@@ -15,6 +17,7 @@ tasks:
|
|
15
17
|
bindir: bin
|
16
18
|
test_files:
|
17
19
|
- spec/**/*.rb
|
18
|
-
version: 0.
|
19
|
-
|
20
|
+
version: 0.1.1
|
21
|
+
project:
|
22
|
+
name: new
|
20
23
|
type: js
|
data/Gemfile.lock
CHANGED
data/Guardfile
CHANGED
@@ -6,7 +6,7 @@ guard :bundler do
|
|
6
6
|
watch('Gemfile')
|
7
7
|
end
|
8
8
|
|
9
|
-
guard :rspec, all_after_pass: true, all_on_start: true, cmd: 'bundle exec rspec spec tasks
|
9
|
+
guard :rspec, all_after_pass: true, all_on_start: true, cmd: 'bundle exec rspec spec tasks' do
|
10
10
|
watch(%r{^spec/.+_spec\.rb$})
|
11
11
|
watch(%r{^tasks/.+_spec\.rb$})
|
12
12
|
watch(%r{^tasks/(.+[^_spec])\.rb$}) { |m| "tasks/#{m[1]}_spec.rb" }
|
data/README.md
CHANGED
data/lib/new/template.rb
CHANGED
@@ -29,8 +29,10 @@ class New::Template
|
|
29
29
|
.deep_merge!(template_config)
|
30
30
|
.deep_merge!(New.custom_config)
|
31
31
|
.deep_merge!({
|
32
|
-
|
33
|
-
|
32
|
+
project: {
|
33
|
+
name: @name,
|
34
|
+
filename: to_filename(@name)
|
35
|
+
},
|
34
36
|
type: @type.to_s
|
35
37
|
})
|
36
38
|
end
|
data/spec/fixtures/custom/.new
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
$: << File.expand_path('../../lib', __FILE__)
|
2
|
-
require 'new'
|
3
2
|
$: << File.expand_path('../../tasks', __FILE__)
|
4
3
|
$: << File.expand_path('../fixtures', __FILE__)
|
4
|
+
require 'new'
|
5
5
|
$: << File.expand_path('tasks', New::CUSTOM_DIR)
|
6
6
|
|
7
7
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
data/tasks/gem/gem.rb
CHANGED
@@ -25,7 +25,7 @@ class New::Task::Gem < New::Task
|
|
25
25
|
write_config
|
26
26
|
deploy
|
27
27
|
|
28
|
-
New.say "Version #{project_options[:version].green} of the #{project_options[:
|
28
|
+
New.say "Version #{project_options[:version].green} of the #{project_options[:project][:name].green} gem successfully published."
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
@@ -67,7 +67,7 @@ private
|
|
67
67
|
|
68
68
|
# set defaults
|
69
69
|
@gemspec[:date] = Date.today.to_s
|
70
|
-
@gemspec[:name] = project_options[:
|
70
|
+
@gemspec[:name] = project_options[:project][:name]
|
71
71
|
@gemspec[:version] = project_options[:version]
|
72
72
|
@gemspec[:author] ||= project_options[:developer][:name]
|
73
73
|
@gemspec[:email] ||= project_options[:developer][:email]
|
data/tasks/gem/gem_spec.rb
CHANGED
@@ -13,7 +13,6 @@ describe New::Task::Gem do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
after do
|
16
|
-
New::Task::Gem.any_instance.unstub(:run)
|
17
16
|
Dir.chdir @pwd
|
18
17
|
end
|
19
18
|
|
@@ -49,13 +48,13 @@ describe New::Task::Gem do
|
|
49
48
|
|
50
49
|
describe '#render_gemspec_options' do
|
51
50
|
before do
|
52
|
-
@gem.
|
51
|
+
allow(@gem).to receive(:extract_gem_dependencies).and_return([' s.extract_gem_dependencies'])
|
53
52
|
@gem.instance_variable_set(:@gemspec, {})
|
54
53
|
@gem.send(:render_gemspec_options)
|
55
54
|
end
|
56
55
|
|
57
56
|
after do
|
58
|
-
@gem.
|
57
|
+
allow(@gem).to receive(:extract_gem_dependencies).and_call_original
|
59
58
|
end
|
60
59
|
|
61
60
|
it 'should create the gemspec_string option' do
|
@@ -97,12 +96,12 @@ describe New::Task::Gem do
|
|
97
96
|
|
98
97
|
describe '#write_gemspec' do
|
99
98
|
before do
|
100
|
-
@gem.
|
99
|
+
allow(@gem).to receive(:project_options).and_return({ gemspec_string: 'foo' })
|
101
100
|
@gem.send(:write_gemspec)
|
102
101
|
end
|
103
102
|
|
104
103
|
after do
|
105
|
-
@gem.
|
104
|
+
allow(@gem).to receive(:project_options).and_call_original
|
106
105
|
end
|
107
106
|
|
108
107
|
it 'should write a gemspec file' do
|
@@ -118,7 +117,7 @@ describe New::Task::Gem do
|
|
118
117
|
|
119
118
|
describe '#write_config' do
|
120
119
|
before do
|
121
|
-
@gem.
|
120
|
+
allow(@gem).to receive(:project_options).and_return({
|
122
121
|
gemspec_string: 'foo',
|
123
122
|
foo_files: 'foo',
|
124
123
|
bar: 'bar'
|
@@ -127,7 +126,7 @@ describe New::Task::Gem do
|
|
127
126
|
end
|
128
127
|
|
129
128
|
after do
|
130
|
-
@gem.
|
129
|
+
allow(@gem).to receive(:project_options).and_call_original
|
131
130
|
end
|
132
131
|
|
133
132
|
it 'should update the config file' do
|
data/templates/js/README.md.erb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# <%=
|
1
|
+
# <%= project.name %>
|
2
2
|
|
3
3
|
## Dependencies
|
4
4
|
*
|
@@ -26,7 +26,7 @@ METHOD ARGUMENT
|
|
26
26
|
|
27
27
|
```shell
|
28
28
|
gem install yuyi
|
29
|
-
yuyi https://raw.githubusercontent.com
|
29
|
+
yuyi -m https://raw.githubusercontent.com/<%= github.username %>/<%= project.filename %>/master/yuyi_menu
|
30
30
|
bundle install
|
31
31
|
npm install
|
32
32
|
bower install
|
data/templates/js/bower.json.erb
CHANGED
File without changes
|
File without changes
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<html>
|
2
2
|
<head>
|
3
|
-
<title><%=
|
4
|
-
<link type="text/css" rel="stylesheet" media="all" href="../
|
5
|
-
<link type="text/css" rel="stylesheet" media="all" href="<%=
|
3
|
+
<title><%= project.name %></title>
|
4
|
+
<link type="text/css" rel="stylesheet" media="all" href="../lib/<%= project.filename %>.css"/>
|
5
|
+
<link type="text/css" rel="stylesheet" media="all" href="<%= project.filename %>_demo.css"/>
|
6
6
|
</head>
|
7
7
|
<body>
|
8
8
|
</body>
|
9
9
|
|
10
|
-
<script type="text/javascript" src="../lib/<%=
|
11
|
-
<script type="text/javascript" src="<%=
|
10
|
+
<script type="text/javascript" src="../lib/<%= project.filename %>.js"></script>
|
11
|
+
<script type="text/javascript" src="<%= project.filename %>_demo.js"></script>
|
12
12
|
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
describe '<%= project.name %>', ->
|
data/templates/js/{demo/[PROJECT_FILENAME]_demo.js.coffee → spec/[PROJECT.FILENAME]_spec.sass}
RENAMED
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<html>
|
2
2
|
<head>
|
3
3
|
<link rel="stylesheet" href="/vendor/mocha/mocha.css">
|
4
|
-
<link rel="stylesheet" href="/lib/<%=
|
5
|
-
<link rel="stylesheet" href="/.tmp/<%=
|
4
|
+
<link rel="stylesheet" href="/lib/<%= project.filename %>.css">
|
5
|
+
<link rel="stylesheet" href="/.tmp/<%= project.filename %>_spec.css">
|
6
6
|
</head>
|
7
7
|
|
8
8
|
<body>
|
@@ -26,8 +26,8 @@
|
|
26
26
|
window.expect = chai.expect;
|
27
27
|
</script>
|
28
28
|
|
29
|
-
<script src="/lib/<%=
|
30
|
-
<script src="/.tmp/<%=
|
29
|
+
<script src="/lib/<%= project.filename %>.js"></script>
|
30
|
+
<script src="/.tmp/<%= project.filename %>_spec.js"></script>
|
31
31
|
|
32
32
|
<script>
|
33
33
|
mocha.run()
|
@@ -1,11 +1,11 @@
|
|
1
1
|
###
|
2
|
-
# * <%=
|
3
|
-
# * https://github.com
|
2
|
+
# * <%= project.name %>
|
3
|
+
# * https://github.com/<%= github.username %>/<%= project.filename %>
|
4
4
|
# *
|
5
|
-
# * @version
|
5
|
+
# * @version <%= version %>
|
6
6
|
# * @author <%= developer.name %>
|
7
7
|
# * Copyright (c) <%= Date.today.year %>
|
8
|
-
# * Licensed under the
|
8
|
+
# * Licensed under the <%= license %> license.
|
9
9
|
###
|
10
10
|
|
11
11
|
((root, factory) ->
|
File without changes
|
data/templates/js/testem.yml
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
test_page: spec/index.html
|
2
2
|
before_tests: |
|
3
|
-
bundle exec coffee -co
|
3
|
+
bundle exec coffee -co lib src/*.coffee
|
4
4
|
bundle exec coffee -co .tmp spec/*.coffee
|
5
|
-
bundle exec
|
6
|
-
bundle exec sass
|
7
|
-
bundle exec sass
|
5
|
+
bundle exec coffee -co demo demo/*.coffee
|
6
|
+
bundle exec sass --update src:lib
|
7
|
+
bundle exec sass --update spec:.tmp
|
8
|
+
bundle exec sass --update demo:demo
|
8
9
|
src_files:
|
9
|
-
- demo
|
10
|
+
- demo/*_demo.coffee
|
11
|
+
- demo/*_demo.sass
|
10
12
|
- spec/*_spec.coffee
|
11
13
|
- spec/*_spec.sass
|
12
14
|
- spec/index.html
|
@@ -14,7 +16,7 @@ src_files:
|
|
14
16
|
- src/*.sass
|
15
17
|
serve_files:
|
16
18
|
- .tmp/*.js
|
17
|
-
-
|
19
|
+
- lib/*.js
|
18
20
|
launch_in_dev:
|
19
21
|
- phantomjs
|
20
22
|
launch_in_ci:
|
data/templates/js/yuyi_menu
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: new
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Brewster
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -217,25 +217,23 @@ files:
|
|
217
217
|
- tasks/gem/gem_spec.rb
|
218
218
|
- templates/js/.bowerrc
|
219
219
|
- templates/js/.gitignore
|
220
|
-
- templates/js/.new
|
220
|
+
- templates/js/.new.erb
|
221
221
|
- templates/js/CHANGELOG.md
|
222
222
|
- templates/js/Gemfile
|
223
223
|
- templates/js/Guardfile
|
224
224
|
- templates/js/LICENSE-MIT.erb
|
225
225
|
- templates/js/README.md.erb
|
226
226
|
- templates/js/bower.json.erb
|
227
|
-
- templates/js/demo/[
|
228
|
-
- templates/js/demo/[
|
227
|
+
- templates/js/demo/[PROJECT.FILENAME]_demo.coffee
|
228
|
+
- templates/js/demo/[PROJECT.FILENAME]_demo.sass
|
229
229
|
- templates/js/demo/index.html.erb
|
230
230
|
- templates/js/lib/README.md
|
231
231
|
- templates/js/package.json
|
232
|
-
- templates/js/spec/[
|
232
|
+
- templates/js/spec/[PROJECT.FILENAME]_spec.coffee.erb
|
233
|
+
- templates/js/spec/[PROJECT.FILENAME]_spec.sass
|
233
234
|
- templates/js/spec/index.html.erb
|
234
|
-
- templates/js/
|
235
|
-
- templates/js/
|
236
|
-
- templates/js/spec/vendor/sinon.js
|
237
|
-
- templates/js/src/[PROJECT_FILENAME].css.sass
|
238
|
-
- templates/js/src/[PROJECT_FILENAME].js.coffee.erb
|
235
|
+
- templates/js/src/[PROJECT.FILENAME].coffee.erb
|
236
|
+
- templates/js/src/[PROJECT.FILENAME].sass
|
239
237
|
- templates/js/testem.yml
|
240
238
|
- templates/js/yuyi_menu
|
241
239
|
homepage: https://github.com/brewster1134/new
|
@@ -1 +0,0 @@
|
|
1
|
-
describe '<%= project_name %>', ->
|