dws-registry 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dws-registry.rb +44 -0
  2. metadata +66 -0
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: dws-registry.rb
4
+
5
+
6
+ require 'xml-registry'
7
+
8
+ class DWSRegistry < XMLRegistry
9
+
10
+ def initialize(filename=nil)
11
+
12
+ super()
13
+ if filename then
14
+ @filename = filename
15
+ load_xml(filename)
16
+ end
17
+ end
18
+
19
+ def set_key(path, value)
20
+ super(path, value)
21
+ save()
22
+ end
23
+
24
+ def delete_key(path)
25
+ super(path)
26
+ save()
27
+ end
28
+
29
+ def save()
30
+ super(@filename)
31
+ end
32
+
33
+ def import(s)
34
+ super(s)
35
+ save()
36
+ end
37
+
38
+ def refresh()
39
+ load_xml(@filename)
40
+ end
41
+
42
+ end
43
+
44
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dws-registry
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.0
6
+ platform: ruby
7
+ authors:
8
+ - James Robertson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2012-02-24 00:00:00 +00:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: xml-registry
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ type: :runtime
26
+ version_requirements: *id001
27
+ description:
28
+ email:
29
+ executables: []
30
+
31
+ extensions: []
32
+
33
+ extra_rdoc_files: []
34
+
35
+ files:
36
+ - lib/dws-registry.rb
37
+ has_rdoc: true
38
+ homepage:
39
+ licenses: []
40
+
41
+ post_install_message:
42
+ rdoc_options: []
43
+
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: "0"
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ requirements: []
59
+
60
+ rubyforge_project:
61
+ rubygems_version: 1.5.2
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: dws-registry
65
+ test_files: []
66
+