build-graph 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +4 -0
- data/.travis.yml +11 -3
- data/build-graph.gemspec +3 -3
- data/lib/build/graph/edge.rb +0 -2
- data/lib/build/graph/node.rb +2 -2
- data/lib/build/graph/task.rb +4 -5
- data/lib/build/graph/version.rb +1 -1
- data/spec/build/graph/graph_spec.rb +10 -5
- metadata +9 -10
- data/spec/build/graph/graph.pdf +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fe664d73ec6b69811e09e9afc08106e751fe154
|
4
|
+
data.tar.gz: 6f9d78571bdd3000fdb171e70855a0da1881cd33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c4b26479fe93ca729f7aa18b996138550f32b9d5214667ea85d7ab29453c847fd65bd703d10ed6b1d4083434eb81ef9f64d42c0cc2b633702d9e6cd4a1ee68
|
7
|
+
data.tar.gz: df5b79fd7d44d134170e78e0b7d032fe8ba2322c83f5b3c3ab07cfc4e05b4636d4af4763510f5f49485cd729dca15ab4d6cdc1341ec2858c555ca19c176380d5
|
data/.rspec
ADDED
data/.travis.yml
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
language: ruby
|
2
|
-
rvm:
|
3
|
-
- "2.0"
|
4
|
-
- "2.1"
|
5
2
|
compiler: clang
|
6
3
|
before_install:
|
7
4
|
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
|
8
5
|
- sudo apt-get -qq update
|
9
6
|
- sudo apt-get -qq install libstdc++-4.8-dev
|
7
|
+
rvm:
|
8
|
+
- 2.0.0
|
9
|
+
- 2.1.8
|
10
|
+
- 2.2.4
|
11
|
+
- 2.3.0
|
12
|
+
- ruby-head
|
13
|
+
- rbx-2
|
10
14
|
env: COVERAGE=true
|
15
|
+
matrix:
|
16
|
+
allow_failures:
|
17
|
+
- rvm: "rbx-2"
|
18
|
+
|
data/build-graph.gemspec
CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.required_ruby_version = '>= 2.0'
|
24
24
|
|
25
|
-
spec.add_dependency "process-group", "~> 1.0.
|
26
|
-
spec.add_dependency "build-files", "~> 1.0.
|
25
|
+
spec.add_dependency "process-group", "~> 1.0.1"
|
26
|
+
spec.add_dependency "build-files", "~> 1.0.2"
|
27
27
|
|
28
28
|
spec.add_development_dependency "build-makefile", "~> 1.0.0"
|
29
29
|
|
@@ -31,6 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "rainbow", "~> 2.0.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.3"
|
34
|
-
spec.add_development_dependency "rspec", "~> 3.
|
34
|
+
spec.add_development_dependency "rspec", "~> 3.4.0"
|
35
35
|
spec.add_development_dependency "rake"
|
36
36
|
end
|
data/lib/build/graph/edge.rb
CHANGED
data/lib/build/graph/node.rb
CHANGED
@@ -47,7 +47,7 @@ module Build
|
|
47
47
|
|
48
48
|
# This computes the most recent modified time for all inputs.
|
49
49
|
def modified_time
|
50
|
-
|
50
|
+
@inputs.map{|path| path.modified_time}.max
|
51
51
|
end
|
52
52
|
|
53
53
|
# This is a canonical dirty function. All outputs must exist and must be newer than all inputs. This function is not efficient, in the sense that it must query all files on disk for last modified time.
|
@@ -85,7 +85,7 @@ module Build
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def inspect
|
88
|
-
"
|
88
|
+
"#<#{self.class} #{@inputs.inspect} => #{@outputs.inspect} by #{@process.inspect}>"
|
89
89
|
end
|
90
90
|
|
91
91
|
def self.top(inputs = Files::Paths::NONE, outputs = :inherit, **options, &block)
|
data/lib/build/graph/task.rb
CHANGED
@@ -28,7 +28,6 @@ module Build
|
|
28
28
|
|
29
29
|
@node = node
|
30
30
|
|
31
|
-
# If the execution of the node fails, this is where we save the error:
|
32
31
|
@error = nil
|
33
32
|
|
34
33
|
@children = []
|
@@ -44,6 +43,9 @@ module Build
|
|
44
43
|
attr :children
|
45
44
|
attr :state
|
46
45
|
|
46
|
+
# The error, if the execution of the node fails.
|
47
|
+
attr :error
|
48
|
+
|
47
49
|
attr :walker
|
48
50
|
|
49
51
|
attr :node
|
@@ -119,12 +121,9 @@ module Build
|
|
119
121
|
end
|
120
122
|
|
121
123
|
def inspect
|
122
|
-
"
|
124
|
+
"#<#{self.class}:#{'0x%X' % self.object_id} #{@node.inspect} #{@state}>"
|
123
125
|
end
|
124
126
|
|
125
|
-
attr :error
|
126
|
-
attr :state
|
127
|
-
|
128
127
|
protected
|
129
128
|
def update_inputs_and_outputs
|
130
129
|
# If @node.inputs is a glob, this part of the process converts the glob into an actual list of files.
|
data/lib/build/graph/version.rb
CHANGED
@@ -139,17 +139,22 @@ module Build::Graph::GraphSpec
|
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|
142
|
+
triggered = 0
|
142
143
|
trashed_files = false
|
143
144
|
|
144
145
|
thread = Thread.new do
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
146
|
+
while triggered == 0 or trashed_files == false
|
147
|
+
sleep 0.1 if trashed_files
|
148
|
+
|
149
|
+
destination.glob("*.cpp").each{|path| path.delete}
|
150
|
+
|
151
|
+
trashed_files = true
|
152
|
+
end
|
150
153
|
end
|
151
154
|
|
152
155
|
walker.run do
|
156
|
+
triggered += 1
|
157
|
+
|
153
158
|
walker.update(top)
|
154
159
|
group.wait
|
155
160
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: build-graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: process-group
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.
|
19
|
+
version: 1.0.1
|
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: 1.0.
|
26
|
+
version: 1.0.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: build-files
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0.
|
33
|
+
version: 1.0.2
|
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
|
-
version: 1.0.
|
40
|
+
version: 1.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: build-makefile
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 3.
|
103
|
+
version: 3.4.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 3.
|
110
|
+
version: 3.4.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,6 +132,7 @@ extensions: []
|
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
134
|
- ".gitignore"
|
135
|
+
- ".rspec"
|
135
136
|
- ".simplecov"
|
136
137
|
- ".travis.yml"
|
137
138
|
- Gemfile
|
@@ -146,7 +147,6 @@ files:
|
|
146
147
|
- lib/build/graph/version.rb
|
147
148
|
- lib/build/graph/walker.rb
|
148
149
|
- spec/build/graph/build_test.rb
|
149
|
-
- spec/build/graph/graph.pdf
|
150
150
|
- spec/build/graph/graph_spec.rb
|
151
151
|
- spec/build/graph/inherit_spec.rb
|
152
152
|
- spec/build/graph/node_spec.rb
|
@@ -185,7 +185,6 @@ summary: Build::Graph is a framework for build systems, with specific functional
|
|
185
185
|
for dealing with file based processes.
|
186
186
|
test_files:
|
187
187
|
- spec/build/graph/build_test.rb
|
188
|
-
- spec/build/graph/graph.pdf
|
189
188
|
- spec/build/graph/graph_spec.rb
|
190
189
|
- spec/build/graph/inherit_spec.rb
|
191
190
|
- spec/build/graph/node_spec.rb
|
data/spec/build/graph/graph.pdf
DELETED
Binary file
|