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
- MGY3ZDIyZTVlYjU3MDA1ZTQxZjJkM2Q1MmVkMDdiNWQwMmMwYzcxOQ==
4
+ NWRjYWY3NTI5ZjRkN2I3ZmZmNTBmNzhkMDc4NDgxNjVmNWJmMDVmNQ==
5
5
  data.tar.gz: !binary |-
6
- NjBlY2E4ZGYyYzU2OTcwNTM4ZmNmMmZkMzU5ZDNiMTNhNDJiNTBkYQ==
6
+ YTkyYTcwOGFhZmQ5ZmRhZTg5NjkyMjVjYmQwYWNjYmQ2OWJlMTI3Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2NmNjBkOWEyNjJlYWNmNzdiY2NmOGVhYzdiMGNjNTAyMzA2MDBjOGUwODEz
10
- ODBkY2I0NjY5ZTIxNDQzZjZiNTk4OTdjMjI4NDI3ODY2MDcxMTM2MDc5OGMy
11
- NjVmNDNkMGI0MGQ3NjAwMTZhMWVlMDA2MzlmMTcxNjk4ZTQwZTE=
9
+ MGU3M2Q2ZDBkZmIxZmMxMTIyNzhlMTNkMjNmNTgzM2ZhMDZlNzcxZTJhMTk4
10
+ ZTQwYzA3NGUxYmU0ZDg2MTBlZGRmZGRhN2VjNzg3MGNlNGQ4MjNkNzVlNWUy
11
+ MmRhNzNhMDY5ZDNlNDFlODExYTFlNDU4MjI0YzUzMzA4NTY1YWY=
12
12
  data.tar.gz: !binary |-
13
- ZDkxZjIzMjQ3MWFjMGUzMjhkYmNlYmZjMTA4ZDQ5MTJiOTZhMWQ0MzQ4YTBm
14
- NjRhZTBhOWVjYTA2YTUyNGFhNjc1Y2ZkYTYxYzVhMjg2YTNkMWU0OTZlMDYw
15
- NmJjMWM0MmEzNzliMzE0ZjJmM2EyMWExOTY3ZmI2NmNhYTg4MGE=
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 ::File.directory?(cand_file_path)
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 + ">"
@@ -1,6 +1,6 @@
1
1
  module SocialSnippet
2
2
 
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
 
5
5
  module Version
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_snippet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Sano