dbus-systemd 0.3.2 → 0.4.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: ce47f2555fb63a896446215d069e982e755e4507
4
- data.tar.gz: d3aed6968ac464e05efe15c39e6b1b6ece73f4cf
3
+ metadata.gz: 95c8685569c4c7a3c26570f4557f697f7891047d
4
+ data.tar.gz: 367841855b267ed551f703d89f46be3fa9e7d226
5
5
  SHA512:
6
- metadata.gz: 7e7ebc4b0cbe06f51c1d35082feb2048eaa0cda6b12e6630fce033100def55cff2d174e4a583afe491f149e75fae5dd688234fbfd9509406a76a7507702be763
7
- data.tar.gz: 30ec8fa275efa5f47e91db25cf5cc8f81dbb5f385216ca941f386793142a73b2226bd8831816aa63d0416db3985bd9f2c88d53862a4a615674af3d1cbd5894b2
6
+ metadata.gz: bac18191a888481e6eb5ea85deb48e314fe7331854155206d7eb2eda330131959234045dc775064c7fe6f6c28d4a84fa3654d071e9c73209037317cdd3b8c7a0
7
+ data.tar.gz: d365aae9ecc672af3bdef7b7bb8e496a2aaa8afb8f0e73c1142f86e942ea1d16bd9fa2ad3ad66343c773fe058545237e6be67eae47cac2eaf066ed86997b625d
@@ -1,9 +1,4 @@
1
- require_relative "systemd/version"
2
- require_relative "systemd/manager"
3
- require_relative "systemd/unit"
4
- require_relative "systemd/job"
5
-
6
- require "dbus"
1
+ require 'dbus'
7
2
 
8
3
  module DBus
9
4
  module Systemd
@@ -20,3 +15,8 @@ module DBus
20
15
  module_function :system_bus, :session_bus
21
16
  end
22
17
  end
18
+
19
+ require_relative 'systemd/version'
20
+ require_relative 'systemd/manager'
21
+ require_relative 'systemd/unit'
22
+ require_relative 'systemd/job'
@@ -9,7 +9,7 @@ module DBus
9
9
  include MethodMissing
10
10
 
11
11
  def initialize(id, manager = Manager.new)
12
- job_path = manager.object.GetJob(id).first
12
+ job_path = manager.GetJob(id).first
13
13
  @object = manager.service.object(job_path)
14
14
  .tap(&:introspect)
15
15
  end
@@ -32,7 +32,7 @@ module DBus
32
32
 
33
33
  include MethodMissing
34
34
 
35
- attr_accessor :service, :object
35
+ attr_reader :service
36
36
 
37
37
  def initialize(bus = Systemd.system_bus)
38
38
  @service = bus.service(Systemd::INTERFACE)
@@ -1,6 +1,8 @@
1
1
  module DBus
2
2
  module Systemd
3
3
  module MethodMissing
4
+ attr_reader :object
5
+
4
6
  def method_missing(name, *args, &blk)
5
7
  if @object.respond_to?(name)
6
8
  @object.send(name, *args, &blk)
@@ -8,13 +8,24 @@ module DBus
8
8
 
9
9
  include MethodMissing
10
10
 
11
- attr_accessor :object
12
-
13
11
  def initialize(name, manager = Manager.new)
14
- unit_path = manager.object.GetUnit(name).first
12
+ unit_path = manager.GetUnit(name).first
15
13
  @object = manager.service.object(unit_path)
16
14
  .tap(&:introspect)
17
15
  end
18
16
  end
19
17
  end
20
18
  end
19
+
20
+ require_relative 'unit/automount'
21
+ require_relative 'unit/device'
22
+ require_relative 'unit/mount'
23
+ require_relative 'unit/path'
24
+ require_relative 'unit/scope'
25
+ require_relative 'unit/service'
26
+ require_relative 'unit/slice'
27
+ require_relative 'unit/snapshot'
28
+ require_relative 'unit/socket'
29
+ require_relative 'unit/swap'
30
+ require_relative 'unit/target'
31
+ require_relative 'unit/timer'
@@ -1,5 +1,5 @@
1
1
  module DBus
2
2
  module Systemd
3
- VERSION = '0.3.2'
3
+ VERSION = '0.4.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.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Williams