mincore 0.0.9.2 → 0.0.9.3.pre

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: b1c28aa892f60a6fe3db33b224a4097e84e33c3a
4
- data.tar.gz: d180a485b91cdf06331c44157c98ae46d05936fd
3
+ metadata.gz: 77d416b36e7f07f9c96c528575cef9f0741f8ecf
4
+ data.tar.gz: 9e8a6397e7ffdfe40ada2bbad0b19eec97a0cb97
5
5
  SHA512:
6
- metadata.gz: 1e3f270a7a442aac888f670841d5389d4dcbdcae3484e4f41361c1954b49eea92a9637042563446e0bea9eeffd2d054fe93c549cd536a06529dd394de00248ec
7
- data.tar.gz: 099141a0228f2d5bd89abe27ff9ddb426513945a0c39d54bb484546d842081350957e77d22679317e27626ef1d60084da7840aab9e9f7d385d1495492343a13c
6
+ metadata.gz: c19ab3259fe46c4ad68b66cf522c4fffb02c1171daf00c21067babf595b15f54dacb16edd5d974a5eafa2e263526b27fa0bf2915de72c0a3e030ec44562873a1
7
+ data.tar.gz: 786a6c28145ebc3a09d8725135218040ef3081a5102a26d95b92146d50d26c3e879f7b02343a9a076fcb97b5ef23d04c7868d1f0b7f922d2dab688f2e85a71f1
data/.gitignore CHANGED
@@ -4,4 +4,5 @@ scratch
4
4
  Gemfile.lock
5
5
  gems/
6
6
  .yardoc/
7
- doc/
7
+ doc/
8
+ coverage/
data/.travis.yml CHANGED
@@ -6,7 +6,7 @@ script: "bundle exec rake test"
6
6
 
7
7
  rvm:
8
8
  - 1.9.3
9
- - 1.8.7
9
+ # - 1.8.7
10
10
  - 2.0.0-p0
11
11
  - 2.0.0-p247
12
12
 
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
- gem 'RubyInline', '>= 3.10.1', :require => 'inline'
4
+ gem 'RubyInline', '>= 3.10.1', :require => 'inline'
5
+ gem 'coveralls', require: false
data/README.md CHANGED
@@ -7,6 +7,8 @@ ruby-mincore - Ruby bindings for Linux cache manipulation
7
7
  [![Code Climate](https://codeclimate.com/github/noushi/ruby-mincore.png)](https://codeclimate.com/github/noushi/ruby-mincore)
8
8
  |
9
9
  [![Dependency Status](https://gemnasium.com/noushi/ruby-mincore.png)](https://gemnasium.com/noushi/ruby-mincore)
10
+ |
11
+ [![Coverage Status](https://coveralls.io/repos/noushi/ruby-mincore/badge.png)](https://coveralls.io/r/noushi/ruby-mincore)
10
12
 
11
13
  `mincore` provides Ruby bindings for Linux cache manipulation, including cache inspection and deletion for a specific file.
12
14
 
data/bin/cachestats.rb ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # Simple script to view the cached'ness of a (single) file.
3
+
4
+ require 'mincore'
5
+
6
+ filename=ARGV[0]
7
+
8
+ retcode, pieces = File.mincore(filename)
9
+
10
+ cached=0
11
+ pieces.each do |e|
12
+ cached += 1 if e
13
+ end
14
+
15
+ puts "#{cached}/#{pieces.size}"
16
+
17
+
data/lib/mincore.rb CHANGED
@@ -88,8 +88,8 @@ static VALUE _mincore(char *filename) {
88
88
 
89
89
  pageinfo_arr = rb_ary_new2(pages);
90
90
  for(i=0; i<pages; i++) {
91
- // VALUE status = ((pageinfo[i] & 1)?Qtrue:Qfalse);
92
- VALUE status = Qtrue;
91
+ VALUE status = ((pageinfo[i] & 1)?Qtrue:Qfalse);
92
+ // VALUE status = Qtrue;
93
93
  rb_ary_push(pageinfo_arr, status);
94
94
  }
95
95
 
data/mincore.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'mincore'
3
- s.version = '0.0.9.2'
4
- s.date = '2013-11-10'
3
+ s.version = '0.0.9.3.pre'
4
+ s.date = '2013-11-19'
5
5
 
6
6
  s.homepage = 'http://github.com/noushi/ruby-mincore'
7
7
  s.summary = "Ruby bindings for Linux cache manipulation"
data/test/test_helper.rb CHANGED
@@ -3,7 +3,6 @@ $LOAD_PATH.unshift ".", "lib", "test"
3
3
 
4
4
  require "test/unit"
5
5
 
6
-
7
6
  class Array
8
7
  def tinify
9
8
  cur = nil
@@ -29,3 +28,8 @@ class Array
29
28
  end
30
29
 
31
30
 
31
+
32
+ require 'coveralls'
33
+ Coveralls.wear!
34
+
35
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mincore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.2
4
+ version: 0.0.9.3.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reda NOUSHI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-10 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: RubyInline
@@ -52,6 +52,7 @@ files:
52
52
  - README.md
53
53
  - Rakefile
54
54
  - TODO
55
+ - bin/cachestats.rb
55
56
  - bin/ci/before_build.sh
56
57
  - lib/mincore.rb
57
58
  - mincore.gemspec
@@ -73,9 +74,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
74
  version: '0'
74
75
  required_rubygems_version: !ruby/object:Gem::Requirement
75
76
  requirements:
76
- - - '>='
77
+ - - '>'
77
78
  - !ruby/object:Gem::Version
78
- version: '0'
79
+ version: 1.3.1
79
80
  requirements: []
80
81
  rubyforge_project:
81
82
  rubygems_version: 2.1.10