capistrano-laravel 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-bundler.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Peter Mitchell (peterjmit@gmail.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # Capistrano::FilePermissions
2
+
3
+ File permissions handling for Capistrano v3.*
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'capistrano', '~> 3.0.0'
11
+ gem 'capistrano-laravel'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install capistrano-laravel
21
+
22
+ ## Usage
23
+
24
+ Require the module in your `Capfile`:
25
+
26
+ ```ruby
27
+ require 'capistrano/laravel'
28
+ ```
29
+
30
+ ### Configuration
31
+
32
+ The gem makes the following configuration variables available (shown with defaults)
33
+
34
+ ```ruby
35
+ set :laravel_roles, :all
36
+ set :laravel_artisan_flags, "--env production"
37
+ set :laravel_server_user, "www-data"
38
+ ```
39
+
40
+ ## Contributing
41
+
42
+ 1. Fork it
43
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
44
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
45
+ 4. Push to the branch (`git push origin my-new-feature`)
46
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-laravel'
7
+ spec.version = '0.0.1'
8
+ spec.authors = ['Peter Mitchell']
9
+ spec.email = ['peterjmit@gmail.com']
10
+ spec.description = %q{Laravel deployment for Capistrano 3.x}
11
+ spec.summary = %q{Laravel deployment for Capistrano 3.x}
12
+ spec.homepage = 'https://github.com/peterjmit/capistrano-laravel'
13
+ spec.license = 'MIT'
14
+
15
+ spec.files = `git ls-files`.split($/)
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ['lib']
19
+
20
+ spec.add_dependency 'capistrano', '>= 3.0.0'
21
+ spec.add_dependency 'capistrano-composer', '>= 0.0.3'
22
+ spec.add_dependency 'capistrano-file-permissions'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.3'
25
+ spec.add_development_dependency 'rake'
26
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../../tasks/artisan.rake", __FILE__)
@@ -0,0 +1,17 @@
1
+ set :laravel_roles, :all
2
+ set :laravel_artisan_flags, "--env production"
3
+ set :laravel_server_user, "www-data"
4
+
5
+ # fix bug in capistrano-file-permissions
6
+ set :linked_dirs, []
7
+
8
+ set :file_permissions_paths, [
9
+ 'app/storage',
10
+ 'app/storage/cache',
11
+ 'app/storage/logs',
12
+ 'app/storage/meta',
13
+ 'app/storage/sessions',
14
+ 'app/storage/views',
15
+ ]
16
+ set :file_permissions_users, [fetch(:webserver_user)]
17
+
@@ -0,0 +1 @@
1
+ load File.expand_path("../../tasks/laravel.rake", __FILE__)
@@ -0,0 +1 @@
1
+ load File.expand_path("../../tasks/migrations.rake", __FILE__)
@@ -0,0 +1,11 @@
1
+ require "capistrano/composer"
2
+ require "capistrano/file-permissions"
3
+ require "capistrano/laravel/artisan"
4
+ require "capistrano/laravel/laravel"
5
+ # require "capistrano/laravel/migrations"
6
+
7
+ namespace :load do
8
+ task :defaults do
9
+ load 'capistrano/laravel/defaults.rb'
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ namespace :laravel do
2
+ desc "Exceute a provided artisan command"
3
+ task :artisan, :command_name do |t, args|
4
+ # ask only runs if argument is not provided
5
+ ask(:cmd, "list")
6
+ command = args[:command_name] || fetch(:cmd)
7
+
8
+ on roles fetch(:laravel_roles) do
9
+ within release_path do
10
+ execute :php, :artisan, command, *args.extras, fetch(:laravel_artisan_flags)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ namespace :deploy do
2
+ task :optimize do
3
+ invoke "laravel:artisan", "optimize"
4
+ end
5
+
6
+ after :updated, "deploy:optimize"
7
+ after :updated, 'deploy:set_permissions:acl'
8
+ end
@@ -0,0 +1,7 @@
1
+ namespace :deploy do
2
+ task :migrate do
3
+ within release_path do
4
+ invoke "laravel:artisan", "migrate"
5
+ end
6
+ end
7
+ end
File without changes
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-laravel
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Peter Mitchell
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-11-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: capistrano
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: capistrano-composer
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.0.3
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.0.3
46
+ - !ruby/object:Gem::Dependency
47
+ name: capistrano-file-permissions
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: bundler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: '1.3'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '1.3'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ description: Laravel deployment for Capistrano 3.x
95
+ email:
96
+ - peterjmit@gmail.com
97
+ executables: []
98
+ extensions: []
99
+ extra_rdoc_files: []
100
+ files:
101
+ - Gemfile
102
+ - LICENSE
103
+ - README.md
104
+ - Rakefile
105
+ - capistrano-laravel.gemspec
106
+ - lib/capistrano-laravel.rb
107
+ - lib/capistrano/laravel.rb
108
+ - lib/capistrano/laravel/artisan.rb
109
+ - lib/capistrano/laravel/defaults.rb
110
+ - lib/capistrano/laravel/laravel.rb
111
+ - lib/capistrano/laravel/migrations.rb
112
+ - lib/capistrano/tasks/artisan.rake
113
+ - lib/capistrano/tasks/laravel.rake
114
+ - lib/capistrano/tasks/migrations.rake
115
+ homepage: https://github.com/peterjmit/capistrano-laravel
116
+ licenses:
117
+ - MIT
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ requirements: []
135
+ rubyforge_project:
136
+ rubygems_version: 1.8.25
137
+ signing_key:
138
+ specification_version: 3
139
+ summary: Laravel deployment for Capistrano 3.x
140
+ test_files: []