albacore 2.3.9 → 2.3.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17edbc6d61873f582e9d6444f4756371625b3d58
|
4
|
+
data.tar.gz: ee2a86b4312bfdded0b1d34c199877069e2d7544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7a9b1c50ddb9265d1111d6d4fc5796cc50836b747ffc831a55dd3260dfc19e5743c3a6bc5327ef6493b4f09a9d7a340e99579c6f162fecfbb9adfb8d5f50c4f
|
7
|
+
data.tar.gz: 076826fc099708ab887ea1bb01ac1722bacbcf7cf2229026ed5d7707276b411654082a506555a4e9272fca3719c1af27bee11ef1043e15193d50e9278008b08e
|
@@ -2,7 +2,7 @@ module Albacore::Asmver
|
|
2
2
|
class Engine
|
3
3
|
def build_attribute attr_name, attr_data
|
4
4
|
attribute = "#{@start_token}assembly: #{format_attribute_name attr_name}("
|
5
|
-
|
5
|
+
|
6
6
|
unless attr_data.nil?
|
7
7
|
if attr_data.is_a? Hash
|
8
8
|
# Only named parameters
|
@@ -22,10 +22,10 @@ module Albacore::Asmver
|
|
22
22
|
attribute << "#{format_value attr_data}"
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
attribute << ")#{@end_token}"
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
def build_named_parameters data
|
30
30
|
params = []
|
31
31
|
data.each_pair do |k, v|
|
@@ -33,7 +33,7 @@ module Albacore::Asmver
|
|
33
33
|
end
|
34
34
|
params.join ", "
|
35
35
|
end
|
36
|
-
|
36
|
+
|
37
37
|
def build_positional_parameters data
|
38
38
|
data.flatten.map{ |a| format_value a }.join(", ")
|
39
39
|
end
|
@@ -84,7 +84,7 @@ module Albacore::Asmver
|
|
84
84
|
v.to_s
|
85
85
|
end
|
86
86
|
end
|
87
|
-
|
87
|
+
|
88
88
|
# For namespaces
|
89
89
|
|
90
90
|
def namespace_start namespace
|
@@ -18,7 +18,7 @@ System.Runtime.InteropServices|
|
|
18
18
|
@ns = ns
|
19
19
|
@opts = Map.new opts
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def generate out, attrs = {}
|
23
23
|
trace { "generating file with attributes: #{attrs} [file_generator #generate]" }
|
24
24
|
|
@@ -36,7 +36,7 @@ System.Runtime.InteropServices|
|
|
36
36
|
out << "\n"
|
37
37
|
end
|
38
38
|
|
39
|
-
warn
|
39
|
+
warn 'no attributes have been given to [file_generator #generate]' if attrs.empty?
|
40
40
|
|
41
41
|
# write all attributes
|
42
42
|
attrs.each do |name, data|
|
data/lib/albacore/version.rb
CHANGED
data/spec/asmver_spec.rb
CHANGED
@@ -13,7 +13,7 @@ include Albacore::Asmver
|
|
13
13
|
|
14
14
|
%w|build_attribute build_named_parameters build_positional_parameters build_using_statement build_comment namespace_end namespace_start|.each do |m|
|
15
15
|
it "should have a public API ##{m.to_s}" do
|
16
|
-
|
16
|
+
expect(subject).to respond_to :"#{m}"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -146,7 +146,8 @@ describe FileGenerator, 'when generating F# file' do
|
|
146
146
|
assembly_title: 'My.Ns',
|
147
147
|
assembly_version: '0.1.2',
|
148
148
|
custom_thing: %w|a b c|,
|
149
|
-
named_thing: { :b => 3, :c => 'hi' }
|
149
|
+
named_thing: { :b => 3, :c => 'hi' },
|
150
|
+
CLSCompliant: true
|
150
151
|
end
|
151
152
|
let :generated do
|
152
153
|
@out.string
|
@@ -178,6 +179,9 @@ describe FileGenerator, 'when generating F# file' do
|
|
178
179
|
it 'should generate the NamedThing attribute' do
|
179
180
|
generated.should include('[<assembly: NamedThing(b = 3, c = "hi")>]')
|
180
181
|
end
|
182
|
+
it 'should generate the CLSCompliant attribute' do
|
183
|
+
generated.should include('[<assembly: CLSCompliant(true)>]')
|
184
|
+
end
|
181
185
|
it 'should end with ()\n' do
|
182
186
|
generated.should =~ /\(\)(\r\n?|\n)$/m
|
183
187
|
end
|
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.10
|
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: 2015-01-
|
12
|
+
date: 2015-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|