albacore 2.3.6 → 2.3.7
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 +4 -4
- data/lib/albacore/task_types/asmver.rb +12 -5
- data/lib/albacore/version.rb +1 -1
- data/spec/asmver_task_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bc15d7c32f051866b973d2e66c39a3548a98d23
|
4
|
+
data.tar.gz: 4a222f833a8e5d952e760a266d5427510332d89a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1da42489a9ce91d28938b74345cc2c72ee3c83d95670e8bba9d0537de9b27ff5eeee77e6cb045bfc295790abf36434cad6e4b4effb22f0d49b74c79cae28dd1
|
7
|
+
data.tar.gz: 672d2aa7f7c909b198c7eeb51e0cd63fdb034cc1d7983c632deb51433a3f2070900810c0d555ee081cc61bb232ede4afe04520debb978ad15856bbbbd7bf1692
|
@@ -65,19 +65,24 @@ module Albacore
|
|
65
65
|
@file_path, @namespace, @attributes = file_path, namespace, attributes
|
66
66
|
end
|
67
67
|
|
68
|
-
#
|
68
|
+
# Call with to get the opportunity to change the attributes hash
|
69
|
+
def change_attributes &block
|
70
|
+
yield @attributes if block
|
71
|
+
end
|
72
|
+
|
73
|
+
# Give the hash of attributes to write to the assembly info file
|
69
74
|
def attributes attrs
|
70
75
|
@attributes = attrs
|
71
76
|
end
|
72
|
-
|
77
|
+
|
73
78
|
def opts
|
74
79
|
raise Error, "#file_path is not set" unless (file_path or out)
|
75
80
|
ns = @namespace || '' # defaults to empty namespace if not set.
|
76
81
|
lang = lang_for file_path
|
77
82
|
m = Map.new attributes: @attributes,
|
78
|
-
|
79
|
-
|
80
|
-
|
83
|
+
namespace: ns,
|
84
|
+
file_path: @file_path,
|
85
|
+
language: lang
|
81
86
|
m[:out] = @out if @out
|
82
87
|
m
|
83
88
|
end
|
@@ -87,6 +92,7 @@ module Albacore
|
|
87
92
|
end
|
88
93
|
|
89
94
|
private
|
95
|
+
|
90
96
|
def lang_for path
|
91
97
|
mk = lambda { |lang| "Albacore::Asmver::#{lang}".split('::').inject(Object) { |o, c| o.const_get c }.new }
|
92
98
|
case File.extname path
|
@@ -97,6 +103,7 @@ module Albacore
|
|
97
103
|
end
|
98
104
|
end
|
99
105
|
end
|
106
|
+
|
100
107
|
class Task
|
101
108
|
include Logging
|
102
109
|
def initialize opts
|
data/lib/albacore/version.rb
CHANGED
data/spec/asmver_task_spec.rb
CHANGED
@@ -28,5 +28,15 @@ describe ::Albacore::Asmver::Config, 'when setting attributes and out' do
|
|
28
28
|
it 'should write AssemblyVersion' do
|
29
29
|
strio.string.should include('[<assembly: AssemblyVersion("0.1.2")>]')
|
30
30
|
end
|
31
|
+
it 'should allow changing attributes' do
|
32
|
+
expect(subject).to respond_to :change_attributes
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should allow getting and setting attributes' do
|
36
|
+
subject.change_attributes do |as|
|
37
|
+
as[:a_key] = '123'
|
38
|
+
end
|
39
|
+
expect(subject.change_attributes { |a| a[:a_key] }).to eq '123'
|
40
|
+
end
|
31
41
|
end
|
32
42
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: albacore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Feldt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|