cog-rb 0.1.14 → 0.1.15

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: ca8b0c6b200dcc1d7b66fc6c2875aa1b0fe03607
4
- data.tar.gz: 517c213a36ce698ca96a8774900829e5583ea191
3
+ metadata.gz: 64a0586d51ae239c6480def393a0077ca10d3150
4
+ data.tar.gz: 792db9e3058eb0d553b1e8ca3be953d28e0c41c9
5
5
  SHA512:
6
- metadata.gz: 9ae3e232b57055dbb78ef51527ec6b791d448cc0be77e77ef32c138e8dfdd57c78e81aa05edabc40e0fb1664f0825db95dfac993e683175b03906e004bf0e6ae
7
- data.tar.gz: 4c79b451f4090c9c44279178c1c5192e06469e56a7ef51ec071e484c50d5f09169270d47c121d84cd3bf5fb2b1769593772974784285ba912b92a4a0f16fc5a2
6
+ metadata.gz: 5560dfa3106ea0286c21583f921e2dc295b9afa799ce1474a8922b60d22f903c3f66c27b2c7c29d5e14a5de9a584ff46abbf4d4b22129242b96867ebd2c32fc8
7
+ data.tar.gz: bc8e20a5e4ef4b393ed9ab6af824152eb6cef78e7dbedc31bc024f17abe95f18bac5e99fb9813d4c0a31f9b113956ff049b7598b3e93915e5dac8ab3bc9d3491
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.1.15
2
+
3
+ * Adds a `cogrb` binary that wraps some helper tasks in `lib/tasks/cog.rake`:
4
+ * `cogrb template:update` - reads files in `templates/*` and updates bundle configuration file with contents
5
+ * `cogrb docker:build` - builds docker image using image/tag defined in bundle configuration file
6
+ * `cogrb docker:push` - pushes docker image using image/tag defined in bundle configuration file
7
+
1
8
  ## 0.1.14
2
9
 
3
10
  * bugfix: options with scalar values were being ignored
data/lib/cog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Cog
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
data/lib/tasks/cog.rake CHANGED
@@ -1,9 +1,10 @@
1
+ config_file = FileList.new('config.y?ml').first
2
+ config = Cog::Config.new(config_file)
3
+ docker_image = config['docker'].nil? ? nil : "#{config['docker']['image']}:#{config['docker']['tag']}"
4
+
1
5
  namespace :template do
2
6
  desc "Update templates in configuration file"
3
7
  task :update do
4
- config_file = FileList.new('config.y?ml').first
5
- config = Cog::Config.new(config_file)
6
-
7
8
  puts "Current bundle configuration version is #{config['version']}."
8
9
 
9
10
  templates = FileList.new('templates/*/*.mustache')
@@ -33,3 +34,22 @@ namespace :template do
33
34
  end
34
35
  end
35
36
  end
37
+
38
+ namespace :docker do
39
+ task :preflight do
40
+ if docker_image.nil?
41
+ puts "No Docker image defined in bundle configuration. Aborting."
42
+ exit(1)
43
+ end
44
+ end
45
+
46
+ desc "Build Docker image for current configuration file"
47
+ task :build => [ :preflight ] do
48
+ system("docker", "build", "-t", docker_image, ".")
49
+ end
50
+
51
+ desc "Push updated Docker image"
52
+ task :push => [ :build ] do
53
+ puts("docker", "push", docker_image)
54
+ end
55
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cog-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Imbriaco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-18 00:00:00.000000000 Z
11
+ date: 2016-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.4.5
95
+ rubygems_version: 2.4.5.1
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Cog command helper library