social_snippet 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWRjYWY3NTI5ZjRkN2I3ZmZmNTBmNzhkMDc4NDgxNjVmNWJmMDVmNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTkyYTcwOGFhZmQ5ZmRhZTg5NjkyMjVjYmQwYWNjYmQ2OWJlMTI3Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGU3M2Q2ZDBkZmIxZmMxMTIyNzhlMTNkMjNmNTgzM2ZhMDZlNzcxZTJhMTk4
|
10
|
+
ZTQwYzA3NGUxYmU0ZDg2MTBlZGRmZGRhN2VjNzg3MGNlNGQ4MjNkNzVlNWUy
|
11
|
+
MmRhNzNhMDY5ZDNlNDFlODExYTFlNDU4MjI0YzUzMzA4NTY1YWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODkzZWJlMzk0ODM4NTYwNzk5MjlkMDcxNDU2M2E2N2JkMmJjMWIzYWI5OGJi
|
14
|
+
MjA5ZDYwZTdkZmI5ZjY4ZGM5MmYwMDQ1NmRlMGY5N2ZhNWMzYjY2MmRiNWMz
|
15
|
+
YTQ0Y2Y5YjUxNDNkN2E3MmI4OGNkZGI2ZTU0NDk3OTRhMmY1ODU=
|
@@ -24,6 +24,7 @@ module SocialSnippet::Repository::Models
|
|
24
24
|
|
25
25
|
def add_directory(path)
|
26
26
|
path = normalize_path(path)
|
27
|
+
add_path path
|
27
28
|
add_path path + "/"
|
28
29
|
dir_path = real_path(path)
|
29
30
|
core.storage.mkdir_p dir_path
|
@@ -71,6 +72,7 @@ module SocialSnippet::Repository::Models
|
|
71
72
|
|
72
73
|
def glob(glob_pattern)
|
73
74
|
paths.select do |path|
|
75
|
+
next if /\/$/ === path
|
74
76
|
::File.fnmatch glob_pattern, path, ::File::FNM_PATHNAME
|
75
77
|
end
|
76
78
|
end
|
@@ -80,10 +80,10 @@ module SocialSnippet::Repository
|
|
80
80
|
repo_name = get_repo_name(keyword)
|
81
81
|
package = find_package(repo_name)
|
82
82
|
file_path = keyword_filepath(keyword)
|
83
|
-
glob_path = "#{file_path}*"
|
83
|
+
glob_path = "#{package.snippet_json["main"]}/#{file_path}*"
|
84
84
|
|
85
85
|
package.glob(glob_path).map do |cand_file_path|
|
86
|
-
if
|
86
|
+
if core.storage.directory?(cand_file_path)
|
87
87
|
Pathname(cand_file_path).basename.to_s + "/"
|
88
88
|
else
|
89
89
|
Pathname(cand_file_path).basename.to_s + ">"
|