xqcoretools 0.0.2 → 0.0.3

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.
Files changed (4) hide show
  1. data/LICENSE.txt +20 -20
  2. data/README.rdoc +13 -13
  3. data/bin/xqcoretools +75 -40
  4. metadata +39 -24
data/LICENSE.txt CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2013 Mark Wong
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2013 Mark Wong
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -1,13 +1,13 @@
1
- = xqcoretools
2
-
3
- Tools for using the XQ.Core framework.
4
-
5
- Tools for synchronizing multiple CSharp projects and deploying to several platform
6
-
7
- == Usage
8
-
9
- * xqcoretools
10
-
11
- == Copyright
12
-
13
- Copyright (c) 2013 Mark Wong. See LICENSE.txt for further details.
1
+ = xqcoretools
2
+
3
+ Tools for using the XQ.Core framework.
4
+
5
+ Tools for synchronizing multiple CSharp projects and deploying to several platform
6
+
7
+ == Usage
8
+
9
+ * xqcoretools
10
+
11
+ == Copyright
12
+
13
+ Copyright (c) 2013 Mark Wong. See LICENSE.txt for further details.
data/bin/xqcoretools CHANGED
@@ -1,41 +1,76 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rubygems'
4
- require 'thor'
5
- require 'cross_platform_csproj'
6
- require 'zip/zip'
7
-
8
- class XQCoreTools < Thor
9
- desc "archive [OUTPUT] [PATHS]", "Generates a compressed archive"
10
- def archive(output, paths)
11
- FileUtils.rm(output, :force=>true)
12
-
13
- pathList = paths.split(';')
14
-
15
- currentPath = Dir.pwd
16
- puts "PACKFILE: #{output}"
17
-
18
- Zip::ZipFile.open(output, Zip::ZipFile::CREATE) do |zipfile|
19
- pathList.each do |path|
20
- XQCoreTools::archiveFilesRecursive(zipfile, path);
21
- end
22
- end
23
- end
24
-
25
- def self.archiveFilesRecursive(zipfile, path, base = '')
26
- Dir.foreach(path) do |item|
27
- subPath = "#{path}/#{item}"
28
- relPath = base == '' ? item : "#{base}/#{item}"
29
- if File.file? subPath
30
- puts "PACKING: #{relPath}"
31
- zipfile.add(relPath, subPath)
32
- else
33
- if item != '.' && item != '..'
34
- XQCoreTools::archiveFilesRecursive(zipfile, subPath, relPath)
35
- end
36
- end
37
- end
38
- end
39
- end
40
-
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'thor'
5
+ require 'cross_platform_csproj'
6
+ require 'zip/zip'
7
+
8
+ class XQCoreTools < Thor
9
+ desc "archive [OUTPUT] [PATHS]", "Generates a compressed archive"
10
+ def archive(output, paths)
11
+ FileUtils.rm(output, :force=>true)
12
+
13
+ pathList = paths.split(';')
14
+
15
+ puts "PACKFILE: #{output}"
16
+
17
+ Zip::ZipFile.open(output, Zip::ZipFile::CREATE) do |zipfile|
18
+ pathList.each do |path|
19
+ XQCoreTools::archiveFilesRecursive(zipfile, path);
20
+ end
21
+ end
22
+ end
23
+
24
+ def self.archiveFilesRecursive(zipfile, path, base = '')
25
+ Dir.foreach(path) do |item|
26
+ subPath = "#{path}/#{item}"
27
+ relPath = base == '' ? item : "#{base}/#{item}"
28
+ if File.file? subPath
29
+ puts "PACKING: #{relPath}"
30
+ zipfile.add(relPath, subPath)
31
+ else
32
+ if item != '.' && item != '..'
33
+ XQCoreTools::archiveFilesRecursive(zipfile, subPath, relPath)
34
+ end
35
+ end
36
+ end
37
+ end
38
+
39
+ desc "bundle [OUTPUT] [PATHS]", "Adds files to an existing bundle"
40
+ def bundle(output, paths)
41
+ if Dir.exists? output
42
+ puts "Output must point to an existing bundle"
43
+ return;
44
+ end
45
+
46
+ contentDirectory = "${output}/content"
47
+
48
+ FileUtils.rm(contentDirectory, :force=>true)
49
+
50
+ pathList = paths.split(';')
51
+
52
+ puts "BUNDLE: #{output}"
53
+
54
+ pathList.each do |path|
55
+ FileUtils.copy path contentDirectory
56
+
57
+ XQCoreTools::logFilesRecursive(path)
58
+ end
59
+ end
60
+
61
+ def self.logFilesRecursive(path, base = '')
62
+ Dir.foreach(path) do |item|
63
+ subPath = "#{path}/#{item}"
64
+ relPath = base == '' ? item : "#{base}/#{item}"
65
+ if File.file? subPath
66
+ puts "COPYING: #{relPath}"
67
+ else
68
+ if item != '.' && item != '..'
69
+ XQCoreTools::logFilesRecursive(subPath, relPath)
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+
41
76
  XQCoreTools.start
metadata CHANGED
@@ -1,49 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: xqcoretools
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Mark Wong
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2013-02-20 00:00:00.000000000 Z
16
+
17
+ date: 2013-03-05 00:00:00 -08:00
18
+ default_executable:
13
19
  dependencies: []
14
- description: Tools for synchronizing multiple CSharp projects and deploying to several
15
- platform
20
+
21
+ description: Tools for synchronizing multiple CSharp projects and deploying to several platform
16
22
  email: mark.sl.wong@gmail.com
17
- executables:
23
+ executables:
18
24
  - xqcoretools
19
25
  extensions: []
26
+
20
27
  extra_rdoc_files: []
21
- files:
28
+
29
+ files:
22
30
  - bin/xqcoretools
23
31
  - README.rdoc
24
32
  - LICENSE.txt
33
+ has_rdoc: true
25
34
  homepage: http://github.com/markslwong/XQ.Core.Tools
26
35
  licenses: []
36
+
27
37
  post_install_message:
28
38
  rdoc_options: []
29
- require_paths:
39
+
40
+ require_paths:
30
41
  - lib
31
- required_ruby_version: !ruby/object:Gem::Requirement
32
- none: false
33
- requirements:
34
- - - ! '>='
35
- - !ruby/object:Gem::Version
36
- version: '0'
37
- required_rubygems_version: !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ! '>='
41
- - !ruby/object:Gem::Version
42
- version: '0'
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ required_rubygems_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
43
56
  requirements: []
57
+
44
58
  rubyforge_project:
45
- rubygems_version: 1.8.25
59
+ rubygems_version: 1.3.6
46
60
  signing_key:
47
61
  specification_version: 3
48
62
  summary: Tools for using the XQ.Core framework.
49
63
  test_files: []
64
+