syncevolution 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/se-config +15 -15
- data/lib/syncevolution/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee8b9dd2589ff610df3afe79c3899eca8186809a
|
4
|
+
data.tar.gz: 10b204ca9caa619c84e7362d359b427646af26e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9216894deacbe6b0f23e030ea16b19c871e03c0af992c3c67dfbd5ecd5cc86f6dfddcbc815126e0714ef5266cefb7330ce36dddb2315e8b765da72bd214afcf4
|
7
|
+
data.tar.gz: cdc7e9e9a80366c32aca2388aeb4dc94f9164556b3329c24a5fb80fc02779ba06a3eaaa7a3fd15fe47fe6e1fb52b0afa8c68bea8ad54e7d2eed27cc785f91499
|
data/bin/se-config
CHANGED
@@ -131,8 +131,8 @@ module SyncEvolution
|
|
131
131
|
throw "Unexpected node #{node.inspect}"
|
132
132
|
end
|
133
133
|
|
134
|
-
def
|
135
|
-
|
134
|
+
def to_shell(indent)
|
135
|
+
shell = ''
|
136
136
|
|
137
137
|
doc = @doc.clone
|
138
138
|
|
@@ -141,38 +141,38 @@ module SyncEvolution
|
|
141
141
|
next unless node[attr] == '-'
|
142
142
|
var = (id(node).gsub(/^\//, '').gsub(/\//, '__').gsub(/[^A-Z0-9]/i, '_') + '__' + attr).upcase
|
143
143
|
node[attr]="$#{var}"
|
144
|
-
|
144
|
+
shell << "#{var}=XXXXXXXXXXXXXXXX\n"
|
145
145
|
}
|
146
146
|
}
|
147
147
|
|
148
148
|
params = to_params(doc.root.attributes.reject{|k, v| k == 'name'}, indent, '')
|
149
|
-
|
149
|
+
shell << "syncevolution --configure --template none #{params}\n" if params != ''
|
150
150
|
|
151
151
|
doc.xpath('//context').each{|context|
|
152
|
-
|
152
|
+
shell << "syncevolution --remove #{escape('@' + context['name'])}\n" if context.at('./clear')
|
153
153
|
|
154
154
|
params = to_params(context.attributes.reject{|k, v| k == 'name'}, indent)
|
155
|
-
|
155
|
+
shell << "syncevolution --configure --template none #{params} @#{escape(context['name'])}\n" if params != ''
|
156
156
|
|
157
157
|
context.xpath('./store').each{|store|
|
158
|
-
|
158
|
+
shell << "syncevolution --remove-database #{escape('@' + context['name'])} #{escape(store['name'])}\n" if store.at('./clear')
|
159
159
|
|
160
160
|
params = to_params(store.attributes.reject{|k, v| k == 'name'}, indent)
|
161
|
-
|
161
|
+
shell << "syncevolution --configure --template none #{params} @#{escape(context['name'])} #{escape(store['name'])}\n" if params != ''
|
162
162
|
}
|
163
163
|
|
164
164
|
context.xpath('./sync').each{|sync|
|
165
|
-
|
165
|
+
shell << "syncevolution --remove #{escape(sync['name'] + '@' + context['name'])}\n" if sync.at('./clear')
|
166
166
|
params = to_params(sync.attributes.reject{|k, v| k == 'name'}, indent)
|
167
|
-
|
167
|
+
shell << "syncevolution --configure --template none #{params} #{escape(sync['name'] + '@' + context['name'])}\n" if params != ''
|
168
168
|
sync.xpath('./store').each{|store|
|
169
169
|
params = to_params(store.attributes.reject{|k, v| k == 'name'}, indent)
|
170
|
-
|
170
|
+
shell << "syncevolution --configure --template none #{params} #{escape(sync['name'] + '@' + context['name'])} #{escape(store['name'])}\n" if params != ''
|
171
171
|
}
|
172
172
|
}
|
173
173
|
}
|
174
174
|
|
175
|
-
|
175
|
+
shell
|
176
176
|
end
|
177
177
|
|
178
178
|
def _inspect(s)
|
@@ -332,9 +332,9 @@ end
|
|
332
332
|
OPTS = Trollop::options do
|
333
333
|
opt :xml, "Output xml"
|
334
334
|
opt :import, "Output xml", :type => :string
|
335
|
-
opt :
|
335
|
+
opt :shell, "Output shell code"
|
336
336
|
opt :graphviz, "Output graphviz code"
|
337
|
-
opt :indent, "Indent
|
337
|
+
opt :indent, "Indent shell code"
|
338
338
|
opt :verify, "Verify configuration"
|
339
339
|
end
|
340
340
|
|
@@ -342,5 +342,5 @@ SE = SyncEvolution::SyncEvolution.new('~')
|
|
342
342
|
SE.verify
|
343
343
|
SE.import(OPTS[:import]) if OPTS[:import]
|
344
344
|
puts SE.to_xml if OPTS[:xml]
|
345
|
-
puts SE.
|
345
|
+
puts SE.to_shell(OPTS[:indent]) if OPTS[:shell]
|
346
346
|
puts SE.to_gv if OPTS[:graphviz]
|