corundum 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjUwMDk0ZDAyYzk4MzQ5OTk1MDg2Y2ZmMTgxMTkwNTIyYjg1YTFjNw==
4
+ NjgyNjhhODY3Y2ZhZGEwYmM0NDJhMTBhMTIwMTg4YmEwZjY2M2QyYg==
5
5
  data.tar.gz: !binary |-
6
- M2I5NWQ0OGU4Zjg3MjdiNjZlNGFmNzIwY2M1NTM4YmM2NzU2NDYwOA==
6
+ YzViMTIyODgwYTJhNGI0ZWUyMzM5MGE1ZWVjZTExMWFkOTM2OGEyMw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MzQ5ODk3NzNlMTM2NjIyMWM1MzY2NjNhYzc1ZWY1MWM1MTFjNWY1NjMxNjMx
10
- YTY3MWEyZDM5NjA4OGRjMDFiNWJkMzMyMWFmMmQ5OTRkODIwMzRjMGMxNzE3
11
- ZjdmNDcwN2JlNTBkMmQ5MDJkNWVjMWI3NzRlZWE4ZDMwOGI1ZmM=
9
+ MTUzMjk3NDAzMjY4ODQyZDBiYWI0MDI2YWM2YTRkNzBhZTFmNDNmZDRkMTdl
10
+ OTc2OGM1OGVkZWUzNmU5M2RhYTQ4OWI2Zjg2NTVmOTQzZjJkNGU1OWQ0ZDVj
11
+ ZTgwYjlhZmU5ZWZkMWU1MzMzZmQzNTczMmEyZWVhMmU1NDcxODE=
12
12
  data.tar.gz: !binary |-
13
- NmE4YmZiN2E0NjMzYjQ0NzE0ZTBlZTFjZjEyYTg5YjA1OGJjYmNmMjM0ZTY5
14
- YmJjYjc4MjM0YWY5ZGJhY2U0NzIwZDBjMmM2MGQ0ZDQzNjJmOGUwNjZiZWY3
15
- M2Q3ZTE0OGZhY2YwY2RlZWNiNWVmMzE0ODU1OTcxNWQxOWM5NjQ=
13
+ NTg4NjViZDUzN2QzMGVjNDZhODU4ZGIzYWI0ZjVhMmRlMTY3ZTk3OGQ5NzMx
14
+ NWZkMDk1YTlhZmY0NDI1YTY2MDY0MTI2Yzk2OGZmNjJjN2EzODMzMWJjMDE4
15
+ MjQwOTllMDdjNzI3OTMxYzdhZDU0YWNmMGQ4ZTdhN2NmNzVhMTQ=
@@ -1,3 +1,4 @@
1
+ require 'simplecov-json'
1
2
  SimpleCov.start do
2
3
  coverage_dir "corundum/docs/coverage"
3
4
  add_filter "./spec"
@@ -1,17 +1,43 @@
1
1
  require 'mattock/tasklib'
2
+ require 'erb'
2
3
 
3
4
  module Corundum
4
5
  class VersionControl < Mattock::CommandTaskLib
5
6
  default_namespace :version_control
6
7
 
8
+ setting :tag_format, "<%= name %>-<%= version %>"
7
9
  required_fields(:gemspec, :build_finished_file, :gemspec_files, :tag)
8
10
 
11
+ class TagContext
12
+ def initialize(gemspec)
13
+ @gemspec = gemspec
14
+ end
15
+
16
+ def version
17
+ @gemspec.version
18
+ end
19
+
20
+ def name
21
+ @gemspec.name
22
+ end
23
+
24
+ def bind
25
+ binding
26
+ end
27
+ end
28
+
9
29
  def default_configuration(toolkit)
10
30
  super
11
31
  self.gemspec = toolkit.gemspec
12
32
  self.build_finished_file = toolkit.build_file.abspath
13
33
  self.gemspec_files = toolkit.files.code + toolkit.files.test
14
- self.tag = toolkit.gemspec.version.to_s
34
+ end
35
+
36
+ def resolve_configuration
37
+ tag_template = ERB.new(tag_format)
38
+ context = TagContext.new(gemspec)
39
+ self.tag = tag_template.result(context.bind)
40
+ super
15
41
  end
16
42
 
17
43
  def define
@@ -1,4 +1,5 @@
1
1
  require 'corundum/version_control'
2
+ require 'erb'
2
3
 
3
4
  module Corundum
4
5
  class Git < VersionControl
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: corundum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-25 00:00:00.000000000 Z
12
+ date: 2015-07-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: corundum
@@ -284,7 +284,7 @@ metadata: {}
284
284
  post_install_message:
285
285
  rdoc_options:
286
286
  - --title
287
- - corundum-0.5.0 RDoc
287
+ - corundum-0.6.0 RDoc
288
288
  require_paths:
289
289
  - lib/
290
290
  required_ruby_version: !ruby/object:Gem::Requirement