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 +4 -4
- data/lib/builtins/helpers/dependency_handler.rb +1 -1
- data/lib/dependencies/pip.rb +35 -0
- data/ops_team.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c5f694faa0c40cbd2f850fe45fb7eb35012d3359bf815e95984198366ddac6d
|
4
|
+
data.tar.gz: 4d9e6178368112d8a55869162b4371ec715a9168bfb9c0b2fca08e0025d7d1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bf4567b067db9a9041628384e3b09c096b6ece2caada9749c449a29e2e772197e52f5ee8413155e47a8faeb3bc68134f9f4ef86d7aa1f26d4b3111cbe21b0c1
|
7
|
+
data.tar.gz: 59eb6746612f1f7209ea93b086be4556274fbda04d2e7372b2ce8583bc1eea9d86b7a0c795d6d137a6278c3c4a716faa67ee3c69ab2ab1cd155d2b7ec5c097b5
|
@@ -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
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.
|
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
|