teapot 2.0.0 → 2.1.0
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/README.md +66 -132
- data/lib/teapot/command.rb +2 -0
- data/lib/teapot/command/clone.rb +63 -0
- data/lib/teapot/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/teapot/command/clone_spec.rb +55 -0
- data/spec/teapot/target_spec.rb +37 -28
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 916041044782b5244a6c8b7cb013e4a0e06e27fc
|
4
|
+
data.tar.gz: adc4038ee1c679711ebf9840ad29337834f2e142
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cbb0611a500ac31c0496a57c425e044466316b1da97d656be13f7e3ec8407663c51fdf6ceef3254db1f0c1502e7f8862b182217f7717a51ac3daac057df2cb5
|
7
|
+
data.tar.gz: bc125462db83ab65e1bf344b83033aeb8e55e2a7b7ca29d766dd2f9d0b362ece8c565cffef3f5e0c7929598f8b01e9d525d00d360aa6e291026389fecc584d58
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# 
|
2
2
|
|
3
3
|
Teapot is a decentralised build tool for managing complex cross-platform projects. It has many goals but it is primarily designed to improve the experience for developers trying to make cross-platform applications and libraries with a minimum of overhead.
|
4
4
|
|
@@ -7,9 +7,9 @@ Teapot is a decentralised build tool for managing complex cross-platform project
|
|
7
7
|
- Generators can simplify the construction of new projects as well as assist with the development of existing ones.
|
8
8
|
- The build subsystem provides a simple set of canonical operations for building libraries and executables to minimise configuration overhead.
|
9
9
|
|
10
|
-
[](http://travis-ci.org/kurocha/teapot)
|
11
|
+
[](https://codeclimate.com/github/kurocha/teapot)
|
12
|
+
[](https://coveralls.io/r/kurocha/teapot)
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
@@ -19,11 +19,13 @@ Ensure that you already have a working install of Ruby 2.0.0+ and run the follow
|
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
22
|
-
Teapot doesn't have a default centralised package management system but there is a canonical one for developing cross-platform C++ applications. This example shows how to use this framework.
|
22
|
+
Teapot doesn't have a default centralised package management system but there is a [canonical one](https://github.com/kurocha) for developing cross-platform C++ applications. This example shows how to use this framework.
|
23
|
+
|
24
|
+
### Create Project
|
23
25
|
|
24
26
|
Firstly, create your project by running:
|
25
27
|
|
26
|
-
$ teapot create "My Project" https://github.com/kurocha
|
28
|
+
$ teapot create "My Project" https://github.com/kurocha generate-project
|
27
29
|
$ cd my-project
|
28
30
|
|
29
31
|
You will be asked to merge the project file. At present, merge tools are not very good and thus you may need to take a moment to review the changes. You want to keep most of the original file, but you would like to add the `define_target` blocks which are being added.
|
@@ -31,139 +33,72 @@ You will be asked to merge the project file. At present, merge tools are not ver
|
|
31
33
|
In the resulting project directory that has been created, you can see the list of dependencies:
|
32
34
|
|
33
35
|
$ teapot list
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
-
|
43
|
-
- clones build-darwin from https://github.com/kurocha/build-darwin
|
44
|
-
Package platforms (from ./my-project/teapot/packages/my-project/platforms):
|
45
|
-
#<Teapot::Configuration "platforms" visibility=public>
|
46
|
-
- clones platforms from https://github.com/kurocha/platforms
|
47
|
-
- references variants from ./my-project/teapot/packages/platforms/variants
|
48
|
-
- references platform-darwin-osx from ./my-project/teapot/packages/platforms/platform-darwin-osx
|
49
|
-
- references platform-darwin-ios from ./my-project/teapot/packages/platforms/platform-darwin-ios
|
50
|
-
- references build-clang from ./my-project/teapot/packages/platforms/build-clang
|
51
|
-
- references build-darwin from ./my-project/teapot/packages/platforms/build-darwin
|
52
|
-
Package unit-test (from ./my-project/teapot/packages/my-project/unit-test):
|
53
|
-
#<Teapot::Project "Unit Test">
|
36
|
+
... lots of output ...
|
37
|
+
|
38
|
+
To only see things exported by your current project, you can run:
|
39
|
+
|
40
|
+
$ teapot list root
|
41
|
+
Package root (from /private/tmp/my-project):
|
42
|
+
#<Teapot::Project "my-project">
|
43
|
+
My Project description.
|
44
|
+
- Summary: A brief one line summary of the project.
|
54
45
|
- License: MIT License
|
55
46
|
- Version: 0.1.0
|
56
|
-
- Author: Samuel Williams
|
57
|
-
#<Teapot::Target "
|
47
|
+
- Author: Samuel Williams <samuel.williams@oriontransfer.co.nz>
|
48
|
+
#<Teapot::Target "my-project-library">
|
58
49
|
- depends on "Build/Files"
|
59
50
|
- depends on "Build/Clang"
|
60
51
|
- depends on :platform
|
61
|
-
- depends on "Language/C++
|
62
|
-
- provides "Library/
|
63
|
-
#<Teapot::Target "
|
52
|
+
- depends on "Language/C++14" {:private=>true}
|
53
|
+
- provides "Library/MyProject"
|
54
|
+
#<Teapot::Target "my-project-test">
|
55
|
+
- depends on "Library/UnitTest"
|
56
|
+
- depends on "Library/MyProject"
|
57
|
+
- provides "Test/MyProject"
|
58
|
+
#<Teapot::Target "my-project-executable">
|
59
|
+
- depends on "Build/Files"
|
64
60
|
- depends on "Build/Clang"
|
65
61
|
- depends on :platform
|
66
|
-
- depends on "Language/C++
|
67
|
-
- depends on "Library/
|
68
|
-
- provides "
|
69
|
-
#<Teapot::
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
- clones
|
75
|
-
- clones platforms from https://github.com/dream-framework/platforms
|
76
|
-
- clones build-files from https://github.com/dream-framework/build-files
|
77
|
-
- clones variants from https://github.com/dream-framework/variants
|
78
|
-
- clones platform-darwin-osx from https://github.com/dream-framework/platform-darwin-osx
|
79
|
-
- clones platform-darwin-ios from https://github.com/dream-framework/platform-darwin-ios
|
80
|
-
- clones build-clang from https://github.com/dream-framework/build-clang
|
81
|
-
- clones build-darwin from https://github.com/dream-framework/build-darwin
|
82
|
-
#<Teapot::Configuration "travis" visibility=private>
|
62
|
+
- depends on "Language/C++14" {:private=>true}
|
63
|
+
- depends on "Library/MyProject"
|
64
|
+
- provides "Executable/MyProject"
|
65
|
+
#<Teapot::Target "my-project-run">
|
66
|
+
- depends on "Executable/MyProject"
|
67
|
+
- provides "Run/MyProject"
|
68
|
+
#<Teapot::Configuration "development" visibility=private>
|
69
|
+
- references root from /private/tmp/my-project
|
70
|
+
- clones platforms from https://github.com/kurocha/platforms
|
83
71
|
- clones unit-test from https://github.com/kurocha/unit-test
|
84
|
-
- clones
|
85
|
-
- clones
|
86
|
-
- clones variants from https://github.com/
|
87
|
-
- clones platform-darwin-osx from https://github.com/
|
88
|
-
- clones platform-darwin-ios from https://github.com/
|
89
|
-
- clones build-clang from https://github.com/
|
90
|
-
- clones build-darwin from https://github.com/
|
91
|
-
|
92
|
-
|
93
|
-
-
|
94
|
-
#<Teapot::
|
95
|
-
-
|
96
|
-
- provides "Variant/debug"
|
97
|
-
- provides :variant => ["Variant/debug"]
|
98
|
-
#<Teapot::Target "variant-release">
|
99
|
-
- depends on "Variant/generic"
|
100
|
-
- provides "Variant/release"
|
101
|
-
- provides :variant => ["Variant/release"]
|
102
|
-
Package platform-darwin-osx (from ./my-project/teapot/packages/my-project/platform-darwin-osx):
|
103
|
-
#<Teapot::Target "platform-darwin-osx">
|
104
|
-
- depends on :variant
|
105
|
-
- provides "Platform/darwin-osx"
|
106
|
-
- provides :platform => ["Platform/darwin-osx"]
|
107
|
-
- provides "Language/C++11"
|
108
|
-
- provides "Library/OpenGL"
|
109
|
-
- provides "Library/OpenAL"
|
110
|
-
- provides "Library/z"
|
111
|
-
- provides "Library/bz2"
|
112
|
-
Package platform-darwin-ios (from ./my-project/teapot/packages/my-project/platform-darwin-ios):
|
113
|
-
#<Teapot::Target "platform-darwin-ios">
|
114
|
-
- depends on :variant
|
115
|
-
- provides "Platform/darwin-ios"
|
116
|
-
- provides :platform => ["Platform/darwin-ios"]
|
117
|
-
- provides "Language/C++11"
|
118
|
-
- provides "Library/OpenGLES"
|
119
|
-
- provides "Library/OpenGL" => ["Library/OpenGLES"]
|
120
|
-
- provides "Library/OpenAL"
|
121
|
-
- provides "Library/z"
|
122
|
-
- provides "Library/bz2"
|
123
|
-
- provides "Aggregate/Display"
|
124
|
-
#<Teapot::Target "platform-darwin-ios-simulator">
|
125
|
-
- depends on :variant
|
126
|
-
- provides "Platform/darwin-ios-simulator"
|
127
|
-
- provides :platform => ["Platform/darwin-ios-simulator"]
|
128
|
-
- provides "Language/C++11"
|
129
|
-
- provides "Library/OpenGLES"
|
130
|
-
- provides "Library/OpenGL" => ["Library/OpenGLES"]
|
131
|
-
- provides "Library/OpenAL"
|
132
|
-
- provides "Library/z"
|
133
|
-
- provides "Library/bz2"
|
134
|
-
- provides "Aggregate/Display"
|
135
|
-
Package build-clang (from ./my-project/teapot/packages/my-project/build-clang):
|
136
|
-
#<Teapot::Target "build-clang">
|
137
|
-
- depends on :linker
|
138
|
-
- provides "Build/Clang"
|
139
|
-
- provides "Language/C++11"
|
140
|
-
Package build-darwin (from ./my-project/teapot/packages/my-project/build-darwin):
|
141
|
-
#<Teapot::Target "build-darwin">
|
142
|
-
- provides :linker => ["Build/darwin"]
|
143
|
-
- provides "Build/darwin"
|
144
|
-
Elapsed Time: 0.007s
|
72
|
+
- clones generate-cpp-class from https://github.com/kurocha/generate-cpp-class
|
73
|
+
- clones generate-project from https://github.com/kurocha/generate-project
|
74
|
+
- clones variants from https://github.com/kurocha/variants
|
75
|
+
- clones platform-darwin-osx from https://github.com/kurocha/platform-darwin-osx
|
76
|
+
- clones platform-darwin-ios from https://github.com/kurocha/platform-darwin-ios
|
77
|
+
- clones build-clang from https://github.com/kurocha/build-clang
|
78
|
+
- clones build-darwin from https://github.com/kurocha/build-darwin
|
79
|
+
- clones build-files from https://github.com/kurocha/build-files
|
80
|
+
- clones streams from https://github.com/kurocha/streams
|
81
|
+
- clones generate-template from https://github.com/kurocha/generate-template
|
82
|
+
#<Teapot::Configuration "my-project" visibility=public>
|
83
|
+
- references root from /private/tmp/my-project
|
145
84
|
|
146
|
-
|
85
|
+
### Run Tests
|
147
86
|
|
148
|
-
|
87
|
+
Testing is a good idea, and teapot supports test driven development.
|
88
|
+
|
89
|
+
$ teapot Test/MyProject
|
90
|
+
|
91
|
+
#### Wildcard Targets
|
92
|
+
|
93
|
+
To run all tests:
|
94
|
+
|
95
|
+
$ teapot "Test/*"
|
149
96
|
|
150
|
-
|
97
|
+
Provided you are using an environment that supports sanitizers, you can test more thoroughly using:
|
151
98
|
|
152
|
-
|
153
|
-
# Build Targets
|
99
|
+
$ teapot "Test/*" variant-sanitize
|
154
100
|
|
155
|
-
|
156
|
-
target.build do
|
157
|
-
run tests: 'UnitTest', source_files: target.package.path.glob("test/MyProject/**/*.cpp")
|
158
|
-
end
|
159
|
-
|
160
|
-
target.depends :platform
|
161
|
-
target.depends "Language/C++11"
|
162
|
-
target.depends "Library/UnitTest"
|
163
|
-
|
164
|
-
target.provides "Test/MyProject"
|
165
|
-
end
|
166
|
-
```
|
101
|
+
### Build Project
|
167
102
|
|
168
103
|
We can now build and run unit tests (althoght there aren't any yet):
|
169
104
|
|
@@ -178,19 +113,18 @@ The resulting executables and libraries will be framework dependent, but are typ
|
|
178
113
|
$ cd teapot/$PROJECT_NAME/platforms/$PLATFORM_NAME/bin/
|
179
114
|
$ ./$PROJECT_NAME
|
180
115
|
|
181
|
-
###
|
116
|
+
### Cloning Project
|
182
117
|
|
183
|
-
|
184
|
-
$ cd local-tagged-format
|
185
|
-
$ teapot build Test/TaggedFormat variant-debug
|
118
|
+
You can clone another project which will fetch all dependencies:
|
186
119
|
|
187
|
-
|
120
|
+
$ teapot clone https://github.com/kurocha/tagged-format
|
121
|
+
$ cd tagged-format
|
122
|
+
$ teapot build Executable/TaggedFormat
|
188
123
|
|
189
124
|
## Open Issues
|
190
125
|
|
191
126
|
- Should packages be built into a shared prefix or should they be built into unique prefixes and joined together either via install or `-L` and `-I`?
|
192
127
|
- Relative include paths might fail to work correctly if headers are not installed into same directory.
|
193
|
-
- Should packages expose the tools required to build themselves as dependencies? e.g. should `build-cmake` as required by, say, `OpenCV`, be exposed to all who depend on `OpenCV`? Should there be a mechanism for non-public dependencies, i.e. dependencies which are not exposed to dependants? *YES - Implemented*.
|
194
128
|
- Should packages have some way to expose system requirements, e.g. installed compiler, libraries, etc. Perhaps some kind of `Package#valid?` which allows custom logic?
|
195
129
|
|
196
130
|
## Contributing
|
data/lib/teapot/command.rb
CHANGED
@@ -23,6 +23,7 @@ require 'samovar'
|
|
23
23
|
require_relative 'command/build'
|
24
24
|
require_relative 'command/clean'
|
25
25
|
require_relative 'command/create'
|
26
|
+
require_relative 'command/clone'
|
26
27
|
require_relative 'command/fetch'
|
27
28
|
require_relative 'command/list'
|
28
29
|
require_relative 'command/status'
|
@@ -58,6 +59,7 @@ module Teapot
|
|
58
59
|
|
59
60
|
nested '<command>',
|
60
61
|
'create' => Create,
|
62
|
+
'clone' => Clone,
|
61
63
|
'fetch' => Fetch,
|
62
64
|
'list' => List,
|
63
65
|
'status' => Status,
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the "Software"), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in
|
11
|
+
# all copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
# THE SOFTWARE.
|
20
|
+
|
21
|
+
require 'samovar'
|
22
|
+
require 'build/name'
|
23
|
+
|
24
|
+
require_relative 'fetch'
|
25
|
+
require 'rugged'
|
26
|
+
|
27
|
+
require 'build/uri'
|
28
|
+
|
29
|
+
module Teapot
|
30
|
+
module Command
|
31
|
+
class Clone < Samovar::Command
|
32
|
+
self.description = "Clone a remote repository and fetch all dependencies."
|
33
|
+
|
34
|
+
one :source, "The source repository to clone."
|
35
|
+
|
36
|
+
def invoke(parent)
|
37
|
+
raise ArgumentError, "source is required" unless @source
|
38
|
+
|
39
|
+
logger = parent.logger
|
40
|
+
|
41
|
+
name = File.basename(::Build::URI[@source].path, ".git")
|
42
|
+
|
43
|
+
nested = parent['--root', parent.options[:root] || name]
|
44
|
+
root = nested.root
|
45
|
+
|
46
|
+
if root.exist?
|
47
|
+
raise ArgumentError.new("#{root} already exists!")
|
48
|
+
end
|
49
|
+
|
50
|
+
logger.info "Cloning #{@source} to #{root}...".color(:cyan)
|
51
|
+
repository = Rugged::Repository.clone_at(@source, root.to_s, credentials: self.method(:credentials))
|
52
|
+
|
53
|
+
# Fetch the initial packages:
|
54
|
+
Fetch[].invoke(nested)
|
55
|
+
end
|
56
|
+
|
57
|
+
def credentials(url, username, types)
|
58
|
+
# We should prompt for username/password if required...
|
59
|
+
return Rugged::Credentials::SshKeyFromAgent.new(username: username)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
data/lib/teapot/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
# Copyright, 2016, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
# of this software and associated documentation files (the "Software"), to deal
|
6
|
+
# in the Software without restriction, including without limitation the rights
|
7
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
# copies of the Software, and to permit persons to whom the Software is
|
9
|
+
# furnished to do so, subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in
|
12
|
+
# all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
# THE SOFTWARE.
|
21
|
+
|
22
|
+
require 'teapot/command'
|
23
|
+
|
24
|
+
RSpec.describe Teapot::Command::Clone, order: :defined do
|
25
|
+
let(:root) {Build::Files::Path.new(__dir__) + "clone_spec"}
|
26
|
+
let(:source) {'http://github.com/kurocha/tagged-format'}
|
27
|
+
|
28
|
+
let(:top) {Teapot::Command::Top["--root", root.to_s]}
|
29
|
+
|
30
|
+
before do
|
31
|
+
root.delete
|
32
|
+
end
|
33
|
+
|
34
|
+
context "clone remote source" do
|
35
|
+
subject {top['clone', source]}
|
36
|
+
|
37
|
+
it "should checkout files" do
|
38
|
+
expect{subject.invoke}.to_not raise_error
|
39
|
+
|
40
|
+
expect(File).to be_exist(root + "teapot.rb")
|
41
|
+
|
42
|
+
# Check that we actually fetched some remote targets.
|
43
|
+
expect(top.context.targets).to include(
|
44
|
+
"tagged-format-library",
|
45
|
+
"tagged-format-executable",
|
46
|
+
"tagged-format-tests",
|
47
|
+
"build-files",
|
48
|
+
"unit-test-library",
|
49
|
+
"unit-test-tests",
|
50
|
+
"variant-debug",
|
51
|
+
"variant-release",
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/spec/teapot/target_spec.rb
CHANGED
@@ -20,34 +20,43 @@
|
|
20
20
|
|
21
21
|
require 'teapot/context'
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
RSpec.describe Teapot::Target do
|
24
|
+
let(:root) {Build::Files::Path.new(__dir__) + "target_spec"}
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
26
|
+
it "should generate environment for configuration" do
|
27
|
+
context = Teapot::Context.new(root)
|
28
|
+
|
29
|
+
target = context.targets['target_spec']
|
30
|
+
expect(target).to_not be == nil
|
31
|
+
|
32
|
+
chain = context.dependency_chain(["Test/TargetSpec"])
|
33
|
+
expect(chain.providers.size).to be == 4
|
34
|
+
expect(chain.providers).to include target
|
35
|
+
|
36
|
+
expect(chain.ordered.size).to be == 3
|
37
|
+
expect(chain.ordered[0].name).to be == 'Variant/debug'
|
38
|
+
expect(chain.ordered[1].name).to be == 'Platform/generic'
|
39
|
+
expect(chain.ordered[2].name).to be == 'Test/TargetSpec'
|
40
|
+
expect(chain.ordered[2].provider).to be == target
|
41
|
+
|
42
|
+
environment = target.environment(context.configuration, chain)
|
43
|
+
# Environment#to_hash flattens the environment and evaluates all values:
|
44
|
+
hash = environment.to_hash
|
45
|
+
|
46
|
+
expect(hash[:variant]).to be == 'debug'
|
47
|
+
expect(hash[:platform_name]).to be == 'generic'
|
48
|
+
|
49
|
+
expect(hash).to include(:buildflags, :linkflags, :build_prefix, :install_prefix, :platforms_path)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should match wildcard packages" do
|
53
|
+
context = Teapot::Context.new(root)
|
54
|
+
|
55
|
+
target = context.targets['target_spec']
|
56
|
+
expect(target).to_not be == nil
|
57
|
+
|
58
|
+
chain = context.dependency_chain(["Test/*"])
|
59
|
+
expect(chain.providers.size).to be == 4
|
60
|
+
expect(chain.providers).to include target
|
52
61
|
end
|
53
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teapot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- lib/teapot/command.rb
|
202
202
|
- lib/teapot/command/build.rb
|
203
203
|
- lib/teapot/command/clean.rb
|
204
|
+
- lib/teapot/command/clone.rb
|
204
205
|
- lib/teapot/command/create.rb
|
205
206
|
- lib/teapot/command/fetch.rb
|
206
207
|
- lib/teapot/command/list.rb
|
@@ -220,6 +221,7 @@ files:
|
|
220
221
|
- materials/teapot.png
|
221
222
|
- materials/teapot.svg
|
222
223
|
- spec/spec_helper.rb
|
224
|
+
- spec/teapot/command/clone_spec.rb
|
223
225
|
- spec/teapot/command/fetch_spec.rb
|
224
226
|
- spec/teapot/command/fetch_spec/repositories/thing/README.md
|
225
227
|
- spec/teapot/command/fetch_spec/repositories/thing/teapot.rb
|
@@ -252,12 +254,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
254
|
version: '0'
|
253
255
|
requirements: []
|
254
256
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.6.
|
257
|
+
rubygems_version: 2.6.12
|
256
258
|
signing_key:
|
257
259
|
specification_version: 4
|
258
260
|
summary: Teapot is a tool for managing complex cross-platform builds.
|
259
261
|
test_files:
|
260
262
|
- spec/spec_helper.rb
|
263
|
+
- spec/teapot/command/clone_spec.rb
|
261
264
|
- spec/teapot/command/fetch_spec.rb
|
262
265
|
- spec/teapot/command/fetch_spec/repositories/thing/README.md
|
263
266
|
- spec/teapot/command/fetch_spec/repositories/thing/teapot.rb
|