win32-mmap 0.4.1 → 0.4.2

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: 55eede18f18e3ac9825d96e891939ced232cb5e0
4
- data.tar.gz: 1805af917568b344f67ecb53f67f05324383cc4a
3
+ metadata.gz: 3d610c448f2f5f137cc5d8424fdaa303dd3b7d63
4
+ data.tar.gz: fa47a4a04b92508d7c6ca60f48747b5b46753c71
5
5
  SHA512:
6
- metadata.gz: 501515d54891cb94c9192a80baad26ab7348d4ea58a19f4ae4445b1d3b0d4aec4fb5c768cb5efdb0462cf32c4e35e1f1ed72c0d736629cc9ff192b1d2cf02805
7
- data.tar.gz: 55b3213ca5a7fa0c3049bf2939076b8dd308226be6e36e0a104c3032525d4cb8f344b1f5e6ae9d0f7841c214b044e7b4e8c344f4b5dcb6522997a77aa2197d01
6
+ metadata.gz: 9e58ed3af8d33045beeafd3824e987b16a749c07620f12ce180f7590bed552ff182c56bdf6ec7bd316f4e33bd2725f39f0316fe63f732586b91632670c816599
7
+ data.tar.gz: bd9c9470331b64c3b080e67f9db1fb35c10940c72340428a35ea29d2d05048c06ea495e141f5d795b3b49d18629caa9aab943a5390c7e69e4c8828f73b9dd58f
Binary file
Binary file
data/CHANGES CHANGED
@@ -1,70 +1,78 @@
1
- == 0.4.1 - 21-Oct-2013
2
- * Fixed the INVALID_HANDLE_VALUE constant for 64-bit Ruby.
3
- * Added rake and test-unit as development dependencies.
4
-
5
- == 0.4.0 - 21-Aug-2013
6
- * Added methods for reading or writing raw strings to the underlying
7
- memory mapped file (as opposed to marshalled data). Thanks go to
8
- Frank Quednau for the patch.
9
-
10
- == 0.3.2 - 28-Apr-2013
11
- * Fixed a prototype mismatch in a call to CreateFile. Thanks go to
12
- Frank Quednau for the spot.
13
-
14
- == 0.3.1 - 26-Apr-2013
15
- * Added the missing OPEN_ALWAYS constant. Thanks go to Frank Quednau.
16
- * Set the dependency properly (ffi now, not windows-pr).
17
-
18
- == 0.3.0 - 10-Apr-2013
19
- * Converted code to use FFI.
20
-
21
- == 0.2.4 - 28-Apr-2010
22
- * The Rakefile was refactored. It now handles gem creation, building and
23
- cleanup.
24
- * Inline code was removed from the gemspec.
25
-
26
- == 0.2.3 - 12-Aug-2009
27
- * Changed license to Artistic 2.0.
28
- * The MMap.open method now properly handles a block.
29
- * Some gemspec updates, including the license and description.
30
- * Changed test and example file names.
31
- * Some Rakefile updates, including tasks for running example programs.
32
-
33
- == 0.2.2 - 16-May-2007
34
- * Fixed a bug where marshalled data that happened to end with a "\0" would
35
- cause the getter to fail.
36
- * Now runs -w clean.
37
- * Added more tests.
38
- * Removed the install.rb file. Installation is now handled via the 'rake
39
- install' task.
40
- * Updated the MANIFEST file and made it rdoc friendly.
41
-
42
- == 0.2.1 - 22-Oct-2006
43
- * Removed the custom memcpy function since that function now does the right
44
- thing regardless of argument type.
45
- * Now requires windows-pr 0.5.6 or later (to take advantage of the improved
46
- memcpy).
47
-
48
- == 0.2.0 - 13-Oct-2006
49
- * Completely scrapped the old interface and code. It is now pure Ruby and
50
- has a much different API, and some internal changes.
51
- * Added a gemspec and an install.rb file for manual installation.
52
- * Now requires the windows-pr package, 0.5.5 or higher.
53
- * Modified the example scripts.
54
- * Updated the docs, and replaced the .txt and .rd files with a single .rdoc
55
- file.
56
-
57
- == 0.1.1 - 1-Mar-2005
58
- * Moved the 'examples' directory to the toplevel directory.
59
- * Made the CHANGES and README files rdoc friendly.
60
-
61
- == 0.1.0 - 12-Aug-2004
62
- * Modified to use the newer allocation framework. That means that, as of
63
- this release, this package requires Ruby 1.8.0 or later.
64
- * Moved sample programs under doc/examples.
65
-
66
- == 0.0.2 - 14-Mar-2004
67
- * Fixed sprintf() bug in new().
68
-
69
- == 0.0.1 - 13-Mar-2004
70
- * Initial (Beta) release
1
+ == 0.4.2 - 12-Nov-2015
2
+ * Added a win32-mmap.rb file for convenience.
3
+ * This gem is now signed.
4
+ * Use require_relative where appropriate.
5
+ * Added an appveyor.yml file for the MS continuous integration service.
6
+ * The gem tasks in the Rakefile now assume Rubygems 2.x.
7
+ * References to the rubyforge_project in the gemspec were removed.
8
+
9
+ == 0.4.1 - 21-Oct-2013
10
+ * Fixed the INVALID_HANDLE_VALUE constant for 64-bit Ruby.
11
+ * Added rake and test-unit as development dependencies.
12
+
13
+ == 0.4.0 - 21-Aug-2013
14
+ * Added methods for reading or writing raw strings to the underlying
15
+ memory mapped file (as opposed to marshalled data). Thanks go to
16
+ Frank Quednau for the patch.
17
+
18
+ == 0.3.2 - 28-Apr-2013
19
+ * Fixed a prototype mismatch in a call to CreateFile. Thanks go to
20
+ Frank Quednau for the spot.
21
+
22
+ == 0.3.1 - 26-Apr-2013
23
+ * Added the missing OPEN_ALWAYS constant. Thanks go to Frank Quednau.
24
+ * Set the dependency properly (ffi now, not windows-pr).
25
+
26
+ == 0.3.0 - 10-Apr-2013
27
+ * Converted code to use FFI.
28
+
29
+ == 0.2.4 - 28-Apr-2010
30
+ * The Rakefile was refactored. It now handles gem creation, building and
31
+ cleanup.
32
+ * Inline code was removed from the gemspec.
33
+
34
+ == 0.2.3 - 12-Aug-2009
35
+ * Changed license to Artistic 2.0.
36
+ * The MMap.open method now properly handles a block.
37
+ * Some gemspec updates, including the license and description.
38
+ * Changed test and example file names.
39
+ * Some Rakefile updates, including tasks for running example programs.
40
+
41
+ == 0.2.2 - 16-May-2007
42
+ * Fixed a bug where marshalled data that happened to end with a "\0" would
43
+ cause the getter to fail.
44
+ * Now runs -w clean.
45
+ * Added more tests.
46
+ * Removed the install.rb file. Installation is now handled via the 'rake
47
+ install' task.
48
+ * Updated the MANIFEST file and made it rdoc friendly.
49
+
50
+ == 0.2.1 - 22-Oct-2006
51
+ * Removed the custom memcpy function since that function now does the right
52
+ thing regardless of argument type.
53
+ * Now requires windows-pr 0.5.6 or later (to take advantage of the improved
54
+ memcpy).
55
+
56
+ == 0.2.0 - 13-Oct-2006
57
+ * Completely scrapped the old interface and code. It is now pure Ruby and
58
+ has a much different API, and some internal changes.
59
+ * Added a gemspec and an install.rb file for manual installation.
60
+ * Now requires the windows-pr package, 0.5.5 or higher.
61
+ * Modified the example scripts.
62
+ * Updated the docs, and replaced the .txt and .rd files with a single .rdoc
63
+ file.
64
+
65
+ == 0.1.1 - 1-Mar-2005
66
+ * Moved the 'examples' directory to the toplevel directory.
67
+ * Made the CHANGES and README files rdoc friendly.
68
+
69
+ == 0.1.0 - 12-Aug-2004
70
+ * Modified to use the newer allocation framework. That means that, as of
71
+ this release, this package requires Ruby 1.8.0 or later.
72
+ * Moved sample programs under doc/examples.
73
+
74
+ == 0.0.2 - 14-Mar-2004
75
+ * Fixed sprintf() bug in new().
76
+
77
+ == 0.0.1 - 13-Mar-2004
78
+ * Initial (Beta) release
data/MANIFEST CHANGED
@@ -1,10 +1,13 @@
1
- * CHANGES
2
- * MANIFEST
3
- * README
4
- * Rakefile
5
- * win32-mmap.gemspec
6
- * examples/example_mmap.rb
7
- * examples/example_mmap_client.rb
8
- * examples/example_mmap_server.rb
9
- * lib/win32/mmap.rb
10
- * test/test_win32_mmap.rb
1
+ * appveyor.yml
2
+ * CHANGES
3
+ * MANIFEST
4
+ * README
5
+ * Rakefile
6
+ * win32-mmap.gemspec
7
+ * certs/djberg96_pub.pem
8
+ * examples/example_mmap.rb
9
+ * examples/example_mmap_client.rb
10
+ * examples/example_mmap_server.rb
11
+ * lib/win32-mmap.rb
12
+ * lib/win32/mmap.rb
13
+ * test/test_win32_mmap.rb
data/README CHANGED
@@ -1,71 +1,71 @@
1
- = Description
2
- This package provides a Ruby interface for memory mapped I/O on MS Windows.
3
-
4
- = Prerequisites
5
- * ffi
6
- * test-unit (Testing only)
7
-
8
- = Installation
9
- gem install win32-mmap
10
-
11
- = Synopsis
12
- require 'win32/mmap'
13
- include Win32
14
-
15
- map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
16
- map1.foo = 'hello'
17
- map1.bar = 77
18
- map1.close
19
-
20
- map2 = MMap.new(:file => "C:\\test.map")
21
- p map2.foo # 'hello'
22
- p map2.bar # 77
23
- map2.close
24
-
25
- = About Memory Mapped Files under Windows
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.
32
-
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.
37
-
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.
43
-
44
- In short, memory mapped files provide shared memory under Windows.
45
-
46
- (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
47
- module.)
48
-
49
- == Contributions
50
- Although this library is free, please consider having your company
51
- setup a gittip if used by your company professionally.
52
-
53
- http://www.gittip.com/djberg96/
54
-
55
- = Future Plans
56
- Suggestions welcome.
57
-
58
- = License
59
- Artistic 2.0
60
-
61
- = Copyright
62
- (C) 2003-2013 Daniel J. Berger, All Rights Reserved
63
-
64
- = 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.
68
-
69
- = Authors
70
- Daniel J. Berger
71
- Park Heesob
1
+ = Description
2
+ This package provides a Ruby interface for memory mapped I/O on MS Windows.
3
+
4
+ = Prerequisites
5
+ * ffi
6
+ * test-unit (Testing only)
7
+
8
+ = Installation
9
+ gem install win32-mmap
10
+
11
+ = Synopsis
12
+ require 'win32/mmap'
13
+ include Win32
14
+
15
+ map1 = MMap.new(:file => "C:\\test.map", :size => 1024)
16
+ map1.foo = 'hello'
17
+ map1.bar = 77
18
+ map1.close
19
+
20
+ map2 = MMap.new(:file => "C:\\test.map")
21
+ p map2.foo # 'hello'
22
+ p map2.bar # 77
23
+ map2.close
24
+
25
+ = About Memory Mapped Files under Windows
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.
32
+
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.
37
+
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.
43
+
44
+ In short, memory mapped files provide shared memory under Windows.
45
+
46
+ (This explanation was largely borrowed from Roger Lee's Win32::MMF Perl
47
+ module.)
48
+
49
+ == Contributions
50
+ Although this library is free, please consider having your company
51
+ setup a gittip if used by your company professionally.
52
+
53
+ http://www.gittip.com/djberg96/
54
+
55
+ = Future Plans
56
+ Suggestions welcome.
57
+
58
+ = License
59
+ Artistic 2.0
60
+
61
+ = Copyright
62
+ (C) 2003-2013 Daniel J. Berger, All Rights Reserved
63
+
64
+ = 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.
68
+
69
+ = Authors
70
+ Daniel J. Berger
71
+ Park Heesob
data/Rakefile CHANGED
@@ -1,48 +1,45 @@
1
- require 'rake'
2
- require 'rake/clean'
3
- require 'rake/testtask'
4
-
5
- CLEAN.include('**/*.gem')
6
-
7
- namespace 'gem' do
8
- desc 'Create the win32-mmap gem.'
9
- task :create => [:clean] do
10
- spec = eval(IO.read('win32-mmap.gemspec'))
11
- if Gem::VERSION.to_f < 2.0
12
- Gem::Builder.new(spec).build
13
- else
14
- require 'rubygems/package'
15
- Gem::Package.build(spec)
16
- end
17
- end
18
-
19
- desc 'Install the win32-mmap gem.'
20
- task :install => [:create] do
21
- file = Dir['*.gem'].first
22
- sh "gem install #{file}"
23
- end
24
- end
25
-
26
- namespace 'example' do
27
- desc 'Run the example mmap file program'
28
- task :file do
29
- ruby '-Ilib examples/example_mmap_file.rb'
30
- end
31
-
32
- desc 'Run the example mmap server'
33
- task :server do
34
- ruby '-Ilib examples/example_mmap_server.rb'
35
- end
36
-
37
- desc 'Run the example mmap client'
38
- task :client do
39
- ruby '-Ilib examples/example_mmap_client.rb'
40
- end
41
- end
42
-
43
- Rake::TestTask.new do |t|
44
- t.verbose = true
45
- t.warning = true
46
- end
47
-
48
- task :default => :test
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+
5
+ CLEAN.include('**/*.gem')
6
+
7
+ namespace 'gem' do
8
+ desc 'Create the win32-mmap gem.'
9
+ task :create => [:clean] do
10
+ require 'rubygems/package'
11
+ spec = eval(IO.read('win32-mmap.gemspec'))
12
+ spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
+ Gem::Package.build(spec, true)
14
+ end
15
+
16
+ desc 'Install the win32-mmap gem.'
17
+ task :install => [:create] do
18
+ file = Dir['*.gem'].first
19
+ sh "gem install -l #{file}"
20
+ end
21
+ end
22
+
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
28
+
29
+ desc 'Run the example mmap server'
30
+ task :server do
31
+ ruby '-Ilib examples/example_mmap_server.rb'
32
+ end
33
+
34
+ desc 'Run the example mmap client'
35
+ task :client do
36
+ ruby '-Ilib examples/example_mmap_client.rb'
37
+ end
38
+ end
39
+
40
+ Rake::TestTask.new do |t|
41
+ t.verbose = true
42
+ t.warning = true
43
+ end
44
+
45
+ task :default => :test
@@ -0,0 +1,46 @@
1
+ version: '{build}'
2
+ branches:
3
+ only:
4
+ - ffi
5
+ skip_tags: true
6
+ clone_depth: 10
7
+ environment:
8
+ matrix:
9
+ - ruby_version: 193
10
+ ruby_dir: 1.9.1
11
+ - ruby_version: 200
12
+ ruby_dir: 2.0.0
13
+ - ruby_version: 200-x64
14
+ ruby_dir: 2.0.0
15
+ - ruby_version: 21
16
+ ruby_dir: 2.1.0
17
+ - ruby_version: 21-x64
18
+ ruby_dir: 2.1.0
19
+ - ruby_version: 22
20
+ ruby_dir: 2.2.0
21
+ - ruby_version: 22-x64
22
+ ruby_dir: 2.2.0
23
+ install:
24
+ - ps: >-
25
+ $env:path = "C:\Ruby" + $env:ruby_version + "\bin;" + $env:path
26
+
27
+ $tpath = "C:\Ruby" + $env:ruby_version + "\lib\ruby\" + $env:ruby_dir + "\test"
28
+
29
+ if ((test-path $tpath) -eq $True){ rm -recurse -force $tpath }
30
+
31
+ gem update --system > $null
32
+
33
+ if ((gem query -i ffi) -eq $False){ gem install ffi --no-document }
34
+
35
+ if ((gem query -i test-unit -v ">= 3.0") -eq $False){ gem install test-unit --no-document }
36
+ cache:
37
+ - C:\Ruby193\lib\ruby\gems\1.9.1
38
+ - C:\Ruby200\lib\ruby\gems\2.0.0
39
+ - C:\Ruby200-x64\lib\ruby\gems\2.0.0
40
+ - C:\Ruby21\lib\ruby\gems\2.1.0
41
+ - C:\Ruby21-x64\lib\ruby\gems\2.1.0
42
+ - C:\Ruby22\lib\ruby\gems\2.2.0
43
+ - C:\Ruby22-x64\lib\ruby\gems\2.2.0
44
+ build: off
45
+ test_script:
46
+ - cmd: rake