imperituroard 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/imperituroard.iml +71 -1
- data/.idea/workspace.xml +168 -52
- data/Gemfile +1 -0
- data/imperituroard.gemspec +1 -0
- data/lib/imperituroard/phpipamdb.rb +41 -0
- data/lib/imperituroard/version.rb +1 -1
- data/lib/imperituroard.rb +25 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94048778cba874aa02842eae0b6959edb2a716fd
|
4
|
+
data.tar.gz: abfb9fd7f7d6befef48f7ea6cbd7771fecf7e1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d85141c0b4efa74eae1141ee9268095d71f3d587f4763fd625f1fee8c51de631c6d0296875969caa800637589e5df6ea622507a01a3def6d0bb03f66504cac7
|
7
|
+
data.tar.gz: fec4686a83cc7e8729631213d0c73e73335c6922843d05f2bb6d3def23248bb227a8ca02018f69777366fe8d0c7c784cb045a4d2ccfae27131ccb7527a85daa0
|
data/.idea/imperituroard.iml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<module type="RUBY_MODULE" version="4">
|
3
3
|
<component name="ModuleRunConfigurationManager">
|
4
|
-
<configuration default="false" name="imperituroard" type="RubyRunConfigurationType" factoryName="Ruby">
|
4
|
+
<configuration default="false" name="imperituroard" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
5
5
|
<module name="imperituroard" />
|
6
6
|
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
7
7
|
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
@@ -20,10 +20,80 @@
|
|
20
20
|
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
21
21
|
<method />
|
22
22
|
</configuration>
|
23
|
+
<configuration default="false" name="phpipamdb" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
24
|
+
<module name="imperituroard" />
|
25
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
26
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib/imperituroard" />
|
27
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
28
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
29
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
30
|
+
<envs />
|
31
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
32
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
33
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
34
|
+
<COVERAGE_PATTERN ENABLED="true">
|
35
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
36
|
+
</COVERAGE_PATTERN>
|
37
|
+
</EXTENSION>
|
38
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/imperituroard/phpipamdb.rb" />
|
39
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
40
|
+
<method />
|
41
|
+
</configuration>
|
42
|
+
<configuration default="false" name="imperituroard (1)" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
43
|
+
<module name="imperituroard" />
|
44
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
45
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib" />
|
46
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
47
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
48
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
49
|
+
<envs />
|
50
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
51
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
52
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
53
|
+
<COVERAGE_PATTERN ENABLED="true">
|
54
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
55
|
+
</COVERAGE_PATTERN>
|
56
|
+
</EXTENSION>
|
57
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/imperituroard.rb" />
|
58
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
59
|
+
<method />
|
60
|
+
</configuration>
|
61
|
+
<configuration default="false" name="Run test 'imperituroard_test': imperituroard" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
62
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
63
|
+
<module name="imperituroard" />
|
64
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Ilib:test" />
|
65
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
66
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
67
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
68
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
69
|
+
<envs>
|
70
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
71
|
+
</envs>
|
72
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
73
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
74
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
75
|
+
<COVERAGE_PATTERN ENABLED="true">
|
76
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
77
|
+
</COVERAGE_PATTERN>
|
78
|
+
</EXTENSION>
|
79
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
80
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/imperituroard_test.rb" />
|
81
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
82
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
83
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
84
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
85
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
86
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
87
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
88
|
+
<method />
|
89
|
+
</configuration>
|
23
90
|
</component>
|
24
91
|
<component name="NewModuleRootManager">
|
25
92
|
<content url="file://$MODULE_DIR$" />
|
26
93
|
<orderEntry type="jdk" jdkName="RVM: ruby-2.4.1 [imperituroard]" jdkType="RUBY_SDK" />
|
27
94
|
<orderEntry type="sourceFolder" forTests="false" />
|
95
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.1, RVM: ruby-2.4.1 [imperituroard]) [gem]" level="application" />
|
96
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.1, RVM: ruby-2.4.1 [imperituroard]) [gem]" level="application" />
|
97
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v12.0.0, RVM: ruby-2.4.1 [imperituroard]) [gem]" level="application" />
|
28
98
|
</component>
|
29
99
|
</module>
|
data/.idea/workspace.xml
CHANGED
@@ -41,6 +41,7 @@
|
|
41
41
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bin/setup" />
|
42
42
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/imperituroard.gemspec" />
|
43
43
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/imperituroard.rb" />
|
44
|
+
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/imperituroard/phpipamdb.rb" />
|
44
45
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/imperituroard/version.rb" />
|
45
46
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/imperituroard_test.rb" />
|
46
47
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/test_helper.rb" />
|
@@ -54,53 +55,56 @@
|
|
54
55
|
</component>
|
55
56
|
<component name="ChangesViewManager" flattened_view="false" />
|
56
57
|
<component name="CoverageDataManager">
|
57
|
-
<SUITE FILE_PATH="coverage/imperituroard@
|
58
|
+
<SUITE FILE_PATH="coverage/imperituroard@imperituroard__1_.coverage" NAME="imperituroard (1) Coverage Results" MODIFIED="1583954516275" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib" MODULE_NAME="imperituroard" />
|
59
|
+
<SUITE FILE_PATH="coverage/imperituroard@phpipamdb.coverage" NAME="phpipamdb Coverage Results" MODIFIED="1583953969990" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/lib/imperituroard" MODULE_NAME="imperituroard" />
|
60
|
+
<SUITE FILE_PATH="coverage/imperituroard@imperituroard.coverage" NAME="imperituroard Coverage Results" MODIFIED="1583952809632" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imperituroard" />
|
61
|
+
<SUITE FILE_PATH="coverage/imperituroard@Run_test__imperituroard_test___imperituroard.coverage" NAME="Run test 'imperituroard_test': imperituroard Coverage Results" MODIFIED="1583954557430" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imperituroard" />
|
58
62
|
</component>
|
59
63
|
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
60
64
|
<component name="FileEditorManager">
|
61
65
|
<leaf>
|
62
|
-
<file leaf-file-name="
|
63
|
-
<entry file="file://$PROJECT_DIR
|
66
|
+
<file leaf-file-name="imperituroard.rb" pinned="false" current-in-tab="false">
|
67
|
+
<entry file="file://$PROJECT_DIR$/lib/imperituroard.rb">
|
64
68
|
<provider selected="true" editor-type-id="text-editor">
|
65
|
-
<state relative-caret-position="
|
66
|
-
<caret line="
|
69
|
+
<state relative-caret-position="284">
|
70
|
+
<caret line="47" column="0" lean-forward="false" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" />
|
67
71
|
<folding />
|
68
72
|
</state>
|
69
73
|
</provider>
|
70
74
|
</entry>
|
71
75
|
</file>
|
72
|
-
<file leaf-file-name="
|
73
|
-
<entry file="file://$PROJECT_DIR$/
|
76
|
+
<file leaf-file-name="imperituroard_test.rb" pinned="false" current-in-tab="false">
|
77
|
+
<entry file="file://$PROJECT_DIR$/test/imperituroard_test.rb">
|
74
78
|
<provider selected="true" editor-type-id="text-editor">
|
75
|
-
<state relative-caret-position="
|
76
|
-
<caret line="
|
79
|
+
<state relative-caret-position="165">
|
80
|
+
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
|
77
81
|
<folding />
|
78
82
|
</state>
|
79
83
|
</provider>
|
80
84
|
</entry>
|
81
85
|
</file>
|
82
|
-
<file leaf-file-name="
|
83
|
-
<entry file="file://$PROJECT_DIR
|
86
|
+
<file leaf-file-name="phpipamdb.rb" pinned="false" current-in-tab="false">
|
87
|
+
<entry file="file://$PROJECT_DIR$/lib/imperituroard/phpipamdb.rb">
|
84
88
|
<provider selected="true" editor-type-id="text-editor">
|
85
|
-
<state relative-caret-position="
|
86
|
-
<caret line="
|
89
|
+
<state relative-caret-position="-218">
|
90
|
+
<caret line="6" column="76" lean-forward="true" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="76" />
|
87
91
|
<folding />
|
88
92
|
</state>
|
89
93
|
</provider>
|
90
94
|
</entry>
|
91
95
|
</file>
|
92
|
-
<file leaf-file-name="
|
93
|
-
<entry file="file://$PROJECT_DIR$/../../freewifi/
|
96
|
+
<file leaf-file-name="freewifi.rb" pinned="false" current-in-tab="false">
|
97
|
+
<entry file="file://$PROJECT_DIR$/../../freewifi/lib/freewifi.rb">
|
94
98
|
<provider selected="true" editor-type-id="text-editor">
|
95
|
-
<state relative-caret-position="
|
96
|
-
<caret line="
|
99
|
+
<state relative-caret-position="75">
|
100
|
+
<caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="10" selection-end-column="5" />
|
97
101
|
<folding />
|
98
102
|
</state>
|
99
103
|
</provider>
|
100
104
|
</entry>
|
101
105
|
</file>
|
102
|
-
<file leaf-file-name="
|
103
|
-
<entry file="file://$PROJECT_DIR$/../../freewifi/
|
106
|
+
<file leaf-file-name="freewifi_test.rb" pinned="false" current-in-tab="false">
|
107
|
+
<entry file="file://$PROJECT_DIR$/../../freewifi/test/freewifi_test.rb">
|
104
108
|
<provider selected="true" editor-type-id="text-editor">
|
105
109
|
<state relative-caret-position="0">
|
106
110
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
@@ -122,8 +126,8 @@
|
|
122
126
|
<file leaf-file-name="Gemfile" pinned="false" current-in-tab="false">
|
123
127
|
<entry file="file://$PROJECT_DIR$/Gemfile">
|
124
128
|
<provider selected="true" editor-type-id="text-editor">
|
125
|
-
<state relative-caret-position="
|
126
|
-
<caret line="
|
129
|
+
<state relative-caret-position="105">
|
130
|
+
<caret line="7" column="34" lean-forward="false" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
|
127
131
|
<folding />
|
128
132
|
</state>
|
129
133
|
</provider>
|
@@ -132,8 +136,8 @@
|
|
132
136
|
<file leaf-file-name="imperituroard.gemspec" pinned="false" current-in-tab="false">
|
133
137
|
<entry file="file://$PROJECT_DIR$/imperituroard.gemspec">
|
134
138
|
<provider selected="true" editor-type-id="text-editor">
|
135
|
-
<state relative-caret-position="
|
136
|
-
<caret line="
|
139
|
+
<state relative-caret-position="317">
|
140
|
+
<caret line="32" column="42" lean-forward="false" selection-start-line="32" selection-start-column="42" selection-end-line="32" selection-end-column="42" />
|
137
141
|
<folding />
|
138
142
|
</state>
|
139
143
|
</provider>
|
@@ -152,8 +156,8 @@
|
|
152
156
|
<file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
|
153
157
|
<entry file="file://$PROJECT_DIR$/lib/imperituroard/version.rb">
|
154
158
|
<provider selected="true" editor-type-id="text-editor">
|
155
|
-
<state relative-caret-position="
|
156
|
-
<caret line="
|
159
|
+
<state relative-caret-position="45">
|
160
|
+
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
157
161
|
<folding />
|
158
162
|
</state>
|
159
163
|
</provider>
|
@@ -167,9 +171,12 @@
|
|
167
171
|
<component name="IdeDocumentHistory">
|
168
172
|
<option name="CHANGED_PATHS">
|
169
173
|
<list>
|
170
|
-
<option value="$PROJECT_DIR$/imperituroard.gemspec" />
|
171
174
|
<option value="$PROJECT_DIR$/../../freewifi/lib/freewifi.rb" />
|
175
|
+
<option value="$PROJECT_DIR$/imperituroard.gemspec" />
|
176
|
+
<option value="$PROJECT_DIR$/Gemfile" />
|
177
|
+
<option value="$PROJECT_DIR$/lib/imperituroard/phpipamdb.rb" />
|
172
178
|
<option value="$PROJECT_DIR$/lib/imperituroard.rb" />
|
179
|
+
<option value="$PROJECT_DIR$/test/imperituroard_test.rb" />
|
173
180
|
<option value="$PROJECT_DIR$/lib/imperituroard/version.rb" />
|
174
181
|
</list>
|
175
182
|
</option>
|
@@ -181,8 +188,8 @@
|
|
181
188
|
<sorting>DEFINITION_ORDER</sorting>
|
182
189
|
</component>
|
183
190
|
<component name="ProjectFrameBounds">
|
184
|
-
<option name="x" value="
|
185
|
-
<option name="y" value="
|
191
|
+
<option name="x" value="73" />
|
192
|
+
<option name="y" value="92" />
|
186
193
|
<option name="width" value="1313" />
|
187
194
|
<option name="height" value="718" />
|
188
195
|
</component>
|
@@ -266,6 +273,20 @@
|
|
266
273
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
267
274
|
</PATH_ELEMENT>
|
268
275
|
</PATH>
|
276
|
+
<PATH>
|
277
|
+
<PATH_ELEMENT>
|
278
|
+
<option name="myItemId" value="imperituroard" />
|
279
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
280
|
+
</PATH_ELEMENT>
|
281
|
+
<PATH_ELEMENT>
|
282
|
+
<option name="myItemId" value="imperituroard" />
|
283
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
284
|
+
</PATH_ELEMENT>
|
285
|
+
<PATH_ELEMENT>
|
286
|
+
<option name="myItemId" value="test" />
|
287
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
288
|
+
</PATH_ELEMENT>
|
289
|
+
</PATH>
|
269
290
|
<PATH>
|
270
291
|
<PATH_ELEMENT>
|
271
292
|
<option name="myItemId" value="imperituroard" />
|
@@ -322,6 +343,7 @@
|
|
322
343
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
323
344
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
324
345
|
<property name="project.settings.patched" value="true" />
|
346
|
+
<property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
|
325
347
|
</component>
|
326
348
|
<component name="RunDashboard">
|
327
349
|
<option name="ruleStates">
|
@@ -335,7 +357,7 @@
|
|
335
357
|
</list>
|
336
358
|
</option>
|
337
359
|
</component>
|
338
|
-
<component name="RunManager" selected="
|
360
|
+
<component name="RunManager" selected="Test::Unit/Shoulda/Minitest.Run test 'imperituroard_test': imperituroard">
|
339
361
|
<configuration default="false" name="imperituroard" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
340
362
|
<module name="imperituroard" />
|
341
363
|
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
@@ -355,6 +377,73 @@
|
|
355
377
|
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
356
378
|
<method />
|
357
379
|
</configuration>
|
380
|
+
<configuration default="false" name="phpipamdb" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
381
|
+
<module name="imperituroard" />
|
382
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
383
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib/imperituroard" />
|
384
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
385
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
386
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
387
|
+
<envs />
|
388
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
389
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
390
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
391
|
+
<COVERAGE_PATTERN ENABLED="true">
|
392
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
393
|
+
</COVERAGE_PATTERN>
|
394
|
+
</EXTENSION>
|
395
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/imperituroard/phpipamdb.rb" />
|
396
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
397
|
+
<method />
|
398
|
+
</configuration>
|
399
|
+
<configuration default="false" name="imperituroard (1)" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
400
|
+
<module name="imperituroard" />
|
401
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
402
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib" />
|
403
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
404
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
405
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
406
|
+
<envs />
|
407
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
408
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
409
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
410
|
+
<COVERAGE_PATTERN ENABLED="true">
|
411
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
412
|
+
</COVERAGE_PATTERN>
|
413
|
+
</EXTENSION>
|
414
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/imperituroard.rb" />
|
415
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
416
|
+
<method />
|
417
|
+
</configuration>
|
418
|
+
<configuration default="false" name="Run test 'imperituroard_test': imperituroard" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
419
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
420
|
+
<module name="imperituroard" />
|
421
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Ilib:test" />
|
422
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
423
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
424
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
425
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
426
|
+
<envs>
|
427
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
428
|
+
</envs>
|
429
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
430
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
431
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
432
|
+
<COVERAGE_PATTERN ENABLED="true">
|
433
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
434
|
+
</COVERAGE_PATTERN>
|
435
|
+
</EXTENSION>
|
436
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
437
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/imperituroard_test.rb" />
|
438
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
439
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
440
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
441
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
442
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
443
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
444
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
445
|
+
<method />
|
446
|
+
</configuration>
|
358
447
|
<configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
|
359
448
|
<predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
|
360
449
|
<module name="" />
|
@@ -492,13 +581,19 @@
|
|
492
581
|
<envs />
|
493
582
|
<method />
|
494
583
|
</configuration>
|
495
|
-
<list size="
|
584
|
+
<list size="5">
|
496
585
|
<item index="0" class="java.lang.String" itemvalue="Ruby.test_helper" />
|
497
586
|
<item index="1" class="java.lang.String" itemvalue="Ruby.imperituroard" />
|
587
|
+
<item index="2" class="java.lang.String" itemvalue="Ruby.phpipamdb" />
|
588
|
+
<item index="3" class="java.lang.String" itemvalue="Ruby.imperituroard (1)" />
|
589
|
+
<item index="4" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.Run test 'imperituroard_test': imperituroard" />
|
498
590
|
</list>
|
499
591
|
<recent_temporary>
|
500
|
-
<list size="
|
501
|
-
<item index="0" class="java.lang.String" itemvalue="
|
592
|
+
<list size="4">
|
593
|
+
<item index="0" class="java.lang.String" itemvalue="Test::Unit/Shoulda/Minitest.Run test 'imperituroard_test': imperituroard" />
|
594
|
+
<item index="1" class="java.lang.String" itemvalue="Ruby.imperituroard (1)" />
|
595
|
+
<item index="2" class="java.lang.String" itemvalue="Ruby.phpipamdb" />
|
596
|
+
<item index="3" class="java.lang.String" itemvalue="Ruby.imperituroard" />
|
502
597
|
</list>
|
503
598
|
</recent_temporary>
|
504
599
|
</component>
|
@@ -513,22 +608,27 @@
|
|
513
608
|
<option name="number" value="Default" />
|
514
609
|
<option name="presentableId" value="Default" />
|
515
610
|
<updated>1583947339097</updated>
|
516
|
-
<workItem from="1583947642761" duration="
|
611
|
+
<workItem from="1583947642761" duration="6154000" />
|
517
612
|
</task>
|
518
613
|
<servers />
|
519
614
|
</component>
|
615
|
+
<component name="TestHistory">
|
616
|
+
<history-entry file="Run_test_'imperituroard_test'__imperituroard - 2020.03.11 at 22h 22m 38s.xml">
|
617
|
+
<configuration name="Run test 'imperituroard_test': imperituroard" configurationId="TestUnitRunConfigurationType" />
|
618
|
+
</history-entry>
|
619
|
+
</component>
|
520
620
|
<component name="TimeTrackingManager">
|
521
|
-
<option name="totallyTimeSpent" value="
|
621
|
+
<option name="totallyTimeSpent" value="6154000" />
|
522
622
|
</component>
|
523
623
|
<component name="ToolWindowManager">
|
524
|
-
<frame x="
|
624
|
+
<frame x="73" y="92" width="1313" height="718" extended-state="0" />
|
525
625
|
<editor active="true" />
|
526
626
|
<layout>
|
527
627
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24940991" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
528
628
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
529
629
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
530
630
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
531
|
-
<window_info id="Run" active="
|
631
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
532
632
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
533
633
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
534
634
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
@@ -586,7 +686,7 @@
|
|
586
686
|
</state>
|
587
687
|
</provider>
|
588
688
|
</entry>
|
589
|
-
<entry file="file://$PROJECT_DIR$/
|
689
|
+
<entry file="file://$PROJECT_DIR$/bin/console">
|
590
690
|
<provider selected="true" editor-type-id="text-editor">
|
591
691
|
<state relative-caret-position="0">
|
592
692
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
@@ -594,50 +694,66 @@
|
|
594
694
|
</state>
|
595
695
|
</provider>
|
596
696
|
</entry>
|
697
|
+
<entry file="file://$PROJECT_DIR$/../../freewifi/test/freewifi_test.rb">
|
698
|
+
<provider selected="true" editor-type-id="text-editor">
|
699
|
+
<state relative-caret-position="0">
|
700
|
+
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
701
|
+
<folding />
|
702
|
+
</state>
|
703
|
+
</provider>
|
704
|
+
</entry>
|
705
|
+
<entry file="file://$PROJECT_DIR$/../../freewifi/lib/freewifi.rb">
|
706
|
+
<provider selected="true" editor-type-id="text-editor">
|
707
|
+
<state relative-caret-position="75">
|
708
|
+
<caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="10" selection-end-column="5" />
|
709
|
+
<folding />
|
710
|
+
</state>
|
711
|
+
</provider>
|
712
|
+
</entry>
|
597
713
|
<entry file="file://$PROJECT_DIR$/imperituroard.gemspec">
|
598
714
|
<provider selected="true" editor-type-id="text-editor">
|
599
|
-
<state relative-caret-position="
|
600
|
-
<caret line="
|
715
|
+
<state relative-caret-position="317">
|
716
|
+
<caret line="32" column="42" lean-forward="false" selection-start-line="32" selection-start-column="42" selection-end-line="32" selection-end-column="42" />
|
601
717
|
<folding />
|
602
718
|
</state>
|
603
719
|
</provider>
|
604
720
|
</entry>
|
605
|
-
<entry file="file://$PROJECT_DIR$/
|
721
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
606
722
|
<provider selected="true" editor-type-id="text-editor">
|
607
|
-
<state relative-caret-position="
|
608
|
-
<caret line="
|
723
|
+
<state relative-caret-position="105">
|
724
|
+
<caret line="7" column="34" lean-forward="false" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
|
609
725
|
<folding />
|
610
726
|
</state>
|
611
727
|
</provider>
|
612
728
|
</entry>
|
613
|
-
<entry file="file://$PROJECT_DIR
|
729
|
+
<entry file="file://$PROJECT_DIR$/test/imperituroard_test.rb">
|
614
730
|
<provider selected="true" editor-type-id="text-editor">
|
615
|
-
<state relative-caret-position="
|
616
|
-
<caret line="
|
731
|
+
<state relative-caret-position="165">
|
732
|
+
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
|
617
733
|
<folding />
|
618
734
|
</state>
|
619
735
|
</provider>
|
620
736
|
</entry>
|
621
|
-
<entry file="file://$PROJECT_DIR
|
737
|
+
<entry file="file://$PROJECT_DIR$/lib/imperituroard/phpipamdb.rb">
|
622
738
|
<provider selected="true" editor-type-id="text-editor">
|
623
|
-
<state relative-caret-position="
|
624
|
-
<caret line="
|
739
|
+
<state relative-caret-position="-218">
|
740
|
+
<caret line="6" column="76" lean-forward="true" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="76" />
|
625
741
|
<folding />
|
626
742
|
</state>
|
627
743
|
</provider>
|
628
744
|
</entry>
|
629
745
|
<entry file="file://$PROJECT_DIR$/lib/imperituroard.rb">
|
630
746
|
<provider selected="true" editor-type-id="text-editor">
|
631
|
-
<state relative-caret-position="
|
632
|
-
<caret line="
|
747
|
+
<state relative-caret-position="284">
|
748
|
+
<caret line="47" column="0" lean-forward="false" selection-start-line="47" selection-start-column="0" selection-end-line="47" selection-end-column="0" />
|
633
749
|
<folding />
|
634
750
|
</state>
|
635
751
|
</provider>
|
636
752
|
</entry>
|
637
753
|
<entry file="file://$PROJECT_DIR$/lib/imperituroard/version.rb">
|
638
754
|
<provider selected="true" editor-type-id="text-editor">
|
639
|
-
<state relative-caret-position="
|
640
|
-
<caret line="
|
755
|
+
<state relative-caret-position="45">
|
756
|
+
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
641
757
|
<folding />
|
642
758
|
</state>
|
643
759
|
</provider>
|
data/Gemfile
CHANGED
data/imperituroard.gemspec
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'mysql2'
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
class Pdb
|
6
|
+
|
7
|
+
attr_accessor :database, :username, :password, :table, :ip, :port, :client
|
8
|
+
def initialize(database, username, password, ip, port)
|
9
|
+
@database = database
|
10
|
+
@username = username
|
11
|
+
@password = password
|
12
|
+
@ip = ip
|
13
|
+
@port = port
|
14
|
+
@client = Mysql2::Client.new(:host => ip, :username => username, :password => password)
|
15
|
+
end
|
16
|
+
|
17
|
+
def check_if_msisdn_exists(msisdn, table)
|
18
|
+
|
19
|
+
req1 = "use " + database
|
20
|
+
req2 = "SELECT count(*) FROM " + table + " where hostname='#{msisdn}' or dns_name='#{msisdn}'"
|
21
|
+
client.query(req1, :cast => false)
|
22
|
+
client.query(req2, :as => :array).each do |row|
|
23
|
+
#client.close
|
24
|
+
res = row [0]
|
25
|
+
p res
|
26
|
+
return res
|
27
|
+
#return number of existed ip addresses in database
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def update_database_rewrite_msisdn(msisdn_old, msisdn_new)
|
32
|
+
req1 = "use " + database
|
33
|
+
req2 = "UPDATE ipaddresses set hostname='#{msisdn_new}', dns_name='#{msisdn_new}' where hostname='#{msisdn_old}' or dns_name='#{msisdn_old}'"
|
34
|
+
req3 = "UPDATE subnets set hostname='#{msisdn_new}' where hostname='#{msisdn_old}'"
|
35
|
+
client.query(req1, :cast => false)
|
36
|
+
client.query(req2, :cast => false)
|
37
|
+
client.query(req3, :cast => false)
|
38
|
+
"success"
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/lib/imperituroard.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "imperituroard/version"
|
2
|
+
require 'imperituroard/phpipamdb'
|
2
3
|
|
3
4
|
module Imperituroard
|
4
5
|
class Error < StandardError; end
|
@@ -19,5 +20,28 @@ module Phpipam
|
|
19
20
|
end
|
20
21
|
|
21
22
|
class Pipam
|
23
|
+
|
24
|
+
attr_accessor :username, :password, :ip, :database_class
|
25
|
+
def initialize(username, password, ip)
|
26
|
+
@username = username
|
27
|
+
@password = password
|
28
|
+
@ip = ip
|
29
|
+
@database_class = Pdb.new("phpipam", username, password, ip, "3306")
|
30
|
+
end
|
31
|
+
|
32
|
+
def update_phpipam_rewr_msisdn(old_msisdn, new_msisdn)
|
33
|
+
|
34
|
+
dst_num_exists = database_class.check_if_msisdn_exists(new_msisdn, "ipaddresses")
|
35
|
+
|
36
|
+
if dst_num_exists == 0
|
37
|
+
database_class.update_database_rewrite_msisdn(old_msisdn, new_msisdn)
|
38
|
+
"updated"
|
39
|
+
else
|
40
|
+
"failed"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
22
44
|
include Phpipam
|
23
|
-
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imperituroard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dzmitry Buynovskiy
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 4.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mysql2
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: https://rubygems.org/ ertr.
|
56
70
|
email:
|
57
71
|
- imperituro.ard@gmail.com
|
@@ -76,6 +90,7 @@ files:
|
|
76
90
|
- bin/setup
|
77
91
|
- imperituroard.gemspec
|
78
92
|
- lib/imperituroard.rb
|
93
|
+
- lib/imperituroard/phpipamdb.rb
|
79
94
|
- lib/imperituroard/version.rb
|
80
95
|
homepage: https://rubygems.org/
|
81
96
|
licenses:
|