ploy 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODFkNjIwYmIzMWNjZThlMzMxOTM4MWMzNDA3ZTUyZjJkYmQ0MjFlMA==
5
- data.tar.gz: !binary |-
6
- NWZkMTEzMjFhMTE0NjY2MTk0MWY2Y2MwNmIxZmRhN2E2YTQwYmYwOA==
2
+ SHA1:
3
+ metadata.gz: 4090e695f11b88462b1730c711e7d1e388341f29
4
+ data.tar.gz: de3e11bfaf48e1e318205a7a9b075bdafbd98f52
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MGFlMjAzYmQwYjQ1Y2UwYWJlM2Q4NjJhMjliZjA2YTFmMzhjYWYyMzU3YWI0
10
- OWE2YWZhOTE2YjEwMGJiYjI5MWZmMGEyNmRiODY1MWZiOGYwZDExMDYxNDEw
11
- ZDBlMDgwZGY5MmM2Mjk1Yzc4OTE3NWNlYzY2NWFjODNkYTg5MTY=
12
- data.tar.gz: !binary |-
13
- NWYwODUyY2UzZDBiMjMwNzdlOGY3MmY0NjQyZTYzNThmZTAxYWI3Y2I2NDVj
14
- MDZiMmU4YWM3OTJjODdkNDhlMzM3MWY2YWI0NGZjZDkyYWYwODgwZWZlMjVh
15
- NWZkNmZlYjdlODNhMDQ1NDQ5MGFiN2M2MzRiNzlmODU4NDJmMzc=
6
+ metadata.gz: b16a6dc2f796a00b62b67656bff66218527a6c2a733fae65870576613efa047960649875acb685bc84b92e39da179b2f7ee10fd4b4e8589d8ead11671af99f55
7
+ data.tar.gz: 351fb639d75282aee37f279207bd62c2d826cddad57ae32e27a2e96846ea9606de60c62dc1315af08631104c2040e5bee0c3d1be66f1131b740cb298ca02e511
@@ -20,9 +20,15 @@ module Ploy
20
20
  else
21
21
  ips = installable_packages(o[:target_packages], ps.packages)
22
22
  ips.each do |package|
23
- if package.check_new_version then
24
- package.install
25
- puts "installed #{package.deploy_name}"
23
+ if package.installed_version == '' then
24
+ package.version
25
+ elsif package.check_new_version then
26
+ if package.updatevia == 'swf'
27
+ puts "skipping update via ploy. updatevia=(%{package.updatevia})"
28
+ else
29
+ package.install
30
+ puts "updated #{package.deploy_name}"
31
+ end
26
32
  else
27
33
  puts "no new #{package.deploy_name} available"
28
34
  end
@@ -62,7 +68,7 @@ helptext
62
68
  def installable_packages(target_packages, packages)
63
69
  tph = {}
64
70
  target_packages.each { |tp| tph[tp] = true }
65
- installables = packages.find_all { |p| tph[p.deploy_name] && p.deployvia == 'ploy-install' }
71
+ installables = packages.find_all { |p| tph[p.deploy_name] }
66
72
  end
67
73
 
68
74
  private
data/lib/ploy/package.rb CHANGED
@@ -7,17 +7,17 @@ module Ploy
7
7
  attr_accessor :branch
8
8
  attr_accessor :version
9
9
  attr_accessor :variant
10
- attr_accessor :deployvia
10
+ attr_accessor :updatevia
11
11
 
12
- def initialize(bucket, deploy, branch, version, variant = nil, deployvia = nil)
12
+ def initialize(bucket, deploy, branch, version, variant = nil, updatevia = nil)
13
13
  @bucket = bucket
14
14
  @deploy_name = deploy
15
15
  @branch = branch
16
16
  @version = version
17
17
  @variant = variant
18
- @deployvia = 'ploy-install'
19
- unless deployvia.nil?
20
- @deployvia = deployvia
18
+ @updatevia = 'ploy'
19
+ unless updatevia.nil?
20
+ @updatevia = updatevia
21
21
  end
22
22
 
23
23
  @store = Ploy::S3Storage.new(bucket)
@@ -28,7 +28,11 @@ module Ploy
28
28
  end
29
29
 
30
30
  def installed_version
31
- return `dpkg-query -W -f '${gitrev}' #{@deploy_name}`.chomp
31
+ version = `dpkg-query -W -f '${gitrev}' #{@deploy_name}`.chomp
32
+ if version =~ /no packages found/i
33
+ version = ''
34
+ end
35
+ return version
32
36
  end
33
37
 
34
38
  def remote_version
@@ -14,7 +14,7 @@ module Ploy
14
14
  v['branch'] || conf['branch'],
15
15
  v['version'] || conf['version'],
16
16
  v['variant'] || conf['variant'] || nil,
17
- v['deployvia'] || conf['deployvia'] || nil
17
+ v['updatevia'] || conf['updatevia'] || nil
18
18
  )
19
19
  end
20
20
  @locked = conf['locked']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bruce
@@ -14,42 +14,42 @@ dependencies:
14
14
  name: aws-sdk
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fpm
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sinatra
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Multi-phase deployment tool for use in a continuous deployment environment.
@@ -91,17 +91,17 @@ require_paths:
91
91
  - lib
92
92
  required_ruby_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ! '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.4.2
104
+ rubygems_version: 2.2.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Multi-phase deployment tool