umbrella 0.0.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.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Alex Zhukov
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,18 @@
1
+ = umbrella
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but
13
+ bump version in a commit by itself I can ignore when I pull)
14
+ * Send me a pull request. Bonus points for topic branches.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2009 Alex Zhukov. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,48 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ Rake::TaskManager.class_eval do
5
+ def remove_task(task_name)
6
+ @tasks.delete(task_name.to_s)
7
+ end
8
+ end
9
+
10
+ def remove_task(task_name)
11
+ Rake.application.remove_task(task_name)
12
+ end
13
+
14
+ begin
15
+ require 'jeweler'
16
+ Jeweler::Tasks.new do |gem|
17
+ gem.name = "umbrella"
18
+ gem.summary = %Q{git based deployment tool}
19
+ gem.description = %Q{git based deployment tool that keeps its config files separate and can deploy applications consisting of more than one repository}
20
+ gem.email = "baron.pampa@gmail.com"
21
+ gem.homepage = "http://github.com/pampa/umbrella"
22
+ gem.authors = ["Alex Zhukov"]
23
+ gem.add_dependency "thor"
24
+ gem.add_dependency "git"
25
+ gem.add_development_dependency "thoughtbot-shoulda"
26
+ gem.files = FileList["[A-Z]*", "{bin,lib,test}/**/*", 'lib/jeweler/templates/.gitignore']
27
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
28
+ end
29
+ rescue LoadError
30
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
31
+ end
32
+
33
+ remove_task :install
34
+ task :install => [:build] do
35
+ version = `cat VERSION`.strip
36
+ sh "gem install pkg/umbrella-#{version}.gem"
37
+ end
38
+
39
+ require 'rake/testtask'
40
+ Rake::TestTask.new(:test) do |test|
41
+ test.libs << 'lib' << 'test'
42
+ test.pattern = 'test/**/*_test.rb'
43
+ test.verbose = true
44
+ end
45
+
46
+ task :test => :check_dependencies
47
+
48
+ task :default => :install
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.0
data/bin/um ADDED
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'thor'
5
+ require 'git'
6
+ require 'umbrella/helpers'
7
+ require 'umbrella/manifest'
8
+
9
+ class Um < Thor
10
+ include Umbrella::Helpers
11
+
12
+ desc "init [REPO]", "initialize an umbrella project in current directory and add [REPO] as remote origin"
13
+ def init(repo=nil)
14
+
15
+ directory = Dir.getwd
16
+ git_directory = directory + "/.git"
17
+ if File.directory? git_directory then
18
+ error "there is already a #{git_directory} directory here, aborting"
19
+ else
20
+ info "git init #{directory}"
21
+ g = Git.init(directory)
22
+
23
+ if !repo.nil? then
24
+ info "git remote add origin #{repo}"
25
+ g.add_remote('origin', repo)
26
+ end
27
+
28
+ info "adding umbrella thor actions"
29
+ create_file directory + "/Thorfile" do
30
+ "require \"rubygems\"\nrequire \"umbrella\"\nrequire \"umbrella/tasks\"\n\n# custom thor tasks go here"
31
+ end
32
+
33
+ info "adding umbrella manifest"
34
+ create_file directory + "/manifest.rb" do
35
+ Umbrella::Manifest.new.generate
36
+ end
37
+
38
+ info "adding empty .gitignore"
39
+ create_file directory + "/.gitignore" do
40
+ "# ignore this"
41
+ end
42
+
43
+ info "git add Thorfile"
44
+ g.add(directory + "/Thorfile")
45
+
46
+ info "git add manifest.rb"
47
+ g.add(directory + "/manifest.rb")
48
+
49
+ info "git add .gitignore"
50
+ g.add(directory + "/.gitignore")
51
+
52
+ info "git commit --all -m \"umbrella project init\""
53
+ g.commit_all("umbrella project init")
54
+ end
55
+ end
56
+ end
57
+
58
+ Um.start
data/lib/umbrella.rb ADDED
@@ -0,0 +1 @@
1
+ require 'umbrella/helpers'
@@ -0,0 +1,16 @@
1
+ require 'rubygems'
2
+ require 'thor'
3
+
4
+ module Umbrella
5
+ module Helpers
6
+ include Thor::Actions
7
+
8
+ def error(message)
9
+ say "#{message}", :red
10
+ end
11
+
12
+ def info(message)
13
+ say "#{message}", :blue
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ module Umbrella
2
+ class Manifest
3
+ def generate
4
+ out = "## umbrella manifest file\n"
5
+ out << "## this file is autogenerated, any changes to this file will be lost\n"
6
+ out << "## \n\n"
7
+ out << "class Manifest < Umbrella::Manifest\n"
8
+ out << "end\n"
9
+ return out
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'thor'
3
+
4
+ module Umbrella
5
+ class Unit < Thor
6
+ desc "add [UNIT_NAME]", "add unit to umbrella project (unit must be a git repo in #{Dir.getwd}/UNIT_NAME)"
7
+ def add(unit_name)
8
+ end
9
+
10
+ desc "pull [REPO_URL]", "pull unit into umbrella project (REPO_URL must be a valid git repository url)"
11
+ def pull(repo_url)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ require 'umbrella'
8
+
9
+ class Test::Unit::TestCase
10
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UmbrellaTest < Test::Unit::TestCase
4
+ should "be true" do
5
+ assert(true)
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,96 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: umbrella
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Alex Zhukov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-17 00:00:00 +04:00
13
+ default_executable: um
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: thor
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: git
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: thoughtbot-shoulda
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ description: git based deployment tool that keeps its config files separate and can deploy applications consisting of more than one repository
46
+ email: baron.pampa@gmail.com
47
+ executables:
48
+ - um
49
+ extensions: []
50
+
51
+ extra_rdoc_files:
52
+ - LICENSE
53
+ - README.rdoc
54
+ files:
55
+ - LICENSE
56
+ - README.rdoc
57
+ - Rakefile
58
+ - VERSION
59
+ - bin/um
60
+ - lib/umbrella.rb
61
+ - lib/umbrella/helpers.rb
62
+ - lib/umbrella/manifest.rb
63
+ - lib/umbrella/tasks.rb
64
+ - test/test_helper.rb
65
+ - test/umbrella_test.rb
66
+ has_rdoc: true
67
+ homepage: http://github.com/pampa/umbrella
68
+ licenses: []
69
+
70
+ post_install_message:
71
+ rdoc_options:
72
+ - --charset=UTF-8
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: "0"
86
+ version:
87
+ requirements: []
88
+
89
+ rubyforge_project:
90
+ rubygems_version: 1.3.5
91
+ signing_key:
92
+ specification_version: 3
93
+ summary: git based deployment tool
94
+ test_files:
95
+ - test/test_helper.rb
96
+ - test/umbrella_test.rb