architecture 4.0.0 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/architecture/dsl.rb +11 -11
- data/lib/architecture/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f3b12d5474199fe1cad3b769615fdb182e5c70
|
4
|
+
data.tar.gz: 5e11c147123b0bcc3b9295e068675d5b2f29f524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0b596987e94aa99ec1d98f928423b3059c4b5d05bcf939c0fe3349a2dd5a60e73af40b35ecfa5d563ecac50941d9d6bc65046c25709607cc111b174ddf5eb97
|
7
|
+
data.tar.gz: dcc32efc441b58e32fc17f88046d1dec93b974a0082037375f4d11a10baa3e751604a4bb283380b808847001cadfc8a0b4ff894098eed1e8f93f0c96ea33e64b
|
data/lib/architecture/dsl.rb
CHANGED
@@ -9,47 +9,47 @@ module Architecture
|
|
9
9
|
yield(self)
|
10
10
|
end
|
11
11
|
|
12
|
-
|
12
|
+
def copy(name:, as: name, context: {})
|
13
13
|
::Architecture::Copy.new(source: source(name), destination: destination(as), context: context).call
|
14
14
|
end
|
15
15
|
|
16
|
-
|
16
|
+
def move(name:, as:)
|
17
17
|
::Architecture::Move.new(source: path, destination: as).call
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
def create(directory: nil, file: nil, content: nil, context: {})
|
21
21
|
::Architecture::Create.new(source: directory || file, content: content, context: context).call
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
def delete(directory: nil, file: nil)
|
25
25
|
::Architecture::Delete.new(source: directory || file).call
|
26
26
|
end
|
27
27
|
|
28
|
-
|
28
|
+
def replace(file: nil, search:, content:)
|
29
29
|
::Architecture::Replace.new(source: file, search: search, content: content).call
|
30
30
|
end
|
31
31
|
|
32
|
-
|
32
|
+
def prepend(file: nil, content:, context: {})
|
33
33
|
::Architecture::Prepend.new(source: file, content: content, context: context).call
|
34
34
|
end
|
35
35
|
|
36
|
-
|
36
|
+
def append(file: nil, content:, context: {})
|
37
37
|
::Architecture::Append.new(source: file, content: content, context: context).call
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
def overwrite(file: nil, content:, context: {})
|
41
41
|
::Architecture::Overwrite.new(source: file, content: content, context: context).call
|
42
42
|
end
|
43
43
|
|
44
|
-
|
44
|
+
def within(source: nil, destination: nil, &block)
|
45
45
|
::Architecture::DSL.new(source: source(path), destination: destination(path), &block).call
|
46
46
|
end
|
47
47
|
|
48
|
-
|
48
|
+
def source(path)
|
49
49
|
join(@source, path)
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
def destination(path)
|
53
53
|
join(@destination, path)
|
54
54
|
end
|
55
55
|
|
data/lib/architecture/version.rb
CHANGED