goku 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/goku/cli.rb +2 -4
- data/lib/goku/element_factory.rb +3 -3
- data/lib/goku/path.rb +6 -0
- data/lib/goku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6b27050ac4a74db4982c7bebe914e61dac5af44
|
4
|
+
data.tar.gz: 418fe95d2a3439dea5102a78be7c6c25f55fdf53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a93a4c448769763f7873fa739e3e37eea8c1f35ecf0a1bc95bb6150b9faaa7401e9f0d2b22f789ae06462d5ad999df6122f101cb80ccccc9a776f357f617efa
|
7
|
+
data.tar.gz: 64fb97ddd37537ee98d5a5cbce8642343d5011364295d3020d04a9d4c64a3a4660ef8cc4c611905e2f5a11f418e41851fe463cb74e2d351c6322b64a9aa31398
|
data/lib/goku/cli.rb
CHANGED
@@ -33,12 +33,10 @@ module Goku
|
|
33
33
|
failure("Spec #{path.to_spec.full.colorize(:red)} already exists") if path.to_spec.exists?
|
34
34
|
|
35
35
|
puts "Creating #{path.full.colorize(:green)}"
|
36
|
-
|
37
|
-
File.write(path.full, implementation)
|
36
|
+
path.write(implementation)
|
38
37
|
|
39
38
|
puts "Creating #{path.to_spec.full.colorize(:green)}"
|
40
|
-
|
41
|
-
File.write(path.to_spec.full, spec)
|
39
|
+
path.to_spec.write(spec)
|
42
40
|
end
|
43
41
|
|
44
42
|
def failure(message)
|
data/lib/goku/element_factory.rb
CHANGED
@@ -28,11 +28,11 @@ module Goku
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def nested(element)
|
31
|
-
|
31
|
+
elements = ancestors << element
|
32
32
|
|
33
|
-
|
33
|
+
elements.each_cons(2) { |parent, sub| parent.add(sub) }
|
34
34
|
|
35
|
-
|
35
|
+
elements.first
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
data/lib/goku/path.rb
CHANGED
data/lib/goku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Šarčević
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|