thrift 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/InstalledFiles +1 -0
  2. data/Makefile +512 -0
  3. data/Makefile.am +3 -1
  4. data/Makefile.in +117 -45
  5. data/Manifest +17 -0
  6. data/Rakefile +6 -8
  7. data/benchmark/gen-rb/benchmark_constants.rb +10 -0
  8. data/benchmark/gen-rb/benchmark_service.rb +80 -0
  9. data/benchmark/gen-rb/benchmark_types.rb +9 -0
  10. data/debug_proto_test/gen-rb/debug_proto_test_constants.rb +273 -0
  11. data/debug_proto_test/gen-rb/debug_proto_test_types.rb +705 -0
  12. data/debug_proto_test/gen-rb/empty_service.rb +24 -0
  13. data/debug_proto_test/gen-rb/inherited.rb +79 -0
  14. data/debug_proto_test/gen-rb/reverse_order_service.rb +82 -0
  15. data/debug_proto_test/gen-rb/service_for_exception_with_a_map.rb +81 -0
  16. data/debug_proto_test/gen-rb/srv.rb +330 -0
  17. data/ext/binary_protocol_accelerated.c +24 -11
  18. data/ext/compact_protocol.c +14 -11
  19. data/ext/constants.h +1 -0
  20. data/ext/memory_buffer.c +56 -1
  21. data/ext/struct.c +76 -19
  22. data/ext/thrift_native.c +2 -0
  23. data/lib/thrift/exceptions.rb +3 -1
  24. data/lib/thrift/protocol/binary_protocol.rb +14 -10
  25. data/lib/thrift/protocol/compact_protocol.rb +7 -4
  26. data/lib/thrift/server/nonblocking_server.rb +15 -5
  27. data/lib/thrift/struct.rb +9 -6
  28. data/lib/thrift/struct_union.rb +47 -14
  29. data/lib/thrift/transport/base_transport.rb +39 -2
  30. data/lib/thrift/transport/buffered_transport.rb +31 -0
  31. data/lib/thrift/transport/framed_transport.rb +26 -0
  32. data/lib/thrift/transport/memory_buffer_transport.rb +29 -0
  33. data/spec/binary_protocol_spec.rb +2 -4
  34. data/spec/gen-rb/nonblocking_service.rb +272 -0
  35. data/spec/gen-rb/thrift_spec_constants.rb +10 -0
  36. data/spec/gen-rb/thrift_spec_types.rb +345 -0
  37. data/spec/spec_helper.rb +1 -3
  38. data/thrift.gemspec +10 -11
  39. data/tmp/thrift-0.7.0.gem +0 -0
  40. metadata +22 -8
data/Makefile.in CHANGED
@@ -1,8 +1,8 @@
1
- # Makefile.in generated by automake 1.10.1 from Makefile.am.
1
+ # Makefile.in generated by automake 1.9.6 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
4
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
- # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5
+ # 2003, 2004, 2005 Free Software Foundation, Inc.
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
8
8
  # with or without modifications, as long as this notice is preserved.
@@ -32,11 +32,15 @@
32
32
  # specific language governing permissions and limitations
33
33
  # under the License.
34
34
  #
35
+ srcdir = @srcdir@
36
+ top_srcdir = @top_srcdir@
35
37
  VPATH = @srcdir@
36
38
  pkgdatadir = $(datadir)/@PACKAGE@
37
39
  pkglibdir = $(libdir)/@PACKAGE@
38
40
  pkgincludedir = $(includedir)/@PACKAGE@
41
+ top_builddir = ../..
39
42
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
43
+ INSTALL = @INSTALL@
40
44
  install_sh_DATA = $(install_sh) -c -m 644
41
45
  install_sh_PROGRAM = $(install_sh) -c
42
46
  install_sh_SCRIPT = $(install_sh) -c
@@ -71,7 +75,13 @@ DIST_SOURCES =
71
75
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
72
76
  ACLOCAL = @ACLOCAL@
73
77
  ALLOCA = @ALLOCA@
78
+ AMDEP_FALSE = @AMDEP_FALSE@
79
+ AMDEP_TRUE = @AMDEP_TRUE@
74
80
  AMTAR = @AMTAR@
81
+ AMX_HAVE_LIBEVENT_FALSE = @AMX_HAVE_LIBEVENT_FALSE@
82
+ AMX_HAVE_LIBEVENT_TRUE = @AMX_HAVE_LIBEVENT_TRUE@
83
+ AMX_HAVE_ZLIB_FALSE = @AMX_HAVE_ZLIB_FALSE@
84
+ AMX_HAVE_ZLIB_TRUE = @AMX_HAVE_ZLIB_TRUE@
75
85
  ANT = @ANT@
76
86
  ANT_FLAGS = @ANT_FLAGS@
77
87
  AR = @AR@
@@ -97,7 +107,6 @@ CXXFLAGS = @CXXFLAGS@
97
107
  CYGPATH_W = @CYGPATH_W@
98
108
  DEFS = @DEFS@
99
109
  DEPDIR = @DEPDIR@
100
- DSYMUTIL = @DSYMUTIL@
101
110
  ECHO = @ECHO@
102
111
  ECHO_C = @ECHO_C@
103
112
  ECHO_N = @ECHO_N@
@@ -118,10 +127,19 @@ GCOV_CXXFLAGS = @GCOV_CXXFLAGS@
118
127
  GCOV_LDFLAGS = @GCOV_LDFLAGS@
119
128
  GLIB_CFLAGS = @GLIB_CFLAGS@
120
129
  GLIB_LIBS = @GLIB_LIBS@
130
+ GOARCH = @GOARCH@
131
+ GOBIN = @GOBIN@
121
132
  GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
122
133
  GOBJECT_LIBS = @GOBJECT_LIBS@
134
+ GOINSTALL = @GOINSTALL@
135
+ GOMAKE = @GOMAKE@
136
+ GOROOT = @GOROOT@
137
+ GO_C = @GO_C@
138
+ GO_L = @GO_L@
123
139
  GREP = @GREP@
124
- INSTALL = @INSTALL@
140
+ HAVE_RSPEC_FALSE = @HAVE_RSPEC_FALSE@
141
+ HAVE_RSPEC_TRUE = @HAVE_RSPEC_TRUE@
142
+ INSTALLDIRS = @INSTALLDIRS@
125
143
  INSTALL_DATA = @INSTALL_DATA@
126
144
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
127
145
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -143,7 +161,8 @@ MAKEINFO = @MAKEINFO@
143
161
  MKDIR_P = @MKDIR_P@
144
162
  MONO_CFLAGS = @MONO_CFLAGS@
145
163
  MONO_LIBS = @MONO_LIBS@
146
- NMEDIT = @NMEDIT@
164
+ NET_2_0_FALSE = @NET_2_0_FALSE@
165
+ NET_2_0_TRUE = @NET_2_0_TRUE@
147
166
  OBJEXT = @OBJEXT@
148
167
  PACKAGE = @PACKAGE@
149
168
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -175,20 +194,82 @@ SED = @SED@
175
194
  SET_MAKE = @SET_MAKE@
176
195
  SHELL = @SHELL@
177
196
  STRIP = @STRIP@
197
+ THRIFT_GEN_as3_FALSE = @THRIFT_GEN_as3_FALSE@
198
+ THRIFT_GEN_as3_TRUE = @THRIFT_GEN_as3_TRUE@
199
+ THRIFT_GEN_c_glib_FALSE = @THRIFT_GEN_c_glib_FALSE@
200
+ THRIFT_GEN_c_glib_TRUE = @THRIFT_GEN_c_glib_TRUE@
201
+ THRIFT_GEN_cocoa_FALSE = @THRIFT_GEN_cocoa_FALSE@
202
+ THRIFT_GEN_cocoa_TRUE = @THRIFT_GEN_cocoa_TRUE@
203
+ THRIFT_GEN_cpp_FALSE = @THRIFT_GEN_cpp_FALSE@
204
+ THRIFT_GEN_cpp_TRUE = @THRIFT_GEN_cpp_TRUE@
205
+ THRIFT_GEN_csharp_FALSE = @THRIFT_GEN_csharp_FALSE@
206
+ THRIFT_GEN_csharp_TRUE = @THRIFT_GEN_csharp_TRUE@
207
+ THRIFT_GEN_erl_FALSE = @THRIFT_GEN_erl_FALSE@
208
+ THRIFT_GEN_erl_TRUE = @THRIFT_GEN_erl_TRUE@
209
+ THRIFT_GEN_go_FALSE = @THRIFT_GEN_go_FALSE@
210
+ THRIFT_GEN_go_TRUE = @THRIFT_GEN_go_TRUE@
211
+ THRIFT_GEN_hs_FALSE = @THRIFT_GEN_hs_FALSE@
212
+ THRIFT_GEN_hs_TRUE = @THRIFT_GEN_hs_TRUE@
213
+ THRIFT_GEN_html_FALSE = @THRIFT_GEN_html_FALSE@
214
+ THRIFT_GEN_html_TRUE = @THRIFT_GEN_html_TRUE@
215
+ THRIFT_GEN_java_FALSE = @THRIFT_GEN_java_FALSE@
216
+ THRIFT_GEN_java_TRUE = @THRIFT_GEN_java_TRUE@
217
+ THRIFT_GEN_javame_FALSE = @THRIFT_GEN_javame_FALSE@
218
+ THRIFT_GEN_javame_TRUE = @THRIFT_GEN_javame_TRUE@
219
+ THRIFT_GEN_js_FALSE = @THRIFT_GEN_js_FALSE@
220
+ THRIFT_GEN_js_TRUE = @THRIFT_GEN_js_TRUE@
221
+ THRIFT_GEN_ocaml_FALSE = @THRIFT_GEN_ocaml_FALSE@
222
+ THRIFT_GEN_ocaml_TRUE = @THRIFT_GEN_ocaml_TRUE@
223
+ THRIFT_GEN_perl_FALSE = @THRIFT_GEN_perl_FALSE@
224
+ THRIFT_GEN_perl_TRUE = @THRIFT_GEN_perl_TRUE@
225
+ THRIFT_GEN_php_FALSE = @THRIFT_GEN_php_FALSE@
226
+ THRIFT_GEN_php_TRUE = @THRIFT_GEN_php_TRUE@
227
+ THRIFT_GEN_py_FALSE = @THRIFT_GEN_py_FALSE@
228
+ THRIFT_GEN_py_TRUE = @THRIFT_GEN_py_TRUE@
229
+ THRIFT_GEN_rb_FALSE = @THRIFT_GEN_rb_FALSE@
230
+ THRIFT_GEN_rb_TRUE = @THRIFT_GEN_rb_TRUE@
231
+ THRIFT_GEN_st_FALSE = @THRIFT_GEN_st_FALSE@
232
+ THRIFT_GEN_st_TRUE = @THRIFT_GEN_st_TRUE@
233
+ THRIFT_GEN_xsd_FALSE = @THRIFT_GEN_xsd_FALSE@
234
+ THRIFT_GEN_xsd_TRUE = @THRIFT_GEN_xsd_TRUE@
178
235
  TRIAL = @TRIAL@
179
236
  VERSION = @VERSION@
237
+ WITH_CPP_FALSE = @WITH_CPP_FALSE@
238
+ WITH_CPP_TRUE = @WITH_CPP_TRUE@
239
+ WITH_C_GLIB_FALSE = @WITH_C_GLIB_FALSE@
240
+ WITH_C_GLIB_TRUE = @WITH_C_GLIB_TRUE@
241
+ WITH_ERLANG_FALSE = @WITH_ERLANG_FALSE@
242
+ WITH_ERLANG_TRUE = @WITH_ERLANG_TRUE@
243
+ WITH_GO_FALSE = @WITH_GO_FALSE@
244
+ WITH_GO_TRUE = @WITH_GO_TRUE@
245
+ WITH_HASKELL_FALSE = @WITH_HASKELL_FALSE@
246
+ WITH_HASKELL_TRUE = @WITH_HASKELL_TRUE@
247
+ WITH_JAVA_FALSE = @WITH_JAVA_FALSE@
248
+ WITH_JAVA_TRUE = @WITH_JAVA_TRUE@
249
+ WITH_MONO_FALSE = @WITH_MONO_FALSE@
250
+ WITH_MONO_TRUE = @WITH_MONO_TRUE@
251
+ WITH_PERL_FALSE = @WITH_PERL_FALSE@
252
+ WITH_PERL_TRUE = @WITH_PERL_TRUE@
253
+ WITH_PHP_EXTENSION_FALSE = @WITH_PHP_EXTENSION_FALSE@
254
+ WITH_PHP_EXTENSION_TRUE = @WITH_PHP_EXTENSION_TRUE@
255
+ WITH_PHP_FALSE = @WITH_PHP_FALSE@
256
+ WITH_PHP_TRUE = @WITH_PHP_TRUE@
257
+ WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@
258
+ WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@
259
+ WITH_RUBY_FALSE = @WITH_RUBY_FALSE@
260
+ WITH_RUBY_TRUE = @WITH_RUBY_TRUE@
180
261
  YACC = @YACC@
181
262
  YFLAGS = @YFLAGS@
182
263
  ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
183
264
  ZLIB_LDFLAGS = @ZLIB_LDFLAGS@
184
265
  ZLIB_LIBS = @ZLIB_LIBS@
185
- abs_builddir = @abs_builddir@
186
- abs_srcdir = @abs_srcdir@
187
- abs_top_builddir = @abs_top_builddir@
188
- abs_top_srcdir = @abs_top_srcdir@
189
266
  ac_ct_CC = @ac_ct_CC@
190
267
  ac_ct_CXX = @ac_ct_CXX@
191
268
  ac_ct_F77 = @ac_ct_F77@
269
+ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
270
+ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
271
+ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
272
+ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
192
273
  am__include = @am__include@
193
274
  am__leading_dot = @am__leading_dot@
194
275
  am__quote = @am__quote@
@@ -200,7 +281,6 @@ build_alias = @build_alias@
200
281
  build_cpu = @build_cpu@
201
282
  build_os = @build_os@
202
283
  build_vendor = @build_vendor@
203
- builddir = @builddir@
204
284
  datadir = @datadir@
205
285
  datarootdir = @datarootdir@
206
286
  docdir = @docdir@
@@ -232,13 +312,9 @@ pyexecdir = @pyexecdir@
232
312
  pythondir = @pythondir@
233
313
  sbindir = @sbindir@
234
314
  sharedstatedir = @sharedstatedir@
235
- srcdir = @srcdir@
236
315
  subdirs = @subdirs@
237
316
  sysconfdir = @sysconfdir@
238
317
  target_alias = @target_alias@
239
- top_build_prefix = @top_build_prefix@
240
- top_builddir = @top_builddir@
241
- top_srcdir = @top_srcdir@
242
318
  EXTRA_DIST = \
243
319
  CHANGELOG \
244
320
  Rakefile \
@@ -288,6 +364,10 @@ mostlyclean-libtool:
288
364
 
289
365
  clean-libtool:
290
366
  -rm -rf .libs _libs
367
+
368
+ distclean-libtool:
369
+ -rm -f libtool
370
+ uninstall-info-am:
291
371
  tags: TAGS
292
372
  TAGS:
293
373
 
@@ -296,21 +376,22 @@ CTAGS:
296
376
 
297
377
 
298
378
  distdir: $(DISTFILES)
299
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
300
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
301
- list='$(DISTFILES)'; \
302
- dist_files=`for file in $$list; do echo $$file; done | \
303
- sed -e "s|^$$srcdirstrip/||;t" \
304
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
305
- case $$dist_files in \
306
- */*) $(MKDIR_P) `echo "$$dist_files" | \
307
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
308
- sort -u` ;; \
309
- esac; \
310
- for file in $$dist_files; do \
379
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
380
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
381
+ list='$(DISTFILES)'; for file in $$list; do \
382
+ case $$file in \
383
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
384
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
385
+ esac; \
311
386
  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
387
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
388
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
389
+ dir="/$$dir"; \
390
+ $(mkdir_p) "$(distdir)$$dir"; \
391
+ else \
392
+ dir=''; \
393
+ fi; \
312
394
  if test -d $$d/$$file; then \
313
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
314
395
  if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
315
396
  cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
316
397
  fi; \
@@ -356,7 +437,7 @@ clean-am: clean-generic clean-libtool clean-local mostlyclean-am
356
437
 
357
438
  distclean: distclean-am
358
439
  -rm -f Makefile
359
- distclean-am: clean-am distclean-generic
440
+ distclean-am: clean-am distclean-generic distclean-libtool
360
441
 
361
442
  dvi: dvi-am
362
443
 
@@ -370,22 +451,14 @@ info-am:
370
451
 
371
452
  install-data-am:
372
453
 
373
- install-dvi: install-dvi-am
374
-
375
454
  install-exec-am:
376
455
  @$(NORMAL_INSTALL)
377
456
  $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
378
457
 
379
- install-html: install-html-am
380
-
381
458
  install-info: install-info-am
382
459
 
383
460
  install-man:
384
461
 
385
- install-pdf: install-pdf-am
386
-
387
- install-ps: install-ps-am
388
-
389
462
  installcheck-am:
390
463
 
391
464
  maintainer-clean: maintainer-clean-am
@@ -404,29 +477,28 @@ ps: ps-am
404
477
 
405
478
  ps-am:
406
479
 
407
- uninstall-am:
408
-
409
- .MAKE: install-am install-exec-am install-strip
480
+ uninstall-am: uninstall-info-am
410
481
 
411
482
  .PHONY: all all-am all-local check check-am check-local clean \
412
483
  clean-generic clean-libtool clean-local distclean \
413
484
  distclean-generic distclean-libtool distdir dvi dvi-am html \
414
485
  html-am info info-am install install-am install-data \
415
- install-data-am install-dvi install-dvi-am install-exec \
416
- install-exec-am install-exec-hook install-html install-html-am \
417
- install-info install-info-am install-man install-pdf \
418
- install-pdf-am install-ps install-ps-am install-strip \
486
+ install-data-am install-exec install-exec-am install-exec-hook \
487
+ install-info install-info-am install-man install-strip \
419
488
  installcheck installcheck-am installdirs maintainer-clean \
420
489
  maintainer-clean-generic mostlyclean mostlyclean-generic \
421
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
490
+ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
491
+ uninstall-info-am
492
+
422
493
 
494
+ DESTDIR ?= /
423
495
 
424
496
  all-local:
425
497
  if [ -n "$(RUBY_PREFIX)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR)$(RUBY_PREFIX) --rbdir='$$libdir/ruby' --sodir='$$libdir/ruby' ; elif [ -n "$(DESTDIR)" ] ; then $(RUBY) setup.rb config --prefix=$(DESTDIR) ; else $(RUBY) setup.rb config ; fi
426
498
  $(RUBY) setup.rb setup
427
499
 
428
500
  install-exec-hook:
429
- $(RUBY) setup.rb install
501
+ $(RUBY) setup.rb install --prefix=$(DESTDIR)
430
502
 
431
503
  # Make sure this doesn't fail if Ruby is not configured.
432
504
  clean-local:
data/Manifest CHANGED
@@ -1,4 +1,6 @@
1
1
  CHANGELOG
2
+ InstalledFiles
3
+ Makefile
2
4
  Makefile.am
3
5
  Makefile.in
4
6
  Manifest
@@ -7,8 +9,18 @@ Rakefile
7
9
  benchmark/Benchmark.thrift
8
10
  benchmark/benchmark.rb
9
11
  benchmark/client.rb
12
+ benchmark/gen-rb/benchmark_constants.rb
13
+ benchmark/gen-rb/benchmark_service.rb
14
+ benchmark/gen-rb/benchmark_types.rb
10
15
  benchmark/server.rb
11
16
  benchmark/thin_server.rb
17
+ debug_proto_test/gen-rb/debug_proto_test_constants.rb
18
+ debug_proto_test/gen-rb/debug_proto_test_types.rb
19
+ debug_proto_test/gen-rb/empty_service.rb
20
+ debug_proto_test/gen-rb/inherited.rb
21
+ debug_proto_test/gen-rb/reverse_order_service.rb
22
+ debug_proto_test/gen-rb/service_for_exception_with_a_map.rb
23
+ debug_proto_test/gen-rb/srv.rb
12
24
  ext/binary_protocol_accelerated.c
13
25
  ext/binary_protocol_accelerated.h
14
26
  ext/compact_protocol.c
@@ -70,6 +82,9 @@ spec/binary_protocol_spec_shared.rb
70
82
  spec/client_spec.rb
71
83
  spec/compact_protocol_spec.rb
72
84
  spec/exception_spec.rb
85
+ spec/gen-rb/nonblocking_service.rb
86
+ spec/gen-rb/thrift_spec_constants.rb
87
+ spec/gen-rb/thrift_spec_types.rb
73
88
  spec/http_client_spec.rb
74
89
  spec/mongrel_http_server_spec.rb
75
90
  spec/nonblocking_server_spec.rb
@@ -84,3 +99,5 @@ spec/struct_spec.rb
84
99
  spec/types_spec.rb
85
100
  spec/union_spec.rb
86
101
  spec/unix_socket_spec.rb
102
+ thrift.gemspec
103
+ tmp/thrift-0.7.0.gem
data/Rakefile CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  require 'rubygems'
21
21
  require 'rake'
22
- require 'spec/rake/spectask'
22
+ require 'rspec/core/rake_task'
23
23
 
24
24
  THRIFT = '../../compiler/cpp/thrift'
25
25
 
@@ -27,14 +27,12 @@ task :default => [:spec]
27
27
 
28
28
  task :spec => [:'gen-rb', :realspec]
29
29
 
30
- Spec::Rake::SpecTask.new(:realspec) do |t|
31
- t.spec_files = FileList['spec/**/*_spec.rb']
32
- t.spec_opts = ['--color']
30
+ RSpec::Core::RakeTask.new(:realspec) do |t|
31
+ t.rspec_opts = ['--color']
33
32
  end
34
33
 
35
- Spec::Rake::SpecTask.new(:'spec:rcov') do |t|
36
- t.spec_files = FileList['spec/**/*_spec.rb']
37
- t.spec_opts = ['--color']
34
+ RSpec::Core::RakeTask.new(:'spec:rcov') do |t|
35
+ t.rspec_opts = ['--color']
38
36
  t.rcov = true
39
37
  t.rcov_opts = ['--exclude', '^spec,/gems/']
40
38
  end
@@ -82,7 +80,7 @@ begin
82
80
  p.summary = "Ruby bindings for the Apache Thrift RPC system"
83
81
  p.url = "http://thrift.apache.org"
84
82
  p.include_rakefile = true
85
- p.version = "0.6.0"
83
+ p.version = "0.7.0"
86
84
  p.rubygems_version = ">= 1.2.0"
87
85
  end
88
86
 
@@ -0,0 +1,10 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.7.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'benchmark_types'
8
+
9
+ module ThriftBenchmark
10
+ end
@@ -0,0 +1,80 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.7.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'benchmark_types'
9
+
10
+ module ThriftBenchmark
11
+ module BenchmarkService
12
+ class Client
13
+ include ::Thrift::Client
14
+
15
+ def fibonacci(n)
16
+ send_fibonacci(n)
17
+ return recv_fibonacci()
18
+ end
19
+
20
+ def send_fibonacci(n)
21
+ send_message('fibonacci', Fibonacci_args, :n => n)
22
+ end
23
+
24
+ def recv_fibonacci()
25
+ result = receive_message(Fibonacci_result)
26
+ return result.success unless result.success.nil?
27
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fibonacci failed: unknown result')
28
+ end
29
+
30
+ end
31
+
32
+ class Processor
33
+ include ::Thrift::Processor
34
+
35
+ def process_fibonacci(seqid, iprot, oprot)
36
+ args = read_args(iprot, Fibonacci_args)
37
+ result = Fibonacci_result.new()
38
+ result.success = @handler.fibonacci(args.n)
39
+ write_result(result, oprot, 'fibonacci', seqid)
40
+ end
41
+
42
+ end
43
+
44
+ # HELPER FUNCTIONS AND STRUCTURES
45
+
46
+ class Fibonacci_args
47
+ include ::Thrift::Struct, ::Thrift::Struct_Union
48
+ N = 1
49
+
50
+ FIELDS = {
51
+ N => {:type => ::Thrift::Types::BYTE, :name => 'n'}
52
+ }
53
+
54
+ def struct_fields; FIELDS; end
55
+
56
+ def validate
57
+ end
58
+
59
+ ::Thrift::Struct.generate_accessors self
60
+ end
61
+
62
+ class Fibonacci_result
63
+ include ::Thrift::Struct, ::Thrift::Struct_Union
64
+ SUCCESS = 0
65
+
66
+ FIELDS = {
67
+ SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}
68
+ }
69
+
70
+ def struct_fields; FIELDS; end
71
+
72
+ def validate
73
+ end
74
+
75
+ ::Thrift::Struct.generate_accessors self
76
+ end
77
+
78
+ end
79
+
80
+ end
@@ -0,0 +1,9 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.7.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+
8
+ module ThriftBenchmark
9
+ end