new 0.0.5 → 0.0.6
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/.gitignore +0 -1
- data/.new +18 -0
- data/lib/new/interpolate.rb +3 -1
- data/spec/lib/new/interpolate_spec.rb +2 -6
- data/tasks/gem/gem.rb +0 -1
- data/templates/js/.gitignore +0 -1
- metadata +2 -3
- data/new_project/.new +0 -2
- data/new_project/custom_bar_template/.new +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1716110bb44e30d0113c7eace999b08132f7176b
|
4
|
+
data.tar.gz: 6466d89f1b6100328e8e61464316d967c8396ac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed64aacab561a9ad3bf085cb42f235e9cb8abae5309c8536823cae382cafa56799202bc22012594c1f71ca4ad717439a2c0272a8da431e801cad99a943655ace
|
7
|
+
data.tar.gz: a64e6383a03fe839a610239f87d22be94087ce30e7318e2980153e9ff78adf7430f9bb740fb43e97ecd5309e5dc31004cf00c3067c013b4f85862b553db109d4
|
data/.gitignore
CHANGED
data/.new
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
license: MIT
|
3
|
+
developer:
|
4
|
+
name: Ryan Brewster
|
5
|
+
email: brewster1134@gmail.com
|
6
|
+
tasks:
|
7
|
+
gem:
|
8
|
+
gemspec:
|
9
|
+
summary: A Quick & Custom Project Creation & Release Tool
|
10
|
+
homepage: https://github.com/brewster1134/new
|
11
|
+
executables:
|
12
|
+
- new
|
13
|
+
bindir: bin
|
14
|
+
test_files:
|
15
|
+
- spec/**/*.rb
|
16
|
+
version: 0.0.6
|
17
|
+
project_name: new
|
18
|
+
type: js
|
data/lib/new/interpolate.rb
CHANGED
@@ -16,7 +16,9 @@ module New::Interpolate
|
|
16
16
|
process_files
|
17
17
|
end
|
18
18
|
|
19
|
-
def dir
|
19
|
+
def dir
|
20
|
+
File.file?(@src_path) ? @dest_path : File.join(@dest_path, File.basename(@src_path))
|
21
|
+
end
|
20
22
|
|
21
23
|
# Convert options to OpenStruct so we can use dot notation in the templates
|
22
24
|
#
|
@@ -22,13 +22,9 @@ describe New::Interpolate do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'should process and rename .erb files' do
|
25
|
-
# check that files exist
|
26
|
-
expect(File.exists?(File.join(@obj.dir, 'foo_template', 'baz.txt'))).to eq true
|
27
|
-
expect(File.exists?(File.join(@obj.dir, 'foo_template', 'nested_baz', 'foo.txt'))).to eq true
|
28
|
-
|
29
25
|
# check their content has been processed
|
30
|
-
expect(File.open(File.join(@obj.dir, '
|
31
|
-
expect(File.open(File.join(@obj.dir, '
|
26
|
+
expect(File.open(File.join(@obj.dir, 'baz.txt')).read).to include 'foo baz'
|
27
|
+
expect(File.open(File.join(@obj.dir, 'nested_baz', 'foo.txt')).read).to include 'foo baz'
|
32
28
|
end
|
33
29
|
|
34
30
|
it 'should create dot notation accessible options' do
|
data/tasks/gem/gem.rb
CHANGED
data/templates/js/.gitignore
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: new
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Brewster
|
@@ -18,6 +18,7 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
|
+
- ".new"
|
21
22
|
- ".rspec"
|
22
23
|
- Gemfile
|
23
24
|
- Gemfile.lock
|
@@ -34,8 +35,6 @@ files:
|
|
34
35
|
- lib/new/task.rb
|
35
36
|
- lib/new/template.rb
|
36
37
|
- lib/new/version.rb
|
37
|
-
- new_project/.new
|
38
|
-
- new_project/custom_bar_template/.new
|
39
38
|
- spec/fixtures/custom/.new
|
40
39
|
- spec/fixtures/custom/tasks/custom_bar_task/custom_bar_task.rb
|
41
40
|
- spec/fixtures/custom/templates/custom_bar_template/.new
|
data/new_project/.new
DELETED