win32-open3 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.2.7 - 11-Jan-2008
2
+ * Fixed a bug that could cause exitstatus to return bogus information. Thanks
3
+ go to Roman Zawada for the spot.
4
+ * Added a 'build_binary_gem' Rake task.
5
+ * Updates to the gemspec, including the addition of Park Heesob as the primary
6
+ author in the gemspec.
7
+ * Renamed the test file and the example file.
8
+
1
9
  == 0.2.6 - 1-June-2007
2
10
  * Fixed RubyForge bug #20455 (closed IO stream). Thanks go an anonymous user
3
11
  for the spot.
@@ -41,4 +49,4 @@
41
49
  * Added some information to the README file about possible compiler problems.
42
50
 
43
51
  == 0.1.0 - 8-Oct-2004
44
- * Initial release
52
+ * Initial release
data/ext/Makefile ADDED
@@ -0,0 +1,181 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = win32
7
+ topdir = C:/Ruby/lib/ruby/1.8/i386-mswin32
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir);$(topdir);$(hdrdir)
10
+
11
+ DESTDIR = C:
12
+ prefix = $(DESTDIR)/Ruby
13
+ exec_prefix = $(prefix)
14
+ sitedir = $(prefix)/lib/ruby/site_ruby
15
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
16
+ archdir = $(rubylibdir)/$(arch)
17
+ sbindir = $(exec_prefix)/sbin
18
+ datadir = $(prefix)/share
19
+ includedir = $(prefix)/include
20
+ infodir = $(prefix)/info
21
+ sysconfdir = $(prefix)/etc
22
+ mandir = $(prefix)/man
23
+ libdir = $(exec_prefix)/lib
24
+ sharedstatedir = $(DESTDIR)/etc
25
+ oldincludedir = $(DESTDIR)/usr/include
26
+ sitearchdir = $(sitelibdir)/$(sitearch)
27
+ localstatedir = $(DESTDIR)/var
28
+ bindir = $(exec_prefix)/bin
29
+ sitelibdir = $(sitedir)/$(ruby_version)
30
+ libexecdir = $(exec_prefix)/libexec
31
+
32
+ CC = cl -nologo
33
+ LIBRUBY = $(RUBY_SO_NAME).lib
34
+ LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
35
+ LIBRUBYARG_SHARED = $(LIBRUBY)
36
+ LIBRUBYARG_STATIC = $(LIBRUBY_A)
37
+
38
+ RUBY_EXTCONF_H =
39
+ CFLAGS = -MD -Zi -O2b2xg- -G6
40
+ INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
41
+ DEFS =
42
+ CPPFLAGS = -DHAVE_TYPE_RB_PID_T
43
+ CXXFLAGS = $(CFLAGS)
44
+ DLDFLAGS = -link -incremental:no -debug -opt:ref -opt:icf -dll $(LIBPATH) -def:$(DEFFILE) -implib:$(*F:.so=)-$(arch).lib -pdb:$(*F:.so=)-$(arch).pdb
45
+ LDSHARED = cl -nologo -LD
46
+ AR = lib -nologo
47
+ EXEEXT = .exe
48
+
49
+ RUBY_INSTALL_NAME = ruby
50
+ RUBY_SO_NAME = msvcrt-ruby18
51
+ arch = i386-mswin32
52
+ sitearch = i386-msvcrt
53
+ ruby_version = 1.8
54
+ ruby = C:/Ruby/bin/ruby
55
+ RUBY = $(ruby:/=\)
56
+ RM = $(RUBY) -run -e rm -- -f
57
+ MAKEDIRS = @$(RUBY) -run -e mkdir -- -p
58
+ INSTALL = @$(RUBY) -run -e install -- -vp
59
+ INSTALL_PROG = $(INSTALL) -m 0755
60
+ INSTALL_DATA = $(INSTALL) -m 0644
61
+ COPY = copy > nul
62
+
63
+ #### End of system configuration section. ####
64
+
65
+ preload =
66
+
67
+ libpath = . $(libdir)
68
+ LIBPATH = -libpath:"." -libpath:"$(libdir)"
69
+ DEFFILE = $(TARGET)-$(arch).def
70
+
71
+ CLEANFILES = mkmf.log
72
+ DISTCLEANFILES = vc*.pdb $(DEFFILE)
73
+
74
+ extout =
75
+ extout_prefix =
76
+ target_prefix = /win32
77
+ LOCAL_LIBS =
78
+ LIBS = $(LIBRUBYARG_SHARED) oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib
79
+ SRCS = open3.c
80
+ OBJS = open3.obj
81
+ TARGET = open3
82
+ DLLIB = $(TARGET).so
83
+ EXTSTATIC =
84
+ STATIC_LIB =
85
+
86
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
87
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
88
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
89
+
90
+ TARGET_SO = $(DLLIB)
91
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
92
+ CLEANOBJS = *.obj *.lib *.s[ol] *.pdb *.exp *.bak
93
+
94
+ all: $(DLLIB)
95
+ static: $(STATIC_LIB)
96
+
97
+ clean:
98
+ @-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\)
99
+
100
+ distclean: clean
101
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
102
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\)
103
+
104
+ realclean: distclean
105
+ install: install-so install-rb
106
+
107
+ install-so: $(RUBYARCHDIR)
108
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
109
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
110
+ $(INSTALL_PROG) $(DLLIB:/=\) $(RUBYARCHDIR:/=\)
111
+ install-rb: pre-install-rb install-rb-default
112
+ install-rb-default: pre-install-rb-default
113
+ pre-install-rb: Makefile
114
+ pre-install-rb-default: Makefile
115
+ $(RUBYARCHDIR):
116
+ $(MAKEDIRS) $@
117
+
118
+ site-install: site-install-so site-install-rb
119
+ site-install-so: install-so
120
+ site-install-rb: install-rb
121
+
122
+ .SUFFIXES: .c .m .cc .cxx .cpp .obj
123
+
124
+ {$(srcdir)}.cc{}.obj:
125
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
126
+
127
+ {$(topdir)}.cc{}.obj:
128
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
129
+
130
+ {$(hdrdir)}.cc{}.obj:
131
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
132
+
133
+ .cc.obj:
134
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
135
+
136
+ {$(srcdir)}.cxx{}.obj:
137
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
138
+
139
+ {$(topdir)}.cxx{}.obj:
140
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
141
+
142
+ {$(hdrdir)}.cxx{}.obj:
143
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
144
+
145
+ .cxx.obj:
146
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
147
+
148
+ {$(srcdir)}.cpp{}.obj:
149
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
150
+
151
+ {$(topdir)}.cpp{}.obj:
152
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
153
+
154
+ {$(hdrdir)}.cpp{}.obj:
155
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
156
+
157
+ .cpp.obj:
158
+ $(CXX) $(INCFLAGS) $(CXXFLAGS) $(CPPFLAGS) -c -Tp$(<:\=/)
159
+
160
+ {$(srcdir)}.c{}.obj:
161
+ $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
162
+
163
+ {$(topdir)}.c{}.obj:
164
+ $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
165
+
166
+ {$(hdrdir)}.c{}.obj:
167
+ $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
168
+
169
+ .c.obj:
170
+ $(CC) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
171
+
172
+ $(DLLIB): $(DEFFILE) $(OBJS)
173
+ @-$(RM) $@
174
+ $(LDSHARED) -Fe$(@) $(OBJS) $(LIBS) $(LOCAL_LIBS) $(DLDFLAGS)
175
+
176
+
177
+
178
+ $(DEFFILE):
179
+ $(RUBY) -e "puts 'EXPORTS', 'Init_$(TARGET)'" > $@
180
+
181
+ $(OBJS): {.;$(srcdir);$(topdir);$(hdrdir)}ruby.h {.;$(srcdir);$(topdir);$(hdrdir)}defines.h
data/ext/mkmf.log ADDED
@@ -0,0 +1,19 @@
1
+ have_type: checking for rb_pid_t in ruby.h... -------------------- yes
2
+
3
+ "cl -nologo -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c conftest.c"
4
+ conftest.c
5
+ checked program was:
6
+ /* begin */
7
+ 1: #define WIN32_LEAN_AND_MEAN
8
+ 2: #define WIN32
9
+ 3: #include <winsock2.h>
10
+ 4: #include <windows.h>
11
+ 5: #include <ruby.h>
12
+ 6:
13
+ 7: /*top*/
14
+ 8: typedef rb_pid_t conftest_type;
15
+ 9: static conftest_type conftestval[sizeof(conftest_type)?1:-1];
16
+ /* end */
17
+
18
+ --------------------
19
+
@@ -0,0 +1,2 @@
1
+ EXPORTS
2
+ Init_open3
Binary file
Binary file
Binary file
data/ext/open3.obj ADDED
Binary file
data/ext/vc60.pdb ADDED
Binary file
data/ext/win32/open3.c CHANGED
@@ -282,6 +282,7 @@ static void win32_pipe_finalize(OpenFile *file, int noraise)
282
282
  if(pid_handle != NULL){
283
283
  GetExitCodeProcess(pid_handle, &status);
284
284
  CloseHandle(pid_handle);
285
+ pid_handle = NULL;
285
286
 
286
287
  if(status != STILL_ACTIVE)
287
288
  win32_set_last_status(status, file->pid);
data/ext/win32/open3.h CHANGED
@@ -1,4 +1,4 @@
1
- #define WIN32_OPEN3_VERSION "0.2.6"
1
+ #define WIN32_OPEN3_VERSION "0.2.7"
2
2
  #define MAX_STRING 512
3
3
 
4
4
  static VALUE io_alloc _((VALUE));
@@ -14,11 +14,14 @@ class TC_Win32_Open3 < Test::Unit::TestCase
14
14
  def setup
15
15
  @good_cmd = 'ver'
16
16
  @bad_cmd = 'verb'
17
+ @stdin = nil
18
+ @stdout = nil
19
+ @stderr = nil
17
20
  end
18
21
 
19
22
  def test_open3_version
20
- assert_equal('0.2.6', Open3::WIN32_OPEN3_VERSION)
21
- assert_equal('0.2.6', Open4::WIN32_OPEN3_VERSION)
23
+ assert_equal('0.2.7', Open3::WIN32_OPEN3_VERSION)
24
+ assert_equal('0.2.7', Open4::WIN32_OPEN3_VERSION)
22
25
  end
23
26
 
24
27
  def test_open3_basic
@@ -84,7 +87,7 @@ class TC_Win32_Open3 < Test::Unit::TestCase
84
87
  assert_kind_of(String, fout.gets)
85
88
  assert_nil(ferr.gets)
86
89
  end
87
-
90
+
88
91
  def test_handle_bad_content
89
92
  fin, fout, ferr = Open3.popen3(@bad_cmd)
90
93
  assert_kind_of(String, ferr.gets)
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: win32-open3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
+ - Park Heesob
7
8
  - Daniel J. Berger
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2008-06-01 00:00:00 -06:00
13
+ date: 2009-01-11 00:00:00 -07:00
13
14
  default_executable:
14
15
  dependencies: []
15
16
 
@@ -27,8 +28,16 @@ extra_rdoc_files:
27
28
  - ext/win32/open3.c
28
29
  files:
29
30
  - doc/open3.txt
30
- - test/tc_open3.rb
31
+ - test/test_win32_open3.rb
31
32
  - ext/extconf.rb
33
+ - ext/Makefile
34
+ - ext/mkmf.log
35
+ - ext/open3-i386-mswin32.def
36
+ - ext/open3-i386-mswin32.exp
37
+ - ext/open3-i386-mswin32.lib
38
+ - ext/open3-i386-mswin32.pdb
39
+ - ext/open3.obj
40
+ - ext/vc60.pdb
32
41
  - ext/win32
33
42
  - ext/win32/open3.c
34
43
  - ext/win32/open3.h
@@ -57,9 +66,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
66
  requirements: []
58
67
 
59
68
  rubyforge_project: win32utils
60
- rubygems_version: 1.1.1
69
+ rubygems_version: 1.3.1
61
70
  signing_key:
62
71
  specification_version: 2
63
72
  summary: Provides an Open3.popen3 implementation for MS Windows
64
73
  test_files:
65
- - test/tc_open3.rb
74
+ - test/test_win32_open3.rb