mina-traackr 0.3.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/.gitignore +10 -0
- data/.rspec +1 -0
- data/.travis.yml +12 -0
- data/CONTRIBUTING.md +124 -0
- data/Gemfile +10 -0
- data/HISTORY.md +304 -0
- data/LICENSE +23 -0
- data/Makefile +29 -0
- data/Notes.md +72 -0
- data/Rakefile +20 -0
- data/Readme.md +1009 -0
- data/bin/mina +65 -0
- data/data/deploy.rb +74 -0
- data/data/deploy.sh.erb +120 -0
- data/lib/mina.rb +23 -0
- data/lib/mina/bundler.rb +44 -0
- data/lib/mina/chruby.rb +49 -0
- data/lib/mina/default.rb +144 -0
- data/lib/mina/deploy.rb +138 -0
- data/lib/mina/deploy_helpers.rb +34 -0
- data/lib/mina/exec_helpers.rb +104 -0
- data/lib/mina/foreman.rb +78 -0
- data/lib/mina/git.rb +62 -0
- data/lib/mina/helpers.rb +383 -0
- data/lib/mina/output_helpers.rb +92 -0
- data/lib/mina/rails.rb +206 -0
- data/lib/mina/rake.rb +9 -0
- data/lib/mina/rbenv.rb +47 -0
- data/lib/mina/rvm.rb +88 -0
- data/lib/mina/settings.rb +32 -0
- data/lib/mina/ssh_helpers.rb +122 -0
- data/lib/mina/tools.rb +20 -0
- data/lib/mina/version.rb +5 -0
- data/lib/mina/whenever.rb +27 -0
- data/manual/index.md +15 -0
- data/manual/modules.md +2 -0
- data/mina.gemspec +17 -0
- data/spec/command_helper.rb +52 -0
- data/spec/commands/cleanup_spec.rb +16 -0
- data/spec/commands/command_spec.rb +71 -0
- data/spec/commands/custom_config_spec.rb +20 -0
- data/spec/commands/deploy_spec.rb +40 -0
- data/spec/commands/outside_project_spec.rb +35 -0
- data/spec/commands/real_deploy_spec.rb +54 -0
- data/spec/commands/ssh_spec.rb +14 -0
- data/spec/commands/verbose_spec.rb +21 -0
- data/spec/dsl/invoke_spec.rb +33 -0
- data/spec/dsl/queue_spec.rb +49 -0
- data/spec/dsl/settings_in_rake_spec.rb +39 -0
- data/spec/dsl/settings_spec.rb +55 -0
- data/spec/dsl/to_spec.rb +20 -0
- data/spec/fixtures/custom_file_env/custom_deploy.rb +15 -0
- data/spec/fixtures/empty_env/config/deploy.rb +15 -0
- data/spec/helpers/output_helper_spec.rb +38 -0
- data/spec/spec_helper.rb +21 -0
- data/support/Readme-footer.md +32 -0
- data/support/Readme-header.md +17 -0
- data/support/guide.md +297 -0
- data/support/index.html +53 -0
- data/support/to_md.rb +11 -0
- data/test_env/config/deploy.rb +72 -0
- metadata +157 -0
data/support/index.html
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta charset='utf-8'>
|
4
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
5
|
+
<meta name="viewport" content="width=device-width">
|
6
|
+
|
7
|
+
<title>Mina</title>
|
8
|
+
|
9
|
+
<!-- Flatdoc -->
|
10
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
11
|
+
<script src='http://rstacruz.github.io/flatdoc/v/0.8.0/legacy.js'></script>
|
12
|
+
<script src='http://rstacruz.github.io/flatdoc/v/0.8.0/flatdoc.js'></script>
|
13
|
+
|
14
|
+
<!-- Flatdoc theme -->
|
15
|
+
<link href='http://rstacruz.github.io/flatdoc/v/0.8.0/theme-white/style.css' rel='stylesheet'>
|
16
|
+
<script src='http://rstacruz.github.io/flatdoc/v/0.8.0/theme-white/script.js'></script>
|
17
|
+
|
18
|
+
<!-- Meta -->
|
19
|
+
<meta content="Mina" property="og:title">
|
20
|
+
<meta content="Mina deployer tool." name="description">
|
21
|
+
|
22
|
+
<!-- Initializer -->
|
23
|
+
<script>
|
24
|
+
Flatdoc.run({
|
25
|
+
fetcher: location.hostname.match(/localhost/) ? Flatdoc.file('../Readme.md') : Flatdoc.github('nadarei/mina')
|
26
|
+
});
|
27
|
+
</script>
|
28
|
+
</head>
|
29
|
+
<body role='flatdoc'>
|
30
|
+
|
31
|
+
<div class='header'>
|
32
|
+
<div class='left'>
|
33
|
+
<h1>Mina</h1>
|
34
|
+
<ul>
|
35
|
+
<li><a href='https://github.com/nadarei/mina'>View on GitHub</a></li>
|
36
|
+
<li><a href='https://github.com/nadarei/mina/issues'>Issues</a></li>
|
37
|
+
</ul>
|
38
|
+
</div>
|
39
|
+
<div class='right'>
|
40
|
+
<!-- GitHub buttons: see http://ghbtns.com -->
|
41
|
+
<iframe src="http://ghbtns.com/github-btn.html?user=nadarei&repo=mina&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="110" height="20"></iframe>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div class='content-root'>
|
46
|
+
<div class='menubar'>
|
47
|
+
<div class='menu section' role='flatdoc-menu'></div>
|
48
|
+
</div>
|
49
|
+
<div role='flatdoc-content' class='content'></div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</body>
|
53
|
+
</html>
|
data/support/to_md.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
c = /(?:#|\/\/)/ # Comment prefix
|
3
|
+
lang = "ruby" # Default language
|
4
|
+
blocks = STDIN.read.scan(/(?:^[ \t]*#{c} [^\n]*\n)+/) # Read contiguous comments
|
5
|
+
blocks.map! { |s| s.gsub!(/(?:^|\n)+[ \t]*#{c} /, "\n") } # Strip out prefixes
|
6
|
+
|
7
|
+
# Code blocks
|
8
|
+
md = blocks.join("")
|
9
|
+
md.gsub!(/((?:^ .*\n+)+)/) { |f| "~~~ #{lang}\n" + f.gsub(/^ /, '').gsub(/\s*$/, '') + "\n~~~\n\n" }
|
10
|
+
|
11
|
+
puts md
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# NOTE:
|
2
|
+
# Yes, you can deploy this project. It will deploy into the ./deploy/
|
3
|
+
# directory. The commands have been stubbed, so it's harmless. No rails or
|
4
|
+
# bundler magic will happen.
|
5
|
+
|
6
|
+
# ASSUMPTIONS:
|
7
|
+
# - You have git installed. (of course you do)
|
8
|
+
# - You have SSH enabled. In OS X, this is "Remote Login" under the Sharing pref pane.
|
9
|
+
# - You have your own SSH key added to your own user so you can SSH to your own machine.
|
10
|
+
|
11
|
+
# In fact, let's make that folder right now.
|
12
|
+
require 'fileutils'
|
13
|
+
FileUtils.mkdir_p "#{Dir.pwd}/deploy"
|
14
|
+
FileUtils.mkdir_p "#{Dir.pwd}/deploy/config"
|
15
|
+
File.open("#{Dir.pwd}/deploy/config/database.yml", 'w') { |f| f.write "Hello" }
|
16
|
+
|
17
|
+
# -- Stubs end, deploy script begins! --------------
|
18
|
+
|
19
|
+
require 'mina/rails'
|
20
|
+
require 'mina/bundler'
|
21
|
+
require 'mina/git'
|
22
|
+
|
23
|
+
set :domain, 'localhost'
|
24
|
+
set :deploy_to, "#{Dir.pwd}/deploy"
|
25
|
+
set :repository, "#{Mina.root_path}"
|
26
|
+
set :shared_paths, ['config/database.yml']
|
27
|
+
|
28
|
+
set :keep_releases, 2
|
29
|
+
|
30
|
+
task :environment do
|
31
|
+
queue %[echo "-----> Loading env"]
|
32
|
+
end
|
33
|
+
|
34
|
+
desc "Deploys."
|
35
|
+
task :deploy => :environment do
|
36
|
+
queue "bundle() { true; }" # Stub the bundle command.
|
37
|
+
|
38
|
+
deploy do
|
39
|
+
queue %[ruby -e "\\$stderr.write \\\"This is stdout output\n\\\""]
|
40
|
+
invoke :'git:clone'
|
41
|
+
invoke :'deploy:link_shared_paths'
|
42
|
+
invoke :'bundle:install'
|
43
|
+
invoke :'rails:db_migrate'
|
44
|
+
|
45
|
+
to :build do
|
46
|
+
queue "touch build.txt"
|
47
|
+
end
|
48
|
+
to :launch do
|
49
|
+
invoke :'passenger:restart'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Restarts the passenger server."
|
55
|
+
task :restart do
|
56
|
+
invoke :'passenger:restart'
|
57
|
+
end
|
58
|
+
|
59
|
+
namespace :passenger do
|
60
|
+
task :restart do
|
61
|
+
queue %{
|
62
|
+
echo "-----> Restarting passenger"
|
63
|
+
#{echo_cmd %[mkdir -p tmp]}
|
64
|
+
#{echo_cmd %[touch tmp/restart.txt]}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
task :get_password do
|
70
|
+
set :term_mode, :pretty
|
71
|
+
queue %[echo "-> Getting password"; echo -n "Password: "; read x; echo ""; echo out: $x;]
|
72
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mina-traackr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Rico Sta. Cruz
|
9
|
+
- Michael Galero
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-04-04 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: open4
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :runtime
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
description: Really fast deployer and server automation tool.
|
64
|
+
email:
|
65
|
+
- rico@nadarei.co
|
66
|
+
- mikong@nadarei.co
|
67
|
+
executables:
|
68
|
+
- mina
|
69
|
+
extensions: []
|
70
|
+
extra_rdoc_files: []
|
71
|
+
files:
|
72
|
+
- .gitignore
|
73
|
+
- .rspec
|
74
|
+
- .travis.yml
|
75
|
+
- CONTRIBUTING.md
|
76
|
+
- Gemfile
|
77
|
+
- HISTORY.md
|
78
|
+
- LICENSE
|
79
|
+
- Makefile
|
80
|
+
- Notes.md
|
81
|
+
- Rakefile
|
82
|
+
- Readme.md
|
83
|
+
- bin/mina
|
84
|
+
- data/deploy.rb
|
85
|
+
- data/deploy.sh.erb
|
86
|
+
- lib/mina.rb
|
87
|
+
- lib/mina/bundler.rb
|
88
|
+
- lib/mina/chruby.rb
|
89
|
+
- lib/mina/default.rb
|
90
|
+
- lib/mina/deploy.rb
|
91
|
+
- lib/mina/deploy_helpers.rb
|
92
|
+
- lib/mina/exec_helpers.rb
|
93
|
+
- lib/mina/foreman.rb
|
94
|
+
- lib/mina/git.rb
|
95
|
+
- lib/mina/helpers.rb
|
96
|
+
- lib/mina/output_helpers.rb
|
97
|
+
- lib/mina/rails.rb
|
98
|
+
- lib/mina/rake.rb
|
99
|
+
- lib/mina/rbenv.rb
|
100
|
+
- lib/mina/rvm.rb
|
101
|
+
- lib/mina/settings.rb
|
102
|
+
- lib/mina/ssh_helpers.rb
|
103
|
+
- lib/mina/tools.rb
|
104
|
+
- lib/mina/version.rb
|
105
|
+
- lib/mina/whenever.rb
|
106
|
+
- manual/index.md
|
107
|
+
- manual/modules.md
|
108
|
+
- mina.gemspec
|
109
|
+
- spec/command_helper.rb
|
110
|
+
- spec/commands/cleanup_spec.rb
|
111
|
+
- spec/commands/command_spec.rb
|
112
|
+
- spec/commands/custom_config_spec.rb
|
113
|
+
- spec/commands/deploy_spec.rb
|
114
|
+
- spec/commands/outside_project_spec.rb
|
115
|
+
- spec/commands/real_deploy_spec.rb
|
116
|
+
- spec/commands/ssh_spec.rb
|
117
|
+
- spec/commands/verbose_spec.rb
|
118
|
+
- spec/dsl/invoke_spec.rb
|
119
|
+
- spec/dsl/queue_spec.rb
|
120
|
+
- spec/dsl/settings_in_rake_spec.rb
|
121
|
+
- spec/dsl/settings_spec.rb
|
122
|
+
- spec/dsl/to_spec.rb
|
123
|
+
- spec/fixtures/custom_file_env/custom_deploy.rb
|
124
|
+
- spec/fixtures/empty_env/config/deploy.rb
|
125
|
+
- spec/helpers/output_helper_spec.rb
|
126
|
+
- spec/spec_helper.rb
|
127
|
+
- support/Readme-footer.md
|
128
|
+
- support/Readme-header.md
|
129
|
+
- support/guide.md
|
130
|
+
- support/index.html
|
131
|
+
- support/to_md.rb
|
132
|
+
- test_env/config/deploy.rb
|
133
|
+
homepage: http://github.com/nadarei/mina
|
134
|
+
licenses: []
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ! '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 1.8.24
|
154
|
+
signing_key:
|
155
|
+
specification_version: 3
|
156
|
+
summary: Really fast deployer and server automation tool.
|
157
|
+
test_files: []
|