albacore 2.8.0 → 3.0.0.pre.alpha

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/albacore/cli.rb +2 -2
  3. data/lib/albacore/dsl.rb +2 -42
  4. data/lib/albacore/nuget_model.rb +173 -67
  5. data/lib/albacore/paket.rb +20 -5
  6. data/lib/albacore/paths.rb +1 -0
  7. data/lib/albacore/project.rb +228 -45
  8. data/lib/albacore/task_types/nugets_pack.rb +73 -425
  9. data/lib/albacore/task_types/sql_cmd.rb +1 -1
  10. data/lib/albacore/tasks/release.rb +2 -2
  11. data/lib/albacore/version.rb +1 -1
  12. data/spec/dsl_spec.rb +1 -1
  13. data/spec/nuget_model_spec.rb +208 -79
  14. data/spec/nugets_pack_spec.rb +1 -353
  15. data/spec/paket_spec.rb +51 -2
  16. data/spec/project_spec.rb +118 -43
  17. data/spec/shared_contexts.rb +28 -14
  18. data/spec/testdata/Project/Project.fsproj +1 -1
  19. data/spec/testdata/console-core-argu/.gitignore +4 -0
  20. data/spec/testdata/console-core-argu/.paket/Paket.Restore.targets +239 -0
  21. data/spec/testdata/console-core-argu/.paket/paket.exe +0 -0
  22. data/spec/testdata/console-core-argu/.paket/paket.targets +72 -0
  23. data/spec/testdata/console-core-argu/ConsoleArgu.fsproj +12 -0
  24. data/spec/testdata/console-core-argu/Library.fs +31 -0
  25. data/spec/testdata/console-core-argu/build.sh +4 -0
  26. data/spec/testdata/console-core-argu/paket.dependencies +3 -0
  27. data/spec/testdata/console-core-argu/paket.lock +565 -0
  28. data/spec/testdata/console-core-argu/paket.references +2 -0
  29. data/spec/testdata/console-core-argu/paket.template +1 -0
  30. metadata +26 -16
  31. data/lib/albacore/app_spec.rb +0 -229
  32. data/lib/albacore/cpack_app_spec.rb +0 -135
  33. data/lib/albacore/task_types/nugets.rb +0 -8
  34. data/lib/albacore/task_types/nugets_restore.rb +0 -181
  35. data/spec/app_spec_spec.rb +0 -147
  36. data/spec/fpm_app_spec_spec.rb +0 -157
  37. data/spec/nugets_find_gem_exe_spec.rb +0 -21
  38. data/spec/nugets_restore_spec.rb +0 -77
@@ -1,21 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'spec_helper'
4
- require 'albacore'
5
- require 'albacore/task_types/nugets'
6
-
7
-
8
- describe "when trying to find nuget exe in gem" do
9
-
10
- subject do
11
- Albacore::Nugets::find_nuget_gem_exe
12
- end
13
-
14
- it "should return path to the correct executable" do
15
- expect(subject).to end_with('nuget.exe')
16
- end
17
-
18
- it "the path should point to something" do
19
- expect(File.exists?( subject)).to be true
20
- end
21
- end
@@ -1,77 +0,0 @@
1
- require 'spec_helper'
2
- require 'albacore'
3
- require 'albacore/task_types/nugets_restore'
4
- require 'albacore/dsl'
5
- require 'support/sh_interceptor'
6
-
7
- class NGConf
8
- self.extend Albacore::DSL
9
- end
10
-
11
- shared_context 'cmd context' do
12
- let (:hafsrc) { OpenStruct.new(:name => 'haf-source', :uri => 'https://haf.se/nugets') }
13
- before(:each) { cmd.extend ShInterceptor }
14
- subject { cmd.execute ; cmd.mono_parameters }
15
- end
16
-
17
- describe Albacore::NugetsRestore::Config, 'when setting #source' do
18
- it 'should allow setting a string' do
19
- subject.source = 'hello'
20
- expect(subject.source).not_to be_a String
21
- expect(subject.source).to be_a OpenStruct
22
- expect(subject.source.name).to eq(Digest::MD5.hexdigest('hello'))
23
- end
24
- it 'should allow setting an OpenStruct' do
25
- subject.source = OpenStruct.new :name => 'a', :uri => 'https://example.com/nugetfeed.svc'
26
- expect(subject.source).not_to be_a String
27
- expect(subject.source).to be_a OpenStruct
28
- expect(subject.source.name).to eq 'a'
29
- expect(subject.source.uri).to eq 'https://example.com/nugetfeed.svc'
30
- end
31
- end
32
-
33
- describe Albacore::NugetsRestore::Config, 'when setting #nuget_gem_exe' do
34
- it 'should be set to path that exists' do
35
- subject.nuget_gem_exe
36
- expect(subject.exe).to be_a String
37
- expect(File.exists?( subject.exe)).to be true
38
- end
39
- end
40
-
41
- describe Albacore::NugetsRestore::RemoveSourceCmd, 'when calling #execute should remove source' do
42
- let(:cmd) { Albacore::NugetsRestore::RemoveSourceCmd.new 'nuget.exe', hafsrc }
43
- include_context 'cmd context'
44
- %w[remove sources -name haf-source].each { |k|
45
- it { should include(k) }
46
- }
47
- end
48
-
49
- describe Albacore::NugetsRestore::AddSourceCmd, 'when calling #execute should remove source' do
50
- let (:cmd) { Albacore::NugetsRestore::AddSourceCmd.new 'nuget.exe', hafsrc, 'u', 'p' }
51
- include_context 'cmd context'
52
- %w[sources add -name haf-source].each { |k|
53
- it { should include(k) }
54
- }
55
- end
56
-
57
- describe Albacore::NugetsRestore::Cmd, 'when calling #execute with specific source' do
58
- let (:cmd) do
59
- cfg = Albacore::NugetsRestore::Config.new
60
- cfg.out = 'src/packages'
61
- cfg.add_parameter '-Source'
62
- cfg.add_parameter 'http://localhost:8081'
63
-
64
- cmd = Albacore::NugetsRestore::Cmd.new nil, 'NuGet.exe', cfg.opts_for_pkgcfg('src/Proj/packages.config')
65
- end
66
-
67
- let (:path) do
68
- Albacore::Paths.normalise_slashes('src/Proj/packages.config')
69
- end
70
-
71
- include_context 'cmd context'
72
-
73
- %W[install -OutputDirectory src/packages -Source http://localhost:8081].each { |parameter|
74
- it { should include(parameter) }
75
- }
76
- it { should include(path) }
77
- end