teapot 0.9.9 → 0.9.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: 09184fb53086c06b569d1d5bdb3467f279213cfe
4
- data.tar.gz: c279be319f6eef1eabc954c201b5f2f2f7eee777
3
+ metadata.gz: 878219ed331477566d41ce4f34e5342bd20d3b54
4
+ data.tar.gz: fb855b6abbc1225ea619a4ba4e17e821a8c37b62
5
5
  SHA512:
6
- metadata.gz: acecea7259829609c6507a2d2d095d6d838c307846be48e41b824153b02861ce943451ecaaa844364045c429c957aa096d3bfb04887a3a3c0255b2af0251b5dc
7
- data.tar.gz: 446c2438293e98666bf2a6c59094c2fa1b747f8107c218a9672387eca40d07f52d2d547262f2f213dbb24cfe2fe5fdafcee2081d26e65020310491ce4e224444
6
+ metadata.gz: d12945e3ba6e0aa7debca0ebbe7642e4edad9b412df3d538f0aa7c4c1195afabad9204c5c9954d52d9563d690c0a8918795e0382c8324c55a86be7f1d6e6195d
7
+ data.tar.gz: b2faf14aa6e156a92e041b082ce790de98425cab5f606f81c0705afea8327f1064540f14d24df84468189f5c6c375ddeef2ab29c5d93df244d730abac09fec08
data/Gemfile CHANGED
@@ -2,7 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in teapot.gemspec
4
4
  gemspec
5
-
6
- group :test do
7
- gem "rake"
8
- end
data/bin/teapot CHANGED
@@ -72,8 +72,12 @@ module Application
72
72
  make_controller.run(targets)
73
73
  end
74
74
 
75
- def self.list
76
- make_controller.list
75
+ def self.list(only = ARGV)
76
+ if only.size > 0
77
+ make_controller.list(Set.new(only))
78
+ else
79
+ make_controller.list
80
+ end
77
81
  end
78
82
 
79
83
  def self.visualize(targets = ARGV)
@@ -22,7 +22,6 @@ require 'teapot/commands'
22
22
  require 'teapot/environment'
23
23
 
24
24
  require 'pathname'
25
- require 'rainbow'
26
25
  require 'fileutils'
27
26
 
28
27
  require 'teapot/build/linker'
@@ -21,7 +21,8 @@
21
21
  require 'set'
22
22
  require 'rainbow'
23
23
  require 'shellwords'
24
- require 'facter'
24
+
25
+ require 'system'
25
26
  require 'rexec/task'
26
27
 
27
28
  module Teapot
@@ -36,14 +37,6 @@ module Teapot
36
37
  end
37
38
  end
38
39
 
39
- def self.processor_count
40
- # Get the number of virtual/physical processors
41
- count = Facter.processorcount.to_i rescue 1
42
-
43
- # Make sure we always return at least 1:
44
- count < 1 ? 1 : count
45
- end
46
-
47
40
  class CommandError < StandardError
48
41
  end
49
42
 
@@ -55,7 +48,7 @@ module Teapot
55
48
  options = Hash === args.last ? args.pop : {}
56
49
  options[:passthrough] ||= :all
57
50
 
58
- args = args.flatten.collect &:to_s
51
+ args = args.flatten.compact.collect &:to_s
59
52
 
60
53
  puts args.join(' ').color(:blue) + " in #{options[:chdir] || Dir.getwd}"
61
54
 
@@ -79,7 +72,7 @@ module Teapot
79
72
  end
80
73
 
81
74
  def self.make(*args)
82
- run("make", *args, "-j", processor_count)
75
+ run("make", args, "-j", System::CPU.count)
83
76
  end
84
77
 
85
78
  def self.make_install
@@ -87,15 +80,20 @@ module Teapot
87
80
  end
88
81
 
89
82
  class Pool
83
+ def self.concurrent_process_count
84
+ System::CPU.count * 2
85
+ end
86
+
90
87
  def initialize(options = {})
91
88
  @commands = []
92
- @limit = options[:limit] || Commands.processor_count
89
+
90
+ @limit = options[:limit] || Pool.concurrent_process_count
93
91
 
94
92
  @running = Set.new
95
93
  end
96
94
 
97
95
  def run(*args)
98
- args = args.flatten.collect &:to_s
96
+ args = args.flatten.compact.collect &:to_s
99
97
 
100
98
  @commands << args
101
99
 
@@ -22,9 +22,12 @@ require 'teapot/controller'
22
22
 
23
23
  module Teapot
24
24
  class Controller
25
- def list
25
+ def list(only = nil)
26
26
  # Should this somehow consider context.root_package?
27
27
  context.configuration.packages.each do |package|
28
+ # The root package is the local package for this context:
29
+ next unless only == nil or only.include?(package.name)
30
+
28
31
  log "Package #{package.name} (from #{package.path}):".bright
29
32
 
30
33
  begin
@@ -19,7 +19,9 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require 'rexec/environment'
22
+
22
23
  require 'rainbow'
24
+ require 'rainbow/ext/string'
23
25
 
24
26
  module Teapot
25
27
  class Environment
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Teapot
22
- VERSION = "0.9.9"
22
+ VERSION = "0.9.10"
23
23
  end
data/teapot.gemspec CHANGED
@@ -10,8 +10,10 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
11
  spec.description = <<-EOF
12
12
  Teapot is a tool for managing complex cross-platform builds. It provides
13
- advanced dependency management via the Teapot file and is supported by
14
- the infusions ecosystem of packages and platform tooling.
13
+ advanced package-based dependency management with a single configuration file
14
+ per project. It can fetch, list, build, visualise and create projects, and
15
+ has been designed from the ground up to support collaborative decentralised
16
+ development.
15
17
  EOF
16
18
  spec.summary = %q{Teapot is a tool for managing complex cross-platform builds.}
17
19
  spec.homepage = "http://www.kyusu.org"
@@ -24,13 +26,17 @@ Gem::Specification.new do |spec|
24
26
 
25
27
  spec.required_ruby_version = '>= 1.9.3'
26
28
 
27
- spec.add_dependency "rainbow"
29
+ spec.add_dependency "rainbow", "~> 2.0.0"
28
30
  spec.add_dependency "rexec", "~> 1.6.0"
29
31
  spec.add_dependency "trollop"
30
- spec.add_dependency "facter"
32
+ spec.add_dependency "system", "~> 0.1.3"
31
33
 
32
34
  spec.add_dependency "graphviz"
33
35
 
34
36
  # This could be a good option in the future for teapot fetch:
35
37
  #spec.add_dependency "rugged"
38
+
39
+ spec.add_development_dependency "bundler", "~> 1.3"
40
+ spec.add_development_dependency "minitest"
41
+ spec.add_development_dependency "rake"
36
42
  end
@@ -18,13 +18,11 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'pathname'
22
- require 'test/unit'
23
- require 'stringio'
21
+ require "minitest/autorun"
24
22
 
25
23
  require 'teapot/dependency'
26
24
 
27
- class TestDependency < Test::Unit::TestCase
25
+ class TestDependency < MiniTest::Test
28
26
  class BasicDependency
29
27
  include Teapot::Dependency
30
28
 
@@ -18,13 +18,11 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'pathname'
22
- require 'test/unit'
23
- require 'stringio'
21
+ require "minitest/autorun"
24
22
 
25
23
  require 'teapot/environment'
26
24
 
27
- class TestEnvironment < Test::Unit::TestCase
25
+ class TestEnvironment < MiniTest::Test
28
26
  def test_environment_chaining
29
27
  a = Teapot::Environment.new
30
28
  a[:cflags] = ["-std=c++11"]
@@ -18,13 +18,11 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'pathname'
22
- require 'test/unit'
23
- require 'stringio'
21
+ require "minitest/autorun"
24
22
 
25
23
  require 'teapot/substitutions'
26
24
 
27
- class TestSubstitutions < Test::Unit::TestCase
25
+ class TestSubstitutions < MiniTest::Test
28
26
  def test_symobolic_substitutions
29
27
  input = <<-EOF
30
28
  $FOO $BAR
data/test/test_teapot.rb CHANGED
@@ -18,13 +18,11 @@
18
18
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
19
  # THE SOFTWARE.
20
20
 
21
- require 'pathname'
22
- require 'test/unit'
23
- require 'stringio'
21
+ require "minitest/autorun"
24
22
 
25
23
  require 'teapot/context'
26
24
 
27
- class TestConfig < Test::Unit::TestCase
25
+ class TestConfig < MiniTest::Test
28
26
  ROOT = Pathname.new(__FILE__).dirname
29
27
 
30
28
  def test_context
metadata CHANGED
@@ -1,88 +1,131 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teapot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-04 00:00:00.000000000 Z
11
+ date: 2014-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rexec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: trollop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: facter
56
+ name: system
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.1.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.1.3
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: graphviz
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: minitest
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
81
123
  - !ruby/object:Gem::Version
82
124
  version: '0'
83
125
  description: "\tTeapot is a tool for managing complex cross-platform builds. It provides\n\tadvanced
84
- dependency management via the Teapot file and is supported by\n\tthe infusions ecosystem
85
- of packages and platform tooling.\n"
126
+ package-based dependency management with a single configuration file\n\tper project.
127
+ It can fetch, list, build, visualise and create projects, and\n\thas been designed
128
+ from the ground up to support collaborative decentralised\n\tdevelopment.\n"
86
129
  email:
87
130
  - samuel.williams@oriontransfer.co.nz
88
131
  executables:
@@ -90,8 +133,8 @@ executables:
90
133
  extensions: []
91
134
  extra_rdoc_files: []
92
135
  files:
93
- - .gitignore
94
- - .travis.yml
136
+ - ".gitignore"
137
+ - ".travis.yml"
95
138
  - Gemfile
96
139
  - README.md
97
140
  - Rakefile
@@ -159,17 +202,17 @@ require_paths:
159
202
  - lib
160
203
  required_ruby_version: !ruby/object:Gem::Requirement
161
204
  requirements:
162
- - - '>='
205
+ - - ">="
163
206
  - !ruby/object:Gem::Version
164
207
  version: 1.9.3
165
208
  required_rubygems_version: !ruby/object:Gem::Requirement
166
209
  requirements:
167
- - - '>='
210
+ - - ">="
168
211
  - !ruby/object:Gem::Version
169
212
  version: '0'
170
213
  requirements: []
171
214
  rubyforge_project:
172
- rubygems_version: 2.0.6
215
+ rubygems_version: 2.2.2
173
216
  signing_key:
174
217
  specification_version: 4
175
218
  summary: Teapot is a tool for managing complex cross-platform builds.