pupcap 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,12 @@
1
+ set :repository, "git@github.com:example/example.get"
2
+
1
3
  task :production do
2
4
  role :site, 'example.com'
3
5
  end
4
6
 
5
7
  task :vagrant do
8
+ # Copy local files to remote host without any scm
9
+ set :pupcap_use_rsync, true
6
10
  set :environment, "development"
7
11
  role :site, "vagrant@<%= options[:ip] %>"
8
12
  end
@@ -9,6 +9,17 @@ module Pupcap::Capistrano
9
9
  ["deploy", pupcap_capfile, file].each{|f| cap.load f }
10
10
  tasks.each do |task|
11
11
  cap.find_and_execute_task(task)
12
+ cap_use_rsync!(cap)
13
+ end
14
+ cap
15
+ end
16
+
17
+ def cap_use_rsync!(cap)
18
+ if cap.fetch(:pupcap_use_rsync, false)
19
+ puts 1
20
+ cap.set :repository, "."
21
+ cap.set :scm, :none
22
+ cap.set :deploy_via, :copy
12
23
  end
13
24
  cap
14
25
  end
@@ -28,11 +39,7 @@ module Pupcap::Capistrano
28
39
  cap.ssh_options[:keys] = cap.provision_key
29
40
  cap.ssh_options[:forward_agent] = true
30
41
  cap.default_run_options[:pty] = true
31
-
32
- cap.set :repository, "."
33
- cap.set :scm, :none
34
- cap.set :deploy_via, :copy
35
-
42
+ cap.set :scm, :git
36
43
  cap.set :copy_exclude, [".git", ".keys"]
37
44
  cap
38
45
  end
@@ -13,6 +13,9 @@ class Pupcap::CLI < Thor
13
13
  def init(dir)
14
14
  directory("action/init", dir)
15
15
  inside(dir) do
16
+ unless File.exists?(".gitignore")
17
+ create_file ".gitignore"
18
+ end
16
19
  append_to_file(".gitignore", ".vagrant\n", :verbose => false)
17
20
  append_to_file(".gitignore", "*.swp\n", :verbose => false)
18
21
  run("librarian-puppet init")
@@ -5,7 +5,7 @@ module Pupcap
5
5
 
6
6
  MAJOR = 0
7
7
  MINOR = 3
8
- PATCH = 2
8
+ PATCH = 3
9
9
 
10
10
  def self.to_s
11
11
  "#{MAJOR}.#{MINOR}.#{PATCH}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pupcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: