ops_team 1.12.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4e8d641dd9ba491fb9be7b485203c2fcf22d46b15668b7640b483a6774bbb33
4
- data.tar.gz: 76089c91d587dbf028ea25b04d62eb5b203303c7680248dd2e27dab377af8880
3
+ metadata.gz: 8c5f694faa0c40cbd2f850fe45fb7eb35012d3359bf815e95984198366ddac6d
4
+ data.tar.gz: 4d9e6178368112d8a55869162b4371ec715a9168bfb9c0b2fca08e0025d7d1e6
5
5
  SHA512:
6
- metadata.gz: e35d83233bae11f76df0f961bfc603426255ab5c51cb6f26af64060e87bf0f82dee3f60a20ce3f498b0de4c9d3131cd2b6d28c2520bebe5b53d79289d106a2c9
7
- data.tar.gz: 4a38de80841fd5ad89b8263f97bb977397ea7915cb6ccdf476c7d73897f96766e5fe61756344ae64c51d0f0b53def9cceae4c2c49913c4d0cbe60ad6f4d32450
6
+ metadata.gz: 1bf4567b067db9a9041628384e3b09c096b6ece2caada9749c449a29e2e772197e52f5ee8413155e47a8faeb3bc68134f9f4ef86d7aa1f26d4b3111cbe21b0c1
7
+ data.tar.gz: 59eb6746612f1f7209ea93b086be4556274fbda04d2e7372b2ce8583bc1eea9d86b7a0c795d6d137a6278c3c4a716faa67ee3c69ab2ab1cd155d2b7ec5c097b5
@@ -18,7 +18,7 @@ module Builtins
18
18
 
19
19
  @dependency_set.map do |type, names|
20
20
  dependencies_for(type, names)
21
- end.flatten
21
+ end.flatten.compact
22
22
  end
23
23
 
24
24
  def dependencies_for(type, names)
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'English'
4
+
5
+ require 'dependency'
6
+ require 'options'
7
+
8
+ module Dependencies
9
+ class Pip < Dependency
10
+ DEFAULT_PIP = "python3 -m pip"
11
+
12
+ def met?
13
+ execute("#{pip} show #{name}")
14
+ end
15
+
16
+ def meet
17
+ execute("#{pip} install #{name}")
18
+ end
19
+
20
+ def unmeet
21
+ # do nothing; we don't want to uninstall packages and reinstall them every time
22
+ true
23
+ end
24
+
25
+ def should_meet?
26
+ true
27
+ end
28
+
29
+ private
30
+
31
+ def pip
32
+ Options.get("pip.command") || DEFAULT_PIP
33
+ end
34
+ end
35
+ end
data/ops_team.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ops_team'
5
- s.version = '1.12.0'
5
+ s.version = '1.13.0'
6
6
  s.authors = [
7
7
  'nickthecook@gmail.com'
8
8
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickthecook@gmail.com
@@ -193,6 +193,7 @@ files:
193
193
  - lib/dependencies/docker.rb
194
194
  - lib/dependencies/gem.rb
195
195
  - lib/dependencies/helpers/apt_cache_policy.rb
196
+ - lib/dependencies/pip.rb
196
197
  - lib/dependencies/sshkey.rb
197
198
  - lib/dependencies/versioned_dependency.rb
198
199
  - lib/dependency.rb