sysinfo 0.9.0.pre.RC1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41eb7522683b4f474f8cf49d15c03891eb5ba2718a549a8cec52b57afd21922d
4
- data.tar.gz: 9d235a1c5f590f5088a55e4c15dfe0ff189dd19b0bd6037677c9530de8ff321c
3
+ metadata.gz: e6abf6718a66e70853ccef46d557ed6ff68757c3af0188c8f4cf633bc863681d
4
+ data.tar.gz: 263db44cde8523ca128165a9ac9b6c0fc87e1c25515af328515196ed820db83c
5
5
  SHA512:
6
- metadata.gz: b84c9a323f1a5a399d0821ef8b85c3e82d2dba38e5ef85f742155a5beb13c46e582e30ad0486299e9428dab41638525ec17db50a7653825a4f2be644412b5194
7
- data.tar.gz: 4c8860fb1ec0305b623839bdfa07beeb9826ab20a07b939a3c8bde424f513bf1c1cf5a58739da8f6e492cd34441e539a60d835d0efabe612d42371cbdb599ccc
6
+ metadata.gz: 96c41cd390897307c845e88e3f086b909724013cfc31d05d45ac83a555a44d2ff90330c85eac37ee412bbab8345a3120a11777282d22293dcbbf5f764d7c27d1
7
+ data.tar.gz: a4aeba2408675885745631e69e6c27142d6309816d204aac27151ec92ded195e8f8204ddfec65d2bc4019587157005f26729dc7ef7c72271817d41009fec3c42
data/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # SysInfo - v0.10
2
+
3
+ All your system-independent infoz in one handy class.
4
+
5
+ SysInfo does a takes a very quick glance at the system it's running on and exposes the results as YAML, JSON, CSV, or TSV. It also determines a platform identifier for the system that takes the form: VM-OS-IMPLEMENTATION-ARCHITECTURE.
6
+
7
+ ## Platform Identifier Examples
8
+
9
+ - ruby-unix-osx-i386
10
+ - ruby-unix-osx-powerpc
11
+ - ruby-unix-linux-x86_64
12
+ - java-win32-windows-i386
13
+ - java-win32-mingw-i386
14
+
15
+ For the complete list of operating systems, implementations and architectures that SysInfo is aware of, see:
16
+
17
+ * `$ sysinfo os`
18
+ * `$ sysinfo impl`
19
+ * `$ sysinfo arch`
20
+
21
+
22
+ ## Usage -- Library
23
+
24
+ ```ruby
25
+ sysinfo = SysInfo.new
26
+ sysinfo.vm # => ruby
27
+ sysinfo.os # => unix
28
+ sysinfo.impl # => osx
29
+ sysinfo.arch # => i386
30
+ sysinfo.platform # => ruby-unix
31
+ sysinfo.to_s # => ruby-unix-osx-i386
32
+
33
+ sysinfo.user # => delano
34
+ sysinfo.home # => /Users/delano
35
+ sysinfo.uptime # => 290.429 (hours)
36
+ sysinfo.shell # => /bin/bash
37
+ sysinfo.paths # => [/sbin, /bin, /usr/bin, ...]
38
+
39
+ sysinfo.hostname # => walter
40
+ sysinfo.ipaddress_internal # => 10.0.1.2
41
+ sysinfo.uptime # => 290.573655656974
42
+ sysinfo.ruby # => [1,9,1]
43
+ ```
44
+
45
+ ## Usage -- Executable
46
+
47
+ ```bash
48
+ $ sysinfo
49
+ ruby-unix-osx-i386
50
+
51
+ $ /usr/jruby/bin/sysinfo
52
+ java-unix-osx-x86_64
53
+
54
+ $ sysinfo -f yaml
55
+ :vm: :ruby
56
+ :os: :unix
57
+ :impl: :osx
58
+ ...
59
+ :shell: :"/bin/bash"
60
+ :user: delano
61
+
62
+ $ sysinfo -f json
63
+ {"vm":"ruby","os":"unix","impl":"osx", ..., "shell":"\/bin\/bash","user":"delano"}
64
+
65
+ $ sysinfo -f csv
66
+ ruby,unix,osx, ... /bin/bash,delano
67
+ ```
68
+
69
+ ## Installation
70
+
71
+ ```bash
72
+ $ sudo gem install sysinfo
73
+ ```
74
+
75
+
76
+ ## Prerequisites
77
+
78
+ * Ruby 1.9+, 2.6.8+, 3.1.4+, or JRuby 1.2+
79
+ * [Storable](https://github.com/delano/storable)
data/lib/sysinfo.rb CHANGED
@@ -10,7 +10,7 @@ require 'tmpdir'
10
10
  # specifically lib/platform.rb.
11
11
  class SysInfo < Storable
12
12
  unless defined?(IMPLEMENTATIONS)
13
- VERSION = "0.9.0".freeze
13
+ VERSION = "0.10.0".freeze
14
14
  IMPLEMENTATIONS = [
15
15
 
16
16
  # These are for JRuby, System.getproperty('os.name').
@@ -52,6 +52,7 @@ class SysInfo < Storable
52
52
  [/mips/i, :mips ],
53
53
  [/powerpc/i, :powerpc ],
54
54
  [/universal/i,:x86_64 ],
55
+ [/arm64/i, :arm64 ],
55
56
  [nil, :unknown ],
56
57
  ].freeze
57
58
  end
@@ -62,7 +63,6 @@ class SysInfo < Storable
62
63
  field :arch => String
63
64
  field :hostname => String
64
65
  field :ipaddress_internal => String
65
- #field :ipaddress_external => String
66
66
  field :uptime => Float
67
67
 
68
68
  field :paths
@@ -85,7 +85,7 @@ class SysInfo < Storable
85
85
 
86
86
  # Returns [vm, os, impl, arch]
87
87
  def find_platform_info
88
- vm, os, impl, arch = :ruby, :unknown, :unknown, :unknow
88
+ vm, os, impl, arch = :ruby, :unknown, :unknown, :unknown
89
89
  IMPLEMENTATIONS.each do |r, o, i|
90
90
  next unless RUBY_PLATFORM =~ r
91
91
  os, impl = [o, i]
data/sysinfo.gemspec CHANGED
@@ -1,25 +1,25 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sysinfo"
3
- s.version = "0.9.0-RC1"
4
- s.summary = "SysInfo: All your system-independent infoz in one handy class. "
5
- s.description = s.summary
3
+ s.version = "0.10.0"
4
+ s.summary = "All your system-independent infoz in one handy class."
5
+ s.description = "SysInfo: #{s.summary}"
6
6
  s.author = "Delano Mandelbaum"
7
- s.email = "delano@solutious.com"
8
- s.homepage = "https://github.com/username/sysinfo" # replace with actual URL
7
+ s.email = "gems@solutious.com"
8
+ s.homepage = "https://github.com/delano/sysinfo" # replace with actual URL
9
9
  s.license = "MIT" # replace with actual license
10
10
 
11
11
  s.executables = %w[sysinfo]
12
12
 
13
- s.add_dependency 'storable', '0.10.pre.RC1'
13
+ s.add_dependency 'storable', '~> 0.10'
14
14
  s.add_dependency 'drydock', '<1.0'
15
15
 
16
16
  s.files = %w(
17
- CHANGES.txt
18
17
  LICENSE.txt
19
- README.rdoc
20
- Rakefile
18
+ README.md
21
19
  bin/sysinfo
22
20
  lib/sysinfo.rb
23
21
  sysinfo.gemspec
24
22
  )
23
+
24
+ s.required_ruby_version = '>= 2.6.8'
25
25
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sysinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.pre.RC1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-03 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: storable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.pre.RC1
19
+ version: '0.10'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.pre.RC1
26
+ version: '0.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: drydock
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,24 +39,22 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  description: 'SysInfo: All your system-independent infoz in one handy class.'
42
- email: delano@solutious.com
42
+ email: gems@solutious.com
43
43
  executables:
44
44
  - sysinfo
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - CHANGES.txt
49
48
  - LICENSE.txt
50
- - README.rdoc
51
- - Rakefile
49
+ - README.md
52
50
  - bin/sysinfo
53
51
  - lib/sysinfo.rb
54
52
  - sysinfo.gemspec
55
- homepage: https://github.com/username/sysinfo
53
+ homepage: https://github.com/delano/sysinfo
56
54
  licenses:
57
55
  - MIT
58
56
  metadata: {}
59
- post_install_message:
57
+ post_install_message:
60
58
  rdoc_options: []
61
59
  require_paths:
62
60
  - lib
@@ -64,15 +62,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
64
62
  requirements:
65
63
  - - ">="
66
64
  - !ruby/object:Gem::Version
67
- version: '0'
65
+ version: 2.6.8
68
66
  required_rubygems_version: !ruby/object:Gem::Requirement
69
67
  requirements:
70
- - - ">"
68
+ - - ">="
71
69
  - !ruby/object:Gem::Version
72
- version: 1.3.1
70
+ version: '0'
73
71
  requirements: []
74
- rubygems_version: 3.3.26
75
- signing_key:
72
+ rubygems_version: 3.2.3
73
+ signing_key:
76
74
  specification_version: 4
77
- summary: 'SysInfo: All your system-independent infoz in one handy class.'
75
+ summary: All your system-independent infoz in one handy class.
78
76
  test_files: []
data/CHANGES.txt DELETED
@@ -1,65 +0,0 @@
1
- SYSINFO, CHANGES
2
-
3
-
4
- #### 0.8.1 (2014-02-11) #############################
5
-
6
- * CHANGE: Use Etc.getpwuid [jperville]
7
-
8
- #### 0.8.0 (2012-04-30) #############################
9
-
10
- * CHANGE: Removed #to_s
11
- * CHANGE: #platform now returns VM-OS-IMPL-ARCH
12
- * CHANGE: json is the default output format
13
-
14
-
15
- #### 0.7.2 (2010-02-12) #############################
16
-
17
- * CHANGE: Removed hanna dependency [Diego Elio 'Flameeyes' Pettenò]
18
-
19
- #### 0.7.1 (2009-11-02) #############################
20
-
21
- * CHANGE: Include ruby version and user name in standard dump.
22
-
23
- #### 0.7.0 (2009-08-24) #############################
24
-
25
- NOTE: SysInfo strings are not compatible with previous releases.
26
-
27
- * FIXED: Don't require Win32API when running in JRuby
28
- * CHANGE: All references to "win32" are now "windows". This resolves
29
- the ambiguity between the OS and the Win32 API.
30
- * CHANGE: All references to "i386" are now "x86"
31
-
32
-
33
- #### 0.6.3 (2009-08-03) #############################
34
-
35
- * FIXED: "warning: already initialized constant System" in JRuby
36
-
37
- #### 0.6.2 (2009-06-30) #############################
38
-
39
- * CHANGE: Updated bin/sysinfo for Drydock 0.6.6
40
- * CHANGE: Removed "require 'rubygems'"
41
-
42
- #### 0.6.1 (2009-05-25) #############################
43
-
44
- * CHANGE: Removed RedCloth dependency from gemspec.
45
-
46
- #### 0.6.0 (2009-06-09) ###############################
47
-
48
- * CHANGE: "universal" mapped to "i386". Now: "x86_64"
49
- * CHANGE: "x86" mapped to "386". Now: "x86"
50
- * CHANGE: /i\d86/ mapped to "386". Now: "x86"
51
-
52
-
53
- #### 0.5.1 (2009-05-07) ###############################
54
-
55
- * CHANGE: Hella cleanup in preparation for future expansion.
56
- * CHANGE: Modified platform, now returns VM-OS instead of OS-IMPL
57
- * ADDED: to_s which returns a full platform string
58
- * ADDED: sysinfo executable
59
-
60
-
61
- #### 0.5 (2009-05-07) ###############################
62
-
63
- * First public release. See commit history for solutious-stella, solutious-rudy,
64
- and delano-rye for complete history of SysInfo (was SystemInfo).
65
-
data/README.rdoc DELETED
@@ -1,87 +0,0 @@
1
- = SysInfo - v0.6
2
-
3
- All your system-independent infoz in one handy class.
4
-
5
- SysInfo does a takes a very quick glance at the system it's running on and exposes the results as YAML, JSON, CSV, or TSV. It also determines a platform identifier for the system that takes the form: VM-OS-IMPLEMENTATION-ARCHITECTURE.
6
-
7
- === Platform Identifier Examples
8
-
9
- ruby-unix-osx-i386
10
- ruby-unix-osx-powerpc
11
- ruby-unix-linux-x86_64
12
- java-win32-windows-i386
13
- java-win32-mingw-i386
14
-
15
- For the complete list of operating systems, implementations and architectures that SysInfo is aware of, see:
16
-
17
- * <tt>$ sysinfo os</tt>
18
- * <tt>$ sysinfo impl</tt>
19
- * <tt>$ sysinfo arch</tt>
20
-
21
- == Usage -- Library
22
-
23
- sysinfo = SysInfo.new
24
- p sysinfo.vm # => ruby
25
- p sysinfo.os # => unix
26
- p sysinfo.impl # => osx
27
- p sysinfo.arch # => i386
28
- p sysinfo.platform # => ruby-unix
29
- p sysinfo.to_s # => ruby-unix-osx-i386
30
-
31
- p sysinfo.user # => delano
32
- p sysinfo.home # => /Users/delano
33
- p sysinfo.uptime # => 290.429 (hours)
34
- p sysinfo.shell # => /bin/bash
35
- p sysinfo.paths # => [/sbin, /bin, /usr/bin, ...]
36
-
37
- p sysinfo.hostname # => walter
38
- p sysinfo.ipaddress_internal # => 10.0.1.2
39
- p sysinfo.uptime # => 290.573655656974
40
- p sysinfo.ruby # => [1,9,1]
41
-
42
- == Usage -- Executable
43
-
44
- $ sysinfo
45
- ruby-unix-osx-i386
46
-
47
- $ /usr/jruby/bin/sysinfo
48
- java-unix-osx-x86_64
49
-
50
- $ sysinfo -f yaml
51
- :vm: :ruby
52
- :os: :unix
53
- :impl: :osx
54
- ...
55
- :shell: :"/bin/bash"
56
- :user: delano
57
-
58
- $ sysinfo -f json
59
- {"vm":"ruby","os":"unix","impl":"osx", ..., "shell":"\/bin\/bash","user":"delano"}
60
-
61
- $ sysinfo -f csv
62
- ruby,unix,osx, ... /bin/bash,delano
63
-
64
- == Installation
65
-
66
- Via Rubygems, one of:
67
-
68
- $ sudo gem install sysinfo
69
- $ sudo gem install delano-sysinfo --source http://gems.github.com/
70
-
71
- or via download:
72
- * sysinfo-latest.tar.gz[http://github.com/delano/sysinfo/tarball/latest]
73
- * sysinfo-latest.zip[http://github.com/delano/sysinfo/zipball/latest]
74
-
75
- == Prerequisites
76
-
77
- * Ruby 1.8, Ruby 1.9, or JRuby 1.2
78
- * Storable[http://github.com/delano/storable]
79
-
80
- == Credits
81
-
82
- * Delano Mandelbaum (delano@solutious.com)
83
- * Portions of this code were originally from Amazon's EC2 AMI tools, specifically lib/platform.rb.
84
-
85
- == License
86
-
87
- See: LICENSE.txt
data/Rakefile DELETED
@@ -1,115 +0,0 @@
1
- require 'rubygems'
2
- require 'rake/clean'
3
- require 'rake/gempackagetask'
4
- require 'fileutils'
5
- include FileUtils
6
-
7
- begin
8
- require 'hanna/rdoctask'
9
- rescue LoadError
10
- require 'rake/rdoctask'
11
- end
12
-
13
-
14
- task :default => :package
15
-
16
- # CONFIG =============================================================
17
-
18
- # Change the following according to your needs
19
- README = "README.rdoc"
20
- CHANGES = "CHANGES.txt"
21
- LICENSE = "LICENSE.txt"
22
-
23
- # Files and directories to be deleted when you run "rake clean"
24
- CLEAN.include [ 'pkg', '*.gem', '.config']
25
-
26
- # Virginia assumes your project and gemspec have the same name
27
- name = (Dir.glob('*.gemspec') || ['virginia']).first.split('.').first
28
- load "#{name}.gemspec"
29
- version = @spec.version
30
-
31
- # That's it! The following defaults should allow you to get started
32
- # on other things.
33
-
34
-
35
- # TESTS/SPECS =========================================================
36
-
37
-
38
-
39
- # INSTALL =============================================================
40
-
41
- Rake::GemPackageTask.new(@spec) do |p|
42
- p.need_tar = true if RUBY_PLATFORM !~ /mswin/
43
- end
44
-
45
- task :release => [ :rdoc, :package ]
46
- task :install => [ :rdoc, :package ] do
47
- sh %{sudo gem install pkg/#{name}-#{version}.gem}
48
- end
49
- task :uninstall => [ :clean ] do
50
- sh %{sudo gem uninstall #{name}}
51
- end
52
-
53
-
54
- # RUBYFORGE RELEASE / PUBLISH TASKS ==================================
55
-
56
- if @spec.rubyforge_project
57
- desc 'Publish website to rubyforge'
58
- task 'publish:rdoc' => 'doc/index.html' do
59
- sh "scp -rp doc/* rubyforge.org:/var/www/gforge-projects/#{name}/"
60
- end
61
-
62
- desc 'Public release to rubyforge'
63
- task 'publish:gem' => [:package] do |t|
64
- sh <<-end
65
- rubyforge add_release -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.gem &&
66
- rubyforge add_file -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.tgz
67
- end
68
- end
69
- end
70
-
71
-
72
-
73
- # RUBY DOCS TASK ==================================
74
- begin
75
- require 'hanna/rdoctask'
76
- rescue LoadError
77
- require 'rake/rdoctask'
78
- end
79
-
80
- Rake::RDocTask.new do |t|
81
- t.rdoc_dir = 'doc'
82
- t.title = @spec.summary
83
- t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
84
- t.options << '--charset' << 'utf-8'
85
- t.rdoc_files.include(LICENSE)
86
- t.rdoc_files.include(README)
87
- t.rdoc_files.include(CHANGES)
88
- t.rdoc_files.include('bin/*')
89
- t.rdoc_files.include('lib/**/*.rb')
90
- end
91
-
92
-
93
-
94
-
95
- #Hoe.new('rspec', Spec::VERSION::STRING) do |p|
96
- # p.summary = Spec::VERSION::SUMMARY
97
- # p.description = "Behaviour Driven Development for Ruby."
98
- # p.rubyforge_name = 'rspec'
99
- # p.developer('RSpec Development Team', 'rspec-devel@rubyforge.org')
100
- # p.extra_dev_deps = [["cucumber",">= 0.1.13"]]
101
- # p.remote_rdoc_dir = "rspec/#{Spec::VERSION::STRING}"
102
- # p.rspec_options = ['--options', 'spec/spec.opts']
103
- # p.history_file = 'History.rdoc'
104
- # p.readme_file = 'README.rdoc'
105
- # p.post_install_message = <<-POST_INSTALL_MESSAGE
106
- ##{'*'*50}
107
- #
108
- # Thank you for installing rspec-#{Spec::VERSION::STRING}
109
- #
110
- # Please be sure to read History.rdoc and Upgrade.rdoc
111
- # for useful information about this release.
112
- #
113
- #{'*'*50}
114
- #POST_INSTALL_MESSAGE
115
- #end