seabass 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/seabass/feature_consumer.rb +1 -1
- data/lib/seabass/feature_packager.rb +5 -3
- data/lib/seabass/package_consumer.rb +28 -0
- data/readme.textile +4 -13
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
@@ -12,7 +12,7 @@ class FeatureConsumer
|
|
12
12
|
raise "The directory packages should be copied to has not been specified" if @consumer_dir.nil?
|
13
13
|
raise "The name of the application has not been specified" if @application_name.nil?
|
14
14
|
|
15
|
-
Dir[@package_dir + "
|
15
|
+
Dir[@package_dir + "/**/#{@application_name}/**/**"].each do |resource|
|
16
16
|
raise "Could not find the app name in the resource type" if resource.match(/.*\/#{@application_name}\/(.*)/).nil?
|
17
17
|
|
18
18
|
destination = File.expand_path(File.join(@consumer_dir, $1))
|
@@ -16,13 +16,15 @@ class FeaturePackager
|
|
16
16
|
raise "Please specify the directory where the features to package exist" if @source_dir.nil?
|
17
17
|
raise "Please specify the directory packages should be placed into" if @package_dir.nil?
|
18
18
|
|
19
|
-
Dir[@source_dir + '
|
19
|
+
Dir[@source_dir + '/**/feature.yml'].each do |feature|
|
20
20
|
next if File.basename(File.dirname(feature)).downcase == File.basename(@source_dir).downcase
|
21
21
|
|
22
22
|
feature_config = YAML.load(File.read(feature))
|
23
|
+
|
24
|
+
raise "The feature config does not contain the feature name" if !feature_config.has_key?('name')
|
23
25
|
raise "The feature config does not contain the destination name" if !feature_config.has_key?('destination_name')
|
24
|
-
|
25
|
-
destination = File.expand_path(File.join(@package_dir, feature_config['destination_name']))
|
26
|
+
|
27
|
+
destination = File.expand_path(File.join(@package_dir, feature_config['name'], feature_config['destination_name']))
|
26
28
|
FileUtils.mkdir_p(destination)
|
27
29
|
|
28
30
|
feature_root = File.expand_path(File.dirname(feature) + '/../')
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'ftools'
|
2
|
+
|
3
|
+
class PackageConsumer
|
4
|
+
attr_accessor :package_dir, :consumer_dir, :application_name
|
5
|
+
|
6
|
+
def execute()
|
7
|
+
raise "The directory containing the packages has not been specified" if @package_dir.nil?
|
8
|
+
raise "The directory packages should be copied to has not been specified" if @consumer_dir.nil?
|
9
|
+
raise "The name of the application has not been specified" if @application_name.nil?
|
10
|
+
|
11
|
+
files = Dir[@package_dir + "**/#{@application_name}/**/**"]
|
12
|
+
|
13
|
+
puts "Found #{files.length} files"
|
14
|
+
|
15
|
+
Dir[@package_dir + "**/#{@application_name}/**/**"].each do |resource|
|
16
|
+
raise "Could not find the app name in the resource type" if resource.match(/.*\/#{@application_name}\/(.*)/).nil?
|
17
|
+
|
18
|
+
destination = File.expand_path(File.join(@consumer_dir, $1))
|
19
|
+
next if File.directory?(resource)
|
20
|
+
|
21
|
+
dir = File.expand_path(File.dirname(destination))
|
22
|
+
FileUtils.mkdir_p(dir) if false == File.exists?(dir)
|
23
|
+
|
24
|
+
puts "Copying #{resource} to #{destination}"
|
25
|
+
File.copy(resource, destination)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/readme.textile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
h1. Seabass
|
2
2
|
|
3
|
-
A suite of Seabass-safe Rake tasks for
|
3
|
+
A suite of Seabass-safe Rake tasks for managing .NET applications
|
4
4
|
|
5
5
|
h1. Installation
|
6
6
|
|
@@ -10,16 +10,7 @@ To install the gem you just need to run
|
|
10
10
|
gem install seabass
|
11
11
|
</pre>
|
12
12
|
|
13
|
-
h1.
|
13
|
+
h1. Documentation
|
14
14
|
|
15
|
-
<
|
16
|
-
|
17
|
-
require 'seabass'
|
18
|
-
|
19
|
-
robocopy do |r|
|
20
|
-
r.files << "foo.txt"
|
21
|
-
r.files << "bar.txt"
|
22
|
-
r.directories << "c:/temp/source/baz"
|
23
|
-
r.destination = "c:/temp/destination"
|
24
|
-
end
|
25
|
-
</pre>
|
15
|
+
* <a href="http://github.com/jhollingworth/Seabass/wiki/Robocopy">Robocopy</a>
|
16
|
+
* <a href="http://github.com/jhollingworth/Seabass/wiki/Features">Features</a>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seabass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 4
|
10
|
+
version: 0.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Hollingworth
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-25 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/seabass/feature_consumer.rb
|
119
119
|
- lib/seabass/feature_packager.rb
|
120
120
|
- lib/seabass/log.rb
|
121
|
+
- lib/seabass/package_consumer.rb
|
121
122
|
- lib/seabass/robocopy.rb
|
122
123
|
- lib/seabass/website_deploy_verifier.rb
|
123
124
|
- lib/tools/robocopy.exe
|