capsulecd 1.0.7 → 1.0.8

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: feef86d8b31b03606cec79c95cb5d3931e25a94c
4
- data.tar.gz: 5e1666ef57b38c95f4cf210f4b07796802f96a5b
3
+ metadata.gz: f8263c78dbcfd6b1c36e0c8ffc3b97a20946f739
4
+ data.tar.gz: 5060d058d415001eb30e8b08e1706aaf47e9e129
5
5
  SHA512:
6
- metadata.gz: 97dd4bacab5f372b18cde8045cb5af0aec606485d75ae4fd7b38d5087d98931a3f61e48416963a2df8b3048561888226e2ebfb5b6f93b2190e1df791fd743577
7
- data.tar.gz: ba1dc1eadf53f50cdd746e91262d2dfd5f2f3ee1e807fd860b17a976134ef55ff5ebcb2aa6f0cffe7ce307f6ad7b732041f99fb3d4680eefd557162d99bdabcb
6
+ metadata.gz: dda101b5a6e36b7a60624131d7e710919aa944fe20c343b8c80324702fe565c66f4d3592c9d62b723c99510fc9bffee2ab9e103a4938699ef6a74b6506a66139
7
+ data.tar.gz: eb75964e44786f889153cbea129deaeb4fbbbd9b62736c47007a1cb8680e234f38dafdf1c582bdeccf4e1ca77a7af10a73dc8e38b12d31538e27adb24e8ddb75
data/Dockerfile CHANGED
@@ -7,7 +7,7 @@ workdir /srv/capsulecd
7
7
 
8
8
  RUN apk --update --no-cache add \
9
9
  build-base ruby-dev libc-dev linux-headers \
10
- openssl-dev libxml2-dev libxslt-dev openssh git && \
10
+ openssl-dev libxml2-dev libxslt-dev openssh git curl && \
11
11
  mkdir ~/.ssh && \
12
12
  ssh-keyscan github.com >> ~/.ssh/known_hosts && \
13
13
  bundle install --without test chef
@@ -90,6 +90,7 @@ module CapsuleCD
90
90
  puts 'The configuration file could not be found. Using defaults'
91
91
  return
92
92
  end
93
+ puts 'Loading configuration file: ' + path
93
94
  file = File.open(path).read
94
95
  unserialize(file)
95
96
  end
@@ -7,6 +7,11 @@ module CapsuleCD
7
7
 
8
8
  def initialize(options)
9
9
  @config = CapsuleCD::Configuration.new(options)
10
+
11
+ # transform the engine with system config file hooks
12
+ transformer = CapsuleCD::TransformEngine.new()
13
+ transformer.transform(self, options[:config_file], :global)
14
+
10
15
  if @config.source == :github
11
16
  require_relative 'source/github'
12
17
  self.class.send(:include, CapsuleCD::Source::Github)
@@ -51,7 +56,6 @@ module CapsuleCD
51
56
  # REQUIRES source_client
52
57
  pre_source_process_pull_request_payload
53
58
  source_process_pull_request_payload(payload)
54
- @config.populate_repo_config_file(@source_git_local_path)
55
59
  post_source_process_pull_request_payload
56
60
  else
57
61
  # start processing the payload, which should result in a local git repository that we
@@ -62,10 +66,17 @@ module CapsuleCD
62
66
  # REQUIRES source_client
63
67
  pre_source_process_push_payload
64
68
  source_process_push_payload(payload)
65
- @config.populate_repo_config_file(@source_git_local_path)
66
69
  post_source_process_push_payload
67
70
  end
68
71
 
72
+ # update the config with repo config file options
73
+ @config.populate_repo_config_file(@source_git_local_path)
74
+
75
+ # transform the engine with the repo config file hooks
76
+ transformer = CapsuleCD::TransformEngine.new()
77
+ transformer.transform(self, @source_git_local_path + '/capsule.yml', :repo)
78
+
79
+
69
80
  # now that the payload has been processed we can begin by building the code.
70
81
  # this may be creating missing files/default structure, compilation, version bumping, etc.
71
82
 
@@ -11,8 +11,8 @@ module CapsuleCD
11
11
  @engine = engine
12
12
  @type = type
13
13
 
14
- unless File.exists?(config_file)
15
- puts 'no configuration file found, no engine hooks'
14
+ if !config_file || !File.exists?(config_file)
15
+ puts "no #{type} configuration file found, no engine hooks applied"
16
16
  return
17
17
  end
18
18
 
data/lib/capsulecd/cli.rb CHANGED
@@ -6,6 +6,12 @@ module CapsuleCD
6
6
  # The command line interface for CapsuleCD.
7
7
  class Cli < Thor
8
8
 
9
+ desc 'version', 'Print out the CapsuleCD version'
10
+ def version
11
+ require 'capsulecd/version'
12
+ puts CapsuleCD::VERSION
13
+ end
14
+
9
15
  ##
10
16
  # Run
11
17
  ##
@@ -1,3 +1,3 @@
1
1
  module CapsuleCD
2
- VERSION = '1.0.7'
2
+ VERSION = '1.0.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capsulecd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Kulatunga (AnalogJ)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-08 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor