es-scout 5.3.0.es1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. data/AUTHORS +4 -0
  2. data/CHANGELOG +225 -0
  3. data/COPYING +340 -0
  4. data/INSTALL +18 -0
  5. data/LICENSE +6 -0
  6. data/README +66 -0
  7. data/Rakefile +74 -0
  8. data/TODO +6 -0
  9. data/bin/es-scout +10 -0
  10. data/data/cacert.pem +3154 -0
  11. data/data/code_key.pub +13 -0
  12. data/data/gpl-2.0.txt +339 -0
  13. data/data/lgpl-2.1.txt +504 -0
  14. data/lib/es-scout/command/install.rb +68 -0
  15. data/lib/es-scout/command/run.rb +56 -0
  16. data/lib/es-scout/command/test.rb +62 -0
  17. data/lib/es-scout/command/troubleshoot.rb +142 -0
  18. data/lib/es-scout/command.rb +258 -0
  19. data/lib/es-scout/plugin.rb +237 -0
  20. data/lib/es-scout/plugin_options.rb +80 -0
  21. data/lib/es-scout/scout_logger.rb +19 -0
  22. data/lib/es-scout/server.rb +578 -0
  23. data/lib/es-scout.rb +11 -0
  24. data/vendor/json_pure/CHANGES +162 -0
  25. data/vendor/json_pure/COPYING +58 -0
  26. data/vendor/json_pure/GPL +340 -0
  27. data/vendor/json_pure/README +358 -0
  28. data/vendor/json_pure/Rakefile +292 -0
  29. data/vendor/json_pure/TODO +1 -0
  30. data/vendor/json_pure/VERSION +1 -0
  31. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  32. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  33. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  34. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  35. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  36. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  37. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  38. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  39. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  40. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  41. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  42. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  43. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  44. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  45. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  46. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  47. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  48. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  49. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  50. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  51. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  52. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  53. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  54. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  55. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  56. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  57. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  58. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  59. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  60. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  61. data/vendor/json_pure/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  62. data/vendor/json_pure/benchmarks/generator2_benchmark.rb +222 -0
  63. data/vendor/json_pure/benchmarks/generator_benchmark.rb +224 -0
  64. data/vendor/json_pure/benchmarks/ohai.json +1216 -0
  65. data/vendor/json_pure/benchmarks/ohai.ruby +1 -0
  66. data/vendor/json_pure/benchmarks/parser2_benchmark.rb +251 -0
  67. data/vendor/json_pure/benchmarks/parser_benchmark.rb +259 -0
  68. data/vendor/json_pure/bin/edit_json.rb +9 -0
  69. data/vendor/json_pure/bin/prettify_json.rb +75 -0
  70. data/vendor/json_pure/data/example.json +1 -0
  71. data/vendor/json_pure/data/index.html +38 -0
  72. data/vendor/json_pure/data/prototype.js +4184 -0
  73. data/vendor/json_pure/ext/json/ext/generator/extconf.rb +16 -0
  74. data/vendor/json_pure/ext/json/ext/generator/generator.c +1341 -0
  75. data/vendor/json_pure/ext/json/ext/generator/generator.h +170 -0
  76. data/vendor/json_pure/ext/json/ext/parser/extconf.rb +15 -0
  77. data/vendor/json_pure/ext/json/ext/parser/parser.c +1935 -0
  78. data/vendor/json_pure/ext/json/ext/parser/parser.h +71 -0
  79. data/vendor/json_pure/ext/json/ext/parser/parser.rl +792 -0
  80. data/vendor/json_pure/install.rb +26 -0
  81. data/vendor/json_pure/lib/json/Array.xpm +21 -0
  82. data/vendor/json_pure/lib/json/FalseClass.xpm +21 -0
  83. data/vendor/json_pure/lib/json/Hash.xpm +21 -0
  84. data/vendor/json_pure/lib/json/Key.xpm +73 -0
  85. data/vendor/json_pure/lib/json/NilClass.xpm +21 -0
  86. data/vendor/json_pure/lib/json/Numeric.xpm +28 -0
  87. data/vendor/json_pure/lib/json/String.xpm +96 -0
  88. data/vendor/json_pure/lib/json/TrueClass.xpm +21 -0
  89. data/vendor/json_pure/lib/json/add/core.rb +148 -0
  90. data/vendor/json_pure/lib/json/add/rails.rb +58 -0
  91. data/vendor/json_pure/lib/json/common.rb +397 -0
  92. data/vendor/json_pure/lib/json/editor.rb +1371 -0
  93. data/vendor/json_pure/lib/json/ext.rb +15 -0
  94. data/vendor/json_pure/lib/json/json.xpm +1499 -0
  95. data/vendor/json_pure/lib/json/pure/generator.rb +452 -0
  96. data/vendor/json_pure/lib/json/pure/parser.rb +307 -0
  97. data/vendor/json_pure/lib/json/pure.rb +77 -0
  98. data/vendor/json_pure/lib/json/version.rb +8 -0
  99. data/vendor/json_pure/lib/json.rb +10 -0
  100. data/vendor/json_pure/tests/fixtures/fail1.json +1 -0
  101. data/vendor/json_pure/tests/fixtures/fail10.json +1 -0
  102. data/vendor/json_pure/tests/fixtures/fail11.json +1 -0
  103. data/vendor/json_pure/tests/fixtures/fail12.json +1 -0
  104. data/vendor/json_pure/tests/fixtures/fail13.json +1 -0
  105. data/vendor/json_pure/tests/fixtures/fail14.json +1 -0
  106. data/vendor/json_pure/tests/fixtures/fail18.json +1 -0
  107. data/vendor/json_pure/tests/fixtures/fail19.json +1 -0
  108. data/vendor/json_pure/tests/fixtures/fail2.json +1 -0
  109. data/vendor/json_pure/tests/fixtures/fail20.json +1 -0
  110. data/vendor/json_pure/tests/fixtures/fail21.json +1 -0
  111. data/vendor/json_pure/tests/fixtures/fail22.json +1 -0
  112. data/vendor/json_pure/tests/fixtures/fail23.json +1 -0
  113. data/vendor/json_pure/tests/fixtures/fail24.json +1 -0
  114. data/vendor/json_pure/tests/fixtures/fail25.json +1 -0
  115. data/vendor/json_pure/tests/fixtures/fail27.json +2 -0
  116. data/vendor/json_pure/tests/fixtures/fail28.json +2 -0
  117. data/vendor/json_pure/tests/fixtures/fail3.json +1 -0
  118. data/vendor/json_pure/tests/fixtures/fail4.json +1 -0
  119. data/vendor/json_pure/tests/fixtures/fail5.json +1 -0
  120. data/vendor/json_pure/tests/fixtures/fail6.json +1 -0
  121. data/vendor/json_pure/tests/fixtures/fail7.json +1 -0
  122. data/vendor/json_pure/tests/fixtures/fail8.json +1 -0
  123. data/vendor/json_pure/tests/fixtures/fail9.json +1 -0
  124. data/vendor/json_pure/tests/fixtures/pass1.json +56 -0
  125. data/vendor/json_pure/tests/fixtures/pass15.json +1 -0
  126. data/vendor/json_pure/tests/fixtures/pass16.json +1 -0
  127. data/vendor/json_pure/tests/fixtures/pass17.json +1 -0
  128. data/vendor/json_pure/tests/fixtures/pass2.json +1 -0
  129. data/vendor/json_pure/tests/fixtures/pass26.json +1 -0
  130. data/vendor/json_pure/tests/fixtures/pass3.json +6 -0
  131. data/vendor/json_pure/tests/test_json.rb +340 -0
  132. data/vendor/json_pure/tests/test_json_addition.rb +162 -0
  133. data/vendor/json_pure/tests/test_json_encoding.rb +68 -0
  134. data/vendor/json_pure/tests/test_json_fixtures.rb +34 -0
  135. data/vendor/json_pure/tests/test_json_generate.rb +122 -0
  136. data/vendor/json_pure/tests/test_json_rails.rb +144 -0
  137. data/vendor/json_pure/tests/test_json_unicode.rb +76 -0
  138. data/vendor/json_pure/tools/fuzz.rb +139 -0
  139. data/vendor/json_pure/tools/server.rb +61 -0
  140. metadata +233 -0
@@ -0,0 +1,170 @@
1
+ #ifndef _GENERATOR_H_
2
+ #define _GENERATOR_H_
3
+
4
+ #include <string.h>
5
+ #include <assert.h>
6
+ #include <math.h>
7
+
8
+ #include "ruby.h"
9
+
10
+ #if HAVE_RUBY_RE_H
11
+ #include "ruby/re.h"
12
+ #endif
13
+
14
+ #if HAVE_RE_H
15
+ #include "re.h"
16
+ #endif
17
+
18
+ #ifdef HAVE_RUBY_ENCODING_H
19
+ #include "ruby/encoding.h"
20
+ #define FORCE_UTF8(obj) rb_enc_associate((obj), rb_utf8_encoding())
21
+ #else
22
+ #define FORCE_UTF8(obj)
23
+ #endif
24
+
25
+ #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
26
+
27
+ #ifndef RHASH_SIZE
28
+ #define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
29
+ #endif
30
+
31
+ #ifndef RFLOAT_VALUE
32
+ #define RFLOAT_VALUE(val) (RFLOAT(val)->value)
33
+ #endif
34
+
35
+ #ifndef RARRAY_PTR
36
+ #define RARRAY_PTR(ARRAY) RARRAY(ARRAY)->ptr
37
+ #endif
38
+ #ifndef RARRAY_LEN
39
+ #define RARRAY_LEN(ARRAY) RARRAY(ARRAY)->len
40
+ #endif
41
+ #ifndef RSTRING_PTR
42
+ #define RSTRING_PTR(string) RSTRING(string)->ptr
43
+ #endif
44
+ #ifndef RSTRING_LEN
45
+ #define RSTRING_LEN(string) RSTRING(string)->len
46
+ #endif
47
+
48
+ #define RSTRING_PAIR(string) RSTRING_PTR(string), RSTRING_LEN(string)
49
+
50
+ /* fbuffer implementation */
51
+
52
+ typedef struct FBufferStruct {
53
+ unsigned int initial_length;
54
+ char *ptr;
55
+ unsigned int len;
56
+ unsigned int capa;
57
+ } FBuffer;
58
+
59
+ #define FBUFFER_INITIAL_LENGTH 4096
60
+
61
+ #define FBUFFER_PTR(fb) (fb->ptr)
62
+ #define FBUFFER_LEN(fb) (fb->len)
63
+ #define FBUFFER_CAPA(fb) (fb->capa)
64
+ #define FBUFFER_PAIR(fb) FBUFFER_PTR(fb), FBUFFER_LEN(fb)
65
+
66
+ static char *fstrndup(const char *ptr, int len);
67
+ static FBuffer *fbuffer_alloc();
68
+ static FBuffer *fbuffer_alloc_with_length(unsigned initial_length);
69
+ static void fbuffer_free(FBuffer *fb);
70
+ static void fbuffer_free_only_buffer(FBuffer *fb);
71
+ static void fbuffer_clear(FBuffer *fb);
72
+ static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned int len);
73
+ static void fbuffer_append_long(FBuffer *fb, long number);
74
+ static void fbuffer_append_char(FBuffer *fb, char newchr);
75
+ static FBuffer *fbuffer_dup(FBuffer *fb);
76
+
77
+ /* unicode defintions */
78
+
79
+ #define UNI_STRICT_CONVERSION 1
80
+
81
+ typedef unsigned long UTF32; /* at least 32 bits */
82
+ typedef unsigned short UTF16; /* at least 16 bits */
83
+ typedef unsigned char UTF8; /* typically 8 bits */
84
+
85
+ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
86
+ #define UNI_MAX_BMP (UTF32)0x0000FFFF
87
+ #define UNI_MAX_UTF16 (UTF32)0x0010FFFF
88
+ #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
89
+ #define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
90
+
91
+ #define UNI_SUR_HIGH_START (UTF32)0xD800
92
+ #define UNI_SUR_HIGH_END (UTF32)0xDBFF
93
+ #define UNI_SUR_LOW_START (UTF32)0xDC00
94
+ #define UNI_SUR_LOW_END (UTF32)0xDFFF
95
+
96
+ static const int halfShift = 10; /* used for shifting by 10 bits */
97
+
98
+ static const UTF32 halfBase = 0x0010000UL;
99
+ static const UTF32 halfMask = 0x3FFUL;
100
+
101
+ static unsigned char isLegalUTF8(const UTF8 *source, int length);
102
+ static void unicode_escape(char *buf, UTF16 character);
103
+ static void unicode_escape_to_buffer(FBuffer *buffer, char buf[6], UTF16 character);
104
+ static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string);
105
+ static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string);
106
+
107
+ /* ruby api and some helpers */
108
+
109
+ typedef struct JSON_Generator_StateStruct {
110
+ char *indent;
111
+ long indent_len;
112
+ char *space;
113
+ long space_len;
114
+ char *space_before;
115
+ long space_before_len;
116
+ char *object_nl;
117
+ long object_nl_len;
118
+ char *array_nl;
119
+ long array_nl_len;
120
+ FBuffer *array_delim;
121
+ FBuffer *object_delim;
122
+ FBuffer *object_delim2;
123
+ long max_nesting;
124
+ char allow_nan;
125
+ char ascii_only;
126
+ } JSON_Generator_State;
127
+
128
+ #define GET_STATE(self) \
129
+ JSON_Generator_State *state; \
130
+ Data_Get_Struct(self, JSON_Generator_State, state)
131
+
132
+ static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self);
133
+ static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self);
134
+ static VALUE mInteger_to_json(int argc, VALUE *argv, VALUE self);
135
+ static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self);
136
+ static VALUE mString_included_s(VALUE self, VALUE modul);
137
+ static VALUE mString_to_json(int argc, VALUE *argv, VALUE self);
138
+ static VALUE mString_to_json_raw_object(VALUE self);
139
+ static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self);
140
+ static VALUE mString_Extend_json_create(VALUE self, VALUE o);
141
+ static VALUE mTrueClass_to_json(int argc, VALUE *argv, VALUE self);
142
+ static VALUE mFalseClass_to_json(int argc, VALUE *argv, VALUE self);
143
+ static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self);
144
+ static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self);
145
+ static void State_free(JSON_Generator_State *state);
146
+ static JSON_Generator_State *State_allocate();
147
+ static VALUE cState_s_allocate(VALUE klass);
148
+ static VALUE cState_configure(VALUE self, VALUE opts);
149
+ static VALUE cState_to_h(VALUE self);
150
+ static void generate_json(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj, long depth);
151
+ static VALUE cState_partial_generate(VALUE self, VALUE obj, VALUE depth);
152
+ static VALUE cState_generate(VALUE self, VALUE obj);
153
+ static VALUE cState_initialize(int argc, VALUE *argv, VALUE self);
154
+ static VALUE cState_from_state_s(VALUE self, VALUE opts);
155
+ static VALUE cState_indent(VALUE self);
156
+ static VALUE cState_indent_set(VALUE self, VALUE indent);
157
+ static VALUE cState_space(VALUE self);
158
+ static VALUE cState_space_set(VALUE self, VALUE space);
159
+ static VALUE cState_space_before(VALUE self);
160
+ static VALUE cState_space_before_set(VALUE self, VALUE space_before);
161
+ static VALUE cState_object_nl(VALUE self);
162
+ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl);
163
+ static VALUE cState_array_nl(VALUE self);
164
+ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl);
165
+ static VALUE cState_max_nesting(VALUE self);
166
+ static VALUE cState_max_nesting_set(VALUE self, VALUE depth);
167
+ static VALUE cState_allow_nan_p(VALUE self);
168
+ static VALUE cState_ascii_only_p(VALUE self);
169
+
170
+ #endif
@@ -0,0 +1,15 @@
1
+ require 'mkmf'
2
+ require 'rbconfig'
3
+
4
+ unless $CFLAGS.gsub!(/ -O[\dsz]?/, ' -O3')
5
+ $CFLAGS << ' -O3'
6
+ end
7
+ if CONFIG['CC'] =~ /gcc/
8
+ $CFLAGS << ' -Wall'
9
+ #unless $CFLAGS.gsub!(/ -O[\dsz]?/, ' -O0 -ggdb')
10
+ # $CFLAGS << ' -O0 -ggdb'
11
+ #end
12
+ end
13
+
14
+ have_header("re.h")
15
+ create_makefile 'json/ext/parser'