exegesis 0.0.4 → 0.0.5
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.
- data/CHANGELOG +11 -2
- data/NOTES.md +24 -0
- data/lib/exegesis.rb +1 -17
- data/lib/exegesis/base_directory.rb +13 -11
- data/lib/exegesis/directory.rb +24 -14
- data/lib/exegesis/file_searcher.rb +31 -29
- data/lib/exegesis/file_system_entity.rb +35 -35
- data/lib/exegesis/flyweight.rb +104 -103
- data/lib/exegesis/registerable.rb +42 -40
- data/lib/exegesis/source_file.rb +23 -21
- data/lib/exegesis/version.rb +1 -1
- data/spec/integration/flyweight_registerable_spec.rb +2 -2
- data/spec/integration/visitor_spec.rb +1 -1
- data/spec/shared/file_system_entity_examples.rb +15 -0
- data/spec/spec_helper.rb +5 -2
- data/spec/unit/base_directory_spec.rb +27 -28
- data/spec/unit/directory_spec.rb +37 -8
- data/spec/unit/file_searcher_spec.rb +10 -10
- data/spec/unit/flyweight_spec.rb +9 -9
- data/spec/unit/source_file_spec.rb +8 -7
- metadata +18 -50
- data/spec/fake_project/AUTHORS +0 -1
- data/spec/fake_project/Rakefile +0 -14
- data/spec/fake_project/config.yml +0 -6
- data/spec/fake_project/src/grafton.c +0 -25
- data/spec/fake_project/src/node.c +0 -23
- data/spec/fake_project/src/node.h +0 -19
- data/spec/fake_project/test/example2_test.c +0 -29
- data/spec/fake_project/test/example_test.c +0 -12
- data/spec/fake_project/test/test_helper.h +0 -19
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'unit_spec_helper'
|
2
2
|
|
3
|
-
describe SourceFile do
|
3
|
+
describe Exegesis::SourceFile do
|
4
4
|
let(:basename) { 'fake' }
|
5
5
|
let(:extension) { '.c' }
|
6
6
|
let(:name) { basename + extension }
|
@@ -11,14 +11,15 @@ describe SourceFile do
|
|
11
11
|
let(:full_path) { File.join(parent.path, name) }
|
12
12
|
let(:content) { double('content') }
|
13
13
|
|
14
|
-
let(:source_file) { SourceFile.create(parent, name, fs_interface) }
|
15
|
-
|
14
|
+
let(:source_file) { Exegesis::SourceFile.create(parent, name, fs_interface) }
|
16
15
|
|
17
16
|
subject { source_file }
|
18
17
|
|
18
|
+
it_should_behave_like 'a FileSystemEntity'
|
19
|
+
|
19
20
|
before do
|
20
21
|
parent.stub(:path).and_return('/path/to/parent/')
|
21
|
-
parent.stub(:is_a?).with(Directory).and_return(true)
|
22
|
+
parent.stub(:is_a?).with(Exegesis::Directory).and_return(true)
|
22
23
|
|
23
24
|
fs_interface.stub(:read).with(full_path).and_return(content)
|
24
25
|
fs_interface.stub(:extname).with(name).and_return(extension)
|
@@ -81,7 +82,7 @@ describe SourceFile do
|
|
81
82
|
|
82
83
|
pending 'reimplementation' do
|
83
84
|
it 'raises an error if you try to give a parent that is not a Directory' do
|
84
|
-
expect { SourceFile.create(:not_a_dir, name) }.to raise_error ArgumentError
|
85
|
+
expect { Exegesis::SourceFile.create(:not_a_dir, name) }.to raise_error ArgumentError
|
85
86
|
end
|
86
87
|
end
|
87
88
|
it { should == source_file.container }
|
@@ -97,7 +98,7 @@ describe SourceFile do
|
|
97
98
|
let(:file) { double('another sourcefile') }
|
98
99
|
let(:not_a_file) { double('not a sourcefile') }
|
99
100
|
|
100
|
-
before { file.stub(:is_a?).with(SourceFile).and_return(:true) }
|
101
|
+
before { file.stub(:is_a?).with(Exegesis::SourceFile).and_return(:true) }
|
101
102
|
|
102
103
|
subject { source_file.dependencies }
|
103
104
|
|
@@ -112,7 +113,7 @@ describe SourceFile do
|
|
112
113
|
it 'raises unless the dependency is a file' do
|
113
114
|
expect {
|
114
115
|
source_file.depends_on(not_a_file)
|
115
|
-
}.to raise_error InvalidDependency
|
116
|
+
}.to raise_error Exegesis::InvalidDependency
|
116
117
|
end
|
117
118
|
end
|
118
119
|
end
|
metadata
CHANGED
@@ -1,19 +1,24 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exegesis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Joe Fredette
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
none: false
|
15
21
|
type: :runtime
|
16
|
-
prerelease: false
|
17
22
|
name: rake
|
18
23
|
version_requirements: !ruby/object:Gem::Requirement
|
19
24
|
requirements:
|
@@ -21,15 +26,15 @@ dependencies:
|
|
21
26
|
- !ruby/object:Gem::Version
|
22
27
|
version: '0'
|
23
28
|
none: false
|
29
|
+
prerelease: false
|
30
|
+
- !ruby/object:Gem::Dependency
|
24
31
|
requirement: !ruby/object:Gem::Requirement
|
25
32
|
requirements:
|
26
33
|
- - ! '>='
|
27
34
|
- !ruby/object:Gem::Version
|
28
35
|
version: '0'
|
29
36
|
none: false
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
37
|
type: :runtime
|
32
|
-
prerelease: false
|
33
38
|
name: celluloid
|
34
39
|
version_requirements: !ruby/object:Gem::Requirement
|
35
40
|
requirements:
|
@@ -37,12 +42,7 @@ dependencies:
|
|
37
42
|
- !ruby/object:Gem::Version
|
38
43
|
version: '0'
|
39
44
|
none: false
|
40
|
-
|
41
|
-
requirements:
|
42
|
-
- - ! '>='
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '0'
|
45
|
-
none: false
|
45
|
+
prerelease: false
|
46
46
|
description: A tool for automatically compiling C projects
|
47
47
|
email:
|
48
48
|
- jfredett@gmail.com
|
@@ -94,24 +94,6 @@ files:
|
|
94
94
|
bGliL2V4ZWdlc2lzL3NvdXJjZV9maWxlLnJi
|
95
95
|
- !binary |-
|
96
96
|
bGliL2V4ZWdlc2lzL3ZlcnNpb24ucmI=
|
97
|
-
- !binary |-
|
98
|
-
c3BlYy9mYWtlX3Byb2plY3QvQVVUSE9SUw==
|
99
|
-
- !binary |-
|
100
|
-
c3BlYy9mYWtlX3Byb2plY3QvUmFrZWZpbGU=
|
101
|
-
- !binary |-
|
102
|
-
c3BlYy9mYWtlX3Byb2plY3QvY29uZmlnLnltbA==
|
103
|
-
- !binary |-
|
104
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL2dyYWZ0b24uYw==
|
105
|
-
- !binary |-
|
106
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL25vZGUuYw==
|
107
|
-
- !binary |-
|
108
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL25vZGUuaA==
|
109
|
-
- !binary |-
|
110
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC9leGFtcGxlMl90ZXN0LmM=
|
111
|
-
- !binary |-
|
112
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC9leGFtcGxlX3Rlc3QuYw==
|
113
|
-
- !binary |-
|
114
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC90ZXN0X2hlbHBlci5o
|
115
97
|
- !binary |-
|
116
98
|
c3BlYy9oZWxwZXJzL2RlbGVnYXRlcy5yYg==
|
117
99
|
- !binary |-
|
@@ -129,6 +111,8 @@ files:
|
|
129
111
|
c3BlYy9pbnRlZ3JhdGlvbi92aXNpdG9yX3NwZWMucmI=
|
130
112
|
- !binary |-
|
131
113
|
c3BlYy9pbnRlZ3JhdGlvbl9zcGVjX2hlbHBlci5yYg==
|
114
|
+
- !binary |-
|
115
|
+
c3BlYy9zaGFyZWQvZmlsZV9zeXN0ZW1fZW50aXR5X2V4YW1wbGVzLnJi
|
132
116
|
- !binary |-
|
133
117
|
c3BlYy9zcGVjX2hlbHBlci5yYg==
|
134
118
|
- !binary |-
|
@@ -155,47 +139,29 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
139
|
requirements:
|
156
140
|
- - ! '>='
|
157
141
|
- !ruby/object:Gem::Version
|
142
|
+
hash: 2002549777813010636
|
158
143
|
segments:
|
159
144
|
- 0
|
160
|
-
hash: 2002549777813010636
|
161
145
|
version: '0'
|
162
146
|
none: false
|
163
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
148
|
requirements:
|
165
149
|
- - ! '>='
|
166
150
|
- !ruby/object:Gem::Version
|
151
|
+
hash: 2002549777813010636
|
167
152
|
segments:
|
168
153
|
- 0
|
169
|
-
hash: 2002549777813010636
|
170
154
|
version: '0'
|
171
155
|
none: false
|
172
156
|
requirements: []
|
173
157
|
rubyforge_project:
|
174
|
-
rubygems_version: 1.8.
|
158
|
+
rubygems_version: 1.8.25
|
175
159
|
signing_key:
|
176
160
|
specification_version: 3
|
177
161
|
summary: Exegesis is a tool for automating many parts of the development of C projects.
|
178
162
|
Following a convention-over-configuration model, it provides tools to create skeleton
|
179
163
|
projects, as well as providing tools to automate building, testing, and packaging.
|
180
164
|
test_files:
|
181
|
-
- !binary |-
|
182
|
-
c3BlYy9mYWtlX3Byb2plY3QvQVVUSE9SUw==
|
183
|
-
- !binary |-
|
184
|
-
c3BlYy9mYWtlX3Byb2plY3QvUmFrZWZpbGU=
|
185
|
-
- !binary |-
|
186
|
-
c3BlYy9mYWtlX3Byb2plY3QvY29uZmlnLnltbA==
|
187
|
-
- !binary |-
|
188
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL2dyYWZ0b24uYw==
|
189
|
-
- !binary |-
|
190
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL25vZGUuYw==
|
191
|
-
- !binary |-
|
192
|
-
c3BlYy9mYWtlX3Byb2plY3Qvc3JjL25vZGUuaA==
|
193
|
-
- !binary |-
|
194
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC9leGFtcGxlMl90ZXN0LmM=
|
195
|
-
- !binary |-
|
196
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC9leGFtcGxlX3Rlc3QuYw==
|
197
|
-
- !binary |-
|
198
|
-
c3BlYy9mYWtlX3Byb2plY3QvdGVzdC90ZXN0X2hlbHBlci5o
|
199
165
|
- !binary |-
|
200
166
|
c3BlYy9oZWxwZXJzL2RlbGVnYXRlcy5yYg==
|
201
167
|
- !binary |-
|
@@ -213,6 +179,8 @@ test_files:
|
|
213
179
|
c3BlYy9pbnRlZ3JhdGlvbi92aXNpdG9yX3NwZWMucmI=
|
214
180
|
- !binary |-
|
215
181
|
c3BlYy9pbnRlZ3JhdGlvbl9zcGVjX2hlbHBlci5yYg==
|
182
|
+
- !binary |-
|
183
|
+
c3BlYy9zaGFyZWQvZmlsZV9zeXN0ZW1fZW50aXR5X2V4YW1wbGVzLnJi
|
216
184
|
- !binary |-
|
217
185
|
c3BlYy9zcGVjX2hlbHBlci5yYg==
|
218
186
|
- !binary |-
|
data/spec/fake_project/AUTHORS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Joe Fredette
|
data/spec/fake_project/Rakefile
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* =====================================================================================
|
3
|
-
*
|
4
|
-
* Filename: grafton.c
|
5
|
-
*
|
6
|
-
* Description:
|
7
|
-
*
|
8
|
-
* Version: 1.0
|
9
|
-
* Created: 08/27/2012 09:09:38
|
10
|
-
* Revision: none
|
11
|
-
* Compiler: gcc
|
12
|
-
*
|
13
|
-
* Author: YOUR NAME (),
|
14
|
-
* Organization:
|
15
|
-
*
|
16
|
-
* =====================================================================================
|
17
|
-
*/
|
18
|
-
#include <stdlib.h>
|
19
|
-
#include <stdio.h>
|
20
|
-
#include "node.h"
|
21
|
-
|
22
|
-
int main() {
|
23
|
-
printf("hello world\n");
|
24
|
-
return foo();
|
25
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* =====================================================================================
|
3
|
-
*
|
4
|
-
* Filename: node.c
|
5
|
-
*
|
6
|
-
* Description:
|
7
|
-
*
|
8
|
-
* Version: 1.0
|
9
|
-
* Created: 08/27/2012 23:01:12
|
10
|
-
* Revision: none
|
11
|
-
* Compiler: gcc
|
12
|
-
*
|
13
|
-
* Author: YOUR NAME (),
|
14
|
-
* Organization:
|
15
|
-
*
|
16
|
-
* =====================================================================================
|
17
|
-
*/
|
18
|
-
#include <stdlib.h>
|
19
|
-
#include "node.h"
|
20
|
-
|
21
|
-
int foo() {
|
22
|
-
return 1;
|
23
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* =====================================================================================
|
3
|
-
*
|
4
|
-
* Filename: node.h
|
5
|
-
*
|
6
|
-
* Description:
|
7
|
-
*
|
8
|
-
* Version: 1.0
|
9
|
-
* Created: 08/27/2012 23:00:57
|
10
|
-
* Revision: none
|
11
|
-
* Compiler: gcc
|
12
|
-
*
|
13
|
-
* Author: YOUR NAME (),
|
14
|
-
* Organization:
|
15
|
-
*
|
16
|
-
* =====================================================================================
|
17
|
-
*/
|
18
|
-
|
19
|
-
int foo();
|
@@ -1,29 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* =====================================================================================
|
3
|
-
*
|
4
|
-
* Filename: example.c
|
5
|
-
*
|
6
|
-
* Description:
|
7
|
-
*
|
8
|
-
* Version: 1.0
|
9
|
-
* Created: 08/27/2012 07:38:40
|
10
|
-
* Revision: none
|
11
|
-
* Compiler: gcc
|
12
|
-
*
|
13
|
-
* Author: YOUR NAME (),
|
14
|
-
* Organization:
|
15
|
-
*
|
16
|
-
* =====================================================================================
|
17
|
-
*/
|
18
|
-
/*#include "test_helper.h"*/
|
19
|
-
|
20
|
-
START_TEST (test_foo) {
|
21
|
-
fail_unless(1);
|
22
|
-
|
23
|
-
} END_TEST
|
24
|
-
|
25
|
-
START_TEST (test_bar) {
|
26
|
-
fail_unless(0);
|
27
|
-
|
28
|
-
} END_TEST
|
29
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* =====================================================================================
|
3
|
-
*
|
4
|
-
* Filename: test_helper.h
|
5
|
-
*
|
6
|
-
* Description: Helper file for writing tests
|
7
|
-
*
|
8
|
-
* Created: 08/25/2012 09:38:50
|
9
|
-
* Compiler: clang
|
10
|
-
*
|
11
|
-
* Author: Joe Fredette (jfredett@gmail.com),
|
12
|
-
*
|
13
|
-
* =====================================================================================
|
14
|
-
*/
|
15
|
-
|
16
|
-
#include <stdlib.h>
|
17
|
-
#include <check.h>
|
18
|
-
|
19
|
-
|