syncevolution 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb5ee760a7b2cd3658ab16b0054a9c091495a1d0
4
- data.tar.gz: 714bcd11a734b172fe66a5506852f09afdb3e420
3
+ metadata.gz: ee8b9dd2589ff610df3afe79c3899eca8186809a
4
+ data.tar.gz: 10b204ca9caa619c84e7362d359b427646af26e9
5
5
  SHA512:
6
- metadata.gz: 10b386dde8ea85515288ca74d4d2ce75633124c2a6baa1feda8d447578e14e41fe8c26198f05e304b03e602885bd85e95edb7e0d23f0efca5db1d894151f4cb2
7
- data.tar.gz: bd0f973461089131ac7010e7e8533ed943a563cbd8600a2d5a4866485443c8889b2eed3f9212f8a155061217f3d847bdb9b5cfcdb66e08a25bb84d2dfe5a54af
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 to_bash(indent)
135
- bash = ''
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
- bash << "#{var}=XXXXXXXXXXXXXXXX\n"
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
- bash << "syncevolution --configure --template none #{params}\n" if params != ''
149
+ shell << "syncevolution --configure --template none #{params}\n" if params != ''
150
150
 
151
151
  doc.xpath('//context').each{|context|
152
- bash << "syncevolution --remove #{escape('@' + context['name'])}\n" if context.at('./clear')
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
- bash << "syncevolution --configure --template none #{params} @#{escape(context['name'])}\n" if params != ''
155
+ shell << "syncevolution --configure --template none #{params} @#{escape(context['name'])}\n" if params != ''
156
156
 
157
157
  context.xpath('./store').each{|store|
158
- bash << "syncevolution --remove-database #{escape('@' + context['name'])} #{escape(store['name'])}\n" if store.at('./clear')
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
- bash << "syncevolution --configure --template none #{params} @#{escape(context['name'])} #{escape(store['name'])}\n" if params != ''
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
- bash << "syncevolution --remove #{escape(sync['name'] + '@' + context['name'])}\n" if sync.at('./clear')
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
- bash << "syncevolution --configure --template none #{params} #{escape(sync['name'] + '@' + context['name'])}\n" if params != ''
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
- bash << "syncevolution --configure --template none #{params} #{escape(sync['name'] + '@' + context['name'])} #{escape(store['name'])}\n" if params != ''
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
- bash
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 :bash, "Output bash code"
335
+ opt :shell, "Output shell code"
336
336
  opt :graphviz, "Output graphviz code"
337
- opt :indent, "Indent bash code"
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.to_bash(OPTS[:indent]) if OPTS[:bash]
345
+ puts SE.to_shell(OPTS[:indent]) if OPTS[:shell]
346
346
  puts SE.to_gv if OPTS[:graphviz]
@@ -1,3 +1,3 @@
1
1
  module SyncEvolution
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syncevolution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emiliano Heyns