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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1da7f5baa4dcee4b0b3f9e1f62c6c0635ca04ca5
4
- data.tar.gz: 539ecd342ed8fb7ba64ccfae94c7b3e2fd80ad39
3
+ metadata.gz: 0fcb24b8a2873feea219aed7e257aefe340347e4
4
+ data.tar.gz: 6140c44f1e88760004c0ed1f35e702c83398a557
5
5
  SHA512:
6
- metadata.gz: a60e864cf2ebfc7c57c830401fba63bc899b74ef566e6ec9617b9278295be82674ee77d325f147b2061df22d1502ad54d3f01dab6b058578d8ac3272179b50a7
7
- data.tar.gz: c4f1396ec177b6bfa127e4be28249c73f7946e602438d1c818a91ebeb4b8b0e74594d179680e7bae488e34e0647aa9ebcb7d48b981b7d83c99b46a80405ab47b
6
+ metadata.gz: 63edd09d277f8624f1ad97fc9f6c7df267e44d30ef4406e348413592281b1732660e23af38c73672936edccac23a8fff6779d6175c3ef2945007a07989b4f5d1
7
+ data.tar.gz: 9b74e7c0a66a9d2ab110df3116be57aff3a764f42838b042168c20600571593bbf62205670d4c9f5a2e77bbb35e0fd8d34b691b73864573c819c8f74292aa006
@@ -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: directory || file, prefix: location || @destination)
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: directory || file, prefix: location || @destination)
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: join(@source, directory), destination: join(@destination, directory), &block)
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
@@ -66,7 +66,9 @@ module Architecture
66
66
  end
67
67
 
68
68
  private def system(command)
69
- `#{command}`
69
+ Kernel.system("#{command}", :out => "/dev/null").tap do |succeeded|
70
+ raise "\n`#{command}` failed to work." unless succeeded
71
+ end
70
72
  end
71
73
  end
72
74
  end
@@ -1,3 +1,3 @@
1
1
  module Architecture
2
- VERSION = "6.0.3"
2
+ VERSION = "6.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: architecture
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.3
4
+ version: 6.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurtis Rainbolt-Greene