win32-mmap 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.2.4 - 28-Apr-2010
2
+ * The Rakefile was refactored. It now handles gem creation, building and
3
+ cleanup.
4
+ * Inline code was removed from the gemspec.
5
+ * Removed the doc directory from the repository. The information that was
6
+ there is already covered in the README.
7
+
1
8
  == 0.2.3 - 12-Aug-2009
2
9
  * Changed license to Artistic 2.0.
3
10
  * The MMap.open method now properly handles a block.
data/README CHANGED
@@ -1,71 +1,65 @@
1
1
  = Description
2
- This package provides a Ruby interface for memory mapped I/O on MS Windows.
2
+ This package provides a Ruby interface for memory mapped I/O on MS Windows.
3
3
 
4
4
  = Prerequisites
5
- Ruby 1.8.2 or later.
6
- windows-pr, 0.5.5 or later.
5
+ Ruby 1.8.2 or later.
6
+ windows-pr, 0.5.5 or later.
7
7
 
8
8
  = Installation
9
- == Standard Installation
10
- rake test (optional)
11
- rake install
12
-
13
- == Gem Installation
14
- ruby win32-mmap.gemspec
15
- gem install win32-mmap-x.y.z.gem
9
+ gem install win32-mmap
16
10
 
17
11
  = Synopsis
18
- require 'win32/mmap'
19
- include Win32
12
+ require 'win32/mmap'
13
+ include Win32
20
14
 
21
- map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
22
- map1.foo = 'hello'
23
- map1.bar = 77
24
- map1.close
15
+ map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
16
+ map1.foo = 'hello'
17
+ map1.bar = 77
18
+ map1.close
25
19
 
26
- map2 = MMap.new(:file => "C:\\test.map")
27
- p map2.foo # 'hello'
28
- p map2.bar # 77
29
- map2.close
20
+ map2 = MMap.new(:file => "C:\\test.map")
21
+ p map2.foo # 'hello'
22
+ p map2.bar # 77
23
+ map2.close
30
24
 
31
25
  = About Memory Mapped Files under Windows
32
- Under Windows, code and data are both repesented by pages of memory backed
33
- by files on disk, code by executable image and data by system pagefile
34
- (i.e. swapfile). These are called memory mapped files. Memory mapped files
35
- can be used to provide a mechanism for shared memory between processes.
36
- Different processes are able to share data backed by the same swapfile,
37
- whether it's the system pagefile or a user-defined swapfile.
26
+ Under Windows, code and data are both repesented by pages of memory backed
27
+ by files on disk, code by executable image and data by system pagefile
28
+ (i.e. swapfile). These are called memory mapped files. Memory mapped files
29
+ can be used to provide a mechanism for shared memory between processes.
30
+ Different processes are able to share data backed by the same swapfile,
31
+ whether it's the system pagefile or a user-defined swapfile.
38
32
 
39
- Windows has a tight security system that prevents processes from directly
40
- sharing information among each other, but mapped memory files provide a
41
- mechanism that works with the Windows security system by using a name that
42
- all processes use to open the swapfile.
33
+ Windows has a tight security system that prevents processes from directly
34
+ sharing information among each other, but mapped memory files provide a
35
+ mechanism that works with the Windows security system by using a name that
36
+ all processes use to open the swapfile.
43
37
 
44
- A shared section of the swapfile is translated into pages of memory that are
45
- addressable by more than one process, Windows uses a system resource called a
46
- prototype page table entry (PPTE) to enable more than one process to address
47
- the same physical page of memory, thus multiple process can share the same
48
- data without violating the Windows system security.
38
+ A shared section of the swapfile is translated into pages of memory that are
39
+ addressable by more than one process, Windows uses a system resource called a
40
+ prototype page table entry (PPTE) to enable more than one process to address
41
+ the same physical page of memory, thus multiple process can share the same
42
+ data without violating the Windows system security.
49
43
 
50
- In short, memory mapped files provide shared memory under Windows.
44
+ In short, memory mapped files provide shared memory under Windows.
51
45
 
52
- (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
53
- module.)
46
+ (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
47
+ module.)
54
48
 
55
49
  = Future Plans
56
- Suggestions welcome.
50
+ Suggestions welcome.
57
51
 
58
52
  = License
59
- Artistic 2.0
53
+ Artistic 2.0
60
54
 
61
55
  = Copyright
62
- (C) 2003-2009 Daniel J. Berger, All Rights Reserved
56
+ (C) 2003-2010 Daniel J. Berger, All Rights Reserved
63
57
 
64
58
  = Warranty
65
- This package is provided "as is" and without any express or
66
- implied warranties, including, without limitation, the implied
67
- warranties of merchantability and fitness for a particular purpose.
59
+ This package is provided "as is" and without any express or
60
+ implied warranties, including, without limitation, the implied
61
+ warranties of merchantability and fitness for a particular purpose.
68
62
 
69
63
  = Authors
70
- Daniel J. Berger
71
- Park Heesob
64
+ Daniel J. Berger
65
+ Park Heesob
data/Rakefile CHANGED
@@ -1,31 +1,43 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
- require 'rbconfig'
4
- include Config
5
3
 
6
- desc 'Install the win32-mmap package (non-gem)'
7
- task :install do
8
- sitelibdir = CONFIG['sitelibdir']
9
- installdir = File.join(sitelibdir, 'win32')
10
- file = 'lib\win32\mmap.rb'
4
+ namespace 'gem' do
5
+ desc 'Delete any gem files in the project.'
6
+ task :clean do
7
+ Dir['*.gem'].each{ |f| File.delete(f) }
8
+ end
11
9
 
12
- Dir.mkdir(installdir) unless File.exists?(installdir)
13
- FileUtils.cp(file, installdir, :verbose => true)
10
+ desc 'Create the win32-mmap gem.'
11
+ task :create => [:clean] do
12
+ spec = eval(IO.read('win32-mmap.gemspec'))
13
+ Gem::Builder.new(spec).build
14
+ end
15
+
16
+ desc 'Install the win32-mmap gem.'
17
+ task :install => [:create] do
18
+ file = Dir['*.gem'].first
19
+ sh "gem install #{file}"
20
+ end
14
21
  end
15
22
 
16
- desc 'Run the example mmap file program'
17
- task :example_file do
18
- ruby '-Ilib examples/example_mmap_file.rb'
23
+ namespace 'example' do
24
+ desc 'Run the example mmap file program'
25
+ task :file do
26
+ ruby '-Ilib examples/example_mmap_file.rb'
27
+ end
19
28
 
20
- desc 'Run the example mmap server'
21
- task :example_server do
22
- ruby '-Ilib examples/example_mmap_server.rb'
29
+ desc 'Run the example mmap server'
30
+ task :server do
31
+ ruby '-Ilib examples/example_mmap_server.rb'
32
+ end
23
33
 
24
- desc 'Run the example mmap client'
25
- task :example_client do
26
- ruby '-Ilib examples/example_mmap_client.rb'
34
+ desc 'Run the example mmap client'
35
+ task :client do
36
+ ruby '-Ilib examples/example_mmap_client.rb'
37
+ end
38
+ end
27
39
 
28
40
  Rake::TestTask.new do |t|
29
- t.verbose = true
30
- t.warning = true
41
+ t.verbose = true
42
+ t.warning = true
31
43
  end
@@ -15,7 +15,7 @@ module Win32
15
15
  class MMap
16
16
 
17
17
  # The version of the win32-mmap library.
18
- VERSION = '0.2.3'
18
+ VERSION = '0.2.4'
19
19
 
20
20
  # Error typically raised in any method of Win32::MMap should fail.
21
21
  #
@@ -14,7 +14,7 @@ class TC_Win32_Mmap < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  def test_version
17
- assert_equal('0.2.3', MMap::VERSION)
17
+ assert_equal('0.2.4', MMap::VERSION)
18
18
  end
19
19
 
20
20
  def test_dynamic_string_value
@@ -1,27 +1,25 @@
1
1
  require 'rubygems'
2
2
 
3
- spec = Gem::Specification.new do |gem|
4
- gem.name = 'win32-mmap'
5
- gem.version = '0.2.3'
6
- gem.author = 'Daniel J. Berger'
7
- gem.license = 'Artistic 2.0'
8
- gem.email = 'djberg96@gmail.com'
9
- gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
- gem.platform = Gem::Platform::RUBY
11
- gem.summary = 'Memory mapped IO for Windows.'
12
- gem.test_file = 'test/test_win32_mmap.rb'
13
- gem.has_rdoc = true
14
- gem.files = Dir['**/*'].reject{ |f| f.include?('CVS') }
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'win32-mmap'
5
+ spec.version = '0.2.4'
6
+ spec.author = 'Daniel J. Berger'
7
+ spec.license = 'Artistic 2.0'
8
+ spec.email = 'djberg96@gmail.com'
9
+ spec.homepage = 'http://www.rubyforge.org/projects/win32utils'
10
+ spec.platform = Gem::Platform::RUBY
11
+ spec.summary = 'Memory mapped IO for Windows.'
12
+ spec.test_file = 'test/test_win32_mmap.rb'
13
+ spec.has_rdoc = true
14
+ spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
15
15
 
16
- gem.rubyforge_project = 'win32utils'
17
- gem.extra_rdoc_files = ['MANIFEST', 'README', 'CHANGES']
16
+ spec.rubyforge_project = 'win32utils'
17
+ spec.extra_rdoc_files = ['MANIFEST', 'README', 'CHANGES']
18
18
 
19
- gem.add_dependency('windows-pr')
19
+ spec.add_dependency('windows-pr')
20
20
 
21
- gem.description = <<-EOF
22
- The win32-mmap library provides an interface for memory mapped IO on
23
- MS Windows.
24
- EOF
21
+ spec.description = <<-EOF
22
+ The win32-mmap library provides an interface for memory mapped IO on
23
+ MS Windows.
24
+ EOF
25
25
  end
26
-
27
- Gem::Builder.new(spec).build
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-mmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 4
9
+ version: 0.2.4
5
10
  platform: ruby
6
11
  authors:
7
12
  - Daniel J. Berger
@@ -9,20 +14,22 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2009-08-12 00:00:00 -06:00
17
+ date: 2010-04-28 00:00:00 -06:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: windows-pr
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
25
- description: " The win32-mmap library provides an interface for memory mapped IO on\n MS Windows.\n"
30
+ type: :runtime
31
+ version_requirements: *id001
32
+ description: " The win32-mmap library provides an interface for memory mapped IO on\n MS Windows.\n"
26
33
  email: djberg96@gmail.com
27
34
  executables: []
28
35
 
@@ -56,18 +63,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
63
  requirements:
57
64
  - - ">="
58
65
  - !ruby/object:Gem::Version
66
+ segments:
67
+ - 0
59
68
  version: "0"
60
- version:
61
69
  required_rubygems_version: !ruby/object:Gem::Requirement
62
70
  requirements:
63
71
  - - ">="
64
72
  - !ruby/object:Gem::Version
73
+ segments:
74
+ - 0
65
75
  version: "0"
66
- version:
67
76
  requirements: []
68
77
 
69
78
  rubyforge_project: win32utils
70
- rubygems_version: 1.3.5
79
+ rubygems_version: 1.3.6
71
80
  signing_key:
72
81
  specification_version: 3
73
82
  summary: Memory mapped IO for Windows.