log_simulator 0.0.7 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.idea/.rakeTasks +1 -1
- data/.idea/log_simulator.iml +14 -38
- data/.idea/workspace.xml +151 -112
- data/Rakefile +0 -1
- data/bin/simulate +32 -9
- data/lib/log_simulator.rb +0 -40
- data/lib/log_simulator/version.rb +1 -1
- data/lib/peak_log_simulator.rb +42 -0
- data/lib/resolve.rb +78 -0
- data/lib/socket_connetion.rb +14 -0
- data/log_simulator.gemspec +1 -0
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 429b3fe1ad72fc41fbec72ac36357d75518db80b
|
|
4
|
+
data.tar.gz: aa840868d35dfa9401aeae9be8ff9110e9dd3cf0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d118ea05eb31aac6020782e3945a3ef1d5fec082c6bec6ee504989165d9d857849c7e93ddaa85124e021f13930042aea3b18b1b230ba8fa874327d052e706f5a
|
|
7
|
+
data.tar.gz: 424be1e6282338ae92d4e914f071c5cd57a6125927ca92e81c40eb5b008ddefea625fe8b0e3f079e7ed20efbad1a9fce344711b26f9e340ca06a68ae81d12bfe
|
data/.gitignore
CHANGED
data/.idea/.rakeTasks
CHANGED
|
@@ -4,4 +4,4 @@ You are allowed to:
|
|
|
4
4
|
1. Remove rake task
|
|
5
5
|
2. Add existing rake tasks
|
|
6
6
|
To add existing rake tasks automatically delete this file and reload the project.
|
|
7
|
-
--><RakeGroup description="" fullCmd="" taksId="rake"
|
|
7
|
+
--><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
|
data/.idea/log_simulator.iml
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<module type="RUBY_MODULE" version="4">
|
|
3
|
-
<component name="CompassSettings">
|
|
4
|
-
<option name="compassSupportEnabled" value="true" />
|
|
5
|
-
</component>
|
|
6
3
|
<component name="FacetManager">
|
|
7
4
|
<facet type="gem" name="Ruby Gem">
|
|
8
5
|
<configuration>
|
|
@@ -13,37 +10,13 @@
|
|
|
13
10
|
</facet>
|
|
14
11
|
</component>
|
|
15
12
|
<component name="ModuleRunConfigurationManager">
|
|
16
|
-
<configuration default="false" name="
|
|
17
|
-
<module name="log_simulator" />
|
|
18
|
-
<COMMAND_RUN_CONFIGURATION NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
19
|
-
<COMMAND_RUN_CONFIGURATION NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
|
20
|
-
<COMMAND_RUN_CONFIGURATION NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
21
|
-
<COMMAND_RUN_CONFIGURATION NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
22
|
-
<COMMAND_RUN_CONFIGURATION NAME="myPassParentEnvs" VALUE="true" />
|
|
23
|
-
<envs />
|
|
24
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
25
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
26
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
27
|
-
<COVERAGE_PATTERN ENABLED="true">
|
|
28
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
29
|
-
</COVERAGE_PATTERN>
|
|
30
|
-
</EXTENSION>
|
|
31
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
32
|
-
<COMMAND_CONFIG_SETTINGS_ID NAME="GEM_NAME" VALUE="bundler" />
|
|
33
|
-
<COMMAND_CONFIG_SETTINGS_ID NAME="EXECUTABLE_NAME" VALUE="gem" />
|
|
34
|
-
<COMMAND_CONFIG_SETTINGS_ID NAME="EXECUTABLE_ARGS" VALUE="install ./log_simulator-0.0.1.gem" />
|
|
35
|
-
<COMMAND_CONFIG_SETTINGS_ID NAME="WORKING_DIR" VALUE="install ./log_simulator-0.0.1.gem" />
|
|
36
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
|
37
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
|
38
|
-
<method />
|
|
39
|
-
</configuration>
|
|
40
|
-
<configuration default="false" name="IRB console: log_simulator" type="IrbRunConfigurationType" factoryName="IRB console" singleton="true">
|
|
13
|
+
<configuration default="false" name="install" type="RakeRunConfigurationType" factoryName="Rake">
|
|
41
14
|
<module name="log_simulator" />
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
<
|
|
15
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
|
|
16
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
|
17
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
18
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
19
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
47
20
|
<envs />
|
|
48
21
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
49
22
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
@@ -53,9 +26,12 @@
|
|
|
53
26
|
</COVERAGE_PATTERN>
|
|
54
27
|
</EXTENSION>
|
|
55
28
|
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
<
|
|
29
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="install" />
|
|
30
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
|
31
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
|
32
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
|
33
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
|
34
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
|
59
35
|
<RunnerSettings RunnerId="RubyRunner" />
|
|
60
36
|
<ConfigurationWrapper RunnerId="RubyRunner" />
|
|
61
37
|
<method />
|
|
@@ -68,6 +44,6 @@
|
|
|
68
44
|
<orderEntry type="inheritedJdk" />
|
|
69
45
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
70
46
|
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.1, RVM: ruby-2.1.1) [gem]" level="application" />
|
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, RVM: ruby-2.1.1) [gem]" level="application" />
|
|
71
48
|
</component>
|
|
72
|
-
</module>
|
|
73
|
-
|
|
49
|
+
</module>
|
data/.idea/workspace.xml
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
<list default="true" id="c4919474-0513-45a2-9ca7-21cec1e69c82" name="Default" comment="" />
|
|
5
5
|
<ignored path="log_simulator.iws" />
|
|
6
6
|
<ignored path=".idea/workspace.xml" />
|
|
7
|
+
<ignored path=".idea/dataSources.local.xml" />
|
|
8
|
+
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
|
7
9
|
<option name="TRACKING_ENABLED" value="true" />
|
|
8
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
9
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -12,9 +14,10 @@
|
|
|
12
14
|
</component>
|
|
13
15
|
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
|
14
16
|
<component name="CoverageDataManager">
|
|
15
|
-
<SUITE FILE_PATH="coverage/log_simulator@
|
|
16
|
-
<SUITE FILE_PATH="coverage/log_simulator@Install_Gem.coverage" NAME="Install Gem Coverage Results" MODIFIED="1414885298687" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="log_simulator" />
|
|
17
|
+
<SUITE FILE_PATH="coverage/log_simulator@install.coverage" NAME="install Coverage Results" MODIFIED="1423586810227" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="log_simulator" />
|
|
17
18
|
<SUITE FILE_PATH="coverage/log_simulator@Unnamed.coverage" NAME="Unnamed Coverage Results" MODIFIED="1414862460976" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" MODULE_NAME="log_simulator" />
|
|
19
|
+
<SUITE FILE_PATH="coverage/log_simulator@Install_Gem.coverage" NAME="Install Gem Coverage Results" MODIFIED="1414885298687" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="log_simulator" />
|
|
20
|
+
<SUITE FILE_PATH="coverage/log_simulator@IRB_console__log_simulator.coverage" NAME="IRB console: log_simulator Coverage Results" MODIFIED="1414926488043" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="log_simulator" />
|
|
18
21
|
</component>
|
|
19
22
|
<component name="CreatePatchCommitExecutor">
|
|
20
23
|
<option name="PATCH_PATH" value="" />
|
|
@@ -28,31 +31,21 @@
|
|
|
28
31
|
</component>
|
|
29
32
|
<component name="FileEditorManager">
|
|
30
33
|
<leaf>
|
|
31
|
-
<file leaf-file-name="simulate" pinned="false" current
|
|
34
|
+
<file leaf-file-name="simulate" pinned="false" current-in-tab="false">
|
|
32
35
|
<entry file="file://$PROJECT_DIR$/bin/simulate">
|
|
33
36
|
<provider selected="true" editor-type-id="text-editor">
|
|
34
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="
|
|
35
|
-
<caret line="
|
|
36
|
-
<folding />
|
|
37
|
-
</state>
|
|
38
|
-
</provider>
|
|
39
|
-
</entry>
|
|
40
|
-
</file>
|
|
41
|
-
<file leaf-file-name="log_simulator.rb" pinned="false" current="true" current-in-tab="true">
|
|
42
|
-
<entry file="file://$PROJECT_DIR$/lib/log_simulator.rb">
|
|
43
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
44
|
-
<state vertical-scroll-proportion="0.10169491" vertical-offset="0" max-vertical-offset="1062">
|
|
45
|
-
<caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
|
|
37
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="51" max-vertical-offset="1026">
|
|
38
|
+
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
|
46
39
|
<folding />
|
|
47
40
|
</state>
|
|
48
41
|
</provider>
|
|
49
42
|
</entry>
|
|
50
43
|
</file>
|
|
51
|
-
<file leaf-file-name="
|
|
52
|
-
<entry file="file://$PROJECT_DIR$/
|
|
44
|
+
<file leaf-file-name="log_simulator.gemspec" pinned="false" current-in-tab="true">
|
|
45
|
+
<entry file="file://$PROJECT_DIR$/log_simulator.gemspec">
|
|
53
46
|
<provider selected="true" editor-type-id="text-editor">
|
|
54
|
-
<state vertical-scroll-proportion="0.
|
|
55
|
-
<caret line="
|
|
47
|
+
<state vertical-scroll-proportion="0.42461538" vertical-offset="0" max-vertical-offset="975">
|
|
48
|
+
<caret line="23" column="3" selection-start-line="23" selection-start-column="3" selection-end-line="23" selection-end-column="3" />
|
|
56
49
|
<folding />
|
|
57
50
|
</state>
|
|
58
51
|
</provider>
|
|
@@ -66,15 +59,22 @@
|
|
|
66
59
|
</FindUsagesManager>
|
|
67
60
|
</component>
|
|
68
61
|
<component name="IdeDocumentHistory">
|
|
69
|
-
<option name="
|
|
62
|
+
<option name="CHANGED_PATHS">
|
|
70
63
|
<list>
|
|
71
|
-
<option value="$PROJECT_DIR$/
|
|
64
|
+
<option value="$PROJECT_DIR$/Rakefile" />
|
|
65
|
+
<option value="$PROJECT_DIR$/lib/socket_connetion.rb" />
|
|
66
|
+
<option value="$PROJECT_DIR$/lib/log_simulator.rb" />
|
|
67
|
+
<option value="$PROJECT_DIR$/lib/resolve.rb" />
|
|
68
|
+
<option value="$PROJECT_DIR$/lib/peak_log_simulator.rb" />
|
|
72
69
|
<option value="$PROJECT_DIR$/bin/simulate" />
|
|
73
70
|
<option value="$PROJECT_DIR$/lib/log_simulator/version.rb" />
|
|
74
|
-
<option value="$PROJECT_DIR$/
|
|
71
|
+
<option value="$PROJECT_DIR$/log_simulator.gemspec" />
|
|
75
72
|
</list>
|
|
76
73
|
</option>
|
|
77
74
|
</component>
|
|
75
|
+
<component name="JsGulpfileManager">
|
|
76
|
+
<detection-done>true</detection-done>
|
|
77
|
+
</component>
|
|
78
78
|
<component name="ProjectFrameBounds">
|
|
79
79
|
<option name="y" value="23" />
|
|
80
80
|
<option name="width" value="2560" />
|
|
@@ -144,24 +144,6 @@
|
|
|
144
144
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
145
145
|
</PATH_ELEMENT>
|
|
146
146
|
</PATH>
|
|
147
|
-
<PATH>
|
|
148
|
-
<PATH_ELEMENT>
|
|
149
|
-
<option name="myItemId" value="log_simulator" />
|
|
150
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
151
|
-
</PATH_ELEMENT>
|
|
152
|
-
<PATH_ELEMENT>
|
|
153
|
-
<option name="myItemId" value="log_simulator" />
|
|
154
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
155
|
-
</PATH_ELEMENT>
|
|
156
|
-
<PATH_ELEMENT>
|
|
157
|
-
<option name="myItemId" value="lib" />
|
|
158
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
159
|
-
</PATH_ELEMENT>
|
|
160
|
-
<PATH_ELEMENT>
|
|
161
|
-
<option name="myItemId" value="log_simulator" />
|
|
162
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
163
|
-
</PATH_ELEMENT>
|
|
164
|
-
</PATH>
|
|
165
147
|
<PATH>
|
|
166
148
|
<PATH_ELEMENT>
|
|
167
149
|
<option name="myItemId" value="log_simulator" />
|
|
@@ -185,7 +167,7 @@
|
|
|
185
167
|
<property name="recentsLimit" value="5" />
|
|
186
168
|
<property name="restartRequiresConfirmation" value="false" />
|
|
187
169
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/bin/simulate" />
|
|
188
|
-
<property name="options.lastSelected" value="
|
|
170
|
+
<property name="options.lastSelected" value="editor.preferences.appearance" />
|
|
189
171
|
<property name="options.splitter.main.proportions" value="0.3" />
|
|
190
172
|
<property name="options.splitter.details.proportions" value="0.2" />
|
|
191
173
|
<property name="options.searchVisible" value="true" />
|
|
@@ -199,7 +181,31 @@
|
|
|
199
181
|
<recent name="$PROJECT_DIR$/bin" />
|
|
200
182
|
</key>
|
|
201
183
|
</component>
|
|
202
|
-
<component name="RunManager" selected="
|
|
184
|
+
<component name="RunManager" selected="Rake.install">
|
|
185
|
+
<configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
|
|
186
|
+
<module name="log_simulator" />
|
|
187
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
188
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
189
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
190
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
191
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
192
|
+
<envs />
|
|
193
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
194
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
195
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
196
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
197
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
198
|
+
</COVERAGE_PATTERN>
|
|
199
|
+
</EXTENSION>
|
|
200
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
201
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
|
|
202
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
|
203
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
|
204
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
|
205
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
|
206
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
|
207
|
+
<method />
|
|
208
|
+
</configuration>
|
|
203
209
|
<configuration default="true" type="CommandRunConfigurationType" factoryName="Gem Command">
|
|
204
210
|
<module name="" />
|
|
205
211
|
<COMMAND_RUN_CONFIGURATION NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
@@ -222,13 +228,14 @@
|
|
|
222
228
|
<COMMAND_CONFIG_SETTINGS_ID NAME="WORKING_DIR" VALUE="" />
|
|
223
229
|
<method />
|
|
224
230
|
</configuration>
|
|
225
|
-
<configuration default="true" type="
|
|
231
|
+
<configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
|
|
232
|
+
<predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
|
|
226
233
|
<module name="" />
|
|
227
|
-
<
|
|
228
|
-
<
|
|
229
|
-
<
|
|
230
|
-
<
|
|
231
|
-
<
|
|
234
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
235
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
236
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
237
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
238
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
232
239
|
<envs />
|
|
233
240
|
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
234
241
|
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
@@ -238,12 +245,13 @@
|
|
|
238
245
|
</COVERAGE_PATTERN>
|
|
239
246
|
</EXTENSION>
|
|
240
247
|
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
241
|
-
<
|
|
242
|
-
<
|
|
243
|
-
<
|
|
244
|
-
<
|
|
245
|
-
<
|
|
246
|
-
<
|
|
248
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
|
|
249
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
|
|
250
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
|
|
251
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
|
|
252
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
|
|
253
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
|
|
254
|
+
<RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
|
|
247
255
|
<method />
|
|
248
256
|
</configuration>
|
|
249
257
|
<configuration default="true" type="CapistranoRunConfigurationType" factoryName="Capistrano">
|
|
@@ -428,9 +436,34 @@
|
|
|
428
436
|
<SPORK_RUN_CONFIG NAME="SPORK_RUN_CONFIG" VALUE="RSPEC" />
|
|
429
437
|
<method />
|
|
430
438
|
</configuration>
|
|
431
|
-
<
|
|
432
|
-
<
|
|
433
|
-
<
|
|
439
|
+
<configuration default="false" name="install" type="RakeRunConfigurationType" factoryName="Rake">
|
|
440
|
+
<module name="log_simulator" />
|
|
441
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
|
|
442
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
|
443
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
444
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
445
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
446
|
+
<envs />
|
|
447
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
448
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
449
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
450
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
451
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
452
|
+
</COVERAGE_PATTERN>
|
|
453
|
+
</EXTENSION>
|
|
454
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
455
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="install" />
|
|
456
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
|
|
457
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
|
|
458
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
|
|
459
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
|
|
460
|
+
<RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
|
|
461
|
+
<RunnerSettings RunnerId="RubyRunner" />
|
|
462
|
+
<ConfigurationWrapper RunnerId="RubyRunner" />
|
|
463
|
+
<method />
|
|
464
|
+
</configuration>
|
|
465
|
+
<list size="1">
|
|
466
|
+
<item index="0" class="java.lang.String" itemvalue="Rake.install" />
|
|
434
467
|
</list>
|
|
435
468
|
</component>
|
|
436
469
|
<component name="ShelveChangesManager" show_recycled="false" />
|
|
@@ -441,32 +474,35 @@
|
|
|
441
474
|
<task active="true" id="Default" summary="Default task">
|
|
442
475
|
<changelist id="c4919474-0513-45a2-9ca7-21cec1e69c82" name="Default" comment="" />
|
|
443
476
|
<created>1414845216526</created>
|
|
477
|
+
<option name="number" value="Default" />
|
|
444
478
|
<updated>1414845216526</updated>
|
|
445
479
|
</task>
|
|
446
480
|
<servers />
|
|
447
481
|
</component>
|
|
448
482
|
<component name="ToolWindowManager">
|
|
449
|
-
<frame x="0" y="23" width="2560" height="1417" extended-state="
|
|
483
|
+
<frame x="0" y="23" width="2560" height="1417" extended-state="0" />
|
|
450
484
|
<editor active="true" />
|
|
451
485
|
<layout>
|
|
452
486
|
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
453
|
-
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.
|
|
454
|
-
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
487
|
+
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24130106" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
455
488
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
456
|
-
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
457
|
-
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.14694202" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
458
489
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
490
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24130106" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
|
459
491
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
|
460
|
-
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
|
461
|
-
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.17549168" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
462
492
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
|
493
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32980332" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
|
494
|
+
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
495
|
+
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
496
|
+
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
|
497
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.1457506" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
498
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.17549168" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
463
499
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
|
464
500
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
465
|
-
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917318" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
466
501
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
502
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32917318" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
467
503
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
|
468
|
-
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
|
469
504
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
|
505
|
+
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
|
470
506
|
</layout>
|
|
471
507
|
</component>
|
|
472
508
|
<component name="Vcs.Log.UiProperties">
|
|
@@ -487,32 +523,9 @@
|
|
|
487
523
|
</component>
|
|
488
524
|
<component name="XDebuggerManager">
|
|
489
525
|
<breakpoint-manager />
|
|
526
|
+
<watches-manager />
|
|
490
527
|
</component>
|
|
491
528
|
<component name="editorHistoryManager">
|
|
492
|
-
<entry file="file://$PROJECT_DIR$/bin/simulate">
|
|
493
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
494
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="378" max-vertical-offset="612">
|
|
495
|
-
<caret line="21" column="58" selection-start-line="21" selection-start-column="2" selection-end-line="21" selection-end-column="58" />
|
|
496
|
-
<folding />
|
|
497
|
-
</state>
|
|
498
|
-
</provider>
|
|
499
|
-
</entry>
|
|
500
|
-
<entry file="file://$PROJECT_DIR$/lib/log_simulator.rb">
|
|
501
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
502
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="324" max-vertical-offset="882">
|
|
503
|
-
<caret line="18" column="0" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
|
|
504
|
-
<folding />
|
|
505
|
-
</state>
|
|
506
|
-
</provider>
|
|
507
|
-
</entry>
|
|
508
|
-
<entry file="file://$PROJECT_DIR$/lib/log_simulator/version.rb">
|
|
509
|
-
<provider selected="true" editor-type-id="text-editor">
|
|
510
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="54" max-vertical-offset="162">
|
|
511
|
-
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
|
512
|
-
<folding />
|
|
513
|
-
</state>
|
|
514
|
-
</provider>
|
|
515
|
-
</entry>
|
|
516
529
|
<entry file="file://$PROJECT_DIR$/bin/simulate">
|
|
517
530
|
<provider selected="true" editor-type-id="text-editor">
|
|
518
531
|
<state vertical-scroll-proportion="0.0" vertical-offset="450" max-vertical-offset="612">
|
|
@@ -523,7 +536,7 @@
|
|
|
523
536
|
</entry>
|
|
524
537
|
<entry file="file://$PROJECT_DIR$/lib/log_simulator.rb">
|
|
525
538
|
<provider selected="true" editor-type-id="text-editor">
|
|
526
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="324" max-vertical-offset="
|
|
539
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="324" max-vertical-offset="900">
|
|
527
540
|
<caret line="18" column="0" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
|
|
528
541
|
<folding />
|
|
529
542
|
</state>
|
|
@@ -531,8 +544,8 @@
|
|
|
531
544
|
</entry>
|
|
532
545
|
<entry file="file://$PROJECT_DIR$/lib/log_simulator/version.rb">
|
|
533
546
|
<provider selected="true" editor-type-id="text-editor">
|
|
534
|
-
<state vertical-scroll-proportion="0.0" vertical-offset="
|
|
535
|
-
<caret line="
|
|
547
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="162">
|
|
548
|
+
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
|
536
549
|
<folding />
|
|
537
550
|
</state>
|
|
538
551
|
</provider>
|
|
@@ -572,6 +585,7 @@
|
|
|
572
585
|
<provider selected="true" editor-type-id="text-editor">
|
|
573
586
|
<state vertical-scroll-proportion="0.0" vertical-offset="234" max-vertical-offset="522">
|
|
574
587
|
<caret line="13" column="28" selection-start-line="13" selection-start-column="28" selection-end-line="13" selection-end-column="28" />
|
|
588
|
+
<folding />
|
|
575
589
|
</state>
|
|
576
590
|
</provider>
|
|
577
591
|
</entry>
|
|
@@ -630,51 +644,76 @@
|
|
|
630
644
|
</state>
|
|
631
645
|
</provider>
|
|
632
646
|
</entry>
|
|
633
|
-
<entry file="file://$PROJECT_DIR
|
|
647
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
|
634
648
|
<provider selected="true" editor-type-id="text-editor">
|
|
635
|
-
<state vertical-scroll-proportion="0.
|
|
636
|
-
<caret line="
|
|
649
|
+
<state vertical-scroll-proportion="0.32258064" vertical-offset="0" max-vertical-offset="837">
|
|
650
|
+
<caret line="15" column="3" selection-start-line="15" selection-start-column="3" selection-end-line="15" selection-end-column="3" />
|
|
637
651
|
</state>
|
|
638
652
|
</provider>
|
|
639
653
|
</entry>
|
|
640
|
-
<entry file="file://$PROJECT_DIR$/
|
|
654
|
+
<entry file="file://$PROJECT_DIR$/lib/socket_connetion.rb">
|
|
641
655
|
<provider selected="true" editor-type-id="text-editor">
|
|
642
|
-
<state vertical-scroll-proportion="0.
|
|
643
|
-
<caret line="
|
|
656
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="342">
|
|
657
|
+
<caret line="3" column="23" selection-start-line="3" selection-start-column="23" selection-end-line="3" selection-end-column="23" />
|
|
658
|
+
<folding />
|
|
644
659
|
</state>
|
|
645
660
|
</provider>
|
|
646
661
|
</entry>
|
|
647
|
-
<entry file="file://$PROJECT_DIR
|
|
662
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
|
648
663
|
<provider selected="true" editor-type-id="text-editor">
|
|
649
|
-
<state vertical-scroll-proportion="0.
|
|
650
|
-
<caret line="
|
|
664
|
+
<state vertical-scroll-proportion="0.02278481" vertical-offset="0" max-vertical-offset="790">
|
|
665
|
+
<caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
|
|
666
|
+
<folding />
|
|
651
667
|
</state>
|
|
652
668
|
</provider>
|
|
653
669
|
</entry>
|
|
654
|
-
<entry file="file://$PROJECT_DIR$/
|
|
670
|
+
<entry file="file://$PROJECT_DIR$/lib/log_simulator/version.rb">
|
|
655
671
|
<provider selected="true" editor-type-id="text-editor">
|
|
656
|
-
<state vertical-scroll-proportion="0.
|
|
657
|
-
<caret line="
|
|
672
|
+
<state vertical-scroll-proportion="0.018461538" vertical-offset="0" max-vertical-offset="975">
|
|
673
|
+
<caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
|
|
658
674
|
<folding />
|
|
659
675
|
</state>
|
|
660
676
|
</provider>
|
|
661
677
|
</entry>
|
|
662
|
-
<entry file="file://$PROJECT_DIR$/lib/
|
|
678
|
+
<entry file="file://$PROJECT_DIR$/lib/resolve.rb">
|
|
663
679
|
<provider selected="true" editor-type-id="text-editor">
|
|
664
|
-
<state vertical-scroll-proportion="0.
|
|
665
|
-
<caret line="
|
|
680
|
+
<state vertical-scroll-proportion="0.41743588" vertical-offset="403" max-vertical-offset="1512">
|
|
681
|
+
<caret line="45" column="25" selection-start-line="45" selection-start-column="25" selection-end-line="45" selection-end-column="25" />
|
|
666
682
|
<folding />
|
|
667
683
|
</state>
|
|
668
684
|
</provider>
|
|
669
685
|
</entry>
|
|
670
686
|
<entry file="file://$PROJECT_DIR$/lib/log_simulator.rb">
|
|
671
687
|
<provider selected="true" editor-type-id="text-editor">
|
|
672
|
-
<state vertical-scroll-proportion="0.
|
|
673
|
-
<caret line="
|
|
688
|
+
<state vertical-scroll-proportion="0.055384614" vertical-offset="0" max-vertical-offset="975">
|
|
689
|
+
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
|
690
|
+
<folding />
|
|
691
|
+
</state>
|
|
692
|
+
</provider>
|
|
693
|
+
</entry>
|
|
694
|
+
<entry file="file://$PROJECT_DIR$/lib/peak_log_simulator.rb">
|
|
695
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
696
|
+
<state vertical-scroll-proportion="0.5723077" vertical-offset="0" max-vertical-offset="975">
|
|
697
|
+
<caret line="31" column="16" selection-start-line="31" selection-start-column="16" selection-end-line="31" selection-end-column="16" />
|
|
698
|
+
<folding />
|
|
699
|
+
</state>
|
|
700
|
+
</provider>
|
|
701
|
+
</entry>
|
|
702
|
+
<entry file="file://$PROJECT_DIR$/bin/simulate">
|
|
703
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
704
|
+
<state vertical-scroll-proportion="0.0" vertical-offset="51" max-vertical-offset="1026">
|
|
705
|
+
<caret line="15" column="0" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
|
|
706
|
+
<folding />
|
|
707
|
+
</state>
|
|
708
|
+
</provider>
|
|
709
|
+
</entry>
|
|
710
|
+
<entry file="file://$PROJECT_DIR$/log_simulator.gemspec">
|
|
711
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
712
|
+
<state vertical-scroll-proportion="0.42461538" vertical-offset="0" max-vertical-offset="975">
|
|
713
|
+
<caret line="23" column="3" selection-start-line="23" selection-start-column="3" selection-end-line="23" selection-end-column="3" />
|
|
674
714
|
<folding />
|
|
675
715
|
</state>
|
|
676
716
|
</provider>
|
|
677
717
|
</entry>
|
|
678
718
|
</component>
|
|
679
|
-
</project>
|
|
680
|
-
|
|
719
|
+
</project>
|
data/Rakefile
CHANGED
data/bin/simulate
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
3
|
require 'optparse'
|
|
4
|
-
require '
|
|
4
|
+
require 'peak_log_simulator'
|
|
5
|
+
require 'resolve'
|
|
6
|
+
require 'socket_connetion'
|
|
5
7
|
|
|
6
|
-
timescale
|
|
8
|
+
options={:filepath => nil ,:timescale => 1.0}
|
|
7
9
|
|
|
8
10
|
opts = OptionParser.new do |opts|
|
|
9
11
|
opts.banner = "Usage: simulate [logfile path] [options]"
|
|
10
12
|
|
|
11
13
|
opts.on('-t time',Float,'timescale. Default is 1.0') do |time|
|
|
12
|
-
timescale = time
|
|
14
|
+
options[:timescale] = time
|
|
13
15
|
end
|
|
14
16
|
|
|
15
17
|
opts.on_tail('-h', '--help', 'Show this message') { puts opts; exit }
|
|
@@ -17,12 +19,33 @@ end
|
|
|
17
19
|
|
|
18
20
|
opts.parse!(ARGV)
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
if
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
# empty option set
|
|
23
|
+
# if STDIN.tty?
|
|
24
|
+
# puts opts.help
|
|
25
|
+
# exit 1
|
|
26
|
+
# end
|
|
27
|
+
|
|
28
|
+
unless ARGV.empty?
|
|
29
|
+
options[:filepath] = ARGV.pop(ARGV.count)[0]
|
|
26
30
|
end
|
|
27
31
|
|
|
32
|
+
LogSimulator::Resolver.select_target(2.0) do |target|
|
|
33
|
+
socket_connection = LogSimulator::SocketConnetion.new(target.target_name,target.port)
|
|
34
|
+
|
|
35
|
+
unless options[:filepath].nil?
|
|
36
|
+
LogSimulator::PeakLogSimulator.start(socket_connection.socket,options[:filepath],options[:timescale]) do |success|
|
|
37
|
+
while true #TODO: make it DRY
|
|
38
|
+
print '>'
|
|
39
|
+
message = gets.chomp
|
|
40
|
+
socket_connection.socket.puts message
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
else
|
|
44
|
+
while true
|
|
45
|
+
print '>'
|
|
46
|
+
message = gets.chomp
|
|
47
|
+
socket_connection.socket.puts message
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
28
51
|
|
data/lib/log_simulator.rb
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
1
|
require 'socket'
|
|
2
2
|
|
|
3
3
|
module LogSimulator
|
|
4
|
-
class PlusLogSimulator
|
|
5
4
|
|
|
6
|
-
def self.start(filepath,timescale)
|
|
7
|
-
begin
|
|
8
|
-
socket = TCPSocket.new 'localhost',7658
|
|
9
|
-
rescue Exception => _
|
|
10
|
-
socket = nil
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
path = File.expand_path(filepath)
|
|
14
|
-
puts "Opening log file at path: " + path
|
|
15
|
-
|
|
16
|
-
if !File.exist? path
|
|
17
|
-
puts 'No such file at path '+ path
|
|
18
|
-
return
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
time = 0
|
|
22
|
-
File.open(path,'r+:utf-8') do |file|
|
|
23
|
-
file.each_line do |line|
|
|
24
|
-
timestamp_parse(line) do |_time,message|
|
|
25
|
-
if time != 0
|
|
26
|
-
sleep (_time - time) * timescale
|
|
27
|
-
end
|
|
28
|
-
if socket != nil
|
|
29
|
-
socket.puts message
|
|
30
|
-
end
|
|
31
|
-
puts '<' + message
|
|
32
|
-
time = _time
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
def self.timestamp_parse (line)
|
|
39
|
-
line.scan(/N\|(\d+)\|RECEIVE << (.*)/) do |timeStr,message|
|
|
40
|
-
yield timeStr.to_i,message
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
end
|
|
45
5
|
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require 'socket'
|
|
2
|
+
|
|
3
|
+
module LogSimulator
|
|
4
|
+
class PeakLogSimulator
|
|
5
|
+
|
|
6
|
+
def self.start(socket,filepath,timescale)
|
|
7
|
+
path = File.expand_path(filepath)
|
|
8
|
+
puts 'Opening log file at path: ' + path
|
|
9
|
+
|
|
10
|
+
unless File.exist? path
|
|
11
|
+
puts 'No such file at path '+ path
|
|
12
|
+
yield false
|
|
13
|
+
return
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
time = 0
|
|
17
|
+
File.open(path,'r+:utf-8') do |file|
|
|
18
|
+
file.each_line do |line|
|
|
19
|
+
timestamp_parse(line) do |_time,message|
|
|
20
|
+
if time != 0
|
|
21
|
+
sleep (_time - time) * timescale
|
|
22
|
+
end
|
|
23
|
+
if socket != nil
|
|
24
|
+
socket.puts message
|
|
25
|
+
end
|
|
26
|
+
puts '<' + message
|
|
27
|
+
time = _time
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
yield true
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.timestamp_parse (line)
|
|
36
|
+
line.scan(/N\|(\d+)\|RECEIVE << (.*)/) do |timeStr,message|
|
|
37
|
+
yield timeStr.to_i,message
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
end
|
data/lib/resolve.rb
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'dnssd'
|
|
4
|
+
require 'socket'
|
|
5
|
+
|
|
6
|
+
module LogSimulator
|
|
7
|
+
class Target
|
|
8
|
+
attr_accessor :name,:target_name,:port
|
|
9
|
+
|
|
10
|
+
def initialize(name,target_name,port)
|
|
11
|
+
@name = name
|
|
12
|
+
@target_name = target_name
|
|
13
|
+
@port = port
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def eql?(o)
|
|
17
|
+
self == o
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def ==(o)
|
|
21
|
+
o.class == self.class && o.target_name == @target_name && o.port == @port
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def hash
|
|
25
|
+
@target_name.hash
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class Resolver
|
|
30
|
+
def self.select_target(scan_time)
|
|
31
|
+
self.resolve_service(scan_time) do |found_targets|
|
|
32
|
+
if found_targets.count <= 0
|
|
33
|
+
puts 'no possible target found!'
|
|
34
|
+
elsif found_targets.count == 1
|
|
35
|
+
target = found_targets[0]
|
|
36
|
+
yield target
|
|
37
|
+
else
|
|
38
|
+
puts 'Which one to connect?'
|
|
39
|
+
found_targets.each_with_index do |target,index|
|
|
40
|
+
puts "#{index+1}. #{target.name} - #{target.target_name}: #{target.port}"
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
puts 'Select: '
|
|
44
|
+
selection = gets.chomp.to_i - 1
|
|
45
|
+
while(selection < 0 || selection >= found_targets.count)
|
|
46
|
+
puts "Select between #{0}-#{found_targets.count}"
|
|
47
|
+
selection = gets.chomp.to_i - 1
|
|
48
|
+
end
|
|
49
|
+
yield found_targets[selection]
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.resolve_service(scan_time)
|
|
55
|
+
browser = DNSSD::Service.new
|
|
56
|
+
service_name = '_debugConnection._tcp'
|
|
57
|
+
puts "Browsing for #{service_name}"
|
|
58
|
+
|
|
59
|
+
found_targets = []
|
|
60
|
+
Thread.new do
|
|
61
|
+
browser.browse service_name do |reply|
|
|
62
|
+
Thread.new do
|
|
63
|
+
Thread.exclusive do
|
|
64
|
+
resolver = DNSSD::Service.new
|
|
65
|
+
resolver.resolve reply do |r|
|
|
66
|
+
found_targets<<Target.new(r.name,r.target,r.port)
|
|
67
|
+
break unless r.flags.more_coming?
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
sleep scan_time
|
|
74
|
+
found_targets.uniq!
|
|
75
|
+
yield found_targets
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
data/log_simulator.gemspec
CHANGED
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
+
spec.add_runtime_dependency "dnssd", "~>2.0"
|
|
21
22
|
spec.add_development_dependency "bundler", "~> 1.6"
|
|
22
23
|
spec.add_development_dependency "rake"
|
|
23
24
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: log_simulator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ogan Topkaya
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: dnssd
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '2.0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '2.0'
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: bundler
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -68,6 +82,9 @@ files:
|
|
|
68
82
|
- bin/simulate
|
|
69
83
|
- lib/log_simulator.rb
|
|
70
84
|
- lib/log_simulator/version.rb
|
|
85
|
+
- lib/peak_log_simulator.rb
|
|
86
|
+
- lib/resolve.rb
|
|
87
|
+
- lib/socket_connetion.rb
|
|
71
88
|
- log_simulator.gemspec
|
|
72
89
|
homepage: ''
|
|
73
90
|
licenses:
|