albacore 0.2.6 → 0.2.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.
- data/Gemfile +7 -7
- data/README.markdown +0 -33
- data/VERSION +1 -1
- metadata +84 -91
- data/spec/albacoremodel_spec.rb +0 -53
- data/spec/assemblyinfo_spec.rb +0 -541
- data/spec/attrmethods_spec.rb +0 -136
- data/spec/config_spec.rb +0 -34
- data/spec/createtask_spec.rb +0 -236
- data/spec/csc_spec.rb +0 -253
- data/spec/docu_spec.rb +0 -109
- data/spec/exec_spec.rb +0 -45
- data/spec/fluentmigratorrunner_spec.rb +0 -254
- data/spec/msbuild_spec.rb +0 -215
- data/spec/mspec_spec.rb +0 -28
- data/spec/mstesttestrunner_spec.rb +0 -142
- data/spec/nant_spec.rb +0 -110
- data/spec/nchurn_spec.rb +0 -75
- data/spec/ncoverconsole_spec.rb +0 -353
- data/spec/ncoverreport_spec.rb +0 -619
- data/spec/ndepend_spec.rb +0 -72
- data/spec/nunittestrunner_spec.rb +0 -122
- data/spec/nuspec_spec.rb +0 -78
- data/spec/output_spec.rb +0 -117
- data/spec/patches/docu_patch.rb +0 -13
- data/spec/patches/fail_patch.rb +0 -9
- data/spec/patches/system_patch.rb +0 -20
- data/spec/plink_spec.rb +0 -62
- data/spec/runcommand_spec.rb +0 -94
- data/spec/spec_helper.rb +0 -17
- data/spec/specflowreport_spec.rb +0 -146
- data/spec/sqlcmd_spec.rb +0 -334
- data/spec/support/assemblyinfotester.rb +0 -51
- data/spec/support/ironruby_validator.rb +0 -26
- data/spec/support/msbuildtestdata.rb +0 -32
- data/spec/support/nanttestdata.rb +0 -33
- data/spec/support/ncoverconsoletestdata.rb +0 -20
- data/spec/support/ncoverreporttestdata.rb +0 -26
- data/spec/support/nokogiri_validator.rb +0 -15
- data/spec/support/outputtestdata.rb +0 -13
- data/spec/support/ziptestdata.rb +0 -13
- data/spec/unzip_spec.rb +0 -15
- data/spec/xbuild_spec.rb +0 -15
- data/spec/xunit_spec.rb +0 -168
- data/spec/yamlconfig_spec.rb +0 -49
- data/spec/zip_spec.rb +0 -104
data/Gemfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rubyzip', '0.9
|
3
|
+
gem 'rubyzip', '~>0.9'
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem 'nokogiri', '1.4
|
7
|
-
gem 'version_bumper', '0.3
|
8
|
-
gem 'jeweler', '1.
|
9
|
-
gem 'rspec', '1.2
|
10
|
-
gem 'jekyll', '0.8
|
11
|
-
gem 'watchr', '0.7'
|
6
|
+
gem 'nokogiri', '~>1.4'
|
7
|
+
gem 'version_bumper', '~>0.3'
|
8
|
+
gem 'jeweler', '~>1.6'
|
9
|
+
gem 'rspec', '~>1.2'
|
10
|
+
gem 'jekyll', '~>0.8'
|
11
|
+
gem 'watchr', '~>0.7'
|
12
12
|
end
|
data/README.markdown
CHANGED
@@ -36,39 +36,6 @@ Support for the following versions of ruby has been dropped. Albacore will no lo
|
|
36
36
|
|
37
37
|
Due to an incompatibility with the Rubyzip gem, IronRuby does not support the ‘zip’ and ‘unzip’ tasks. If you need zip / unzip support, look into using a third party tool such as [7-zip](http://7-zip.org) or [SharpZipLib](http://sharpdevelop.net/OpenSource/SharpZipLib/).
|
38
38
|
|
39
|
-
## Contributors
|
40
|
-
|
41
|
-
Many thanks for contributions to albacore are due (in alphabetical order):
|
42
|
-
|
43
|
-
* [Andreone](http://github.com/Andreone): Significant Wiki contributions, questions and contributions on the google group
|
44
|
-
* [Andrew Vos](http://github.com/AndrewVos): Fixes and additions to SQLCmd task
|
45
|
-
* [Ben Hall](http://github.com/benhall): Primary contributor. SSH, SFTP, ZipDirectory, Rename, YAML auto config, Wiki pages, and many other great additions
|
46
|
-
* [Brett Veenstra](http://github.com/brettveenstra): SQLCmd options (truted connection, batch abort), etc
|
47
|
-
* [Brian Donahue](http://github.com/briandonahue): Inspiration and initial code for the ExpandTemplates task
|
48
|
-
* [ChrisAnn](http://github.com/ChrisAnn): MSBuild logger module settings
|
49
|
-
* [Chris Geihsler](http://github.com/geihsler): MSTest task
|
50
|
-
* [Dotan Nahum](http://github.com/jondot): NChurn task, Output task, wiki updates, etc
|
51
|
-
* [Hernan Garcia](http://github.com/hgarcia): Specflow Report task
|
52
|
-
* [Hibri Marzook](http://github.com/hibri): PLink (deprecated) and NDepend tasks
|
53
|
-
* [James Gregory](http://github.com/jagregory): Docu task, zip task contributions, nuspec contributions, etc
|
54
|
-
* [Kevin Colyar](http://github.com/kevincolyar): Testing and updating of MSBuild to work with Cygwin
|
55
|
-
* [Louis Salin](http://github.com/louissalin): Support for nix path separators in CSC task
|
56
|
-
* [Mark Boltuc](http://github.com/mboltuc): Fluent Migrator task
|
57
|
-
* [Mark Wilkins](http://github.com/markwilk): VB.NET Language Generator For The AssemblyInfo Task
|
58
|
-
* [Mike Nichols](http://github.com/mnichols): XUnit contributions, bug reports, etc
|
59
|
-
* [Nathan Fisher](:http://github.com/nfisher): additions to CSC task
|
60
|
-
* [Nils Jonsson](http://github.com/njonsson): AssemblyInfo corrections, rakefile corrections
|
61
|
-
* [Prabir Shrestha](http://github.com/prabirshrestha): Nupack task, bug fixes for xunit test runner, etc.
|
62
|
-
* [Panda Wood](http://github.com/pandawood): NCover Console options and wiki edits
|
63
|
-
* [Sean Biefeld](http://github.com/seanbiefeld): MSpecTestRunner for NCoverConsole
|
64
|
-
* [Steven Harman](http://github.com/stevenharman): Primary contributor. Nant task, issue tickets, disucssions, and much much more.
|
65
|
-
* [Steve Hebert](http://github.com/stevehebert): Nuspec task
|
66
|
-
* [Steven Johnson](http://github.com/2020steve): Expand Templates (deprecated task) supplimental data, etc
|
67
|
-
* [thomasvm](http://github.com/thomasvm): AssemblyInfo read / update existing file, MSSql additions
|
68
|
-
* [Tobias Grimm](http://github.com/e-tobi): AssemblyInfo custom\_data, working directory code refactoring, relative project paths for executables
|
69
|
-
|
70
|
-
And to anyone and everyone else who has contributed in any way, to the mailing list, spreading the word, blog posts, etc: thank you!
|
71
|
-
|
72
39
|
## Legal Mumbo Jumbo (MIT License)
|
73
40
|
|
74
41
|
Copyright (c) 2011 Derick Bailey
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: albacore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Derick Bailey
|
@@ -11,10 +11,86 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-
|
14
|
+
date: 2011-07-10 00:00:00 -05:00
|
15
15
|
default_executable:
|
16
|
-
dependencies:
|
17
|
-
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: rubyzip
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
21
|
+
requirements:
|
22
|
+
- - ~>
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0.9"
|
25
|
+
type: :runtime
|
26
|
+
prerelease: false
|
27
|
+
version_requirements: *id001
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: nokogiri
|
30
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ~>
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: "1.4"
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: *id002
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: version_bumper
|
41
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0.3"
|
47
|
+
type: :development
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: *id003
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: jeweler
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ~>
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "1.6"
|
58
|
+
type: :development
|
59
|
+
prerelease: false
|
60
|
+
version_requirements: *id004
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: "1.2"
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: *id005
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: jekyll
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: "0.8"
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: *id006
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: watchr
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: "0.7"
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: *id007
|
18
94
|
description: Easily build your .NET solutions with Ruby and Rake, using this suite of Rake tasks.
|
19
95
|
email: albacorebuild@gmail.com
|
20
96
|
executables: []
|
@@ -115,55 +191,13 @@ files:
|
|
115
191
|
- rakefile.rb
|
116
192
|
- watchrtesting.rb
|
117
193
|
- yaml_autoconfig_test.yml
|
118
|
-
- spec/albacoremodel_spec.rb
|
119
|
-
- spec/assemblyinfo_spec.rb
|
120
|
-
- spec/attrmethods_spec.rb
|
121
|
-
- spec/config_spec.rb
|
122
|
-
- spec/createtask_spec.rb
|
123
|
-
- spec/csc_spec.rb
|
124
|
-
- spec/docu_spec.rb
|
125
|
-
- spec/exec_spec.rb
|
126
|
-
- spec/fluentmigratorrunner_spec.rb
|
127
|
-
- spec/msbuild_spec.rb
|
128
|
-
- spec/mspec_spec.rb
|
129
|
-
- spec/mstesttestrunner_spec.rb
|
130
|
-
- spec/nant_spec.rb
|
131
|
-
- spec/nchurn_spec.rb
|
132
|
-
- spec/ncoverconsole_spec.rb
|
133
|
-
- spec/ncoverreport_spec.rb
|
134
|
-
- spec/ndepend_spec.rb
|
135
|
-
- spec/nunittestrunner_spec.rb
|
136
|
-
- spec/nuspec_spec.rb
|
137
|
-
- spec/output_spec.rb
|
138
|
-
- spec/patches/docu_patch.rb
|
139
|
-
- spec/patches/fail_patch.rb
|
140
|
-
- spec/patches/system_patch.rb
|
141
|
-
- spec/plink_spec.rb
|
142
|
-
- spec/runcommand_spec.rb
|
143
|
-
- spec/spec_helper.rb
|
144
|
-
- spec/specflowreport_spec.rb
|
145
|
-
- spec/sqlcmd_spec.rb
|
146
|
-
- spec/support/assemblyinfotester.rb
|
147
|
-
- spec/support/ironruby_validator.rb
|
148
|
-
- spec/support/msbuildtestdata.rb
|
149
|
-
- spec/support/nanttestdata.rb
|
150
|
-
- spec/support/ncoverconsoletestdata.rb
|
151
|
-
- spec/support/ncoverreporttestdata.rb
|
152
|
-
- spec/support/nokogiri_validator.rb
|
153
|
-
- spec/support/outputtestdata.rb
|
154
|
-
- spec/support/ziptestdata.rb
|
155
|
-
- spec/unzip_spec.rb
|
156
|
-
- spec/xbuild_spec.rb
|
157
|
-
- spec/xunit_spec.rb
|
158
|
-
- spec/yamlconfig_spec.rb
|
159
|
-
- spec/zip_spec.rb
|
160
194
|
has_rdoc: true
|
161
195
|
homepage: http://albacorebuild.net
|
162
196
|
licenses: []
|
163
197
|
|
164
198
|
post_install_message:
|
165
|
-
rdoc_options:
|
166
|
-
|
199
|
+
rdoc_options: []
|
200
|
+
|
167
201
|
require_paths:
|
168
202
|
- lib
|
169
203
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -185,46 +219,5 @@ rubygems_version: 1.6.0
|
|
185
219
|
signing_key:
|
186
220
|
specification_version: 3
|
187
221
|
summary: Dolphin-Safe Rake Tasks For .NET Systems
|
188
|
-
test_files:
|
189
|
-
|
190
|
-
- spec/assemblyinfo_spec.rb
|
191
|
-
- spec/attrmethods_spec.rb
|
192
|
-
- spec/config_spec.rb
|
193
|
-
- spec/createtask_spec.rb
|
194
|
-
- spec/csc_spec.rb
|
195
|
-
- spec/docu_spec.rb
|
196
|
-
- spec/exec_spec.rb
|
197
|
-
- spec/fluentmigratorrunner_spec.rb
|
198
|
-
- spec/msbuild_spec.rb
|
199
|
-
- spec/mspec_spec.rb
|
200
|
-
- spec/mstesttestrunner_spec.rb
|
201
|
-
- spec/nant_spec.rb
|
202
|
-
- spec/nchurn_spec.rb
|
203
|
-
- spec/ncoverconsole_spec.rb
|
204
|
-
- spec/ncoverreport_spec.rb
|
205
|
-
- spec/ndepend_spec.rb
|
206
|
-
- spec/nunittestrunner_spec.rb
|
207
|
-
- spec/nuspec_spec.rb
|
208
|
-
- spec/output_spec.rb
|
209
|
-
- spec/patches/docu_patch.rb
|
210
|
-
- spec/patches/fail_patch.rb
|
211
|
-
- spec/patches/system_patch.rb
|
212
|
-
- spec/plink_spec.rb
|
213
|
-
- spec/runcommand_spec.rb
|
214
|
-
- spec/spec_helper.rb
|
215
|
-
- spec/specflowreport_spec.rb
|
216
|
-
- spec/sqlcmd_spec.rb
|
217
|
-
- spec/support/assemblyinfotester.rb
|
218
|
-
- spec/support/ironruby_validator.rb
|
219
|
-
- spec/support/msbuildtestdata.rb
|
220
|
-
- spec/support/nanttestdata.rb
|
221
|
-
- spec/support/ncoverconsoletestdata.rb
|
222
|
-
- spec/support/ncoverreporttestdata.rb
|
223
|
-
- spec/support/nokogiri_validator.rb
|
224
|
-
- spec/support/outputtestdata.rb
|
225
|
-
- spec/support/ziptestdata.rb
|
226
|
-
- spec/unzip_spec.rb
|
227
|
-
- spec/xbuild_spec.rb
|
228
|
-
- spec/xunit_spec.rb
|
229
|
-
- spec/yamlconfig_spec.rb
|
230
|
-
- spec/zip_spec.rb
|
222
|
+
test_files: []
|
223
|
+
|
data/spec/albacoremodel_spec.rb
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/albacoretask'
|
3
|
-
|
4
|
-
class ModelTest
|
5
|
-
include Albacore::Task
|
6
|
-
attr_accessor :foo, :bar
|
7
|
-
attr_hash :a_hash
|
8
|
-
attr_array :a_array
|
9
|
-
end
|
10
|
-
|
11
|
-
class NamedTaskExample
|
12
|
-
TaskName = [:namedtask, :anothername]
|
13
|
-
include Albacore::Task
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "when updating object attributes with a valid set of hash keys" do
|
17
|
-
before :each do
|
18
|
-
@model = ModelTest.new
|
19
|
-
@model << {:foo => "test", :bar => "whatever"}
|
20
|
-
end
|
21
|
-
|
22
|
-
it "should set the attributes correctly" do
|
23
|
-
@model.foo.should == "test"
|
24
|
-
@model.bar.should == "whatever"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
describe "when updating an object attributes with an invalid hash key" do
|
29
|
-
before :each do
|
30
|
-
@model = ModelTest.new
|
31
|
-
str = StringIO.new
|
32
|
-
@model.log_device = str
|
33
|
-
@model << {:something => "broken"}
|
34
|
-
@log = str.string
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should warn about the attribute not being found" do
|
38
|
-
@log.should include("something is not a settable attribute on ModelTest")
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
describe "when an class includes albacoretask" do
|
43
|
-
it "should create a rake task for that class" do
|
44
|
-
respond_to?(:modeltest).should be_true
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
describe "when an albacoretask class specifies task names" do
|
49
|
-
it "should create a task with the specified names" do
|
50
|
-
respond_to?(:namedtask).should be_true
|
51
|
-
respond_to?(:anothername).should be_true
|
52
|
-
end
|
53
|
-
end
|
data/spec/assemblyinfo_spec.rb
DELETED
@@ -1,541 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'assemblyinfotester'
|
3
|
-
require 'albacore/assemblyinfo'
|
4
|
-
|
5
|
-
describe AssemblyInfo, "when generating an assembly info file" do
|
6
|
-
before :all do
|
7
|
-
@tester = AssemblyInfoTester.new
|
8
|
-
asm = AssemblyInfo.new
|
9
|
-
strio = StringIO.new
|
10
|
-
asm.log_device = strio
|
11
|
-
|
12
|
-
@tester.build_and_read_assemblyinfo_file asm
|
13
|
-
|
14
|
-
@log_data = strio.string
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should log the name of the output file" do
|
18
|
-
@log_data.downcase.should include(@tester.assemblyinfo_file.downcase)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
describe AssemblyInfo, "when generating an assembly info file in verbose mode" do
|
23
|
-
before :all do
|
24
|
-
@tester = AssemblyInfoTester.new
|
25
|
-
asm = AssemblyInfo.new
|
26
|
-
strio = StringIO.new
|
27
|
-
asm.log_device = strio
|
28
|
-
asm.log_level = :verbose
|
29
|
-
|
30
|
-
asm.version = @tester.version
|
31
|
-
|
32
|
-
@tester.build_and_read_assemblyinfo_file asm
|
33
|
-
@log_data = strio.string
|
34
|
-
end
|
35
|
-
|
36
|
-
it "should log the name of the output file" do
|
37
|
-
@log_data.downcase.should include(@tester.assemblyinfo_file.downcase)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe AssemblyInfo, "when generating an assembly info file without an output file specified" do
|
42
|
-
before :all do
|
43
|
-
@tester = AssemblyInfoTester.new
|
44
|
-
asm = AssemblyInfo.new
|
45
|
-
asm.extend(FailPatch)
|
46
|
-
|
47
|
-
strio = StringIO.new
|
48
|
-
asm.log_device = strio
|
49
|
-
|
50
|
-
asm.execute
|
51
|
-
|
52
|
-
@log_data = strio.string
|
53
|
-
end
|
54
|
-
|
55
|
-
it "should log an error message saying the output file is required" do
|
56
|
-
@log_data.should include("output_file cannot be nil")
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
describe AssemblyInfo, "when providing a custom namespace without specifiying the language" do
|
61
|
-
before :all do
|
62
|
-
@tester = AssemblyInfoTester.new
|
63
|
-
asm = AssemblyInfo.new
|
64
|
-
|
65
|
-
asm.namespaces 'My.Name.Space'
|
66
|
-
|
67
|
-
# Generate the same file twice.
|
68
|
-
@tester.build_and_read_assemblyinfo_file asm
|
69
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
70
|
-
end
|
71
|
-
|
72
|
-
it "should default to c# for the generated assemby info" do
|
73
|
-
@filedata.scan('using My.Name.Space;').length.should == 1
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
describe AssemblyInfo, "when providing custom namespaces and specifying C#" do
|
78
|
-
before :all do
|
79
|
-
@tester = AssemblyInfoTester.new
|
80
|
-
@tester.lang_engine = CSharpEngine.new
|
81
|
-
asm = AssemblyInfo.new
|
82
|
-
asm.lang_engine = CSharpEngine.new
|
83
|
-
|
84
|
-
asm.namespaces 'My.Name.Space', 'Another.Namespace.GoesHere'
|
85
|
-
|
86
|
-
# Generate the same file twice.
|
87
|
-
@tester.build_and_read_assemblyinfo_file asm
|
88
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
89
|
-
end
|
90
|
-
|
91
|
-
it "should.execute the namespaces into the using statements" do
|
92
|
-
@filedata.scan('using My.Name.Space;').length.should == 1
|
93
|
-
@filedata.scan('using Another.Namespace.GoesHere;').length.should == 1
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
describe AssemblyInfo, "when providing custom namespaces and specifying VB.NET" do
|
98
|
-
before :all do
|
99
|
-
@tester = AssemblyInfoTester.new
|
100
|
-
@tester.lang_engine = VbNetEngine.new
|
101
|
-
asm = AssemblyInfo.new
|
102
|
-
asm.lang_engine = VbNetEngine.new
|
103
|
-
|
104
|
-
asm.namespaces 'My.Name.Space', 'Another.Namespace.GoesHere'
|
105
|
-
|
106
|
-
# Generate the same file twice.
|
107
|
-
@tester.build_and_read_assemblyinfo_file asm
|
108
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
109
|
-
end
|
110
|
-
|
111
|
-
it "should.execute the namespaces into the imports statements" do
|
112
|
-
@filedata.scan('Imports My.Name.Space').length.should == 1
|
113
|
-
@filedata.scan('Imports Another.Namespace.GoesHere').length.should == 1
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
describe AssemblyInfo, "when providing custom attributes without specifying a language" do
|
118
|
-
before :all do
|
119
|
-
@tester = AssemblyInfoTester.new
|
120
|
-
asm = AssemblyInfo.new
|
121
|
-
|
122
|
-
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
123
|
-
|
124
|
-
# Generate the same file twice.
|
125
|
-
@tester.build_and_read_assemblyinfo_file asm
|
126
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
127
|
-
end
|
128
|
-
|
129
|
-
it "should.execute the custom attributes to the assembly info file" do
|
130
|
-
@filedata.scan('[assembly: CustomAttribute("custom attribute data")]').length.should == 1
|
131
|
-
@filedata.scan('[assembly: AnotherAttribute("more data here")]').length.should == 1
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
describe AssemblyInfo, "when providing custom attributes and specifying C#" do
|
136
|
-
before :all do
|
137
|
-
@tester = AssemblyInfoTester.new
|
138
|
-
@tester.lang_engine = CSharpEngine.new
|
139
|
-
asm = AssemblyInfo.new
|
140
|
-
asm.lang_engine = CSharpEngine.new
|
141
|
-
|
142
|
-
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
143
|
-
|
144
|
-
# Generate the same file twice.
|
145
|
-
@tester.build_and_read_assemblyinfo_file asm
|
146
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
147
|
-
end
|
148
|
-
|
149
|
-
it "should.execute the custom attributes to the assembly info file" do
|
150
|
-
@filedata.scan('[assembly: CustomAttribute("custom attribute data")]').length.should == 1
|
151
|
-
@filedata.scan('[assembly: AnotherAttribute("more data here")]').length.should == 1
|
152
|
-
end
|
153
|
-
end
|
154
|
-
|
155
|
-
describe AssemblyInfo, "when providing custom attributes and specifying VB.NET" do
|
156
|
-
before :all do
|
157
|
-
@tester = AssemblyInfoTester.new
|
158
|
-
@tester.lang_engine = VbNetEngine.new
|
159
|
-
asm = AssemblyInfo.new
|
160
|
-
asm.lang_engine = VbNetEngine.new
|
161
|
-
|
162
|
-
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
163
|
-
|
164
|
-
# Generate the same file twice.
|
165
|
-
@tester.build_and_read_assemblyinfo_file asm
|
166
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
167
|
-
end
|
168
|
-
|
169
|
-
it "should.execute the custom attributes to the assembly info file" do
|
170
|
-
@filedata.scan('<assembly: CustomAttribute("custom attribute data")>').length.should == 1
|
171
|
-
@filedata.scan('<assembly: AnotherAttribute("more data here")>').length.should == 1
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
describe AssemblyInfo, "when specifying a custom attribute with no data" do
|
176
|
-
before :all do
|
177
|
-
@tester = AssemblyInfoTester.new
|
178
|
-
asm = AssemblyInfo.new
|
179
|
-
|
180
|
-
asm.custom_attributes :NoArgsAttribute => nil
|
181
|
-
|
182
|
-
# Generate the same file twice.
|
183
|
-
@tester.build_and_read_assemblyinfo_file asm
|
184
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
185
|
-
end
|
186
|
-
|
187
|
-
it "should.execute the attribute with an empty argument list" do
|
188
|
-
@filedata.scan('[assembly: NoArgsAttribute()]').length.should == 1
|
189
|
-
end
|
190
|
-
end
|
191
|
-
|
192
|
-
describe AssemblyInfo, "when specifying an attribute with non-string data" do
|
193
|
-
before :all do
|
194
|
-
@tester = AssemblyInfoTester.new
|
195
|
-
asm = AssemblyInfo.new
|
196
|
-
|
197
|
-
asm.custom_attributes :NonStringAttribute => true
|
198
|
-
|
199
|
-
# Generate the same file twice.
|
200
|
-
@tester.build_and_read_assemblyinfo_file asm
|
201
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
202
|
-
end
|
203
|
-
|
204
|
-
it "should.execute the attribute data without quotes" do
|
205
|
-
@filedata.scan('[assembly: NonStringAttribute(true)]').length.should == 1
|
206
|
-
end
|
207
|
-
end
|
208
|
-
|
209
|
-
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and no language specified" do
|
210
|
-
before :all do
|
211
|
-
@tester = AssemblyInfoTester.new
|
212
|
-
asm = AssemblyInfo.new
|
213
|
-
|
214
|
-
asm.company_name = @tester.company_name
|
215
|
-
asm.product_name = @tester.product_name
|
216
|
-
asm.version = @tester.version
|
217
|
-
asm.title = @tester.title
|
218
|
-
asm.description = @tester.description
|
219
|
-
asm.copyright = @tester.copyright
|
220
|
-
asm.com_visible = @tester.com_visible
|
221
|
-
asm.com_guid = @tester.com_guid
|
222
|
-
asm.file_version = @tester.file_version
|
223
|
-
asm.trademark = @tester.trademark
|
224
|
-
|
225
|
-
# Generate the same file twice.
|
226
|
-
@tester.build_and_read_assemblyinfo_file asm
|
227
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
228
|
-
end
|
229
|
-
|
230
|
-
it "should use the system.reflection namespace" do
|
231
|
-
@filedata.scan('using System.Reflection;').length.should == 1
|
232
|
-
end
|
233
|
-
|
234
|
-
it "should use the system.runtime.interopservices namespace" do
|
235
|
-
@filedata.scan('using System.Runtime.InteropServices;').length.should == 1
|
236
|
-
end
|
237
|
-
|
238
|
-
it "should contain the specified version information" do
|
239
|
-
@filedata.scan(%Q|[assembly: AssemblyVersion("#{@tester.version}")]|).length.should == 1
|
240
|
-
end
|
241
|
-
|
242
|
-
it "should contain the assembly title" do
|
243
|
-
@filedata.scan(%Q|[assembly: AssemblyTitle("#{@tester.title}")]|).length.should == 1
|
244
|
-
end
|
245
|
-
|
246
|
-
it "should contain the assembly description" do
|
247
|
-
@filedata.scan(%Q|[assembly: AssemblyDescription("#{@tester.description}")|).length.should == 1
|
248
|
-
end
|
249
|
-
|
250
|
-
it "should contain the copyright information" do
|
251
|
-
@filedata.scan(%Q|[assembly: AssemblyCopyright("#{@tester.copyright}")]|).length.should == 1
|
252
|
-
end
|
253
|
-
|
254
|
-
it "should contain the com visible information" do
|
255
|
-
@filedata.scan(%Q|[assembly: ComVisible(#{@tester.com_visible})]|).length.should == 1
|
256
|
-
@filedata.scan(%Q|[assembly: Guid("#{@tester.com_guid}")]|).length.should == 1
|
257
|
-
end
|
258
|
-
|
259
|
-
it "should contain the company name information" do
|
260
|
-
@filedata.scan(%Q|[assembly: AssemblyCompany("#{@tester.company_name}")]|).length.should == 1
|
261
|
-
end
|
262
|
-
|
263
|
-
it "should contain the product information" do
|
264
|
-
@filedata.scan(%Q|[assembly: AssemblyProduct("#{@tester.product_name}")]|).length.should == 1
|
265
|
-
end
|
266
|
-
|
267
|
-
it "should contain the file version information" do
|
268
|
-
@filedata.scan(%Q|[assembly: AssemblyFileVersion("#{@tester.file_version}")]|).length.should == 1
|
269
|
-
end
|
270
|
-
|
271
|
-
it "should contain the trademark information" do
|
272
|
-
@filedata.scan(%Q|[assembly: AssemblyTrademark("#{@tester.trademark}")]|).length.should == 1
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and C# specified" do
|
277
|
-
before :all do
|
278
|
-
@tester = AssemblyInfoTester.new
|
279
|
-
@tester.lang_engine = CSharpEngine.new
|
280
|
-
asm = AssemblyInfo.new
|
281
|
-
asm.lang_engine = CSharpEngine.new
|
282
|
-
|
283
|
-
asm.company_name = @tester.company_name
|
284
|
-
asm.product_name = @tester.product_name
|
285
|
-
asm.version = @tester.version
|
286
|
-
asm.title = @tester.title
|
287
|
-
asm.description = @tester.description
|
288
|
-
asm.copyright = @tester.copyright
|
289
|
-
asm.com_visible = @tester.com_visible
|
290
|
-
asm.com_guid = @tester.com_guid
|
291
|
-
asm.file_version = @tester.file_version
|
292
|
-
asm.trademark = @tester.trademark
|
293
|
-
|
294
|
-
# Generate the same file twice.
|
295
|
-
@tester.build_and_read_assemblyinfo_file asm
|
296
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
297
|
-
end
|
298
|
-
|
299
|
-
it "should use the system.reflection namespace" do
|
300
|
-
@filedata.scan('using System.Reflection;').length.should == 1
|
301
|
-
end
|
302
|
-
|
303
|
-
it "should use the system.runtime.interopservices namespace" do
|
304
|
-
@filedata.scan('using System.Runtime.InteropServices;').length.should == 1
|
305
|
-
end
|
306
|
-
|
307
|
-
it "should contain the specified version information" do
|
308
|
-
@filedata.scan(%Q|[assembly: AssemblyVersion("#{@tester.version}")]|).length.should == 1
|
309
|
-
end
|
310
|
-
|
311
|
-
it "should contain the assembly title" do
|
312
|
-
@filedata.scan(%Q|[assembly: AssemblyTitle("#{@tester.title}")]|).length.should == 1
|
313
|
-
end
|
314
|
-
|
315
|
-
it "should contain the assembly description" do
|
316
|
-
@filedata.scan(%Q|[assembly: AssemblyDescription("#{@tester.description}")]|).length.should == 1
|
317
|
-
end
|
318
|
-
|
319
|
-
it "should contain the copyright information" do
|
320
|
-
@filedata.scan(%Q|[assembly: AssemblyCopyright("#{@tester.copyright}")]|).length.should == 1
|
321
|
-
end
|
322
|
-
|
323
|
-
it "should contain the com visible information" do
|
324
|
-
@filedata.scan(%Q|[assembly: ComVisible(#{@tester.com_visible})]|).length.should == 1
|
325
|
-
@filedata.scan(%Q|[assembly: Guid("#{@tester.com_guid}")]|).length.should == 1
|
326
|
-
end
|
327
|
-
|
328
|
-
it "should contain the company name information" do
|
329
|
-
@filedata.scan(%Q|[assembly: AssemblyCompany("#{@tester.company_name}")]|).length.should == 1
|
330
|
-
end
|
331
|
-
|
332
|
-
it "should contain the product information" do
|
333
|
-
@filedata.scan(%Q|[assembly: AssemblyProduct("#{@tester.product_name}")]|).length.should == 1
|
334
|
-
end
|
335
|
-
|
336
|
-
it "should contain the file version information" do
|
337
|
-
@filedata.scan(%Q|[assembly: AssemblyFileVersion("#{@tester.file_version}")]|).length.should == 1
|
338
|
-
end
|
339
|
-
|
340
|
-
it "should contain the trademark information" do
|
341
|
-
@filedata.scan(%Q|[assembly: AssemblyTrademark("#{@tester.trademark}")]|).length.should == 1
|
342
|
-
end
|
343
|
-
end
|
344
|
-
|
345
|
-
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and VB.NET specified" do
|
346
|
-
before :all do
|
347
|
-
@tester = AssemblyInfoTester.new
|
348
|
-
@tester.lang_engine = VbNetEngine.new
|
349
|
-
asm = AssemblyInfo.new
|
350
|
-
asm.lang_engine = VbNetEngine.new
|
351
|
-
|
352
|
-
asm.company_name = @tester.company_name
|
353
|
-
asm.product_name = @tester.product_name
|
354
|
-
asm.version = @tester.version
|
355
|
-
asm.title = @tester.title
|
356
|
-
asm.description = @tester.description
|
357
|
-
asm.copyright = @tester.copyright
|
358
|
-
asm.com_visible = @tester.com_visible
|
359
|
-
asm.com_guid = @tester.com_guid
|
360
|
-
asm.file_version = @tester.file_version
|
361
|
-
asm.trademark = @tester.trademark
|
362
|
-
|
363
|
-
# Generate the same file twice.
|
364
|
-
@tester.build_and_read_assemblyinfo_file asm
|
365
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
366
|
-
end
|
367
|
-
|
368
|
-
it "should use the system.reflection namespace" do
|
369
|
-
@filedata.scan('Imports System.Reflection').length.should == 1
|
370
|
-
end
|
371
|
-
|
372
|
-
it "should use the system.runtime.interopservices namespace" do
|
373
|
-
@filedata.scan('Imports System.Runtime.InteropServices').length.should == 1
|
374
|
-
end
|
375
|
-
|
376
|
-
it "should contain the specified version information" do
|
377
|
-
@filedata.scan(%Q|<assembly: AssemblyVersion("#{@tester.version}")>|).length.should == 1
|
378
|
-
end
|
379
|
-
|
380
|
-
it "should contain the assembly title" do
|
381
|
-
@filedata.scan(%Q|<assembly: AssemblyTitle("#{@tester.title}")>|).length.should == 1
|
382
|
-
end
|
383
|
-
|
384
|
-
it "should contain the assembly description" do
|
385
|
-
@filedata.scan(%Q|<assembly: AssemblyDescription("#{@tester.description}")>|).length.should == 1
|
386
|
-
end
|
387
|
-
|
388
|
-
it "should contain the copyright information" do
|
389
|
-
@filedata.scan(%Q|<assembly: AssemblyCopyright("#{@tester.copyright}")>|).length.should == 1
|
390
|
-
end
|
391
|
-
|
392
|
-
it "should contain the com visible information" do
|
393
|
-
@filedata.scan(%Q|<assembly: ComVisible(#{@tester.com_visible})>|).length.should == 1
|
394
|
-
@filedata.scan(%Q|<assembly: Guid("#{@tester.com_guid}")>|).length.should == 1
|
395
|
-
end
|
396
|
-
|
397
|
-
it "should contain the company name information" do
|
398
|
-
@filedata.scan(%Q|<assembly: AssemblyCompany("#{@tester.company_name}")>|).length.should == 1
|
399
|
-
end
|
400
|
-
|
401
|
-
it "should contain the product information" do
|
402
|
-
@filedata.scan(%Q|<assembly: AssemblyProduct("#{@tester.product_name}")>|).length.should == 1
|
403
|
-
end
|
404
|
-
|
405
|
-
it "should contain the file version information" do
|
406
|
-
@filedata.scan(%Q|<assembly: AssemblyFileVersion("#{@tester.file_version}")>|).length.should == 1
|
407
|
-
end
|
408
|
-
|
409
|
-
it "should contain the trademark information" do
|
410
|
-
@filedata.scan(%Q|<assembly: AssemblyTrademark("#{@tester.trademark}")>|).length.should == 1
|
411
|
-
end
|
412
|
-
end
|
413
|
-
|
414
|
-
describe AssemblyInfo, "when generating an assembly info file with no attributes provided" do
|
415
|
-
before :all do
|
416
|
-
@tester = AssemblyInfoTester.new
|
417
|
-
asm = AssemblyInfo.new
|
418
|
-
|
419
|
-
# Generate the same file twice.
|
420
|
-
@tester.build_and_read_assemblyinfo_file asm
|
421
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
422
|
-
end
|
423
|
-
|
424
|
-
it "should not contain the specified version information" do
|
425
|
-
@filedata.scan(%Q|[assembly: AssemblyVersion("#{@tester.version}")]|).should be_empty
|
426
|
-
end
|
427
|
-
|
428
|
-
it "should not contain the assembly title" do
|
429
|
-
@filedata.scan(%Q|[assembly: AssemblyTitle("#{@tester.title}")]|).should be_empty
|
430
|
-
end
|
431
|
-
|
432
|
-
it "should not contain the assembly description" do
|
433
|
-
@filedata.scan(%Q|[assembly: AssemblyDescription("#{@tester.description}")]|).should be_empty
|
434
|
-
end
|
435
|
-
|
436
|
-
it "should not contain the copyright information" do
|
437
|
-
@filedata.scan(%Q|[assembly: AssemblyCopyright("#{@tester.copyright}")]|).should be_empty
|
438
|
-
end
|
439
|
-
|
440
|
-
it "should not contain the com visible information" do
|
441
|
-
@filedata.scan(%Q|[assembly: ComVisible(#{@tester.com_visible})]|).should be_empty
|
442
|
-
@filedata.scan(%Q|[assembly: Guid("#{@tester.com_guid}")]|).should be_empty
|
443
|
-
end
|
444
|
-
|
445
|
-
it "should not contain the company name information" do
|
446
|
-
@filedata.scan(%Q|[assembly: AssemblyCompany("#{@tester.company_name}")]|).should be_empty
|
447
|
-
end
|
448
|
-
|
449
|
-
it "should not contain the product information" do
|
450
|
-
@filedata.scan(%Q|[assembly: AssemblyProduct("#{@tester.product_name}")]|).should be_empty
|
451
|
-
end
|
452
|
-
|
453
|
-
it "should not contain the file version information" do
|
454
|
-
@filedata.scan(%Q|[assembly: AssemblyFileVersion("#{@tester.file_version}")]|).should be_empty
|
455
|
-
end
|
456
|
-
|
457
|
-
it "should not contain the trademark information" do
|
458
|
-
@filedata.scan(%Q|[assembly: AssemblyTrademark("#{@tester.trademark}")]|).should be_empty
|
459
|
-
end
|
460
|
-
end
|
461
|
-
|
462
|
-
describe AssemblyInfo, "when configuring the assembly info generator with a yaml file" do
|
463
|
-
before :all do
|
464
|
-
tester = AssemblyInfoTester.new
|
465
|
-
@asm = AssemblyInfo.new
|
466
|
-
@asm.configure(tester.yaml_file)
|
467
|
-
end
|
468
|
-
|
469
|
-
it "should set the values for the provided attributes" do
|
470
|
-
@asm.version.should == "0.0.1"
|
471
|
-
@asm.company_name.should == "some company name"
|
472
|
-
end
|
473
|
-
end
|
474
|
-
|
475
|
-
describe AssemblyInfo, "when assembly info configuration is provided" do
|
476
|
-
let :asm do
|
477
|
-
Albacore.configure do |config|
|
478
|
-
config.assemblyinfo do |asm|
|
479
|
-
asm.company_name = "foo"
|
480
|
-
asm.version = "bar"
|
481
|
-
end
|
482
|
-
end
|
483
|
-
AssemblyInfo.new
|
484
|
-
end
|
485
|
-
it "should use the supplied info" do
|
486
|
-
asm.company_name.should == "foo"
|
487
|
-
asm.version.should == "bar"
|
488
|
-
end
|
489
|
-
end
|
490
|
-
|
491
|
-
describe AssemblyInfo, "when specifying custom data" do
|
492
|
-
before :all do
|
493
|
-
@tester = AssemblyInfoTester.new
|
494
|
-
asm = AssemblyInfo.new
|
495
|
-
|
496
|
-
asm.custom_data "// foo", "// bar"
|
497
|
-
|
498
|
-
# Generate the same file twice.
|
499
|
-
@tester.build_and_read_assemblyinfo_file asm
|
500
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
501
|
-
end
|
502
|
-
|
503
|
-
it "should write data unmodified to the output" do
|
504
|
-
@filedata.scan('// foo').length.should == 1
|
505
|
-
@filedata.scan('// bar').length.should == 1
|
506
|
-
end
|
507
|
-
end
|
508
|
-
|
509
|
-
describe AssemblyInfo, "when an input file is provided" do
|
510
|
-
before :all do
|
511
|
-
@tester = AssemblyInfoTester.new
|
512
|
-
asm = AssemblyInfo.new
|
513
|
-
|
514
|
-
asm.version = @tester.version
|
515
|
-
asm.file_version = @tester.file_version
|
516
|
-
|
517
|
-
asm.custom_data "// foo", "// baz"
|
518
|
-
|
519
|
-
# make it use existing file
|
520
|
-
@tester.use_input_file
|
521
|
-
|
522
|
-
# Generate the same file twice.
|
523
|
-
@tester.build_and_read_assemblyinfo_file asm
|
524
|
-
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
525
|
-
end
|
526
|
-
it "should contain correct version attribute" do
|
527
|
-
@filedata.scan(%Q|[assembly: AssemblyVersion("#{@tester.version}")]|).length.should == 1
|
528
|
-
end
|
529
|
-
it "shoud leave comment untouched" do
|
530
|
-
@filedata.scan(%Q|// A comment we want to see maintained|).length.should == 1
|
531
|
-
end
|
532
|
-
it "should introduce a new fileversion attribute" do
|
533
|
-
@filedata.scan(%Q|[assembly: AssemblyFileVersion("#{@tester.file_version}")]|).length.should == 1
|
534
|
-
end
|
535
|
-
it "should still leave custom data that's already in there intact" do
|
536
|
-
@filedata.scan(%Q|// foo|).length.should == 1
|
537
|
-
end
|
538
|
-
it "should add custom data that's still missing" do
|
539
|
-
@filedata.scan(%Q|// baz|).length.should == 1
|
540
|
-
end
|
541
|
-
end
|