vitreous_share 0.0.19 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,10 +45,18 @@ module Vitreous
45
45
  if( ext_name == 'meta' )
46
46
  result[multi_ext_name] = YAML.load( e['content'] )
47
47
  elsif( ext_name =~ Vitreous::TXT_EXTENSIONS )
48
+ # wildcard
48
49
  result['description'] ||= e['content']
50
+ result['descriptions'] ||= []
51
+ result['descriptions'] << e['content']
52
+
49
53
  result[multi_ext_name] = e['content']
50
54
  else
55
+ # wildcard
51
56
  result['file'] ||= e['uri']
57
+ result['files'] ||= []
58
+ result['files'] << e['uri']
59
+
52
60
  result[multi_ext_name] = e['uri']
53
61
  end
54
62
  end
@@ -60,9 +68,9 @@ module Vitreous
60
68
  def self.meta_arrays( meta )
61
69
  result = {}
62
70
 
63
- meta.each do |k,v|
71
+ meta.select { |k,v| !['meta', 'description', 'descriptions', 'file', 'files'].include? k }.each do |k,v|
64
72
  key = "#{k.split('_')[0]}s"
65
- result[key] = [] unless result[key]
73
+ result[key] ||= []
66
74
  result[key] << v
67
75
  end
68
76
 
@@ -72,6 +80,10 @@ module Vitreous
72
80
 
73
81
  return result
74
82
  end
83
+
84
+ def self.meta_wildcards( meta )
85
+
86
+ end
75
87
  end
76
88
  end
77
89
  end
@@ -1,5 +1,5 @@
1
1
  module Vitreous
2
2
  module Share
3
- VERSION = "0.0.19"
3
+ VERSION = "0.0.21"
4
4
  end
5
5
  end
@@ -16,18 +16,18 @@
16
16
 
17
17
  ],
18
18
  "file": "wadus uri",
19
- "jpg": "wadus uri",
20
- "description": "file content",
21
- "txt": "file content",
22
19
  "files": [
23
20
  "wadus uri"
24
21
  ],
25
- "jpgs": [
26
- "wadus uri"
27
- ],
22
+ "jpg": "wadus uri",
23
+ "description": "file content",
28
24
  "descriptions": [
29
25
  "file content"
30
26
  ],
27
+ "txt": "file content",
28
+ "jpgs": [
29
+ "wadus uri"
30
+ ],
31
31
  "txts": [
32
32
  "file content"
33
33
  ]
@@ -40,18 +40,18 @@
40
40
 
41
41
  ],
42
42
  "file": "wadus uri",
43
- "jpg": "wadus uri",
44
- "description": "file content",
45
- "txt": "file content",
46
43
  "files": [
47
44
  "wadus uri"
48
45
  ],
49
- "jpgs": [
50
- "wadus uri"
51
- ],
46
+ "jpg": "wadus uri",
47
+ "description": "file content",
52
48
  "descriptions": [
53
49
  "file content"
54
50
  ],
51
+ "txt": "file content",
52
+ "jpgs": [
53
+ "wadus uri"
54
+ ],
55
55
  "txts": [
56
56
  "file content"
57
57
  ]
@@ -69,10 +69,10 @@
69
69
 
70
70
  ],
71
71
  "description": "file content",
72
- "txt": "file content",
73
72
  "descriptions": [
74
73
  "file content"
75
74
  ],
75
+ "txt": "file content",
76
76
  "txts": [
77
77
  "file content"
78
78
  ]
@@ -81,18 +81,18 @@
81
81
  }
82
82
  ],
83
83
  "file": "wadus uri",
84
- "jpg": "wadus uri",
85
- "description": "file content",
86
- "txt": "file content",
87
84
  "files": [
88
85
  "wadus uri"
89
86
  ],
90
- "jpgs": [
91
- "wadus uri"
92
- ],
87
+ "jpg": "wadus uri",
88
+ "description": "file content",
93
89
  "descriptions": [
94
90
  "file content"
95
91
  ],
92
+ "txt": "file content",
93
+ "jpgs": [
94
+ "wadus uri"
95
+ ],
96
96
  "txts": [
97
97
  "file content"
98
98
  ]
@@ -110,10 +110,10 @@
110
110
 
111
111
  ],
112
112
  "description": "file content",
113
- "txt": "file content",
114
113
  "descriptions": [
115
114
  "file content"
116
115
  ],
116
+ "txt": "file content",
117
117
  "txts": [
118
118
  "file content"
119
119
  ]
@@ -128,6 +128,9 @@
128
128
 
129
129
  ],
130
130
  "file": "wadus uri",
131
+ "files": [
132
+ "wadus uri"
133
+ ],
131
134
  "jpg": "wadus uri",
132
135
  "meta": {
133
136
  "title": "This is my new title",
@@ -136,25 +139,15 @@
136
139
  "summary": "This is a summary\ntwo lines long\n"
137
140
  },
138
141
  "description": "file content",
142
+ "descriptions": [
143
+ "file content",
144
+ "file content"
145
+ ],
139
146
  "txt_thumb": "file content",
140
147
  "txt": "file content",
141
- "files": [
142
- "wadus uri"
143
- ],
144
148
  "jpgs": [
145
149
  "wadus uri"
146
150
  ],
147
- "metas": [
148
- {
149
- "title": "This is my new title",
150
- "collection": "collection1",
151
- "price": 10,
152
- "summary": "This is a summary\ntwo lines long\n"
153
- }
154
- ],
155
- "descriptions": [
156
- "file content"
157
- ],
158
151
  "txts": [
159
152
  "file content",
160
153
  "file content"
@@ -162,18 +155,18 @@
162
155
  }
163
156
  ],
164
157
  "file": "wadus uri",
165
- "jpg": "wadus uri",
166
- "description": "root content",
167
- "txt": "root content",
168
158
  "files": [
169
159
  "wadus uri"
170
160
  ],
171
- "jpgs": [
172
- "wadus uri"
173
- ],
161
+ "jpg": "wadus uri",
162
+ "description": "root content",
174
163
  "descriptions": [
175
164
  "root content"
176
165
  ],
166
+ "txt": "root content",
167
+ "jpgs": [
168
+ "wadus uri"
169
+ ],
177
170
  "txts": [
178
171
  "root content"
179
172
  ]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 19
9
- version: 0.0.19
8
+ - 21
9
+ version: 0.0.21
10
10
  platform: ruby
11
11
  authors:
12
12
  - Fernando Guillen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-08 00:00:00 +02:00
17
+ date: 2011-08-12 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency