Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix

  • Loading branch information...
commit de17ccf86caa50856f4f200d7d14d63f4fc5f30d 1 parent 7a1d7c0
@swistaczek authored
View
2  Rakefile
@@ -44,7 +44,7 @@ task :default => :test
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
- version = NetworkManager::VERSION::STRING
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "ruby-network-manager #{version}"
View
2  lib/network_manager/modem.rb
@@ -12,7 +12,7 @@ class << self
def fetch(paths_array)
devices = []
paths_array.each do |path|
- devices << self.new(bus_path: path)
+ devices << self.new(bus_path: path) unless path.nil?
end
devices
end
View
11 lib/network_manager/version.rb
@@ -1,11 +0,0 @@
-# encoding: utf-8
-class NetworkManager
- module Version
- MAJOR = 0
- MINOR = 1
- PATCH = 1
- BUILD = nil
-
- STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
- end
-end
View
4 lib/ruby-network-manager.rb
@@ -1,5 +1,4 @@
# encoding: utf-8
-require 'network_manager/version'
require 'network_manager/modem'
class NetworkManager
@@ -17,8 +16,7 @@ def initialize(opts = {})
def devices(opts = {})
@devices = []
@mm_object.introspect
- @mm_object.EnumerateDevices()
-
+ NetworkManager::Modem.fetch(@mm_object.EnumerateDevices())
end
class << self
View
5 ruby-network-manager.gemspec
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = "ruby-network-manager"
- s.version = ""
+ s.version = "0.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ernest Bursa"]
@@ -23,9 +23,10 @@ Gem::Specification.new do |s|
"LICENSE.txt",
"README.rdoc",
"Rakefile",
+ "VERSION",
"lib/network_manager/modem.rb",
- "lib/network_manager/version.rb",
"lib/ruby-network-manager.rb",
+ "ruby-network-manager.gemspec",
"test/helper.rb",
"test/test_ruby-network-manager.rb"
]
Please sign in to comment.
Something went wrong with that request. Please try again.