bibliothecary 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/cocoapods.rb +28 -1
- data/lib/bibliothecary/parsers/cran.rb +1 -0
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27c5f2c6e7c8a86659db4ec13a4b7068f864a01e
|
4
|
+
data.tar.gz: 71bc2a31d0137d9e41e5b645489c5317cc152316
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d11ce1f103ed476d0feb33379872e079c3139748e4f13e236b8e4e2b4e11aa7fa02f9948a7f628a07514dd19264ec6358e2d18ca47df7f154f03a23ecca5633e
|
7
|
+
data.tar.gz: 86ef971a46ba1c859f5272c1ccd90fae9e149dffed024b48c439ee82a0cfa9fa8b4e8b45efb962552afbfe0f3f2c21d873e80011c7735ae6fcdb572d16eefa88
|
@@ -20,6 +20,9 @@ module Bibliothecary
|
|
20
20
|
elsif filename.match(/^Podfile\.lock$/)
|
21
21
|
manifest = YAML.load file_contents
|
22
22
|
parse_podfile_lock(manifest)
|
23
|
+
elsif filename.match(/^[A-Za-z0-9_-]+\.podspec.json$/)
|
24
|
+
json = JSON.parse(file_contents)
|
25
|
+
parse_json_manifest(json)
|
23
26
|
else
|
24
27
|
[]
|
25
28
|
end
|
@@ -29,7 +32,8 @@ module Bibliothecary
|
|
29
32
|
[
|
30
33
|
analyse_podfile(folder_path, file_list),
|
31
34
|
analyse_podspec(folder_path, file_list),
|
32
|
-
analyse_podfile_lock(folder_path, file_list)
|
35
|
+
analyse_podfile_lock(folder_path, file_list),
|
36
|
+
analyse_podspec_json(folder_path, file_list)
|
33
37
|
]
|
34
38
|
end
|
35
39
|
|
@@ -59,6 +63,19 @@ module Bibliothecary
|
|
59
63
|
}
|
60
64
|
end
|
61
65
|
|
66
|
+
def self.analyse_podspec_json(folder_path, file_list)
|
67
|
+
path = file_list.find{|path| path.gsub(folder_path, '').gsub(/^\//, '').match(/^[A-Za-z0-9_-]+\.podspec.json$/) }
|
68
|
+
return unless path
|
69
|
+
|
70
|
+
manifest = JSON.parse File.open(path).read
|
71
|
+
|
72
|
+
{
|
73
|
+
platform: PLATFORM_NAME,
|
74
|
+
path: path,
|
75
|
+
dependencies: parse_json_manifest(manifest)
|
76
|
+
}
|
77
|
+
end
|
78
|
+
|
62
79
|
def self.analyse_podfile_lock(folder_path, file_list)
|
63
80
|
path = file_list.find{|path| path.gsub(folder_path, '').gsub(/^\//, '').match(/^Podfile\.lock$/) }
|
64
81
|
return unless path
|
@@ -93,6 +110,16 @@ module Bibliothecary
|
|
93
110
|
})
|
94
111
|
end.uniq
|
95
112
|
end
|
113
|
+
|
114
|
+
def self.parse_json_manifest(manifest)
|
115
|
+
manifest['dependencies'].inject([]) do |deps, dep|
|
116
|
+
deps.push({
|
117
|
+
name: dep[0],
|
118
|
+
requirement: dep[1],
|
119
|
+
type: 'runtime'
|
120
|
+
})
|
121
|
+
end.uniq
|
122
|
+
end
|
96
123
|
end
|
97
124
|
end
|
98
125
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# DESCRIPTION
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibliothecary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/bibliothecary/parsers/clojars.rb
|
121
121
|
- lib/bibliothecary/parsers/cocoapods.rb
|
122
122
|
- lib/bibliothecary/parsers/cpan.rb
|
123
|
+
- lib/bibliothecary/parsers/cran.rb
|
123
124
|
- lib/bibliothecary/parsers/dub.rb
|
124
125
|
- lib/bibliothecary/parsers/elm.rb
|
125
126
|
- lib/bibliothecary/parsers/go.rb
|