Class: Depec::Target::CircleCi
- Inherits:
-
Base
- Object
- Base
- Depec::Target::CircleCi
show all
- Defined in:
- lib/depec/target/circle_ci.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#config_file ⇒ String
7
8
9
|
# File 'lib/depec/target/circle_ci.rb', line 7
def config_file
File.join(@dir, '.circleci', 'config.yml')
end
|
#images ⇒ Array
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/depec/target/circle_ci.rb', line 21
def images
images = []
return images unless File.exists?(config_file)
File.open(config_file) do |f|
f.each_line do |line|
if line.include?(' image:')
images << line.match(/image: (?<image>.*)/)[:image]
end
end
end
images
end
|
#used? ⇒ Boolean
14
15
16
|
# File 'lib/depec/target/circle_ci.rb', line 14
def used?
File.exists?(config_file)
end
|