iStats 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: eb1369240f2072354581bb573ebdf407a0c682c8
4
- data.tar.gz: 91c09bc2abbc4d05d7dd48df2fb9bf20c3bfaa3b
3
+ metadata.gz: aee9dfc4f388921ce4fee43b4b55dcd82e8b0e05
4
+ data.tar.gz: 227f1cdf64824cc28ad25f39a70bec2ca0aad48d
5
5
  SHA512:
6
- metadata.gz: 9dbae4ef3143f68b138e521d94d7e02f30a93729da29e166c4ea94943b53d769de7491b876155a9d826e9828c59b4603211ff5755d2a247705069bc5fd6a4a87
7
- data.tar.gz: ed89de2bd78b55d1dc23134f6f32674445f7c3ee05f56777df299e34337bb2bed3eb94c1b1c61a0bcaf8a43e8e9bf8b6bd1b6b2871983999bcf347128819c058
6
+ metadata.gz: 94840adaefe38c418798232714c9b74c3f9ce8aca70c6e6392ab3b6f7c3454f912412a6eee1c6a9ffc2b5e834bfb6661bf30f69f107d21b57397c68dd5bf1d65
7
+ data.tar.gz: 79476455860bdbdf6bd3ac2298a3b37aa5f0170211c4a1185fa31ad064f4b737cf528e73fc7254d6c90065e256fce6c0906fd261a3760b6795f5f6530c71fd4c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iStats (0.0.1)
4
+ iStats (0.0.2)
5
5
  sparkr
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,7 +1,12 @@
1
1
  iStats
2
2
  ======
3
3
 
4
- Quick attempt at writing a Ruby wrapper for a small C library that interacts with the IOKit library (apple) to get the CPU temperature.
4
+ Quick attempt at writing a Ruby wrapper for a small C library that interacts with the IOKit library (apple) to get the CPU temperature. Will expand to more hardware data and stats in the future.
5
+
6
+ __Note:__ Currently only works for Ruby 2.0. Working on a new gem that will work on 1.9, 2.0 and 2.1.
7
+
8
+ ## Screenshot
9
+ ![](http://i.imgur.com/ht2NZCL.gif)
5
10
 
6
11
  ## Installation
7
12
 
@@ -19,7 +24,18 @@ Or install it yourself as:
19
24
 
20
25
  ## Usage
21
26
 
22
- TODO: Write usage instructions here
27
+ ```
28
+ - iStats: help ---------------------------------------------------
29
+
30
+ istats --help This help text
31
+ istats --version Print current version
32
+
33
+ istats all Print all stats
34
+ istats cpu Print all CPU stats
35
+ istats cpu [temp | temperature] Print CPU temperature
36
+
37
+ for more help see: https://github.com/Chris911/iStats
38
+ ```
23
39
 
24
40
  ## Contributing
25
41
 
data/Rakefile CHANGED
@@ -1,6 +1,9 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rake/extensiontask'
3
3
 
4
- Rake::ExtensionTask.new 'osx_stats' do |ext|
4
+ GEMSPEC = Gem::Specification.load(File.expand_path("../iStats.gemspec", __FILE__))
5
+
6
+ Rake::ExtensionTask.new('osx_stats', GEMSPEC) do |ext|
7
+ ext.name = 'osx_stats'
5
8
  ext.lib_dir = 'lib/osx_stats'
6
9
  end
data/iStats.gemspec CHANGED
@@ -5,26 +5,27 @@ lib = File.expand_path('../lib', __FILE__)
5
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'iStats/version'
7
7
 
8
- Gem::Specification.new do |spec|
9
- spec.name = "iStats"
10
- spec.version = IStats::VERSION
11
- spec.authors = ["Chris911"]
12
- spec.email = ["christophe.naud.dulude@gmail.com"]
13
- spec.description = "Stats for your mac"
14
- spec.summary = "Stats for your mac"
15
- spec.homepage = "https://github.com/Chris911/iStats"
16
- spec.license = "MIT"
8
+ spec = Gem::Specification.new do |s|
9
+ s.name = "iStats"
10
+ s.version = IStats::VERSION
11
+ s.authors = ["Chris911"]
12
+ s.email = ["christophe.naud.dulude@gmail.com"]
13
+ s.description = "Stats for your mac"
14
+ s.summary = "Stats for your mac"
15
+ s.homepage = "https://github.com/Chris911/iStats"
16
+ s.license = "MIT"
17
17
 
18
- spec.files = `git ls-files`.split($/)
19
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
- spec.require_paths = ["lib"]
18
+ s.files = `git ls-files`.split($/)
19
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
21
+ s.require_paths = ["lib", "ext"]
22
22
 
23
- spec.extensions = Rake::FileList["ext/**/extconf.rb"]
23
+ s.platform = Gem::Platform::RUBY
24
+ s.extensions = FileList["ext/**/extconf.rb"]
24
25
 
25
- spec.add_dependency "sparkr"
26
+ s.add_dependency "sparkr"
26
27
 
27
- spec.add_development_dependency "bundler", "~> 1.3"
28
- spec.add_development_dependency "rake"
29
- spec.add_development_dependency "rake-compiler"
28
+ s.add_development_dependency "bundler", "~> 1.3"
29
+ s.add_development_dependency "rake"
30
+ s.add_development_dependency "rake-compiler"
30
31
  end
data/lib/iStats.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # Extensions (C libs)
2
- require 'osx_stats/osx_stats'
2
+ require 'osx_stats'
3
3
 
4
4
  # Gems
5
5
  require 'optparse'
data/lib/iStats/cpu.rb CHANGED
@@ -32,7 +32,7 @@ module IStats
32
32
  green(tick)
33
33
  elsif index.between?(2, 3) and t > 50
34
34
  light_yellow(tick)
35
- elsif index == 4 and t > 70
35
+ elsif index == 4 and t > 68
36
36
  yellow(tick)
37
37
  elsif index == 5 and t > 80
38
38
  red(tick)
@@ -1,3 +1,3 @@
1
1
  module IStats
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iStats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris911
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-13 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sparkr
@@ -91,8 +91,6 @@ files:
91
91
  - lib/iStats/command.rb
92
92
  - lib/iStats/cpu.rb
93
93
  - lib/iStats/version.rb
94
- - lib/osx_stats/osx_stats.bundle
95
- - lib/osx_stats/test.rb
96
94
  homepage: https://github.com/Chris911/iStats
97
95
  licenses:
98
96
  - MIT
@@ -101,6 +99,7 @@ post_install_message:
101
99
  rdoc_options: []
102
100
  require_paths:
103
101
  - lib
102
+ - ext
104
103
  required_ruby_version: !ruby/object:Gem::Requirement
105
104
  requirements:
106
105
  - - '>='
Binary file
@@ -1,5 +0,0 @@
1
- require './osx_stats'
2
-
3
- include CPU_STATS
4
-
5
- puts get_cpu_temp