architecture 6.0.3 → 6.0.4
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 +5 -13
- data/lib/architecture/entity.rb +3 -1
- 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: 0fcb24b8a2873feea219aed7e257aefe340347e4
|
4
|
+
data.tar.gz: 6140c44f1e88760004c0ed1f35e702c83398a557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63edd09d277f8624f1ad97fc9f6c7df267e44d30ef4406e348413592281b1732660e23af38c73672936edccac23a8fff6779d6175c3ef2945007a07989b4f5d1
|
7
|
+
data.tar.gz: 9b74e7c0a66a9d2ab110df3116be57aff3a764f42838b042168c20600571593bbf62205670d4c9f5a2e77bbb35e0fd8d34b691b73864573c819c8f74292aa006
|
data/lib/architecture/dsl.rb
CHANGED
@@ -66,7 +66,7 @@ module Architecture
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def replace(file:, search:, content:, location: nil)
|
69
|
-
a = Entity.new(id:
|
69
|
+
a = Entity.new(id: file, prefix: location || @destination)
|
70
70
|
|
71
71
|
@output.print("#{indentention}Replacing content in #{a}")
|
72
72
|
|
@@ -76,7 +76,7 @@ module Architecture
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def prepend(file:, content:, context: Architecture::EMPTY_CONTEXT, location: nil)
|
79
|
-
a = Entity.new(id:
|
79
|
+
a = Entity.new(id: file, prefix: location || @destination)
|
80
80
|
|
81
81
|
@output.print("#{indentention}Prepending #{a} with content")
|
82
82
|
|
@@ -106,22 +106,14 @@ module Architecture
|
|
106
106
|
@output.puts(" succeeded.")
|
107
107
|
end
|
108
108
|
|
109
|
-
def within(directory: nil, source:
|
109
|
+
def within(directory: nil, source: @source, destination: @destination, &block)
|
110
110
|
@output.puts "#{indentention}Within #{destination}"
|
111
111
|
|
112
|
-
self.class.new(source: source, destination: destination, output: @output, level: @level + 1, &block)
|
113
|
-
end
|
114
|
-
|
115
|
-
private def source
|
116
|
-
@source
|
117
|
-
end
|
118
|
-
|
119
|
-
private def destination
|
120
|
-
@destination
|
112
|
+
self.class.new(source: join(@source, source, directory), destination: join(@destination, destination, directory), output: @output, level: @level + 1, &block)
|
121
113
|
end
|
122
114
|
|
123
115
|
private def join(*ids)
|
124
|
-
File.join(*ids)
|
116
|
+
File.join(*ids.compact)
|
125
117
|
end
|
126
118
|
|
127
119
|
private def indentention
|
data/lib/architecture/entity.rb
CHANGED
data/lib/architecture/version.rb
CHANGED