capifony 2.1.16 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capifony
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
- - 1
9
- - 16
10
- version: 2.1.16
8
+ - 2
9
+ - 0
10
+ version: 2.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Konstantin Kudryashov
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-09-24 00:00:00 Z
19
+ date: 2012-10-22 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: capistrano
@@ -50,6 +50,22 @@ dependencies:
50
50
  version: 1.2.0
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: inifile
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 11
62
+ segments:
63
+ - 2
64
+ - 0
65
+ - 2
66
+ version: 2.0.2
67
+ type: :runtime
68
+ version_requirements: *id003
53
69
  description: " Capistrano is an open source tool for running scripts on multiple servers. It\xE2\x80\x99s primary use is for easily deploying applications. While it was built specifically for deploying Rails apps, it\xE2\x80\x99s pretty simple to customize it to deploy other types of applications. This package is a deployment \"recipe\" to work with symfony (both 1 and 2) applications.\n"
54
70
  email:
55
71
  - ever.zet@gmail.com
@@ -63,6 +79,8 @@ extra_rdoc_files: []
63
79
  files:
64
80
  - bin/capifony
65
81
  - lib/capifony.rb
82
+ - lib/capifony_symfony1.rb
83
+ - lib/capifony_symfony2.rb
66
84
  - lib/symfony1/database.rb
67
85
  - lib/symfony1/deploy.rb
68
86
  - lib/symfony1/doctrine.rb
@@ -70,18 +88,16 @@ files:
70
88
  - lib/symfony1/shared.rb
71
89
  - lib/symfony1/symfony.rb
72
90
  - lib/symfony1/web.rb
73
- - lib/symfony1.rb
74
91
  - lib/symfony2/database.rb
75
92
  - lib/symfony2/deploy.rb
76
93
  - lib/symfony2/doctrine.rb
77
- - lib/symfony2/output.rb
78
94
  - lib/symfony2/propel.rb
79
95
  - lib/symfony2/symfony.rb
80
96
  - lib/symfony2/web.rb
81
- - lib/symfony2.rb
82
97
  - README.md
83
98
  - LICENSE
84
- - CHANGELOG
99
+ - CHANGELOG.md
100
+ - UPGRADE.md
85
101
  homepage: http://capifony.org
86
102
  licenses: []
87
103
 
data/lib/symfony2.rb DELETED
@@ -1,175 +0,0 @@
1
- load Gem.find_files('capifony.rb').last.to_s
2
- load_paths.push File.expand_path('../', __FILE__)
3
-
4
- load 'symfony2/output'
5
- load 'symfony2/database'
6
- load 'symfony2/deploy'
7
- load 'symfony2/doctrine'
8
- load 'symfony2/propel'
9
- load 'symfony2/symfony'
10
- load 'symfony2/web'
11
-
12
- require 'yaml'
13
-
14
- # Symfony application path
15
- set :app_path, "app"
16
-
17
- # Symfony web path
18
- set :web_path, "web"
19
-
20
- # Symfony console bin
21
- set :symfony_console, app_path + "/console"
22
-
23
- # Symfony log path
24
- set :log_path, app_path + "/logs"
25
-
26
- # Symfony cache path
27
- set :cache_path, app_path + "/cache"
28
-
29
- # Symfony bin vendors
30
- set :symfony_vendors, "bin/vendors"
31
-
32
- # Symfony build_bootstrap script
33
- set :build_bootstrap, "bin/build_bootstrap"
34
-
35
- # Whether to use composer to install vendors.
36
- # If set to false, it will use the bin/vendors script
37
- set :use_composer, false
38
-
39
- # Path to composer binary
40
- # If set to false, Capifony will download/install composer
41
- set :composer_bin, false
42
-
43
- # Options to pass to composer when installing/updating
44
- set :composer_options, "--no-scripts --verbose"
45
-
46
- # Whether to update vendors using the configured dependency manager (composer or bin/vendors)
47
- set :update_vendors, false
48
-
49
- # run bin/vendors script in mode (upgrade, install (faster if shared /vendor folder) or reinstall)
50
- set :vendors_mode, "reinstall"
51
-
52
- # Whether to run cache warmup
53
- set :cache_warmup, true
54
-
55
- # Use AsseticBundle
56
- set :dump_assetic_assets, false
57
-
58
- # Assets install
59
- set :assets_install, true
60
- set :assets_symlinks, false
61
- set :assets_relative, false
62
-
63
- # Whether to update `assets_version` in `config.yml`
64
- set :update_assets_version, false
65
-
66
- # Need to clear *_dev controllers
67
- set :clear_controllers, true
68
-
69
- # Files that need to remain the same between deploys
70
- set :shared_files, false
71
-
72
- # Dirs that need to remain the same between deploys (shared dirs)
73
- set :shared_children, [log_path, web_path + "/uploads"]
74
-
75
- # Asset folders (that need to be timestamped)
76
- set :asset_children, [web_path + "/css", web_path + "/images", web_path + "/js"]
77
-
78
- # Dirs that need to be writable by the HTTP Server (i.e. cache, log dirs)
79
- set :writable_dirs, [log_path, cache_path]
80
-
81
- # Name used by the Web Server (i.e. www-data for Apache)
82
- set :webserver_user, "www-data"
83
-
84
- # Method used to set permissions (:chmod, :acl, or :chown)
85
- set :permission_method, false
86
-
87
- # Model manager: (doctrine, propel)
88
- set :model_manager, "doctrine"
89
-
90
- # Symfony2 version
91
- set(:symfony_version) { guess_symfony_version }
92
-
93
- # If set to false, it will never ask for confirmations (migrations task for instance)
94
- # Use it carefully, really!
95
- set :interactive_mode, true
96
-
97
- def load_database_config(data, env)
98
- parameters = YAML::load(data)
99
-
100
- parameters['parameters']
101
- end
102
-
103
- def guess_symfony_version
104
- capture("cd #{latest_release} && #{php_bin} #{symfony_console} --version |cut -d \" \" -f 3")
105
- end
106
-
107
- def remote_file_exists?(full_path)
108
- 'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip
109
- end
110
-
111
- def remote_command_exists?(command)
112
- 'true' == capture("if [ -x \"$(which #{command})\" ]; then echo 'true'; fi").strip
113
- end
114
-
115
- after "deploy:finalize_update" do
116
- if use_composer
117
- if update_vendors
118
- symfony.composer.update
119
- else
120
- symfony.composer.install
121
- end
122
-
123
- symfony.composer.dump_autoload
124
- else
125
- if update_vendors
126
- vendors_mode.chomp # To remove trailing whiteline
127
- case vendors_mode
128
- when "upgrade" then symfony.vendors.upgrade
129
- when "install" then symfony.vendors.install
130
- when "reinstall" then symfony.vendors.reinstall
131
- end
132
- end
133
- end
134
-
135
- symfony.bootstrap.build
136
-
137
- if model_manager == "propel"
138
- symfony.propel.build.model
139
- end
140
-
141
- if assets_install
142
- symfony.assets.install # Publish bundle assets
143
- end
144
-
145
- if update_assets_version
146
- symfony.assets.update_version # Update `assets_version`
147
- end
148
-
149
- if cache_warmup
150
- symfony.cache.warmup # Warmup clean cache
151
- end
152
-
153
- if dump_assetic_assets
154
- symfony.assetic.dump # Dump assetic assets
155
- end
156
-
157
- if clear_controllers
158
- symfony.project.clear_controllers
159
- end
160
- end
161
-
162
- before "deploy:update_code" do
163
- msg = "--> Updating code base with #{deploy_via} strategy"
164
-
165
- if logger.level == Logger::IMPORTANT
166
- pretty_errors
167
- puts msg
168
- else
169
- puts msg.green
170
- end
171
- end
172
-
173
- after "deploy:create_symlink" do
174
- puts "--> Successfully deployed!".green
175
- end
@@ -1,48 +0,0 @@
1
- require 'colored'
2
-
3
- STDOUT.sync
4
- $error = false
5
- $pretty_errors_defined = false
6
-
7
- # Be less verbose by default
8
- logger.level = Logger::IMPORTANT
9
-
10
- def pretty_print(msg)
11
- if logger.level == Logger::IMPORTANT
12
- pretty_errors
13
-
14
- msg << '.' * (55 - msg.size)
15
- print msg
16
- else
17
- puts msg.green
18
- end
19
- end
20
-
21
- def puts_ok
22
- if logger.level == Logger::IMPORTANT && !$error
23
- puts '✔'.green
24
- end
25
-
26
- $error = false
27
- end
28
-
29
- def pretty_errors
30
- if !$pretty_errors_defined
31
- $pretty_errors_defined = true
32
-
33
- class << $stderr
34
- @@firstLine = true
35
- alias _write write
36
-
37
- def write(s)
38
- if @@firstLine
39
- s = '✘' << "\n" << s
40
- @@firstLine = false
41
- end
42
-
43
- _write(s.red)
44
- $error = true
45
- end
46
- end
47
- end
48
- end