os 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile.lock +1 -1
  3. data/Rakefile +4 -2
  4. data/VERSION +1 -1
  5. data/lib/os.rb +14 -0
  6. data/os.gemspec +22 -7
  7. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1477aa871c9207710b6d5ac5ffbac3d3ce68b5c6
4
- data.tar.gz: e7ea7749f846a01f4906d4ecf1cc83692b8ddfc6
2
+ SHA256:
3
+ metadata.gz: e244d18c5f73cd59e53bbad8432687377e660f83122ceaf9c0bec6605fa1944c
4
+ data.tar.gz: 124c84467cf346ab9d24dc2853938deb6fea0c0d4d7235d1e6591ad9f732e6d0
5
5
  SHA512:
6
- metadata.gz: fda9a548d80869cc3fdc0fc3da2593889e0f147e845ad79ab5b7b74b23c64d3483a230778ee1d3b92b397767f45a3a498cf2f5601765d80eb1e82e4656108089
7
- data.tar.gz: 9424bce41996a0a77429377f274df819e213ab7e1f704d2e85c96d2ddae7d681598ec463676892f3ba5e2022e1b8535b058f93fce61d0bcf84df0fd1c949b923
6
+ metadata.gz: d1cb09a1f1fa56c5c669cec11c19209b80cc00a6b409a358fc4f3a217bf6b50e02944be480fca3f4836e29905af6bcb98b68d43a96327f771275e5294becf901
7
+ data.tar.gz: b0631f672df0de823538583b577418b8e243c1a588bca03cdeb3af8c1e89b44216f9ae91df7030430040d471e91f998348cd97ab560a4343618f1916502344e1
@@ -31,4 +31,4 @@ DEPENDENCIES
31
31
  test-unit (~> 3)
32
32
 
33
33
  BUNDLED WITH
34
- 1.14.5
34
+ 2.1.4
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'rubygems' if RUBY_VERSION < '1.9.0'
2
2
 
3
3
  # Don't forget to run rake gemspec with each release! ... I think...
4
+ # then manually edit os.gemspec remove duplicatee rspecs, circular dependency? HUH?
5
+ # # also, to release, run gem release pkg/XXXX
4
6
 
5
7
  begin
6
8
  require 'jeweler'
@@ -16,8 +18,8 @@ begin
16
18
  # gem.add_development_dependency "fast_require"
17
19
  gem.add_development_dependency "rspec", ">= 2.0"
18
20
  end
19
- rescue LoadError
20
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
+ rescue LoadError => e
22
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler #{e}"
21
23
  end
22
24
 
23
25
  require 'rspec/core/rake_task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.1.0
data/lib/os.rb CHANGED
@@ -282,6 +282,20 @@ class OS
282
282
  end
283
283
  end
284
284
 
285
+ def self.parse_os_release
286
+ if OS.linux? && File.exist?('/etc/os-release')
287
+ output = {}
288
+
289
+ File.read('/etc/os-release').each_line do |line|
290
+ parsed_line = line.chomp.tr('"', '').split('=')
291
+ output[parsed_line[0].to_sym] = parsed_line[1]
292
+ end
293
+ output
294
+ else
295
+ raise "File /etc/os-release doesn't exists or not Linux"
296
+ end
297
+ end
298
+
285
299
  class << self
286
300
  alias :doze? :windows? # a joke name but I use it and like it :P
287
301
  alias :jruby? :java?
data/os.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: os 1.0.0 ruby lib
5
+ # stub: os 1.1.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "os".freeze
9
- s.version = "1.0.1"
9
+ s.version = "1.1.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["rdp".freeze, "David McCullars".freeze]
14
- s.date = "2017-10-18"
14
+ s.date = "2020-03-31"
15
15
  s.description = "The OS gem allows for some useful and easy functions, like OS.windows? (=> true or false) OS.bits ( => 32 or 64) etc\"".freeze
16
16
  s.email = "rogerpack2005@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -39,10 +39,25 @@ Gem::Specification.new do |s|
39
39
  ]
40
40
  s.homepage = "http://github.com/rdp/os".freeze
41
41
  s.licenses = ["MIT".freeze]
42
- s.rubygems_version = "2.5.2".freeze
42
+ s.rubygems_version = "2.7.6".freeze
43
43
  s.summary = "Simple and easy way to know if you're on windows or not (reliably), as well as how many bits the OS is, etc.".freeze
44
44
 
45
- s.add_development_dependency('rake', '~> 0.8')
46
- s.add_development_dependency('rspec', '~> 2.5.0')
47
- s.add_development_dependency('test-unit', '~> 3')
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 4
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_development_dependency(%q<rake>.freeze, ["~> 0.8"])
50
+ s.add_development_dependency(%q<test-unit>.freeze, ["~> 3"])
51
+ s.add_development_dependency(%q<rspec>.freeze, [">= 2.0"])
52
+ else
53
+ s.add_dependency(%q<rake>.freeze, ["~> 0.8"])
54
+ s.add_dependency(%q<test-unit>.freeze, ["~> 3"])
55
+ s.add_dependency(%q<rspec>.freeze, [">= 2.0"])
56
+ end
57
+ else
58
+ s.add_dependency(%q<rake>.freeze, ["~> 0.8"])
59
+ s.add_dependency(%q<test-unit>.freeze, ["~> 3"])
60
+ s.add_dependency(%q<rspec>.freeze, [">= 2.0"])
61
+ end
48
62
  end
63
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: os
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rdp
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-18 00:00:00.000000000 Z
12
+ date: 2020-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -26,33 +26,33 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0.8'
28
28
  - !ruby/object:Gem::Dependency
29
- name: rspec
29
+ name: test-unit
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 2.5.0
34
+ version: '3'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 2.5.0
41
+ version: '3'
42
42
  - !ruby/object:Gem::Dependency
43
- name: test-unit
43
+ name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '3'
48
+ version: '2.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '3'
55
+ version: '2.0'
56
56
  description: The OS gem allows for some useful and easy functions, like OS.windows?
57
57
  (=> true or false) OS.bits ( => 32 or 64) etc"
58
58
  email: rogerpack2005@gmail.com
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 2.5.2.3
102
+ rubygems_version: 2.7.6
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: Simple and easy way to know if you're on windows or not (reliably), as well