packspec 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cli.rb +11 -14
- data/packspec.gemspec +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: b8c668e116454f961a1b72ecf2d483ad27fdad6e
|
4
|
+
data.tar.gz: 706ff5a19b3a2a600d1804cc1571b140521fa2be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deca3968f28df4ff7cfa7404e048b09a34526863018e39e70e5409f3727bf9cbb6f523f8bc80432111c5685c15f7b8f61c8f02dc3596d05f8fe08663ac919058
|
7
|
+
data.tar.gz: 66258b5429c14282d1be372fe6714b893068ebced6344639ca1360654be38908d3d48bb4ae3d30393d98ed93e4be99f322dfa577c6cc4043d340ab8038dcaf9f
|
data/lib/cli.rb
CHANGED
@@ -10,17 +10,19 @@ def parse_specs(path)
|
|
10
10
|
|
11
11
|
# Paths
|
12
12
|
paths = []
|
13
|
+
if path
|
14
|
+
if File.file?(path)
|
15
|
+
paths = [path]
|
16
|
+
elsif File.directory?(path)
|
17
|
+
paths = Dir.glob("#{path}/*.yml")
|
18
|
+
end
|
19
|
+
end
|
13
20
|
if !path
|
14
|
-
paths = Dir.glob('package.*')
|
15
21
|
if paths.empty?
|
16
|
-
|
22
|
+
paths = Dir.glob('packspec.yml')
|
17
23
|
end
|
18
|
-
|
19
|
-
|
20
|
-
paths = [path]
|
21
|
-
elsif File.directory?(path)
|
22
|
-
for path in Dir.glob("#{path}/*.*")
|
23
|
-
paths.push(path)
|
24
|
+
if paths.empty?
|
25
|
+
paths = Dir.glob("packspec/*.yml")
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
@@ -40,17 +42,12 @@ end
|
|
40
42
|
|
41
43
|
def parse_spec(path)
|
42
44
|
|
43
|
-
#
|
45
|
+
# Package
|
44
46
|
documents = []
|
45
|
-
if !path.end_with?('.yml')
|
46
|
-
return nil
|
47
|
-
end
|
48
47
|
contents = File.read(path)
|
49
48
|
YAML.load_stream(contents) do |document|
|
50
49
|
documents.push(document)
|
51
50
|
end
|
52
|
-
|
53
|
-
# Package
|
54
51
|
feature = parse_feature(documents[0][0])
|
55
52
|
if feature['skip']
|
56
53
|
return nil
|
data/packspec.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- |
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|