consimilo 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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 77eaea9de7c1b4a110ed022db0e5eede61d21dead5899581b15ea7010a6c0cd3
4
+ data.tar.gz: 51c4ccc2fc5e08f122a0b66b2fe283c0220fc0b3fbe08effd5b18e5ef6bbc02b
5
+ SHA512:
6
+ metadata.gz: db7eba27af07dd7582191fd21708cac65e4bebdf1ba486f14fe8eed1d5b95d568faa931f5fa8ecd5d9e0cedae74a149bc27e93956cbd4e792f053e5e23cb5d87
7
+ data.tar.gz: 3b3c215f117f080b4158c957bc351a70db74ec0a60ea66f713b049252c9af7d87436610efcdf1a714520b7a0a130de009fd7e23c7e41826d81dec1fbd3963a13
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared>
5
+ <configuration default="false" name="test" type="RakeRunConfigurationType" factoryName="Rake">
6
+ <module name="consimilo" />
7
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
8
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
9
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
10
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
11
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
12
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
13
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
14
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
15
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
16
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
17
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
18
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
19
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
20
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
21
+ <method v="2" />
22
+ </configuration>
23
+ </shared>
24
+ </component>
25
+ <component name="NewModuleRootManager">
26
+ <content url="file://$MODULE_DIR$" />
27
+ <orderEntry type="jdk" jdkName="ruby-2.5.3-p105" jdkType="RUBY_SDK" />
28
+ <orderEntry type="sourceFolder" forTests="false" />
29
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.5.3-p105) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.5.3-p105) [gem]" level="application" />
31
+ </component>
32
+ </module>
@@ -0,0 +1,7 @@
1
+ <component name="ProjectDictionaryState">
2
+ <dictionary name="Derk-Jan">
3
+ <words>
4
+ <w>consimilo</w>
5
+ </words>
6
+ </dictionary>
7
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
+ </profile>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptSettings">
4
+ <option name="languageLevel" value="ES6" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.4.4-p296" project-jdk-type="RUBY_SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/consimilo.iml" filepath="$PROJECT_DIR$/.idea/consimilo.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,20 @@
1
+ <component name="ProjectRunConfigurationManager">
2
+ <configuration default="false" name="test" type="RakeRunConfigurationType" factoryName="Rake">
3
+ <module name="consimilo" />
4
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
5
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
6
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
7
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
8
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
9
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
10
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
11
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
12
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
13
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
14
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
15
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
16
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
17
+ <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
18
+ <method v="2" />
19
+ </configuration>
20
+ </component>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,331 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="b407d24b-3c0b-4aee-806d-401d887188a6" name="Default Changelist" comment="">
5
+ <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
6
+ <change afterPath="$PROJECT_DIR$/.idea/consimilo.iml" afterDir="false" />
7
+ <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
8
+ <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/.travis.yml" afterDir="false" />
11
+ <change afterPath="$PROJECT_DIR$/CODE_OF_CONDUCT.md" afterDir="false" />
12
+ <change afterPath="$PROJECT_DIR$/Gemfile" afterDir="false" />
13
+ <change afterPath="$PROJECT_DIR$/LICENSE.txt" afterDir="false" />
14
+ <change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
15
+ <change afterPath="$PROJECT_DIR$/Rakefile" afterDir="false" />
16
+ <change afterPath="$PROJECT_DIR$/bin/console" afterDir="false" />
17
+ <change afterPath="$PROJECT_DIR$/bin/setup" afterDir="false" />
18
+ <change afterPath="$PROJECT_DIR$/consimilo.gemspec" afterDir="false" />
19
+ <change afterPath="$PROJECT_DIR$/lib/consimilo.rb" afterDir="false" />
20
+ <change afterPath="$PROJECT_DIR$/lib/consimilo/kernel.rb" afterDir="false" />
21
+ <change afterPath="$PROJECT_DIR$/test/consimilo/kernel_test.rb" afterDir="false" />
22
+ <change afterPath="$PROJECT_DIR$/test/consimilo_test.rb" afterDir="false" />
23
+ <change afterPath="$PROJECT_DIR$/test/test_helper.rb" afterDir="false" />
24
+ </list>
25
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
26
+ <option name="SHOW_DIALOG" value="false" />
27
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
28
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
29
+ <option name="LAST_RESOLUTION" value="IGNORE" />
30
+ </component>
31
+ <component name="FileEditorManager">
32
+ <leaf>
33
+ <file pinned="false" current-in-tab="false">
34
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
35
+ <provider selected="true" editor-type-id="text-editor">
36
+ <state relative-caret-position="289">
37
+ <caret line="17" selection-start-line="17" selection-end-line="17" />
38
+ </state>
39
+ </provider>
40
+ </entry>
41
+ </file>
42
+ <file pinned="false" current-in-tab="false">
43
+ <entry file="file://$PROJECT_DIR$/test/consimilo_test.rb">
44
+ <provider selected="true" editor-type-id="text-editor">
45
+ <state relative-caret-position="337">
46
+ <caret line="89" column="5" lean-forward="true" selection-start-line="82" selection-start-column="4" selection-end-line="89" selection-end-column="5" />
47
+ </state>
48
+ </provider>
49
+ </entry>
50
+ </file>
51
+ <file pinned="false" current-in-tab="false">
52
+ <entry file="file://$PROJECT_DIR$/test/test_helper.rb">
53
+ <provider selected="true" editor-type-id="text-editor" />
54
+ </entry>
55
+ </file>
56
+ <file pinned="false" current-in-tab="true">
57
+ <entry file="file://$PROJECT_DIR$/README.md">
58
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
59
+ <state split_layout="SPLIT">
60
+ <first_editor relative-caret-position="39">
61
+ <caret line="71" column="39" lean-forward="true" selection-start-line="71" selection-start-column="39" selection-end-line="71" selection-end-column="39" />
62
+ </first_editor>
63
+ <second_editor />
64
+ </state>
65
+ </provider>
66
+ </entry>
67
+ </file>
68
+ <file pinned="false" current-in-tab="false">
69
+ <entry file="file://$PROJECT_DIR$/lib/consimilo.rb">
70
+ <provider selected="true" editor-type-id="text-editor">
71
+ <state relative-caret-position="-224">
72
+ <caret line="19" column="48" selection-start-line="19" selection-start-column="48" selection-end-line="19" selection-end-column="48" />
73
+ </state>
74
+ </provider>
75
+ </entry>
76
+ </file>
77
+ <file pinned="false" current-in-tab="false">
78
+ <entry file="file://$PROJECT_DIR$/test/consimilo/kernel_test.rb">
79
+ <provider selected="true" editor-type-id="text-editor">
80
+ <state relative-caret-position="303">
81
+ <caret line="25" column="11" lean-forward="true" selection-start-line="20" selection-start-column="10" selection-end-line="25" selection-end-column="11" />
82
+ </state>
83
+ </provider>
84
+ </entry>
85
+ </file>
86
+ <file pinned="false" current-in-tab="false">
87
+ <entry file="file://$PROJECT_DIR$/lib/consimilo/kernel.rb">
88
+ <provider selected="true" editor-type-id="text-editor">
89
+ <state relative-caret-position="85">
90
+ <caret line="5" column="70" selection-start-line="5" selection-start-column="70" selection-end-line="5" selection-end-column="70" />
91
+ </state>
92
+ </provider>
93
+ </entry>
94
+ </file>
95
+ </leaf>
96
+ </component>
97
+ <component name="Git.Settings">
98
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
99
+ </component>
100
+ <component name="IdeDocumentHistory">
101
+ <option name="CHANGED_PATHS">
102
+ <list>
103
+ <option value="$PROJECT_DIR$/.travis.yml" />
104
+ <option value="$PROJECT_DIR$/consimilo.gemspec" />
105
+ <option value="$PROJECT_DIR$/lib/consimilo.rb" />
106
+ <option value="$PROJECT_DIR$/test/consimilo_test.rb" />
107
+ <option value="$PROJECT_DIR$/lib/consimilo/kernel.rb" />
108
+ <option value="$PROJECT_DIR$/test/consimilo/kernel_test.rb" />
109
+ <option value="$PROJECT_DIR$/README.md" />
110
+ </list>
111
+ </option>
112
+ </component>
113
+ <component name="ProjectConfigurationFiles">
114
+ <option name="files">
115
+ <list>
116
+ <option value="$PROJECT_DIR$/.idea/vcs.xml" />
117
+ <option value="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
118
+ <option value="$PROJECT_DIR$/.idea/dictionaries/Derk_Jan.xml" />
119
+ <option value="$PROJECT_DIR$/.idea/runConfigurations/Unnamed.xml" />
120
+ </list>
121
+ </option>
122
+ </component>
123
+ <component name="ProjectFrameBounds" extendedState="6">
124
+ <option name="width" value="3852" />
125
+ <option name="height" value="2106" />
126
+ </component>
127
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
128
+ <component name="ProjectView">
129
+ <navigator proportions="" version="1">
130
+ <foldersAlwaysOnTop value="true" />
131
+ </navigator>
132
+ <panes>
133
+ <pane id="Scope" />
134
+ <pane id="ProjectPane">
135
+ <subPane>
136
+ <expand>
137
+ <path>
138
+ <item name="consimilo" type="b2602c69:ProjectViewProjectNode" />
139
+ <item name="consimilo" type="462c0819:PsiDirectoryNode" />
140
+ </path>
141
+ <path>
142
+ <item name="consimilo" type="b2602c69:ProjectViewProjectNode" />
143
+ <item name="consimilo" type="462c0819:PsiDirectoryNode" />
144
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
145
+ </path>
146
+ <path>
147
+ <item name="consimilo" type="b2602c69:ProjectViewProjectNode" />
148
+ <item name="consimilo" type="462c0819:PsiDirectoryNode" />
149
+ <item name="test" type="462c0819:PsiDirectoryNode" />
150
+ </path>
151
+ <path>
152
+ <item name="consimilo" type="b2602c69:ProjectViewProjectNode" />
153
+ <item name="consimilo" type="462c0819:PsiDirectoryNode" />
154
+ <item name="test" type="462c0819:PsiDirectoryNode" />
155
+ <item name="consimilo" type="462c0819:PsiDirectoryNode" />
156
+ </path>
157
+ </expand>
158
+ <select />
159
+ </subPane>
160
+ </pane>
161
+ </panes>
162
+ </component>
163
+ <component name="PropertiesComponent">
164
+ <property name="WebServerToolWindowFactoryState" value="false" />
165
+ <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
166
+ <property name="nodejs_npm_path_reset_for_default_project" value="true" />
167
+ <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
168
+ </component>
169
+ <component name="RecentsManager">
170
+ <key name="MoveFile.RECENT_KEYS">
171
+ <recent name="C:\Users\Derk-Jan\Documents\Github\consimilo\lib\consimilo" />
172
+ </key>
173
+ </component>
174
+ <component name="RunDashboard">
175
+ <option name="ruleStates">
176
+ <list>
177
+ <RuleState>
178
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
179
+ </RuleState>
180
+ <RuleState>
181
+ <option name="name" value="StatusDashboardGroupingRule" />
182
+ </RuleState>
183
+ </list>
184
+ </option>
185
+ </component>
186
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
187
+ <component name="SvnConfiguration">
188
+ <configuration />
189
+ </component>
190
+ <component name="TaskManager">
191
+ <task active="true" id="Default" summary="Default task">
192
+ <changelist id="b407d24b-3c0b-4aee-806d-401d887188a6" name="Default Changelist" comment="" />
193
+ <created>1550230677452</created>
194
+ <option name="number" value="Default" />
195
+ <option name="presentableId" value="Default" />
196
+ <updated>1550230677452</updated>
197
+ <workItem from="1550230679064" duration="2654000" />
198
+ </task>
199
+ <servers />
200
+ </component>
201
+ <component name="TestHistory">
202
+ <history-entry file="test - 2019.02.15 at 13h 15m 58s.xml">
203
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
204
+ </history-entry>
205
+ <history-entry file="test - 2019.02.15 at 13h 16m 13s.xml">
206
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
207
+ </history-entry>
208
+ <history-entry file="test - 2019.02.15 at 13h 17m 07s.xml">
209
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
210
+ </history-entry>
211
+ <history-entry file="test - 2019.02.15 at 13h 17m 47s.xml">
212
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
213
+ </history-entry>
214
+ <history-entry file="test - 2019.02.15 at 13h 17m 57s.xml">
215
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
216
+ </history-entry>
217
+ <history-entry file="test - 2019.02.15 at 13h 19m 34s.xml">
218
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
219
+ </history-entry>
220
+ <history-entry file="test - 2019.02.15 at 13h 20m 52s.xml">
221
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
222
+ </history-entry>
223
+ <history-entry file="test - 2019.02.15 at 13h 21m 39s.xml">
224
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
225
+ </history-entry>
226
+ <history-entry file="test - 2019.02.15 at 13h 22m 07s.xml">
227
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
228
+ </history-entry>
229
+ <history-entry file="test - 2019.02.15 at 13h 22m 17s.xml">
230
+ <configuration name="test" configurationId="RakeRunConfigurationType" />
231
+ </history-entry>
232
+ </component>
233
+ <component name="TimeTrackingManager">
234
+ <option name="totallyTimeSpent" value="2654000" />
235
+ </component>
236
+ <component name="ToolWindowManager">
237
+ <frame x="-6" y="-6" width="1719" height="942" extended-state="6" />
238
+ <editor active="true" />
239
+ <layout>
240
+ <window_info id="Favorites" order="0" side_tool="true" />
241
+ <window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.1467228" />
242
+ <window_info id="Structure" order="2" side_tool="true" weight="0.25" />
243
+ <window_info anchor="bottom" id="Terminal" order="0" weight="0.3296433" />
244
+ <window_info anchor="bottom" id="Database Changes" order="1" />
245
+ <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
246
+ <window_info anchor="bottom" id="Version Control" order="3" />
247
+ <window_info anchor="bottom" id="Docker" order="4" show_stripe_button="false" />
248
+ <window_info anchor="bottom" id="Message" order="5" />
249
+ <window_info anchor="bottom" id="Find" order="6" />
250
+ <window_info active="true" anchor="bottom" id="Run" order="7" visible="true" weight="0.33825338" />
251
+ <window_info anchor="bottom" id="Debug" order="8" weight="0.4" />
252
+ <window_info anchor="bottom" id="Cvs" order="9" weight="0.25" />
253
+ <window_info anchor="bottom" id="Inspection" order="10" weight="0.4" />
254
+ <window_info anchor="bottom" id="TODO" order="11" />
255
+ <window_info anchor="right" id="Database" order="0" />
256
+ <window_info anchor="right" id="Commander" order="1" weight="0.4" />
257
+ <window_info anchor="right" id="Ant Build" order="2" weight="0.25" />
258
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="3" weight="0.25" />
259
+ </layout>
260
+ </component>
261
+ <component name="TypeScriptGeneratedFilesManager">
262
+ <option name="version" value="1" />
263
+ </component>
264
+ <component name="com.intellij.coverage.CoverageDataManagerImpl">
265
+ <SUITE FILE_PATH="coverage/consimilo@test.rcov" NAME="test Coverage Results" MODIFIED="1550233749727" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="consimilo" />
266
+ </component>
267
+ <component name="editorHistoryManager">
268
+ <entry file="file://C:/Ruby25-x64/lib/ruby/2.5.0/pp.rb">
269
+ <provider selected="true" editor-type-id="text-editor">
270
+ <state relative-caret-position="156">
271
+ <caret line="535" lean-forward="true" selection-start-line="535" selection-end-line="536" selection-end-column="13" />
272
+ </state>
273
+ </provider>
274
+ </entry>
275
+ <entry file="file://$PROJECT_DIR$/consimilo.gemspec">
276
+ <provider selected="true" editor-type-id="text-editor">
277
+ <state relative-caret-position="272">
278
+ <caret line="16" column="49" lean-forward="true" selection-start-line="16" selection-start-column="49" selection-end-line="16" selection-end-column="49" />
279
+ </state>
280
+ </provider>
281
+ </entry>
282
+ <entry file="file://$PROJECT_DIR$/.travis.yml">
283
+ <provider selected="true" editor-type-id="text-editor">
284
+ <state relative-caret-position="289">
285
+ <caret line="17" selection-start-line="17" selection-end-line="17" />
286
+ </state>
287
+ </provider>
288
+ </entry>
289
+ <entry file="file://$PROJECT_DIR$/lib/consimilo/kernel.rb">
290
+ <provider selected="true" editor-type-id="text-editor">
291
+ <state relative-caret-position="85">
292
+ <caret line="5" column="70" selection-start-line="5" selection-start-column="70" selection-end-line="5" selection-end-column="70" />
293
+ </state>
294
+ </provider>
295
+ </entry>
296
+ <entry file="file://$PROJECT_DIR$/test/consimilo_test.rb">
297
+ <provider selected="true" editor-type-id="text-editor">
298
+ <state relative-caret-position="337">
299
+ <caret line="89" column="5" lean-forward="true" selection-start-line="82" selection-start-column="4" selection-end-line="89" selection-end-column="5" />
300
+ </state>
301
+ </provider>
302
+ </entry>
303
+ <entry file="file://$PROJECT_DIR$/test/test_helper.rb">
304
+ <provider selected="true" editor-type-id="text-editor" />
305
+ </entry>
306
+ <entry file="file://$PROJECT_DIR$/test/consimilo/kernel_test.rb">
307
+ <provider selected="true" editor-type-id="text-editor">
308
+ <state relative-caret-position="303">
309
+ <caret line="25" column="11" lean-forward="true" selection-start-line="20" selection-start-column="10" selection-end-line="25" selection-end-column="11" />
310
+ </state>
311
+ </provider>
312
+ </entry>
313
+ <entry file="file://$PROJECT_DIR$/lib/consimilo.rb">
314
+ <provider selected="true" editor-type-id="text-editor">
315
+ <state relative-caret-position="-224">
316
+ <caret line="19" column="48" selection-start-line="19" selection-start-column="48" selection-end-line="19" selection-end-column="48" />
317
+ </state>
318
+ </provider>
319
+ </entry>
320
+ <entry file="file://$PROJECT_DIR$/README.md">
321
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
322
+ <state split_layout="SPLIT">
323
+ <first_editor relative-caret-position="39">
324
+ <caret line="71" column="39" lean-forward="true" selection-start-line="71" selection-start-column="39" selection-end-line="71" selection-end-column="39" />
325
+ </first_editor>
326
+ <second_editor />
327
+ </state>
328
+ </provider>
329
+ </entry>
330
+ </component>
331
+ </project>
@@ -0,0 +1,17 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5
7
+ - 2.6
8
+ - ruby-head
9
+ before_install:
10
+ - gem install bundler -v 2.0.1
11
+ - gem update --system
12
+ - gem --version
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: ruby-head
16
+ install:
17
+ - bundle install --with development --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at derk-jan+github@karrenbeld.info. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in consimilo.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ consimilo (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.11.3)
10
+ rake (10.5.0)
11
+
12
+ PLATFORMS
13
+ x64-mingw32
14
+
15
+ DEPENDENCIES
16
+ bundler (~> 2.0)
17
+ consimilo!
18
+ minitest (~> 5.0)
19
+ rake (~> 10.0)
20
+
21
+ BUNDLED WITH
22
+ 2.0.1
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Derk-Jan Karrenbeld
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,87 @@
1
+ # Consimilo
2
+
3
+ [![Build Status: master](https://travis-ci.com/XPBytes/consimilo.svg)](https://travis-ci.com/XPBytes/consimilo)
4
+ [![Gem Version](https://badge.fury.io/rb/consimilo.svg)](https://badge.fury.io/rb/consimilo)
5
+ [![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
6
+
7
+ :nut_and_bolt: Compare (consimilo) primitives such as Hash and Array deeply
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'consimilo'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install consimilo
24
+
25
+ ## Usage
26
+
27
+ When you're comparing two states, two data sets or something similar, you might to know _what_ has changed.
28
+ Running the two versions through `Consimilo` gives a snapshot of the difference between the two, with each
29
+ difference represented as a pair `[from, to]`.
30
+
31
+ ```ruby
32
+ require 'consimilo'
33
+
34
+ before = [1, 2 ,3]
35
+ after = [3, 2, 1]
36
+ Consimilo.difference(before, after)
37
+ # => [[1, 3], [], [3,1]]
38
+
39
+ before = { foo: [:a, :b], bar: 1, same: 0 }
40
+ after = { foo: [:a, :c], next: 3, same: 0 }
41
+ Consimilo.difference(before, after)
42
+ # => { foo: [[], [:b, :c]], bar: [1, nil], next: [nil, 3] }
43
+ ```
44
+
45
+ By default, `Consimilo` enforces `Array` order. This can be turned off with the `order` option:
46
+
47
+ ```ruby
48
+ before = [1, 2 ,3]
49
+ after = [3, 2, 1]
50
+ Consimilo.difference(before, after, order: false)
51
+ # => []
52
+ ```
53
+
54
+ By default `Consimilo` returns empty "differences" for arrays, unless the entire array is equal, so that
55
+ you may trace back at which index something has changed. This can be turned off by setting the `compact` option:
56
+
57
+ ```ruby
58
+ before = [1, 2 ,3]
59
+ after = [3, 2, 1]
60
+ Consimilo.difference(before, after, compact: true)
61
+ # => [[1, 3], [3,1]]
62
+ ```
63
+
64
+ You can also require `'consimilo/kernel'` in your code or Gemfile in order to enable an additional `Kernel`
65
+ method `Consimilo(left, right, order: true, compact: false)`:
66
+
67
+ ```ruby
68
+ require 'consimilo/kernel'
69
+
70
+ before = [1, 2 ,3]
71
+ after = [3, 2, 1]
72
+ Consimilo(before, after, compact: true)
73
+ # => [[1, 3], [3,1]]
74
+ ```
75
+
76
+ ## Development
77
+
78
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can
79
+ also run `bin/console` for an interactive prompt that will allow you to experiment.
80
+
81
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
82
+ version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,
83
+ push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
84
+
85
+ ## Contributing
86
+
87
+ Bug reports and pull requests are welcome on GitHub at [XPBytes/consimilo](https://github.com/XPBytes/consimilo).
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "consimilo"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,41 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "consimilo"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "consimilo"
8
+ spec.version = Consimilo::VERSION
9
+ spec.authors = ["Derk-Jan Karrenbeld"]
10
+ spec.email = ["derk-jan@xpbytes.com"]
11
+
12
+ spec.summary = 'Compare (consimilo) primitives such as Hash and Array deeply'
13
+ spec.homepage = 'https://github.com/XPBytes/consimilo'
14
+ spec.license = '"MIT'
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
20
+
21
+ spec.metadata["homepage_uri"] = spec.homepage
22
+ spec.metadata["source_code_uri"] = spec.homepage
23
+ spec.metadata["changelog_uri"] = spec.homepage + '/CHANGELOG.md'
24
+ else
25
+ raise "RubyGems 2.0 or newer is required to protect against " \
26
+ "public gem pushes."
27
+ end
28
+
29
+ # Specify which files should be added to the gem when it is released.
30
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
31
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
32
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
33
+ end
34
+ spec.bindir = "exe"
35
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
+ spec.require_paths = ["lib"]
37
+
38
+ spec.add_development_dependency "bundler", "~> 2.0"
39
+ spec.add_development_dependency "rake", "~> 10.0"
40
+ spec.add_development_dependency "minitest", "~> 5.0"
41
+ end
@@ -0,0 +1,55 @@
1
+
2
+ module Consimilo
3
+ VERSION = '0.1.0'
4
+
5
+ class Error < StandardError; end
6
+
7
+ module_function
8
+
9
+ def is_array?(instance)
10
+ instance.is_a?(Array)
11
+ end
12
+
13
+ def is_hash?(instance)
14
+ instance.is_a?(Hash)
15
+ end
16
+
17
+ def difference(left, right, order: true, compact: false)
18
+ if is_array?(left) && is_array?(right)
19
+ result = difference_array(left, right, order: order, compact: compact)
20
+ return result.flatten.empty? ? [] : result
21
+ end
22
+
23
+ if is_hash?(left) && is_hash?(right)
24
+ return difference_hash(left, right, order: order, compact: compact)
25
+ end
26
+
27
+ [left, right]
28
+ end
29
+
30
+ def difference_hash(left, right, order: true, compact: false)
31
+ (left.keys | right.keys).each_with_object({}) do |key, diff|
32
+ next if left[key] == right[key]
33
+ difference = difference(left[key], right[key], order: order, compact: compact)
34
+ next if difference.empty?
35
+ diff[key] = difference
36
+ end
37
+ end
38
+
39
+ def difference_array(left, right, order: true, compact: false)
40
+ unless order
41
+ left = left.sort
42
+ right = right.sort
43
+ end
44
+
45
+ (0...[left.size, right.size].max).each_with_object([]) do |index, diff|
46
+ if left[index] == right[index]
47
+ next compact ? diff : diff.push([])
48
+ end
49
+
50
+ difference = difference(left[index], right[index], order: order, compact: compact)
51
+ next diff if difference.empty? && compact
52
+ diff.push(difference)
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,8 @@
1
+ require 'consimilo'
2
+
3
+ module Kernel
4
+ # noinspection RubyInstanceMethodNamingConvention
5
+ def Consimilo(left, right, order: true, compact: false)
6
+ ::Consimilo.difference(left, right, order: order, compact: compact)
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: consimilo
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Derk-Jan Karrenbeld
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-02-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description:
56
+ email:
57
+ - derk-jan@xpbytes.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".idea/consimilo.iml"
64
+ - ".idea/dictionaries/Derk_Jan.xml"
65
+ - ".idea/inspectionProfiles/Project_Default.xml"
66
+ - ".idea/misc.xml"
67
+ - ".idea/modules.xml"
68
+ - ".idea/runConfigurations/test.xml"
69
+ - ".idea/vcs.xml"
70
+ - ".idea/workspace.xml"
71
+ - ".travis.yml"
72
+ - CODE_OF_CONDUCT.md
73
+ - Gemfile
74
+ - Gemfile.lock
75
+ - LICENSE.txt
76
+ - README.md
77
+ - Rakefile
78
+ - bin/console
79
+ - bin/setup
80
+ - consimilo.gemspec
81
+ - lib/consimilo.rb
82
+ - lib/consimilo/kernel.rb
83
+ homepage: https://github.com/XPBytes/consimilo
84
+ licenses:
85
+ - "\"MIT"
86
+ metadata:
87
+ homepage_uri: https://github.com/XPBytes/consimilo
88
+ source_code_uri: https://github.com/XPBytes/consimilo
89
+ changelog_uri: https://github.com/XPBytes/consimilo/CHANGELOG.md
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.7.6
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Compare (consimilo) primitives such as Hash and Array deeply
110
+ test_files: []