build-graph 2.1.0 → 2.2.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.
metadata CHANGED
@@ -1,43 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
9
8
  bindir: bin
10
- cert_chain: []
11
- date: 2019-10-07 00:00:00.000000000 Z
9
+ cert_chain:
10
+ - |
11
+ -----BEGIN CERTIFICATE-----
12
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
13
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
14
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
15
+ MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
16
+ MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
17
+ bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
18
+ igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
19
+ 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
20
+ sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
21
+ e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
22
+ XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
23
+ RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
24
+ tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
25
+ zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
26
+ xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
27
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
28
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
29
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
30
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
31
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
32
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
33
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
34
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
35
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
36
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
37
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
38
+ -----END CERTIFICATE-----
39
+ date: 1980-01-02 00:00:00.000000000 Z
12
40
  dependencies:
13
41
  - !ruby/object:Gem::Dependency
14
- name: process-group
42
+ name: build-files
15
43
  requirement: !ruby/object:Gem::Requirement
16
44
  requirements:
17
45
  - - "~>"
18
46
  - !ruby/object:Gem::Version
19
- version: '1.1'
47
+ version: '1.8'
20
48
  type: :runtime
21
49
  prerelease: false
22
50
  version_requirements: !ruby/object:Gem::Requirement
23
51
  requirements:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
- version: '1.1'
54
+ version: '1.8'
27
55
  - !ruby/object:Gem::Dependency
28
- name: build-files
56
+ name: build-files-monitor
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: '1.0'
61
+ version: '0.4'
34
62
  type: :runtime
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: '1.0'
68
+ version: '0.4'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: console
43
71
  requirement: !ruby/object:Gem::Requirement
@@ -52,117 +80,25 @@ dependencies:
52
80
  - - "~>"
53
81
  - !ruby/object:Gem::Version
54
82
  version: '1.1'
55
- - !ruby/object:Gem::Dependency
56
- name: build-makefile
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: covered
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
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: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '3.4'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '3.4'
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
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- description: "\tBuild::Graph is a framework for managing file-system based build processes.
126
- It provides graph based build functionality which monitors the file-system for changes.
127
- Because of this, it can efficiently manage large and complex process based builds.\n"
128
- email:
129
- - samuel.williams@oriontransfer.co.nz
130
83
  executables: []
131
84
  extensions: []
132
85
  extra_rdoc_files: []
133
86
  files:
134
- - ".gitignore"
135
- - ".rspec"
136
- - ".travis.yml"
137
- - Gemfile
138
- - README.md
139
- - Rakefile
140
- - build-graph.gemspec
141
87
  - lib/build/graph.rb
142
88
  - lib/build/graph/edge.rb
143
89
  - lib/build/graph/node.rb
144
90
  - lib/build/graph/task.rb
145
91
  - lib/build/graph/version.rb
146
92
  - lib/build/graph/walker.rb
147
- - spec/build/graph/build_test.rb
148
- - spec/build/graph/edge_spec.rb
149
- - spec/build/graph/graph_spec.rb
150
- - spec/build/graph/inherit_spec.rb
151
- - spec/build/graph/node_spec.rb
152
- - spec/build/graph/process_graph.rb
153
- - spec/build/graph/program/Benchmark.cpp
154
- - spec/build/graph/program/Benchmark.h
155
- - spec/build/graph/program/DictionarySort.h
156
- - spec/build/graph/program/ParallelMergeSort.h
157
- - spec/build/graph/program/main.cpp
158
- - spec/build/graph/task_spec.rb
159
- - spec/build/graph/walker_spec.rb
160
- - spec/spec_helper.rb
161
- homepage: ''
93
+ - license.md
94
+ - readme.md
95
+ - releases.md
162
96
  licenses:
163
97
  - MIT
164
- metadata: {}
165
- post_install_message:
98
+ metadata:
99
+ documentation_uri: https://ioquatix.github.io/build-graph
100
+ funding_uri: https://github.com/sponsors/ioquatix
101
+ source_code_uri: https://github.com/ioquatix/build-graph.git
166
102
  rdoc_options: []
167
103
  require_paths:
168
104
  - lib
@@ -170,30 +106,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
106
  requirements:
171
107
  - - ">="
172
108
  - !ruby/object:Gem::Version
173
- version: '2.0'
109
+ version: '3.2'
174
110
  required_rubygems_version: !ruby/object:Gem::Requirement
175
111
  requirements:
176
112
  - - ">="
177
113
  - !ruby/object:Gem::Version
178
114
  version: '0'
179
115
  requirements: []
180
- rubygems_version: 3.0.4
181
- signing_key:
116
+ rubygems_version: 4.0.3
182
117
  specification_version: 4
183
118
  summary: Build::Graph is a framework for build systems, with specific functionality
184
119
  for dealing with file based processes.
185
- test_files:
186
- - spec/build/graph/build_test.rb
187
- - spec/build/graph/edge_spec.rb
188
- - spec/build/graph/graph_spec.rb
189
- - spec/build/graph/inherit_spec.rb
190
- - spec/build/graph/node_spec.rb
191
- - spec/build/graph/process_graph.rb
192
- - spec/build/graph/program/Benchmark.cpp
193
- - spec/build/graph/program/Benchmark.h
194
- - spec/build/graph/program/DictionarySort.h
195
- - spec/build/graph/program/ParallelMergeSort.h
196
- - spec/build/graph/program/main.cpp
197
- - spec/build/graph/task_spec.rb
198
- - spec/build/graph/walker_spec.rb
199
- - spec/spec_helper.rb
120
+ test_files: []
metadata.gz.sig ADDED
Binary file
data/.gitignore DELETED
@@ -1,24 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- *.bundle
19
- *.so
20
- *.o
21
- *.a
22
- *.d
23
- mkmf.log
24
- .rspec_status
data/.rspec DELETED
@@ -1,4 +0,0 @@
1
- --format documentation
2
- --backtrace
3
- --warnings
4
- --require spec_helper
data/.travis.yml DELETED
@@ -1,19 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- cache: bundler
4
-
5
- addons:
6
- apt:
7
- sources:
8
- - ubuntu-toolchain-r-test
9
- packages:
10
- - libstdc++-4.8-dev
11
-
12
- matrix:
13
- include:
14
- - rvm: 2.3
15
- - rvm: 2.4
16
- - rvm: 2.5
17
- - rvm: 2.6
18
- - rvm: 2.6
19
- env: COVERAGE=BriefSummary,Coveralls
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Use local code for testing.
4
- # gem "build-files", path: "../build-files"
5
-
6
- # Specify your gem's dependencies in build.gemspec
7
- gemspec
8
-
9
- group :test do
10
- gem 'rb-fsevent'
11
- gem 'rb-inotify'
12
-
13
- gem 'graphviz'
14
- end
data/README.md DELETED
@@ -1,99 +0,0 @@
1
- # Build::Graph
2
-
3
- Build::Graph is a framework for build systems, with specific functionality for dealing with file based processes.
4
-
5
- [![Build Status](https://secure.travis-ci.org/ioquatix/build-graph.svg)](http://travis-ci.org/ioquatix/build-graph)
6
- [![Code Climate](https://codeclimate.com/github/ioquatix/build-graph.svg)](https://codeclimate.com/github/ioquatix/build-graph)
7
- [![Coverage Status](https://coveralls.io/repos/ioquatix/build-graph/badge.svg)](https://coveralls.io/r/ioquatix/build-graph)
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- gem 'build-graph'
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install build-graph
22
-
23
- ## Usage
24
-
25
- A build graph is an abstract set of `[input, process, output]` nodes. A node executes it's process within the context of a `Task` which represents a specific set of inputs and outputs and is managed within a `Walker` that walks over graph nodes, regenerating tasks where required. If inputs or outputs change (i.e. become dirty), the old task is nullified.
26
-
27
- A `Walker` is used to traverse the build graph once. As it walks over the graph it builds a set of `Edge` relationships between nodes and only traverses relationships which are complete `Walker#wait_on_paths`. Parent nodes also wait until all their children are complete `Walker#wait_on_nodes` It also keeps track of failures `Walker#failed?` and fails all dependencies of a node.
28
-
29
- A `Task` is instantiated once per node when traversing the graph. The task represents a specific process being applied to the graph, e.g. build, clean, etc. It is responsible for actually performing any real actions and providing the methods to do so. A `Task` contains all details about the specific graph state at that point in time, e.g. `Task#children` and updating the node state in `Task#exit`. Statistics on the build graph are also captured through `Task` and `Walker`, e.g. number of nodes visited, etc.
30
-
31
- ### Inputs and Outputs
32
-
33
- Inputs to a node should be all on-disk state and any additional parameters which cause it's behavior to produce different results.
34
-
35
- Outputs from a node should be all files that are generated directly by the processes within the node and sometimes it's children.
36
-
37
- ### Dirty Propagation
38
-
39
- A `Node` has a set of `#inputs` and `#outputs` but these are abstract. For example, `#outputs` could be `:inherit` which means that the node symbolically has all the outputs of all it's direct children. A `Task`, at the time of execution, captures it's inputs and outputs and these may be monitored for changes in real time.
40
-
41
- File changes are currently detected using `File::mtime` as this is generally a good trade off between efficiency and accuracy.
42
-
43
- When a task is marked as dirty, it also marks all it's outputs as being dirty, which in cause could mark other tasks as dirty. This is the mechanism for which dirtiness propagates through the graph. The walker should only have to traverse the graph once to build it completely. If multiple updates are required (i.e. buidling one part of the graph implicitly dirties another part of the graph), the specification of the graph is incomplete and this may lead to problems within the build graph.
44
-
45
- ### Example Graph
46
-
47
- target("Library/UnitTest", [] -> :inherit) do
48
- library([UnitTest.cpp] -> UnitTest.a) do
49
- compile([UnitTest.cpp] -> UnitTest.o)
50
- link([UnitTest.o] -> libUnitTest.a)
51
- end
52
-
53
- copy headers: [UnitTest.hpp]
54
-
55
- # Outputs become libUnitTest.a and UnitTest.hpp
56
- end
57
-
58
- target("Executable/UnitTest", [] -> :inherit) do
59
- depends("Library/UnitTest")
60
-
61
- executable(main.cpp -> UnitTest) do
62
- compile(main.cpp -> main.o)
63
- link([main.o, libUnitTest.a] -> UnitTest)
64
- end
65
-
66
- # Outputs become UnitTest
67
- end
68
-
69
- ## Contributing
70
-
71
- 1. Fork it
72
- 2. Create your feature branch (`git checkout -b my-new-feature`)
73
- 3. Commit your changes (`git commit -am 'Add some feature'`)
74
- 4. Push to the branch (`git push origin my-new-feature`)
75
- 5. Create new Pull Request
76
-
77
- ## License
78
-
79
- Released under the MIT license.
80
-
81
- Copyright, 2012, 2014, 2016, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
82
-
83
- Permission is hereby granted, free of charge, to any person obtaining a copy
84
- of this software and associated documentation files (the "Software"), to deal
85
- in the Software without restriction, including without limitation the rights
86
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87
- copies of the Software, and to permit persons to whom the Software is
88
- furnished to do so, subject to the following conditions:
89
-
90
- The above copyright notice and this permission notice shall be included in
91
- all copies or substantial portions of the Software.
92
-
93
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
96
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
99
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/build-graph.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'build/graph/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "build-graph"
8
- spec.version = Build::Graph::VERSION
9
- spec.authors = ["Samuel Williams"]
10
- spec.email = ["samuel.williams@oriontransfer.co.nz"]
11
- spec.summary = %q{Build::Graph is a framework for build systems, with specific functionality for dealing with file based processes.}
12
- spec.description = <<-EOF
13
- Build::Graph is a framework for managing file-system based build processes. It provides graph based build functionality which monitors the file-system for changes. Because of this, it can efficiently manage large and complex process based builds.
14
- EOF
15
- spec.homepage = ""
16
- spec.license = "MIT"
17
-
18
- spec.files = `git ls-files`.split($/)
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ["lib"]
22
-
23
- spec.required_ruby_version = '>= 2.0'
24
-
25
- spec.add_dependency "process-group", "~> 1.1"
26
- spec.add_dependency "build-files", "~> 1.0"
27
- spec.add_dependency "console", "~> 1.1"
28
-
29
- spec.add_development_dependency "build-makefile", "~> 1.0"
30
-
31
- spec.add_development_dependency "covered"
32
- spec.add_development_dependency "bundler"
33
- spec.add_development_dependency "rspec", "~> 3.4"
34
- spec.add_development_dependency "rake"
35
- end
@@ -1,85 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
4
-
5
- require 'graphviz'
6
- require_relative 'process_graph'
7
-
8
- include ProcessGraph
9
-
10
- program_root = Path.join(__dir__, "program")
11
- code_glob = Glob.new(program_root, "*.cpp")
12
- program_path = Path.join(program_root, "dictionary-sort")
13
-
14
- group = Process::Group.new
15
- walker = Walker.for(ProcessTask, group)
16
-
17
- top = ProcessNode.top code_glob, title: 'top' do
18
- process code_glob, program_path, title: 'build' do
19
- object_files = inputs.with(extension: ".o") do |input_path, output_path|
20
- depfile_path = input_path + ".d"
21
-
22
- dependencies = Paths.new(input_path)
23
-
24
- if File.exist? depfile_path
25
- depfile = Build::Makefile.load_file(depfile_path)
26
-
27
- dependencies = depfile[output_path] || dependencies
28
- end
29
-
30
- process dependencies, output_path, title: 'compile' do
31
- run("clang++", "-MMD", "-O3",
32
- "-o", output_path.shortest_path(input_path.root),
33
- "-c", input_path.relative_path, "-std=c++11",
34
- chdir: input_path.root
35
- )
36
- end
37
- end
38
-
39
- process object_files, program_path, title: 'link' do
40
- run("clang++", "-O3", "-o", program_path, *object_files.to_a, "-lm", "-pthread")
41
- end
42
- end
43
-
44
- process program_path, title: 'run' do
45
- run("./" + program_path.relative_path, chdir: program_path.root)
46
- end
47
- end
48
-
49
- interrupted = false
50
-
51
- trap(:INT) do
52
- exit(0)
53
- end
54
-
55
- viz = Graphviz::Graph.new
56
- viz.attributes[:rankdir] = 'LR'
57
-
58
- walker.run do
59
- group.wait do
60
- walker.update(top)
61
- end
62
-
63
- walker.tasks.each do |node, task|
64
- input_nodes = []
65
- output_nodes = []
66
-
67
- task.inputs.each do |path|
68
- input_nodes << viz.add_node(path.basename)
69
- end
70
-
71
- task.outputs.each do |path|
72
- output_nodes << viz.add_node(path.basename)
73
- end
74
-
75
- if output_nodes.size == 1
76
- input_nodes.each do |input_node|
77
- edge = input_node.connect(output_nodes.first)
78
- edge.attributes[:label] = node.title
79
- end
80
- end
81
- end
82
-
83
- File.write('graph.dot', viz.to_dot)
84
- `dot -Tpdf graph.dot > graph.pdf && open graph.pdf`
85
- end
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env rspec
2
-
3
- # Copyright, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
22
-
23
- require_relative 'process_graph'
24
-
25
- RSpec.describe Build::Graph::Edge do
26
- let(:failed_task) {double(:failed? => true)}
27
-
28
- it "should fail if failed task is added" do
29
- subject.traverse(failed_task)
30
-
31
- expect(subject.failed?).to be_truthy
32
- end
33
-
34
- it "should fail if failed task is skipped" do
35
- subject.skip!(failed_task)
36
-
37
- expect(subject.failed?).to be_truthy
38
- end
39
- end