pandafu 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Zach Bonham
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 ADDED
@@ -0,0 +1,19 @@
1
+ = panda
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to panda
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2010 Zach Bonham. See LICENSE.txt for
18
+ further details.
19
+
@@ -0,0 +1,15 @@
1
+
2
+
3
+ module Panda
4
+
5
+ class ProjectItem
6
+ attr_accessor :projectId, :name, :relativePath
7
+
8
+ def initialize(projectId, name, relativePath)
9
+ @projectId = projectId
10
+ @name = name
11
+ @relativePath = relativePath
12
+ end
13
+ end
14
+
15
+ end
@@ -0,0 +1,62 @@
1
+ module Panda
2
+
3
+
4
+ class SolutionRepository
5
+
6
+ NAME = 1
7
+ RELATIVE_PATH = 2
8
+ ID = 3
9
+
10
+ attr_accessor :solution_path
11
+
12
+ def initialize(filename)
13
+
14
+ raise "file not found: " + filename unless File.exist? filename
15
+ @solution_path = filename
16
+
17
+ end
18
+
19
+ def all
20
+
21
+ get_projects(@solution_path)
22
+
23
+ end
24
+
25
+
26
+ # TODO - add find_by as needed?
27
+ #
28
+
29
+ private
30
+
31
+ def get_projects(filename)
32
+
33
+ projects = []
34
+
35
+ contents = read_file(filename)
36
+
37
+ contents.scan(/^Project\(.*/) { |line|
38
+ tokens = line.split(/,|=/)
39
+ projects << ProjectItem.new(
40
+ tokens[ID],
41
+ tokens[NAME],
42
+ tokens[RELATIVE_PATH])
43
+ }
44
+
45
+ return projects
46
+
47
+ end
48
+
49
+ def read_file(filename)
50
+
51
+ data = ''
52
+ file = File.open(filename, 'r')
53
+ file.each_line do |line|
54
+ data += line
55
+ end
56
+
57
+ data
58
+ end
59
+
60
+
61
+ end
62
+ end
data/lib/panda.rb ADDED
@@ -0,0 +1,9 @@
1
+
2
+ module Panda
3
+
4
+ require 'panda/solution_repository'
5
+ require 'panda/project_item'
6
+
7
+ VERSION = "0.0.1"
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,71 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pandafu
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Zach Bonham
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-12-25 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Packaging ANd Deployment Automation Kung Fu for .NET leveraging Ruby, if you dare!
23
+ email: zachbonham@gmail.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - LICENSE
32
+ - README.rdoc
33
+ - lib/panda.rb
34
+ - lib/panda/project_item.rb
35
+ - lib/panda/solution_repository.rb
36
+ has_rdoc: true
37
+ homepage: https://github.com/zachbonham/rackit
38
+ licenses: []
39
+
40
+ post_install_message:
41
+ rdoc_options: []
42
+
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ hash: 3
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ requirements: []
64
+
65
+ rubyforge_project:
66
+ rubygems_version: 1.3.7
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Packaging ANd Deployment Automation Kung Fu for .NET
70
+ test_files: []
71
+