european-carry-all 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/european-carry-all.gemspec +1 -1
- data/lib/{european.rb → european-carry-all.rb} +2 -0
- data/lib/european/build.rb +1 -1
- data/lib/european/build_system.rb +20 -8
- data/lib/european/carry_all.rb +126 -19
- data/lib/european/deploy_system.rb +57 -0
- data/lib/european/name_interpreter.rb +17 -0
- data/lib/european/named_carry_all_item.rb +9 -1
- data/lib/european/project.rb +21 -6
- data/lib/european/version.rb +1 -1
- data/spec/data/configs/build.rb +7 -0
- data/spec/data/configs/build_system-with-block.rb +4 -0
- data/spec/data/configs/build_system.rb +1 -0
- data/spec/data/configs/deploy.rb +8 -0
- data/spec/data/configs/deploy_system-with-block.rb +4 -0
- data/spec/data/configs/deploy_system.rb +1 -0
- data/spec/data/configs/jedcn.rb +3 -5
- data/spec/data/configs/project-with-block.rb +6 -0
- data/spec/data/configs/project.rb +1 -0
- data/spec/data/configs/project_defaults.rb +16 -0
- data/spec/data/configs/source_system-with-block.rb +3 -0
- data/spec/data/configs/source_system.rb +1 -0
- data/spec/data/configs/typical-example.rb +26 -0
- data/spec/dsl/build_spec.rb +41 -0
- data/spec/dsl/build_system_spec.rb +57 -0
- data/spec/dsl/deploy_spec.rb +38 -0
- data/spec/dsl/deploy_system_spec.rb +57 -0
- data/spec/dsl/project_defaults_spec.rb +37 -0
- data/spec/dsl/project_spec.rb +50 -0
- data/spec/dsl/source_system_spec.rb +53 -0
- data/spec/dsl/typical_example_spec.rb +109 -0
- data/spec/lib/european/carry_all_spec.rb +6 -47
- data/spec/lib/european/name_interpreter_spec.rb +22 -0
- data/spec/lib/european/project_spec.rb +36 -12
- data/spec/spec_helper.rb +1 -1
- metadata +48 -5
data/lib/european/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
build_system 'travis/jedcn'
|
@@ -0,0 +1 @@
|
|
1
|
+
deploy_system 'jenkins'
|
data/spec/data/configs/jedcn.rb
CHANGED
@@ -2,20 +2,18 @@ source_system 'github' do
|
|
2
2
|
hosts_projects_at '"https://github.com/jedcn/#{name}.git"'
|
3
3
|
end
|
4
4
|
|
5
|
-
build_system 'travis
|
5
|
+
build_system 'travis-jedcn' do
|
6
6
|
url_is 'https://travis-ci.org/jedcn'
|
7
7
|
hosts_projects_at '"#{url}/#{name}/"'
|
8
8
|
end
|
9
9
|
|
10
10
|
project 'reveal-ck' do
|
11
|
-
|
12
|
-
has_build 'reveal-ck'
|
11
|
+
has_build 'travis-jedcn/reveal-ck'
|
13
12
|
is_hosted_on 'github'
|
14
13
|
end
|
15
14
|
|
16
15
|
project 'rake-to-web' do
|
17
|
-
|
18
|
-
has_build 'rake-to-web'
|
16
|
+
has_build 'travis-jedcn/rake-to-web'
|
19
17
|
is_hosted_on 'github'
|
20
18
|
end
|
21
19
|
|
@@ -0,0 +1 @@
|
|
1
|
+
project 'reveal-ck'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
source_system 'github' do
|
2
|
+
hosts_projects_at '"https://github.com/jedcn/#{name}.git"'
|
3
|
+
end
|
4
|
+
|
5
|
+
build_system 'travis-jedcn' do
|
6
|
+
url_is 'https://travis-ci.org/jedcn'
|
7
|
+
hosts_projects_at '"#{url}/#{name}/"'
|
8
|
+
end
|
9
|
+
|
10
|
+
project 'defaults' do
|
11
|
+
is_hosted_on 'github'
|
12
|
+
end
|
13
|
+
|
14
|
+
project 'reveal-ck' do
|
15
|
+
has_build 'travis-jedcn/reveal-ck'
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
source_system 'github/jedcn'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
source_system 'github/jedcn' do
|
2
|
+
hosts_projects_at '"https://github.com/jedcn/#{name}.git"'
|
3
|
+
end
|
4
|
+
|
5
|
+
build_system 'travis-jedcn' do
|
6
|
+
url_is 'https://travis-ci.org/jedcn'
|
7
|
+
hosts_projects_at '"#{url}/#{name}/"'
|
8
|
+
end
|
9
|
+
|
10
|
+
project 'defaults' do
|
11
|
+
is_hosted_on 'github/jedcn'
|
12
|
+
end
|
13
|
+
|
14
|
+
project 'reveal-ck' do
|
15
|
+
has_build 'travis-jedcn/reveal-ck'
|
16
|
+
end
|
17
|
+
|
18
|
+
project 'reveal-ck-template'
|
19
|
+
|
20
|
+
project 'rake-to-web' do
|
21
|
+
has_build 'travis-jedcn/rake-to-web'
|
22
|
+
end
|
23
|
+
|
24
|
+
project 'emacs-setup'
|
25
|
+
|
26
|
+
project 'european-carry-all'
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'build' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :travis do
|
12
|
+
carry_all.build_system named: 'travis'
|
13
|
+
end
|
14
|
+
|
15
|
+
let :reveal_ck do
|
16
|
+
travis.build named: 'jedcn/reveal-ck'
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'build (without a block)' do
|
20
|
+
|
21
|
+
let :file do
|
22
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'build.rb'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'brings a build into existence' do
|
26
|
+
reveal_ck.should_not be_nil
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'sets the build up with a nil project' do
|
30
|
+
reveal_ck.project.should be_nil
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'sets the build up with a valid url' do
|
34
|
+
reveal_ck.url.should == 'https://travis-ci.org/jedcn/reveal-ck/'
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'build_system' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :build_systems do
|
12
|
+
carry_all.build_systems
|
13
|
+
end
|
14
|
+
|
15
|
+
let :travis_jedcn do
|
16
|
+
carry_all.build_system named: 'travis/jedcn'
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'build_system (without a block)' do
|
20
|
+
|
21
|
+
let :file do
|
22
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'build_system.rb'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'brings a build system into existence' do
|
26
|
+
build_systems.size.should == 1
|
27
|
+
travis_jedcn.should_not be_nil
|
28
|
+
travis_jedcn.name.should == 'travis/jedcn'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'build_system with a block' do
|
34
|
+
|
35
|
+
let :file do
|
36
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'build_system-with-block.rb'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'brings a build system into existence' do
|
40
|
+
build_systems.size.should == 1
|
41
|
+
travis_jedcn.should_not be_nil
|
42
|
+
travis_jedcn.name.should == 'travis/jedcn'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'recognizes "url_is"' do
|
46
|
+
travis_jedcn.url.should == 'https://travis-ci.org/jedcn'
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'recognizes "hosts_projects_at"' do
|
50
|
+
travis_jedcn.project_path.should == '"#{url}/#{name}/"'
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'deploy' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :travis do
|
12
|
+
carry_all.deploy_system named: 'jenkins'
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
describe 'deploy (without a block)' do
|
17
|
+
|
18
|
+
let :file do
|
19
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'deploy.rb'
|
20
|
+
end
|
21
|
+
|
22
|
+
xit 'brings a deploy into existence' do
|
23
|
+
reveal_ck.should_not be_nil
|
24
|
+
end
|
25
|
+
|
26
|
+
xit 'sets the deploy up with a nil project' do
|
27
|
+
reveal_ck.project.should be_nil
|
28
|
+
end
|
29
|
+
|
30
|
+
xit 'sets the deploy up with a valid url' do
|
31
|
+
reveal_ck.url.should == 'https://travis-ci.org/jedcn/reveal-ck/'
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'deploy_system' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :deploy_systems do
|
12
|
+
carry_all.deploy_systems
|
13
|
+
end
|
14
|
+
|
15
|
+
let :jenkins do
|
16
|
+
carry_all.deploy_system named: 'jenkins'
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'deploy_system (without a block)' do
|
20
|
+
|
21
|
+
let :file do
|
22
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'deploy_system.rb'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'brings a deploy system into existence' do
|
26
|
+
deploy_systems.size.should == 1
|
27
|
+
jenkins.should_not be_nil
|
28
|
+
jenkins.name.should == 'jenkins'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'deploy_system with a block' do
|
34
|
+
|
35
|
+
let :file do
|
36
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'deploy_system-with-block.rb'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'brings a deploy system into existence' do
|
40
|
+
deploy_systems.size.should == 1
|
41
|
+
jenkins.should_not be_nil
|
42
|
+
jenkins.name.should == 'jenkins'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'recognizes "url_is"' do
|
46
|
+
jenkins.url.should == 'https://jenkins.company.com'
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'recognizes "hosts_projects_at"' do
|
50
|
+
jenkins.project_path.should == '"#{url}/#{name}/"'
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'project "defaults"' do
|
6
|
+
|
7
|
+
let :file do
|
8
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'project_defaults.rb'
|
9
|
+
end
|
10
|
+
|
11
|
+
let :carry_all do
|
12
|
+
European::CarryAll.load_file file
|
13
|
+
end
|
14
|
+
|
15
|
+
let :projects do
|
16
|
+
carry_all.projects
|
17
|
+
end
|
18
|
+
|
19
|
+
let :reveal_ck do
|
20
|
+
carry_all.project named: 'reveal-ck'
|
21
|
+
end
|
22
|
+
|
23
|
+
let :travis do
|
24
|
+
carry_all.build_system named: 'travis/jedcn'
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'enables all projects to share default settings' do
|
28
|
+
|
29
|
+
it 'supports "is_hosted_on"' do
|
30
|
+
expect(reveal_ck.src_url).to eq 'https://github.com/jedcn/reveal-ck.git'
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'project' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :projects do
|
12
|
+
carry_all.projects
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'project (without a block)' do
|
16
|
+
|
17
|
+
let :file do
|
18
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'project.rb'
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'brings a project into existence' do
|
22
|
+
projects.size.should == 1
|
23
|
+
reveal_ck = carry_all.project named: 'reveal-ck'
|
24
|
+
reveal_ck.name.should == 'reveal-ck'
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'project (with a block)' do
|
30
|
+
|
31
|
+
let :file do
|
32
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'project-with-block.rb'
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'brings a project into existence' do
|
36
|
+
projects.size.should == 1
|
37
|
+
reveal_ck = carry_all.project named: 'reveal-ck'
|
38
|
+
reveal_ck.name.should == 'reveal-ck'
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'instance evals the associated block' do
|
42
|
+
reveal_ck = carry_all.project named: 'reveal-ck'
|
43
|
+
reveal_ck.example.should == 1
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'EuropeanCarryAll DSL' do
|
4
|
+
|
5
|
+
describe 'source_system' do
|
6
|
+
|
7
|
+
let :carry_all do
|
8
|
+
European::CarryAll.load_file file
|
9
|
+
end
|
10
|
+
|
11
|
+
let :source_systems do
|
12
|
+
carry_all.source_systems
|
13
|
+
end
|
14
|
+
|
15
|
+
let :github_jedcn do
|
16
|
+
carry_all.source_system named: 'github/jedcn'
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'source_system (without a block)' do
|
20
|
+
|
21
|
+
let :file do
|
22
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'source_system.rb'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'brings a source system into existence' do
|
26
|
+
source_systems.size.should == 1
|
27
|
+
github_jedcn.should_not be_nil
|
28
|
+
github_jedcn.name.should == 'github/jedcn'
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe 'source_system with a block' do
|
34
|
+
|
35
|
+
let :file do
|
36
|
+
File.join Dir.pwd, 'spec', 'data', 'configs', 'source_system-with-block.rb'
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'brings a source system into existence' do
|
40
|
+
source_systems.size.should == 1
|
41
|
+
github_jedcn.should_not be_nil
|
42
|
+
github_jedcn.name.should == 'github/jedcn'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'recognizes "hosts_projects_at"' do
|
46
|
+
github_jedcn.project_path.should == '"https://github.com/jedcn/#{name}.git"'
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|