new 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afe2f42c9590339bfbaaec0eacf6589142d06328
4
- data.tar.gz: e997f01b1ae47182531cf8358dfc7f391bdb1ab4
3
+ metadata.gz: 1716110bb44e30d0113c7eace999b08132f7176b
4
+ data.tar.gz: 6466d89f1b6100328e8e61464316d967c8396ac5
5
5
  SHA512:
6
- metadata.gz: c10a6b9ac56adc91300818bddcc0a3af01a75b0230406b7649ff0ce7b189298da4215753f86c9497eeecf6d04eb3c60965adfc5dac0ea2548b5b1a6bab755484
7
- data.tar.gz: f47bd284b19253c6d6f3920b8c7fa607a9501843d09b02435635d5dd60a4e04f8de4e5715b6a5653741beca3cb7b3368341a580d5fe10d5e0fafdbfa469fed54
6
+ metadata.gz: ed64aacab561a9ad3bf085cb42f235e9cb8abae5309c8536823cae382cafa56799202bc22012594c1f71ca4ad717439a2c0272a8da431e801cad99a943655ace
7
+ data.tar.gz: a64e6383a03fe839a610239f87d22be94087ce30e7318e2980153e9ff78adf7430f9bb740fb43e97ecd5309e5dc31004cf00c3067c013b4f85862b553db109d4
data/.gitignore CHANGED
@@ -1,7 +1,6 @@
1
1
  .DS_Store
2
2
  .bundle
3
3
  .tmp
4
- .new
5
4
  pkg
6
5
  tmp
7
6
  *.gem
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
@@ -16,7 +16,9 @@ module New::Interpolate
16
16
  process_files
17
17
  end
18
18
 
19
- def dir; @dest_path; end
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, 'foo_template', 'baz.txt')).read).to include 'foo baz'
31
- expect(File.open(File.join(@obj.dir, 'foo_template', 'nested_baz', 'foo.txt')).read).to include 'foo baz'
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
@@ -44,7 +44,6 @@ private
44
44
  files = []
45
45
  @gemspec[file_attr].each do |glob|
46
46
  matching_files = FileList.new(glob).select{ |f| File.file? f }
47
- matching_files.delete '.new'
48
47
  matching_files.delete '.gemspec'
49
48
 
50
49
  if matching_files.empty?
@@ -1,3 +1,2 @@
1
1
  .bundle
2
- .new
3
2
  .tmp
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.5
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
@@ -1,2 +0,0 @@
1
- ---
2
- ...
@@ -1,3 +0,0 @@
1
- tasks:
2
- foo_task:
3
- custom_bar_task: