dbus-systemd 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea53af0fec820f37809e129092b1473434e59575
4
- data.tar.gz: b4bbf209b0133adb70962a75a6491c1ae6da98dc
3
+ metadata.gz: 86b09b232eb8227a3e939d3c077a52b7afa52e6b
4
+ data.tar.gz: 7b4e6154f9f0a876baecf9d949f319e7f93efb58
5
5
  SHA512:
6
- metadata.gz: 5c3d6d5454127c8c6ff7887fbe4e5801d7646af8c541d7d138ce68264a249d0bfbb521f303eef8f2aaf86af0ab0c6e0685ae9a0b82fd0715f47848c8545c628d
7
- data.tar.gz: 6ca8c7c10100204029d81af055ed25d771170880994ca87f2847b71172e014a9bbf05d29fd2f561ff179c9e01ce00f1646ea0cf45e9d880b3ef80cfa51165cf8
6
+ metadata.gz: 4fc7fffe7050ba5820d2a7302ac37225141812ab28e215c22c82caa995f7605a2b63fa4fd0c23ac542939e711246e57c31597ddcfc9ff011e1135ec9dea85024
7
+ data.tar.gz: f1a241c43b86de4358d621418ead40c76609d24ed040084cc9982ce534e4c0475e8823a621381c0b1b4ccefd119390ae3510db639ba297fabfb16d75d777ccdd
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ /*.gem
1
2
  /.vagrant/
2
3
  /.bundle/
3
4
  /.yardoc
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # Dbus::Systemd
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/dbus/systemd`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Ruby library for simplifying access to systemd dbus interfaces.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ Recommended Reading
6
+
7
+ - [systemd D-Bus specification](https://www.freedesktop.org/wiki/Software/systemd/dbus/)
8
+ - [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html)
6
9
 
7
10
  ## Installation
8
11
 
@@ -22,7 +25,7 @@ Or install it yourself as:
22
25
 
23
26
  ## Usage
24
27
 
25
- TODO: Write usage instructions here
28
+
26
29
 
27
30
  ## Development
28
31
 
@@ -30,11 +33,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
30
33
 
31
34
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
35
 
36
+ A Vagrantfile is provided in the VCS root that creates a Fedora vagrant box, with which library can be tested and D-Bus interfaces explored.
37
+
33
38
  ## Contributing
34
39
 
35
40
  Bug reports and pull requests are welcome on GitHub at https://github.com/nathwill/ruby-dbus-systemd.
36
41
 
37
-
38
42
  ## License
39
43
 
40
44
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -5,7 +5,12 @@ module DBus
5
5
 
6
6
  def initialize(id, manager = DBus::Systemd::Manager.new)
7
7
  job_path = manager.object.GetJob(id).first
8
- @object = manager.service.object(job_path).tap(&:introspect)
8
+ @object = manager.service.object(job_path)
9
+ .tap(&:introspect)
10
+ end
11
+
12
+ def method_missing(name, *args, &blk)
13
+ @object.send(name, *args, &blk) if @object.respond_to?(name)
9
14
  end
10
15
  end
11
16
  end
@@ -46,7 +46,8 @@ module DBus
46
46
  end
47
47
 
48
48
  def get_unit_by_object_path(path)
49
- obj = @service.object(path).tap(&:introspect)
49
+ obj = @service.object(path)
50
+ .tap(&:introspect)
50
51
  Unit.new(obj.Get(Unit::INTERFACE, 'Id').first, self)
51
52
  end
52
53
 
@@ -65,7 +66,8 @@ module DBus
65
66
  end
66
67
 
67
68
  def get_job_by_object_path(path)
68
- obj = @service.object(path).tap(&:introspect)
69
+ obj = @service.object(path)
70
+ .tap(&:introspect)
69
71
  Job.new(obj.Get(Job::INTERFACE, 'Id').first, self)
70
72
  end
71
73
 
@@ -78,6 +80,10 @@ module DBus
78
80
 
79
81
  mapped
80
82
  end
83
+
84
+ def method_missing(name, *args, &blk)
85
+ @object.send(name, *args, &blk) if @object.respond_to?(name)
86
+ end
81
87
  end
82
88
  end
83
89
  end
@@ -9,7 +9,12 @@ module DBus
9
9
 
10
10
  def initialize(name, manager = DBus::Systemd::Manager.new)
11
11
  unit_path = manager.object.GetUnit(name).first
12
- @object = manager.service.object(unit_path).tap(&:introspect)
12
+ @object = manager.service.object(unit_path)
13
+ .tap(&:introspect)
14
+ end
15
+
16
+ def method_missing(name, *args, &blk)
17
+ @object.send(name, *args, &blk) if @object.respond_to?(name)
13
18
  end
14
19
  end
15
20
  end
@@ -1,5 +1,5 @@
1
1
  module DBus
2
2
  module Systemd
3
- VERSION = "0.1.0"
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbus-systemd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Williams