filander 0.5.3 → 0.6.0

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.
@@ -7,10 +7,10 @@ require 'filander/actions/copy_directory'
7
7
  require 'filander/actions/copy_file'
8
8
  require 'filander/actions/create_file'
9
9
  require 'filander/actions/empty_directory'
10
+ require 'filander/actions/gem_install'
10
11
  require 'filander/actions/git_clone'
11
12
  require 'filander/actions/inject_into_file'
12
13
  require 'filander/actions/inside'
13
- require 'filander/actions/install_gem'
14
14
  require 'filander/actions/template'
15
15
 
16
16
  module Filander
@@ -28,7 +28,7 @@ module Filander
28
28
  Filander.quiet = value
29
29
  end
30
30
 
31
- # can be :pretend, :skip, :force
31
+ # can be :pretend, :skip or :force
32
32
  def self.behavior(value)
33
33
  Filander.behavior = value
34
34
  end
@@ -77,9 +77,9 @@ module Filander
77
77
  include CopyFile
78
78
  include CreateFile
79
79
  include EmptyDirectory
80
+ include GemInstall
80
81
  include GitClone
81
82
  include InjectIntoFile
82
83
  include Inside
83
- include InstallGem
84
84
  include Template
85
85
  end
@@ -1,8 +1,8 @@
1
1
  module Filander
2
- module InstallGem
2
+ module GemInstall
3
3
  include Base
4
4
 
5
- def install_gem(name, version = nil)
5
+ def gem_install(name, version = nil)
6
6
  if version
7
7
  gem_install_args = "-v=#{version} #{name}"
8
8
  report_name = "#{name} #{version}"
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Filander" do
4
+ describe "Chown" do
5
+ include Filander::Chown
6
+
7
+ before do
8
+ setup_roots
9
+ end
10
+
11
+ after do
12
+ teardown_roots
13
+ end
14
+
15
+ it "should change uid"
16
+ it "should recursively change uid"
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Filander" do
4
+ describe "Cmd" do
5
+ include Filander::Cmd
6
+
7
+ before do
8
+ setup_roots
9
+ end
10
+
11
+ after do
12
+ teardown_roots
13
+ end
14
+
15
+ it "should execute command"
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Filander" do
4
+ describe "CopyDirectory" do
5
+ include Filander::CopyDirectory
6
+
7
+ before do
8
+ setup_roots
9
+ end
10
+
11
+ after do
12
+ teardown_roots
13
+ end
14
+
15
+ it "should copy directory"
16
+ it "should recursively copy directory"
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Filander" do
4
+ describe "GemInstall" do
5
+ include Filander::GemInstall
6
+
7
+ before do
8
+ setup_roots
9
+ end
10
+
11
+ after do
12
+ teardown_roots
13
+ end
14
+
15
+ it "should install gem"
16
+ it "should not install gem when already installed"
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+
3
+ describe "Filander" do
4
+ describe "GitClone" do
5
+ include Filander::GitClone
6
+
7
+ before do
8
+ setup_roots
9
+ end
10
+
11
+ after do
12
+ teardown_roots
13
+ end
14
+
15
+ it "should clone repro"
16
+ end
17
+ end
@@ -3,21 +3,54 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
  describe "Filander" do
4
4
  describe "source_root" do
5
5
  it "should be accessible" do
6
+ old = Filander.source_root
6
7
  Filander.source_root = 'abc'
7
8
  Filander.source_root.should == 'abc'
8
- Filander.source_root = nil
9
+ Filander.source_root = old
9
10
  end
10
11
  end
11
12
 
12
13
  describe "destination_root" do
13
14
  it "should be accessible" do
15
+ old = Filander.destination_root
14
16
  Filander.destination_root = 'abc'
15
17
  Filander.destination_root.should == 'abc'
16
- Filander.destination_root = nil
18
+ Filander.destination_root = old
19
+ end
20
+ end
21
+
22
+ describe "quiet" do
23
+ it "should be accessible" do
24
+ old = Filander.quiet
25
+ Filander.quiet = true
26
+ Filander.quiet.should == true
27
+ Filander.quiet = old
28
+ end
29
+ end
30
+
31
+ describe "behavior" do
32
+ it "should be accessible" do
33
+ old = Filander.behavior
34
+ Filander.behavior = :skip
35
+ Filander.behavior.should == :skip
36
+ Filander.behavior = old
17
37
  end
18
38
  end
19
39
 
20
40
  describe "actions" do
41
+ it "should include Cmd" do
42
+ Filander.included_modules.should include(Filander::Cmd)
43
+ end
44
+
45
+
46
+ it "should include Chown" do
47
+ Filander.included_modules.should include(Filander::Chown)
48
+ end
49
+
50
+ it "should include CopyDirectory" do
51
+ Filander.included_modules.should include(Filander::CopyDirectory)
52
+ end
53
+
21
54
  it "should include CopyFile" do
22
55
  Filander.included_modules.should include(Filander::CopyFile)
23
56
  end
@@ -30,6 +63,10 @@ describe "Filander" do
30
63
  Filander.included_modules.should include(Filander::EmptyDirectory)
31
64
  end
32
65
 
66
+ it "should include GitClone" do
67
+ Filander.included_modules.should include(Filander::GitClone)
68
+ end
69
+
33
70
  it "should include InjectIntoFile" do
34
71
  Filander.included_modules.should include(Filander::InjectIntoFile)
35
72
  end
@@ -38,6 +75,10 @@ describe "Filander" do
38
75
  Filander.included_modules.should include(Filander::Inside)
39
76
  end
40
77
 
78
+ it "should include InstallGem" do
79
+ Filander.included_modules.should include(Filander::InstallGem)
80
+ end
81
+
41
82
  it "should include Template" do
42
83
  Filander.included_modules.should include(Filander::Template)
43
84
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
8
- - 3
9
- version: 0.5.3
7
+ - 6
8
+ - 0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Johannes J. Schmidt
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-09 00:00:00 +02:00
17
+ date: 2010-05-06 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -49,10 +49,10 @@ files:
49
49
  - lib/filander/actions/copy_file.rb
50
50
  - lib/filander/actions/create_file.rb
51
51
  - lib/filander/actions/empty_directory.rb
52
+ - lib/filander/actions/gem_install.rb
52
53
  - lib/filander/actions/git_clone.rb
53
54
  - lib/filander/actions/inject_into_file.rb
54
55
  - lib/filander/actions/inside.rb
55
- - lib/filander/actions/install_gem.rb
56
56
  - lib/filander/actions/template.rb
57
57
  - LICENSE
58
58
  - README.rdoc
@@ -89,13 +89,18 @@ summary: File manipulation tools
89
89
  test_files:
90
90
  - spec/filander_spec.rb
91
91
  - spec/spec_helper.rb
92
+ - spec/filander/actions/copy_directory_spec.rb
92
93
  - spec/filander/actions/inside_spec.rb
93
94
  - spec/filander/actions/copy_file_spec.rb
94
95
  - spec/filander/actions/inject_into_file_spec.rb
96
+ - spec/filander/actions/chown_spec.rb
95
97
  - spec/filander/actions/template_spec.rb
96
98
  - spec/filander/actions/empty_directory_spec.rb
97
99
  - spec/filander/actions/create_file_spec.rb
100
+ - spec/filander/actions/gem_install_spec.rb
98
101
  - spec/filander/actions/base_spec.rb
102
+ - spec/filander/actions/cmd_spec.rb
103
+ - spec/filander/actions/git_clone_spec.rb
99
104
  - spec/source/myfile
100
105
  - spec/source/mydir/myfile
101
106
  - spec/source/mydir/mytemplate