git-deploy 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,9 +19,17 @@ if use_bundler
19
19
  end
20
20
 
21
21
  if File.file? 'Rakefile'
22
- num_migrations = `git diff #{oldrev} #{newrev} --diff-filter=A --name-only`.split("\n").size
22
+ tasks = []
23
+
24
+ num_migrations = `git diff #{oldrev} #{newrev} --diff-filter=A --name-only -z db/migrate`.split("\0").size
23
25
  # run migrations if new ones have been added
24
- run "#{rake_cmd} db:migrate RAILS_ENV=#{RAILS_ENV}" if num_migrations > 0
26
+ tasks << "db:migrate" if num_migrations > 0
27
+
28
+ # precompile assets
29
+ changed_assets = `git diff #{oldrev} #{newrev} --name-only -z app/assets`.split("\0")
30
+ tasks << "assets:precompile" if changed_assets.size > 0
31
+
32
+ run "#{rake_cmd} #{tasks.join(' ')} RAILS_ENV=#{RAILS_ENV}" if tasks.any?
25
33
  end
26
34
 
27
35
  # clear cached assets (unversioned/ignored files)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-11 00:00:00.000000000 Z
12
+ date: 2011-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70176242907060 !ruby/object:Gem::Requirement
16
+ requirement: &70345731615680 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70176242907060
24
+ version_requirements: *70345731615680
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: net-ssh
27
- requirement: &70176242905040 !ruby/object:Gem::Requirement
27
+ requirement: &70345731614440 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70176242905040
35
+ version_requirements: *70345731614440
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: net-scp
38
- requirement: &70176242903080 !ruby/object:Gem::Requirement
38
+ requirement: &70345731613060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70176242903080
46
+ version_requirements: *70345731613060
47
47
  description: A tool to install useful git hooks on your remote repository to enable
48
48
  push-based, Heroku-like deployment on your host.
49
49
  email: mislav.marohnic@gmail.com
@@ -83,8 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubyforge_project:
86
- rubygems_version: 1.8.10
86
+ rubygems_version: 1.8.12
87
87
  signing_key:
88
88
  specification_version: 3
89
89
  summary: Simple git push-based application deployment
90
90
  test_files: []
91
+ has_rdoc: