namelessjon-dm-gen 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/generators/is.rb CHANGED
@@ -37,6 +37,10 @@ module DMGen
37
37
  # since we want text files processed, we have to replace the default
38
38
  # extension list.
39
39
  glob!('', %w[rb txt Rakefile LICENSE TODO])
40
+
41
+ def manifest_files
42
+ self.all_actions.map {|t| t.destination.gsub(/#{destination_root}\//,'') }.sort
43
+ end
40
44
  end
41
45
 
42
46
  add :is, Is
@@ -1,14 +1 @@
1
- History.txt
2
- LICENSE
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- TODO
7
- lib/<%= gem_name %>.rb
8
- lib/<%= gem_name %>/is/<%= snake_name %>.rb
9
- lib/<%= gem_name %>/is/version.rb
10
- spec/integration/<%= snake_name %>_spec.rb
11
- spec/spec.opts
12
- spec/spec_helper.rb
13
- tasks/spec.rb
14
- tasks/install.rb
1
+ <%= manifest_files.join("\n") %>
data/spec/adapter_spec.rb CHANGED
@@ -48,6 +48,9 @@ describe "DMGen::Adapter" do
48
48
  @result.should.be.a.match(/^Manifest.txt$/)
49
49
  end
50
50
 
51
+ it "is the sorted list of its contents" do
52
+ @result.split("\n").sort.should == @result.split("\n")
53
+ end
51
54
  end
52
55
 
53
56
  describe "version.rb" do
@@ -1,6 +1,6 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
2
 
3
- describe "DMGen::OneFile" do
3
+ describe "DMGen::Is" do
4
4
  before do
5
5
  @generator = DMGen::Is.new('/tmp', {}, 'awesome')
6
6
  end
@@ -38,4 +38,19 @@ describe "DMGen::OneFile" do
38
38
  @generator.should create('/tmp/dm-is-awesome/tasks/spec.rb')
39
39
  @generator.should create('/tmp/dm-is-awesome/tasks/install.rb')
40
40
  end
41
+
42
+ describe "Manifest.txt" do
43
+ before do
44
+ @template = @generator.template(:manifest_txt)
45
+ @result = @template.render
46
+ end
47
+
48
+ it "contains itself" do
49
+ @result.should.be.a.match(/^Manifest.txt$/)
50
+ end
51
+
52
+ it "is the sorted list of its contents" do
53
+ @result.split("\n").sort.should == @result.split("\n")
54
+ end
55
+ end
41
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namelessjon-dm-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Stott
@@ -43,7 +43,6 @@ files:
43
43
  - lib/templates/is/lib/%gem_name%/is/version.rb
44
44
  - lib/templates/is/History.txt
45
45
  - lib/templates/is/LICENSE
46
- - lib/templates/is/Manifest.txt
47
46
  - lib/templates/is/README.txt
48
47
  - lib/templates/is/Rakefile
49
48
  - lib/templates/is/TODO
@@ -55,6 +54,7 @@ files:
55
54
  - lib/templates/is/tasks
56
55
  - lib/templates/is/tasks/install.rb
57
56
  - lib/templates/is/tasks/spec.rb
57
+ - lib/templates/is/Manifest.txt
58
58
  - lib/templates/adapter
59
59
  - lib/templates/adapter/History.txt
60
60
  - lib/templates/adapter/LICENSE
@@ -76,14 +76,14 @@ files:
76
76
  - lib/templates/adapter/tasks/spec.rb
77
77
  - lib/generators
78
78
  - lib/generators/one_file.rb
79
- - lib/generators/is.rb
80
79
  - lib/generators/adapter.rb
80
+ - lib/generators/is.rb
81
81
  - lib/dm_gen.rb
82
+ - spec/is_plugin_spec.rb
82
83
  - spec/dm_gen_spec.rb
84
+ - spec/adapter_spec.rb
83
85
  - spec/spec_helper.rb
84
86
  - spec/one_file_spec.rb
85
- - spec/is_plugin_spec.rb
86
- - spec/adapter_spec.rb
87
87
  has_rdoc: true
88
88
  homepage: http://github.com/namelessjon/dm-gen
89
89
  post_install_message: