pave 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -12
- data/bin/pave +18 -0
- data/lib/pave/concrete.rb +0 -1
- data/lib/pave/database.rb +0 -2
- data/lib/pave/deploy.rb +25 -0
- data/lib/pave/version.rb +1 -1
- data/lib/pave/virtual_host.rb +0 -1
- data/lib/pave.rb +1 -0
- data/resources/deploy.sh +8 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51010f11d688daf56a02e4d565813dcec29436dc
|
4
|
+
data.tar.gz: a2e67566e859660b1f2ad07c0748ed6075b200ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0dee91466eb5f6092fcf3c7be14e66791ad505628a364ebabbeb214b8333e6d484d9f8db107c135a7de6e0ff16fa2a24bf7659b84209ebf7c07053c389b441b
|
7
|
+
data.tar.gz: 0d3cc447999ccb062a9b87d237c58e060f896d53e0c215d641ff43bf9dd997bba83d297e5f7739f4ba088d683327f4146f05e8b14b190c7539c54f508efcd8b3
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Provides a set of command line tools for Concrete5.
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
Create a new Concrete5 website:
|
13
|
+
#### Create a new Concrete5 website:
|
14
14
|
|
15
15
|
$ pave new mywebsite
|
16
16
|
|
@@ -22,21 +22,30 @@ This:
|
|
22
22
|
4. Builds an app folder of commonly used folders (symlinked into the root folder so Concrete5 can find them)
|
23
23
|
5. Initializes a Git repo and adds the first ("Initial") commit.
|
24
24
|
|
25
|
-
|
25
|
+
#### Deployments
|
26
26
|
|
27
|
-
$ pave
|
28
|
-
|
29
|
-
|
27
|
+
$ pave deploy:setup
|
28
|
+
|
29
|
+
This sets up a deployment script to the remote server and deploys an initial version.
|
30
|
+
|
31
|
+
$ pave deploy
|
32
|
+
|
33
|
+
Deploys the site using git.
|
30
34
|
|
31
|
-
|
35
|
+
#### Database
|
32
36
|
|
33
|
-
|
34
|
-
1. Tell user to go set up Concrete5 in-browser once virtual host and db is set up
|
35
|
-
1. Uninstall? `pave remove mywebsite` (including virtual host)
|
36
|
-
1. Do database dumps. `pave db dump`
|
37
|
-
1. Do live database download & replace local one. `pave db download` (confirmation first)
|
38
|
-
1. Do local database upload & replace remote one. `pave db upload` (confirmation first)
|
37
|
+
TODO:
|
39
38
|
|
39
|
+
$ pave db:create
|
40
|
+
$ pave db:push
|
41
|
+
$ pave db:pull
|
42
|
+
$ pave db:backup
|
43
|
+
|
44
|
+
#### Help
|
45
|
+
|
46
|
+
$ pave --help
|
47
|
+
|
48
|
+
Outputs common tasks that pave can do.
|
40
49
|
|
41
50
|
## Contributing
|
42
51
|
|
data/bin/pave
CHANGED
@@ -146,3 +146,21 @@ command :"db:upload" do |c|
|
|
146
146
|
say "`db:upload` command not implemented yet."
|
147
147
|
end
|
148
148
|
end
|
149
|
+
|
150
|
+
command :"deploy" do |c|
|
151
|
+
c.syntax = "pave deploy"
|
152
|
+
c.description = "Deploy project to web server."
|
153
|
+
c.action do |args|
|
154
|
+
remote = args[0] || "production"
|
155
|
+
branch = args[1] || "master"
|
156
|
+
Pave::Deploy.new.deploy(remote, branch)
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
command :"deploy:setup" do |c|
|
161
|
+
c.syntax = "pave deploy:setup"
|
162
|
+
c.description = "Setup deployment via git to web server."
|
163
|
+
c.action do
|
164
|
+
Pave::Deploy.new.setup
|
165
|
+
end
|
166
|
+
end
|
data/lib/pave/concrete.rb
CHANGED
@@ -47,7 +47,6 @@ module Pave
|
|
47
47
|
gitkeep_folders.each{ |folder| sh "touch #{name}/#{folder}/.keep" }
|
48
48
|
sh "touch #{name}/files/.keep"
|
49
49
|
sh "touch #{name}/updates/.keep"
|
50
|
-
# sh "cd #{name} && git init && git add -A && git commit -m 'Initial'"
|
51
50
|
end
|
52
51
|
|
53
52
|
def gitignored_folders
|
data/lib/pave/database.rb
CHANGED
data/lib/pave/deploy.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
module Pave
|
2
|
+
class Deploy
|
3
|
+
include Pave::Shell
|
4
|
+
|
5
|
+
def setup
|
6
|
+
server = ask "Username and hostname of the remote server (e.g. user@server.com): "
|
7
|
+
folder = ask "Name of the remote directory (e.g. ~/webapps/appname/): "
|
8
|
+
remote = ask "Desired git remote name (e.g. production): "
|
9
|
+
script = File.join(File.expand_path("../..", File.dirname(__FILE__)), "resources/deploy.sh")
|
10
|
+
|
11
|
+
puts "Piping shell script to #{server} for setup."
|
12
|
+
sh "ssh #{server} 'cd #{folder}; bash -s' < #{script}"
|
13
|
+
|
14
|
+
sh "git remote remove #{remote}"
|
15
|
+
sh "git remote add #{remote} #{server}:#{folder}/deploy.git"
|
16
|
+
|
17
|
+
puts "Finished! You may now run `pave deploy` to deploy your application."
|
18
|
+
end
|
19
|
+
|
20
|
+
def deploy(remote="production", branch="master")
|
21
|
+
sh "git push #{remote} #{branch}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
data/lib/pave/version.rb
CHANGED
data/lib/pave/virtual_host.rb
CHANGED
data/lib/pave.rb
CHANGED
data/resources/deploy.sh
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pave
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamon Holmgren
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -101,10 +101,12 @@ files:
|
|
101
101
|
- lib/pave.rb
|
102
102
|
- lib/pave/concrete.rb
|
103
103
|
- lib/pave/database.rb
|
104
|
+
- lib/pave/deploy.rb
|
104
105
|
- lib/pave/shell.rb
|
105
106
|
- lib/pave/version.rb
|
106
107
|
- lib/pave/virtual_host.rb
|
107
108
|
- pave.gemspec
|
109
|
+
- resources/deploy.sh
|
108
110
|
- test/pave_test.rb
|
109
111
|
homepage: https://github.com/jamonholmgren/pave
|
110
112
|
licenses:
|