binky-builder 0.4.0 → 0.5.4
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 +3 -0
- data/.idea/workspace.xml +337 -155
- data/README.md +16 -6
- data/lib/binky/builder.rb +23 -28
- data/lib/binky/builder/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd2cefe06fb5e423de23a6d2376a3a3e4cb4862018f947c92db6464a2cf2e209
|
4
|
+
data.tar.gz: 2bedcb0714fa9d66c00cc732e7f6d33698a05dba98d513075442df24c5c6053c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f70aa041590d893b634eea622f64ed4891fad4fc7219f2d485f6684fbafbf8c3c09ef661c0b7e1bc90a32458b0c486e985dbebb8dc4fc6adb54f73f5a8700a5
|
7
|
+
data.tar.gz: 53cdb61a0b3a1e417facbf55b7074fdcc75ab26282e371428b8911c7cc0949f2bec957e540ee225a2776a66af965e84320cf4344e4cc0456c364720cccb40c51
|
data/.gitignore
CHANGED
data/.idea/workspace.xml
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="c1900bce-76f3-4483-9969-b14ec05dbe50" name="Default Changelist" comment="Binky Builder gem initial commit.">
|
5
5
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
6
|
-
<change beforePath="$PROJECT_DIR$/lib/binky/builder.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/binky/builder.rb" afterDir="false" />
|
7
6
|
<change beforePath="$PROJECT_DIR$/lib/binky/builder/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/binky/builder/version.rb" afterDir="false" />
|
8
|
-
<change beforePath="$PROJECT_DIR$/test/binky/builder_test.rb" beforeDir="false" afterPath="$PROJECT_DIR$/test/binky/builder_test.rb" afterDir="false" />
|
9
7
|
</list>
|
10
8
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
11
9
|
<option name="SHOW_DIALOG" value="false" />
|
@@ -18,92 +16,85 @@
|
|
18
16
|
<file pinned="false" current-in-tab="false">
|
19
17
|
<entry file="file://$PROJECT_DIR$/lib/binky/builder.rb">
|
20
18
|
<provider selected="true" editor-type-id="text-editor">
|
21
|
-
<state relative-caret-position="
|
22
|
-
<caret line="
|
19
|
+
<state relative-caret-position="810">
|
20
|
+
<caret line="93" column="3" lean-forward="true" selection-start-line="93" selection-start-column="3" selection-end-line="93" selection-end-column="3" />
|
23
21
|
</state>
|
24
22
|
</provider>
|
25
23
|
</entry>
|
26
24
|
</file>
|
27
|
-
<file pinned="false" current-in-tab="
|
28
|
-
<entry file="file://$
|
25
|
+
<file pinned="false" current-in-tab="true">
|
26
|
+
<entry file="file://$PROJECT_DIR$/lib/binky/builder/version.rb">
|
29
27
|
<provider selected="true" editor-type-id="text-editor">
|
30
|
-
<state relative-caret-position="
|
31
|
-
<caret line="
|
28
|
+
<state relative-caret-position="52">
|
29
|
+
<caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
|
32
30
|
</state>
|
33
31
|
</provider>
|
34
32
|
</entry>
|
35
33
|
</file>
|
36
34
|
<file pinned="false" current-in-tab="false">
|
37
|
-
<entry file="file://$
|
35
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/2.7.0/pp.rb">
|
38
36
|
<provider selected="true" editor-type-id="text-editor">
|
39
|
-
<state relative-caret-position="
|
40
|
-
<caret line="
|
37
|
+
<state relative-caret-position="231">
|
38
|
+
<caret line="600" selection-start-line="600" selection-end-line="600" />
|
41
39
|
</state>
|
42
40
|
</provider>
|
43
41
|
</entry>
|
44
42
|
</file>
|
45
|
-
<file pinned="false" current-in-tab="
|
46
|
-
<entry file="file://$PROJECT_DIR$/
|
43
|
+
<file pinned="false" current-in-tab="false">
|
44
|
+
<entry file="file://$PROJECT_DIR$/test/binky/builder_test.rb">
|
47
45
|
<provider selected="true" editor-type-id="text-editor">
|
48
|
-
<state relative-caret-position="
|
49
|
-
<caret line="
|
46
|
+
<state relative-caret-position="520">
|
47
|
+
<caret line="20" lean-forward="true" selection-start-line="20" selection-end-line="20" />
|
50
48
|
</state>
|
51
49
|
</provider>
|
52
50
|
</entry>
|
53
51
|
</file>
|
54
52
|
<file pinned="false" current-in-tab="false">
|
55
|
-
<entry file="file://$PROJECT_DIR$/
|
56
|
-
<provider selected="true" editor-type-id="
|
57
|
-
<state split_layout="SPLIT">
|
58
|
-
<first_editor relative-caret-position="1404">
|
59
|
-
<caret line="54" column="3" selection-start-line="54" selection-start-column="3" selection-end-line="54" selection-end-column="3" />
|
60
|
-
</first_editor>
|
61
|
-
<second_editor />
|
62
|
-
</state>
|
63
|
-
</provider>
|
53
|
+
<entry file="file://$PROJECT_DIR$/test/binky/activerecord_test.rb">
|
54
|
+
<provider selected="true" editor-type-id="text-editor" />
|
64
55
|
</entry>
|
65
56
|
</file>
|
66
57
|
<file pinned="false" current-in-tab="false">
|
67
|
-
<entry file="file://$PROJECT_DIR$/test/
|
58
|
+
<entry file="file://$PROJECT_DIR$/test/binky/struct_test.rb">
|
68
59
|
<provider selected="true" editor-type-id="text-editor">
|
69
|
-
<state relative-caret-position="
|
70
|
-
<caret line="
|
60
|
+
<state relative-caret-position="357">
|
61
|
+
<caret line="36" column="21" lean-forward="true" selection-start-line="36" selection-start-column="21" selection-end-line="36" selection-end-column="21" />
|
71
62
|
</state>
|
72
63
|
</provider>
|
73
64
|
</entry>
|
74
65
|
</file>
|
75
66
|
<file pinned="false" current-in-tab="false">
|
76
|
-
<entry file="file://$PROJECT_DIR$/test/
|
67
|
+
<entry file="file://$PROJECT_DIR$/test/test_helper.rb">
|
77
68
|
<provider selected="true" editor-type-id="text-editor">
|
78
|
-
<state relative-caret-position="
|
79
|
-
<caret line="
|
69
|
+
<state relative-caret-position="26">
|
70
|
+
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
80
71
|
</state>
|
81
72
|
</provider>
|
82
73
|
</entry>
|
83
74
|
</file>
|
84
75
|
<file pinned="false" current-in-tab="false">
|
85
|
-
<entry file="file://$
|
76
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest/assertions.rb">
|
86
77
|
<provider selected="true" editor-type-id="text-editor">
|
87
|
-
<state relative-caret-position="
|
88
|
-
<caret line="
|
78
|
+
<state relative-caret-position="10816">
|
79
|
+
<caret line="416" selection-start-line="416" selection-end-line="416" />
|
89
80
|
</state>
|
90
81
|
</provider>
|
91
82
|
</entry>
|
92
83
|
</file>
|
93
84
|
<file pinned="false" current-in-tab="false">
|
94
|
-
<entry file="file://$
|
85
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest/test.rb">
|
95
86
|
<provider selected="true" editor-type-id="text-editor">
|
96
|
-
<state relative-caret-position="
|
97
|
-
<caret line="
|
87
|
+
<state relative-caret-position="385">
|
88
|
+
<caret line="100" selection-start-line="100" selection-end-line="100" />
|
98
89
|
</state>
|
99
90
|
</provider>
|
100
91
|
</entry>
|
101
92
|
</file>
|
102
93
|
<file pinned="false" current-in-tab="false">
|
103
|
-
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest
|
94
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest.rb">
|
104
95
|
<provider selected="true" editor-type-id="text-editor">
|
105
|
-
<state relative-caret-position="
|
106
|
-
<caret line="
|
96
|
+
<state relative-caret-position="385">
|
97
|
+
<caret line="273" selection-start-line="273" selection-end-line="273" />
|
107
98
|
</state>
|
108
99
|
</provider>
|
109
100
|
</entry>
|
@@ -114,6 +105,8 @@
|
|
114
105
|
<option name="RECENT_TEMPLATES">
|
115
106
|
<list>
|
116
107
|
<option value="Ruby File" />
|
108
|
+
<option value="TestUnit Template" />
|
109
|
+
<option value="MiniTest Template" />
|
117
110
|
</list>
|
118
111
|
</option>
|
119
112
|
</component>
|
@@ -122,6 +115,8 @@
|
|
122
115
|
<find>instance_</find>
|
123
116
|
<find>instance_method</find>
|
124
117
|
<find>block</find>
|
118
|
+
<find>to_hash</find>
|
119
|
+
<find>MyBuilder</find>
|
125
120
|
</findStrings>
|
126
121
|
</component>
|
127
122
|
<component name="Git.Settings">
|
@@ -132,24 +127,17 @@
|
|
132
127
|
<list>
|
133
128
|
<option value="$PROJECT_DIR$/lib/binky/builder/builder_helper.rb" />
|
134
129
|
<option value="$PROJECT_DIR$/binky-builder.gemspec" />
|
130
|
+
<option value="$PROJECT_DIR$/.gitignore" />
|
131
|
+
<option value="$PROJECT_DIR$/test/binky/helper_test.rb" />
|
132
|
+
<option value="$PROJECT_DIR$/test/binky/builder_test.rb" />
|
133
|
+
<option value="$PROJECT_DIR$/test/binky/activerecord_test.rb" />
|
135
134
|
<option value="$PROJECT_DIR$/README.md" />
|
136
135
|
<option value="$PROJECT_DIR$/lib/binky/builder.rb" />
|
137
|
-
<option value="$PROJECT_DIR$/test/binky/
|
136
|
+
<option value="$PROJECT_DIR$/test/binky/struct_test.rb" />
|
138
137
|
<option value="$PROJECT_DIR$/lib/binky/builder/version.rb" />
|
139
138
|
</list>
|
140
139
|
</option>
|
141
140
|
</component>
|
142
|
-
<component name="ProjectConfigurationFiles">
|
143
|
-
<option name="files">
|
144
|
-
<list>
|
145
|
-
<option value="$PROJECT_DIR$/.idea/binky-builder.iml" />
|
146
|
-
<option value="$PROJECT_DIR$/.idea/misc.xml" />
|
147
|
-
<option value="$PROJECT_DIR$/.idea/vcs.xml" />
|
148
|
-
<option value="$PROJECT_DIR$/.idea/modules.xml" />
|
149
|
-
<option value="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
|
150
|
-
</list>
|
151
|
-
</option>
|
152
|
-
</component>
|
153
141
|
<component name="ProjectFrameBounds" extendedState="6">
|
154
142
|
<option name="x" value="1920" />
|
155
143
|
<option name="y" value="28" />
|
@@ -158,11 +146,10 @@
|
|
158
146
|
</component>
|
159
147
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
160
148
|
<component name="ProjectView">
|
161
|
-
<navigator proportions="" version="1">
|
149
|
+
<navigator currentView="Scope" currentSubView="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope" proportions="" version="1">
|
162
150
|
<foldersAlwaysOnTop value="true" />
|
163
151
|
</navigator>
|
164
152
|
<panes>
|
165
|
-
<pane id="Scope" />
|
166
153
|
<pane id="ProjectPane">
|
167
154
|
<subPane>
|
168
155
|
<expand>
|
@@ -170,34 +157,45 @@
|
|
170
157
|
<item name="binky-builder" type="b2602c69:ProjectViewProjectNode" />
|
171
158
|
<item name="binky-builder" type="462c0819:PsiDirectoryNode" />
|
172
159
|
</path>
|
160
|
+
</expand>
|
161
|
+
<select />
|
162
|
+
</subPane>
|
163
|
+
</pane>
|
164
|
+
<pane id="Scope">
|
165
|
+
<subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope">
|
166
|
+
<expand>
|
173
167
|
<path>
|
174
|
-
<item name="binky-builder" type="
|
175
|
-
<item name="binky-builder" type="
|
176
|
-
<item name="lib" type="462c0819:PsiDirectoryNode" />
|
168
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
169
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
177
170
|
</path>
|
178
171
|
<path>
|
179
|
-
<item name="binky-builder" type="
|
180
|
-
<item name="binky-builder" type="
|
181
|
-
<item name="lib" type="
|
182
|
-
<item name="binky" type="462c0819:PsiDirectoryNode" />
|
172
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
173
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
174
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
183
175
|
</path>
|
184
176
|
<path>
|
185
|
-
<item name="binky-builder" type="
|
186
|
-
<item name="binky-builder" type="
|
187
|
-
<item name="lib" type="
|
188
|
-
<item name="binky" type="
|
189
|
-
<item name="builder" type="462c0819:PsiDirectoryNode" />
|
177
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
178
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
179
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
180
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
190
181
|
</path>
|
191
182
|
<path>
|
192
|
-
<item name="binky-builder" type="
|
193
|
-
<item name="binky-builder" type="
|
194
|
-
<item name="
|
183
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
184
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
185
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
186
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
187
|
+
<item name="builder" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
195
188
|
</path>
|
196
189
|
<path>
|
197
|
-
<item name="binky-builder" type="
|
198
|
-
<item name="binky-builder" type="
|
199
|
-
<item name="test" type="
|
200
|
-
|
190
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
191
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
192
|
+
<item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
193
|
+
</path>
|
194
|
+
<path>
|
195
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
196
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
197
|
+
<item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
198
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
201
199
|
</path>
|
202
200
|
</expand>
|
203
201
|
<select />
|
@@ -206,10 +204,12 @@
|
|
206
204
|
</panes>
|
207
205
|
</component>
|
208
206
|
<component name="PropertiesComponent">
|
207
|
+
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
209
208
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
210
209
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
211
210
|
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
212
211
|
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
212
|
+
<property name="nodejs_package_manager_path" value="npm" />
|
213
213
|
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
|
214
214
|
</component>
|
215
215
|
<component name="RunDashboard">
|
@@ -224,7 +224,7 @@
|
|
224
224
|
</list>
|
225
225
|
</option>
|
226
226
|
</component>
|
227
|
-
<component name="RunManager" selected="Test::Unit/Shoulda/Minitest.
|
227
|
+
<component name="RunManager" selected="Test::Unit/Shoulda/Minitest.All tests in test: binky-builder">
|
228
228
|
<configuration name="All tests in binky-builder: binky-builder" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
229
229
|
<module name="binky-builder" />
|
230
230
|
<predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
|
@@ -283,6 +283,35 @@
|
|
283
283
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
284
284
|
<method v="2" />
|
285
285
|
</configuration>
|
286
|
+
<configuration name="Run test 'activerecord_test': binky-builder" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
287
|
+
<module name="binky-builder" />
|
288
|
+
<predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
|
289
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
|
290
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
291
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
292
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
293
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
294
|
+
<envs>
|
295
|
+
<env name="JRUBY_OPTS" value="-X+O" />
|
296
|
+
</envs>
|
297
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
298
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
299
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov">
|
300
|
+
<COVERAGE_PATTERN ENABLED="true">
|
301
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
302
|
+
</COVERAGE_PATTERN>
|
303
|
+
</EXTENSION>
|
304
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
305
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/binky/activerecord_test.rb" />
|
306
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
307
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
308
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
309
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
310
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
311
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
312
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
313
|
+
<method v="2" />
|
314
|
+
</configuration>
|
286
315
|
<configuration name="Run test 'builder_test': binky-builder" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
287
316
|
<module name="binky-builder" />
|
288
317
|
<predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
|
@@ -312,7 +341,7 @@
|
|
312
341
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
313
342
|
<method v="2" />
|
314
343
|
</configuration>
|
315
|
-
<configuration name="
|
344
|
+
<configuration name="Run test 'struct_test': binky-builder" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true">
|
316
345
|
<module name="binky-builder" />
|
317
346
|
<predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
|
318
347
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
|
@@ -331,10 +360,10 @@
|
|
331
360
|
</COVERAGE_PATTERN>
|
332
361
|
</EXTENSION>
|
333
362
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
334
|
-
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/binky/
|
363
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/test/binky/struct_test.rb" />
|
335
364
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
336
|
-
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="
|
337
|
-
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="
|
365
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
366
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
338
367
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
339
368
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
340
369
|
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
@@ -343,10 +372,11 @@
|
|
343
372
|
</configuration>
|
344
373
|
<recent_temporary>
|
345
374
|
<list>
|
346
|
-
<item itemvalue="Test::Unit/Shoulda/Minitest.Run test 'builder_test': binky-builder" />
|
347
375
|
<item itemvalue="Test::Unit/Shoulda/Minitest.All tests in test: binky-builder" />
|
376
|
+
<item itemvalue="Test::Unit/Shoulda/Minitest.Run test 'struct_test': binky-builder" />
|
377
|
+
<item itemvalue="Test::Unit/Shoulda/Minitest.Run test 'activerecord_test': binky-builder" />
|
378
|
+
<item itemvalue="Test::Unit/Shoulda/Minitest.Run test 'builder_test': binky-builder" />
|
348
379
|
<item itemvalue="Test::Unit/Shoulda/Minitest.All tests in binky-builder: binky-builder" />
|
349
|
-
<item itemvalue="Test::Unit/Shoulda/Minitest.test_using_builder: binky-builder" />
|
350
380
|
</list>
|
351
381
|
</recent_temporary>
|
352
382
|
</component>
|
@@ -361,7 +391,12 @@
|
|
361
391
|
<workItem from="1596190243364" duration="5305000" />
|
362
392
|
<workItem from="1596196456720" duration="5542000" />
|
363
393
|
<workItem from="1596439308667" duration="19176000" />
|
364
|
-
<workItem from="1596462743515" duration="
|
394
|
+
<workItem from="1596462743515" duration="6742000" />
|
395
|
+
<workItem from="1596538937194" duration="1082000" />
|
396
|
+
<workItem from="1596613602740" duration="3179000" />
|
397
|
+
<workItem from="1596616805310" duration="17035000" />
|
398
|
+
<workItem from="1596698537845" duration="1934000" />
|
399
|
+
<workItem from="1596721829800" duration="1202000" />
|
365
400
|
</task>
|
366
401
|
<task id="LOCAL-00001" summary="Binky Builder gem initial commit.">
|
367
402
|
<created>1596191104643</created>
|
@@ -440,43 +475,127 @@
|
|
440
475
|
<option name="project" value="LOCAL" />
|
441
476
|
<updated>1596462191383</updated>
|
442
477
|
</task>
|
443
|
-
<
|
478
|
+
<task id="LOCAL-00012" summary="Binky Builder gem initial commit.">
|
479
|
+
<created>1596463070270</created>
|
480
|
+
<option name="number" value="00012" />
|
481
|
+
<option name="presentableId" value="LOCAL-00012" />
|
482
|
+
<option name="project" value="LOCAL" />
|
483
|
+
<updated>1596463070270</updated>
|
484
|
+
</task>
|
485
|
+
<task id="LOCAL-00013" summary="Binky Builder gem initial commit.">
|
486
|
+
<created>1596467478817</created>
|
487
|
+
<option name="number" value="00013" />
|
488
|
+
<option name="presentableId" value="LOCAL-00013" />
|
489
|
+
<option name="project" value="LOCAL" />
|
490
|
+
<updated>1596467478817</updated>
|
491
|
+
</task>
|
492
|
+
<task id="LOCAL-00014" summary="Binky Builder gem initial commit.">
|
493
|
+
<created>1596469840825</created>
|
494
|
+
<option name="number" value="00014" />
|
495
|
+
<option name="presentableId" value="LOCAL-00014" />
|
496
|
+
<option name="project" value="LOCAL" />
|
497
|
+
<updated>1596469840825</updated>
|
498
|
+
</task>
|
499
|
+
<task id="LOCAL-00015" summary="Binky Builder gem initial commit.">
|
500
|
+
<created>1596469918368</created>
|
501
|
+
<option name="number" value="00015" />
|
502
|
+
<option name="presentableId" value="LOCAL-00015" />
|
503
|
+
<option name="project" value="LOCAL" />
|
504
|
+
<updated>1596469918368</updated>
|
505
|
+
</task>
|
506
|
+
<task id="LOCAL-00016" summary="Binky Builder gem initial commit.">
|
507
|
+
<created>1596469949471</created>
|
508
|
+
<option name="number" value="00016" />
|
509
|
+
<option name="presentableId" value="LOCAL-00016" />
|
510
|
+
<option name="project" value="LOCAL" />
|
511
|
+
<updated>1596469949471</updated>
|
512
|
+
</task>
|
513
|
+
<task id="LOCAL-00017" summary="Binky Builder gem initial commit.">
|
514
|
+
<created>1596470177093</created>
|
515
|
+
<option name="number" value="00017" />
|
516
|
+
<option name="presentableId" value="LOCAL-00017" />
|
517
|
+
<option name="project" value="LOCAL" />
|
518
|
+
<updated>1596470177093</updated>
|
519
|
+
</task>
|
520
|
+
<task id="LOCAL-00018" summary="Binky Builder gem initial commit.">
|
521
|
+
<created>1596616508792</created>
|
522
|
+
<option name="number" value="00018" />
|
523
|
+
<option name="presentableId" value="LOCAL-00018" />
|
524
|
+
<option name="project" value="LOCAL" />
|
525
|
+
<updated>1596616508792</updated>
|
526
|
+
</task>
|
527
|
+
<task id="LOCAL-00019" summary="Binky Builder gem initial commit.">
|
528
|
+
<created>1596616621095</created>
|
529
|
+
<option name="number" value="00019" />
|
530
|
+
<option name="presentableId" value="LOCAL-00019" />
|
531
|
+
<option name="project" value="LOCAL" />
|
532
|
+
<updated>1596616621095</updated>
|
533
|
+
</task>
|
534
|
+
<task id="LOCAL-00020" summary="Binky Builder gem initial commit.">
|
535
|
+
<created>1596628497674</created>
|
536
|
+
<option name="number" value="00020" />
|
537
|
+
<option name="presentableId" value="LOCAL-00020" />
|
538
|
+
<option name="project" value="LOCAL" />
|
539
|
+
<updated>1596628497674</updated>
|
540
|
+
</task>
|
541
|
+
<task id="LOCAL-00021" summary="Binky Builder gem initial commit.">
|
542
|
+
<created>1596639172168</created>
|
543
|
+
<option name="number" value="00021" />
|
544
|
+
<option name="presentableId" value="LOCAL-00021" />
|
545
|
+
<option name="project" value="LOCAL" />
|
546
|
+
<updated>1596639172168</updated>
|
547
|
+
</task>
|
548
|
+
<task id="LOCAL-00022" summary="Binky Builder gem initial commit.">
|
549
|
+
<created>1596700881876</created>
|
550
|
+
<option name="number" value="00022" />
|
551
|
+
<option name="presentableId" value="LOCAL-00022" />
|
552
|
+
<option name="project" value="LOCAL" />
|
553
|
+
<updated>1596700881877</updated>
|
554
|
+
</task>
|
555
|
+
<task id="LOCAL-00023" summary="Binky Builder gem initial commit.">
|
556
|
+
<created>1596723010419</created>
|
557
|
+
<option name="number" value="00023" />
|
558
|
+
<option name="presentableId" value="LOCAL-00023" />
|
559
|
+
<option name="project" value="LOCAL" />
|
560
|
+
<updated>1596723010419</updated>
|
561
|
+
</task>
|
562
|
+
<option name="localTasksCounter" value="24" />
|
444
563
|
<servers />
|
445
564
|
</component>
|
446
565
|
<component name="TestHistory">
|
447
|
-
<history-entry file="Run_test_'
|
448
|
-
<configuration name="Run test '
|
566
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 06m 53s.xml">
|
567
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
449
568
|
</history-entry>
|
450
|
-
<history-entry file="
|
451
|
-
<configuration name="
|
569
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 07m 05s.xml">
|
570
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
452
571
|
</history-entry>
|
453
|
-
<history-entry file="
|
454
|
-
<configuration name="
|
572
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 07m 11s.xml">
|
573
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
455
574
|
</history-entry>
|
456
|
-
<history-entry file="
|
457
|
-
<configuration name="
|
575
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 07m 59s.xml">
|
576
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
458
577
|
</history-entry>
|
459
|
-
<history-entry file="Run_test_'
|
460
|
-
<configuration name="Run test '
|
578
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 08m 10s.xml">
|
579
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
461
580
|
</history-entry>
|
462
|
-
<history-entry file="
|
463
|
-
<configuration name="
|
581
|
+
<history-entry file="Run_test_'struct_test'__binky-builder - 2020.08.06 at 16h 08m 29s.xml">
|
582
|
+
<configuration name="Run test 'struct_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
464
583
|
</history-entry>
|
465
|
-
<history-entry file="All_tests_in_test__binky-builder - 2020.08.
|
584
|
+
<history-entry file="All_tests_in_test__binky-builder - 2020.08.06 at 16h 09m 25s.xml">
|
466
585
|
<configuration name="All tests in test: binky-builder" configurationId="TestUnitRunConfigurationType" />
|
467
586
|
</history-entry>
|
468
|
-
<history-entry file="
|
469
|
-
<configuration name="
|
587
|
+
<history-entry file="All_tests_in_test__binky-builder - 2020.08.06 at 16h 09m 34s.xml">
|
588
|
+
<configuration name="All tests in test: binky-builder" configurationId="TestUnitRunConfigurationType" />
|
470
589
|
</history-entry>
|
471
|
-
<history-entry file="
|
472
|
-
<configuration name="
|
590
|
+
<history-entry file="All_tests_in_test__binky-builder - 2020.08.06 at 16h 09m 37s.xml">
|
591
|
+
<configuration name="All tests in test: binky-builder" configurationId="TestUnitRunConfigurationType" />
|
473
592
|
</history-entry>
|
474
|
-
<history-entry file="
|
475
|
-
<configuration name="
|
593
|
+
<history-entry file="All_tests_in_test__binky-builder - 2020.08.06 at 16h 09m 39s.xml">
|
594
|
+
<configuration name="All tests in test: binky-builder" configurationId="TestUnitRunConfigurationType" />
|
476
595
|
</history-entry>
|
477
596
|
</component>
|
478
597
|
<component name="TimeTrackingManager">
|
479
|
-
<option name="totallyTimeSpent" value="
|
598
|
+
<option name="totallyTimeSpent" value="61197000" />
|
480
599
|
</component>
|
481
600
|
<component name="ToolWindowManager">
|
482
601
|
<frame x="1920" y="28" width="1920" height="1052" extended-state="6" />
|
@@ -486,9 +605,9 @@
|
|
486
605
|
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
487
606
|
<window_info id="Favorites" order="2" side_tool="true" />
|
488
607
|
<window_info anchor="bottom" id="Message" order="0" />
|
489
|
-
<window_info anchor="bottom" id="Find" order="1" weight="0.
|
490
|
-
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.
|
491
|
-
<window_info anchor="bottom" id="Debug" order="3" weight="0.
|
608
|
+
<window_info anchor="bottom" id="Find" order="1" weight="0.3295688" />
|
609
|
+
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.19609857" />
|
610
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.22895277" />
|
492
611
|
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
493
612
|
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
494
613
|
<window_info anchor="bottom" id="TODO" order="6" />
|
@@ -510,52 +629,58 @@
|
|
510
629
|
<MESSAGE value="Binky Builder gem initial commit." />
|
511
630
|
<option name="LAST_COMMIT_MESSAGE" value="Binky Builder gem initial commit." />
|
512
631
|
</component>
|
513
|
-
<component name="XDebuggerManager">
|
514
|
-
<breakpoint-manager>
|
515
|
-
<breakpoints>
|
516
|
-
<line-breakpoint enabled="true" type="ruby-line">
|
517
|
-
<url>file://$PROJECT_DIR$/test/binky/builder_test.rb</url>
|
518
|
-
<line>50</line>
|
519
|
-
<option name="timeStamp" value="5" />
|
520
|
-
</line-breakpoint>
|
521
|
-
<line-breakpoint enabled="true" type="ruby-line">
|
522
|
-
<url>file://$PROJECT_DIR$/lib/binky/builder.rb</url>
|
523
|
-
<line>95</line>
|
524
|
-
<option name="timeStamp" value="6" />
|
525
|
-
</line-breakpoint>
|
526
|
-
</breakpoints>
|
527
|
-
</breakpoint-manager>
|
528
|
-
</component>
|
529
632
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
530
|
-
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_binky_builder__binky_builder.rcov" NAME="All tests in binky-builder: binky-builder Coverage Results" MODIFIED="
|
531
|
-
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_test__binky_builder.rcov" NAME="All tests in test: binky-builder Coverage Results" MODIFIED="
|
532
|
-
<SUITE FILE_PATH="coverage/binky_builder@Run_test__builder_test___binky_builder.rcov" NAME="Run test 'builder_test': binky-builder Coverage Results" MODIFIED="
|
633
|
+
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_binky_builder__binky_builder.rcov" NAME="All tests in binky-builder: binky-builder Coverage Results" MODIFIED="1596616148912" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
634
|
+
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_test__binky_builder.rcov" NAME="All tests in test: binky-builder Coverage Results" MODIFIED="1596722978260" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
635
|
+
<SUITE FILE_PATH="coverage/binky_builder@Run_test__builder_test___binky_builder.rcov" NAME="Run test 'builder_test': binky-builder Coverage Results" MODIFIED="1596633653684" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
533
636
|
<SUITE FILE_PATH="coverage/binky_builder@test_using_builder__binky_builder.rcov" NAME="test_using_builder: binky-builder Coverage Results" MODIFIED="1596457170843" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
637
|
+
<SUITE FILE_PATH="coverage/binky_builder@Run_test__struct_test___binky_builder.rcov" NAME="Run test 'struct_test': binky-builder Coverage Results" MODIFIED="1596722908219" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
638
|
+
<SUITE FILE_PATH="coverage/binky_builder@Run_test__activerecord_test___binky_builder.rcov" NAME="Run test 'activerecord_test': binky-builder Coverage Results" MODIFIED="1596639288493" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="binky-builder" />
|
534
639
|
</component>
|
535
640
|
<component name="debuggerHistoryManager">
|
536
641
|
<expressions id="evaluateExpression">
|
537
642
|
<expression>
|
538
|
-
<expression-string
|
643
|
+
<expression-string>e</expression-string>
|
539
644
|
<language-id>ruby</language-id>
|
540
645
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
541
646
|
</expression>
|
542
647
|
<expression>
|
543
|
-
<expression-string
|
648
|
+
<expression-string>e.toll</expression-string>
|
544
649
|
<language-id>ruby</language-id>
|
545
650
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
546
651
|
</expression>
|
547
652
|
<expression>
|
548
|
-
<expression-string
|
653
|
+
<expression-string>e.to_k</expression-string>
|
549
654
|
<language-id>ruby</language-id>
|
550
655
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
551
656
|
</expression>
|
552
657
|
<expression>
|
553
|
-
<expression-string
|
658
|
+
<expression-string>e.to_h</expression-string>
|
554
659
|
<language-id>ruby</language-id>
|
555
660
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
556
661
|
</expression>
|
557
662
|
<expression>
|
558
|
-
<expression-string>
|
663
|
+
<expression-string>self.to_h</expression-string>
|
664
|
+
<language-id>ruby</language-id>
|
665
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
666
|
+
</expression>
|
667
|
+
<expression>
|
668
|
+
<expression-string>self</expression-string>
|
669
|
+
<language-id>ruby</language-id>
|
670
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
671
|
+
</expression>
|
672
|
+
<expression>
|
673
|
+
<expression-string>elements</expression-string>
|
674
|
+
<language-id>ruby</language-id>
|
675
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
676
|
+
</expression>
|
677
|
+
<expression>
|
678
|
+
<expression-string>elements.to_h</expression-string>
|
679
|
+
<language-id>ruby</language-id>
|
680
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
681
|
+
</expression>
|
682
|
+
<expression>
|
683
|
+
<expression-string>elements.to_hash</expression-string>
|
559
684
|
<language-id>ruby</language-id>
|
560
685
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
561
686
|
</expression>
|
@@ -569,82 +694,139 @@
|
|
569
694
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
570
695
|
<provider selected="true" editor-type-id="text-editor" />
|
571
696
|
</entry>
|
572
|
-
<entry file="file://$PROJECT_DIR$/.gitignore">
|
573
|
-
<provider selected="true" editor-type-id="text-editor" />
|
574
|
-
</entry>
|
575
697
|
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
576
698
|
<provider selected="true" editor-type-id="text-editor" />
|
577
699
|
</entry>
|
700
|
+
<entry file="file://$PROJECT_DIR$/Gemfile.lock" />
|
578
701
|
<entry file="file://$PROJECT_DIR$/binky-builder.gemspec">
|
579
702
|
<provider selected="true" editor-type-id="text-editor">
|
580
|
-
<state relative-caret-position="
|
581
|
-
<caret line="
|
703
|
+
<state relative-caret-position="546">
|
704
|
+
<caret line="21" column="56" selection-start-line="21" selection-start-column="56" selection-end-line="21" selection-end-column="56" />
|
705
|
+
</state>
|
706
|
+
</provider>
|
707
|
+
</entry>
|
708
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
709
|
+
<provider selected="true" editor-type-id="text-editor">
|
710
|
+
<state relative-caret-position="208">
|
711
|
+
<caret line="8" column="8" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
|
712
|
+
</state>
|
713
|
+
</provider>
|
714
|
+
</entry>
|
715
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/hash.rb">
|
716
|
+
<provider selected="true" editor-type-id="text-editor">
|
717
|
+
<state relative-caret-position="352">
|
718
|
+
<caret line="588" column="8" selection-start-line="588" selection-start-column="8" selection-end-line="588" selection-end-column="8" />
|
719
|
+
</state>
|
720
|
+
</provider>
|
721
|
+
</entry>
|
722
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/array.rb">
|
723
|
+
<provider selected="true" editor-type-id="text-editor">
|
724
|
+
<state relative-caret-position="423">
|
725
|
+
<caret line="1176" column="8" selection-start-line="1176" selection-start-column="8" selection-end-line="1176" selection-end-column="8" />
|
582
726
|
</state>
|
583
727
|
</provider>
|
584
728
|
</entry>
|
585
729
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/string.rb">
|
586
730
|
<provider selected="true" editor-type-id="text-editor">
|
587
|
-
<state relative-caret-position="
|
588
|
-
<caret line="
|
731
|
+
<state relative-caret-position="423">
|
732
|
+
<caret line="1305" column="8" selection-start-line="1305" selection-start-column="8" selection-end-line="1305" selection-end-column="8" />
|
589
733
|
</state>
|
590
734
|
</provider>
|
591
735
|
</entry>
|
592
|
-
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/
|
736
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/basic_object.rb">
|
593
737
|
<provider selected="true" editor-type-id="text-editor">
|
594
|
-
<state relative-caret-position="
|
595
|
-
<caret line="
|
738
|
+
<state relative-caret-position="189">
|
739
|
+
<caret line="231" column="8" selection-start-line="231" selection-start-column="8" selection-end-line="231" selection-end-column="8" />
|
740
|
+
</state>
|
741
|
+
</provider>
|
742
|
+
</entry>
|
743
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/module.rb">
|
744
|
+
<provider selected="true" editor-type-id="text-editor">
|
745
|
+
<state relative-caret-position="501">
|
746
|
+
<caret line="948" column="8" selection-start-line="948" selection-start-column="8" selection-end-line="948" selection-end-column="8" />
|
596
747
|
</state>
|
597
748
|
</provider>
|
598
749
|
</entry>
|
599
750
|
<entry file="file://$PROJECT_DIR$/README.md">
|
600
751
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
601
752
|
<state split_layout="SPLIT">
|
602
|
-
<first_editor relative-caret-position="
|
603
|
-
<caret line="
|
753
|
+
<first_editor relative-caret-position="338">
|
754
|
+
<caret line="13" selection-start-line="13" selection-end-line="13" />
|
604
755
|
</first_editor>
|
605
756
|
<second_editor />
|
606
757
|
</state>
|
607
758
|
</provider>
|
608
759
|
</entry>
|
609
|
-
<entry file="file://$PROJECT_DIR$/test/
|
760
|
+
<entry file="file://$PROJECT_DIR$/test/binky/helper_test.rb">
|
610
761
|
<provider selected="true" editor-type-id="text-editor">
|
611
762
|
<state relative-caret-position="104">
|
612
|
-
<caret line="4" selection-start-line="4" selection-end-line="4" />
|
763
|
+
<caret line="4" column="3" selection-start-line="4" selection-start-column="3" selection-end-line="4" selection-end-column="3" />
|
613
764
|
</state>
|
614
765
|
</provider>
|
615
766
|
</entry>
|
616
|
-
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/
|
767
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/object.rb">
|
617
768
|
<provider selected="true" editor-type-id="text-editor">
|
618
|
-
<state relative-caret-position="
|
619
|
-
<caret line="
|
769
|
+
<state relative-caret-position="18096">
|
770
|
+
<caret line="696" column="8" selection-start-line="696" selection-start-column="8" selection-end-line="696" selection-end-column="8" />
|
620
771
|
</state>
|
621
772
|
</provider>
|
622
773
|
</entry>
|
623
|
-
<entry file="file://$
|
774
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest/assertions.rb">
|
624
775
|
<provider selected="true" editor-type-id="text-editor">
|
625
|
-
<state relative-caret-position="
|
626
|
-
<caret line="
|
776
|
+
<state relative-caret-position="10816">
|
777
|
+
<caret line="416" selection-start-line="416" selection-end-line="416" />
|
778
|
+
</state>
|
779
|
+
</provider>
|
780
|
+
</entry>
|
781
|
+
<entry file="file://$PROJECT_DIR$/test/test_helper.rb">
|
782
|
+
<provider selected="true" editor-type-id="text-editor">
|
783
|
+
<state relative-caret-position="26">
|
784
|
+
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
785
|
+
</state>
|
786
|
+
</provider>
|
787
|
+
</entry>
|
788
|
+
<entry file="file://$PROJECT_DIR$/test/binky/activerecord_test.rb">
|
789
|
+
<provider selected="true" editor-type-id="text-editor" />
|
790
|
+
</entry>
|
791
|
+
<entry file="file://$PROJECT_DIR$/test/binky/builder_test.rb">
|
792
|
+
<provider selected="true" editor-type-id="text-editor">
|
793
|
+
<state relative-caret-position="520">
|
794
|
+
<caret line="20" lean-forward="true" selection-start-line="20" selection-end-line="20" />
|
795
|
+
</state>
|
796
|
+
</provider>
|
797
|
+
</entry>
|
798
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/2.7.0/pp.rb">
|
799
|
+
<provider selected="true" editor-type-id="text-editor">
|
800
|
+
<state relative-caret-position="231">
|
801
|
+
<caret line="600" selection-start-line="600" selection-end-line="600" />
|
627
802
|
</state>
|
628
803
|
</provider>
|
629
804
|
</entry>
|
630
805
|
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest/test.rb">
|
631
806
|
<provider selected="true" editor-type-id="text-editor">
|
632
|
-
<state relative-caret-position="
|
633
|
-
<caret line="
|
807
|
+
<state relative-caret-position="385">
|
808
|
+
<caret line="100" selection-start-line="100" selection-end-line="100" />
|
809
|
+
</state>
|
810
|
+
</provider>
|
811
|
+
</entry>
|
812
|
+
<entry file="file://$USER_HOME$/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/minitest-5.14.1/lib/minitest.rb">
|
813
|
+
<provider selected="true" editor-type-id="text-editor">
|
814
|
+
<state relative-caret-position="385">
|
815
|
+
<caret line="273" selection-start-line="273" selection-end-line="273" />
|
634
816
|
</state>
|
635
817
|
</provider>
|
636
818
|
</entry>
|
637
819
|
<entry file="file://$PROJECT_DIR$/lib/binky/builder.rb">
|
638
820
|
<provider selected="true" editor-type-id="text-editor">
|
639
|
-
<state relative-caret-position="
|
640
|
-
<caret line="
|
821
|
+
<state relative-caret-position="810">
|
822
|
+
<caret line="93" column="3" lean-forward="true" selection-start-line="93" selection-start-column="3" selection-end-line="93" selection-end-column="3" />
|
641
823
|
</state>
|
642
824
|
</provider>
|
643
825
|
</entry>
|
644
|
-
<entry file="file://$PROJECT_DIR$/test/binky/
|
826
|
+
<entry file="file://$PROJECT_DIR$/test/binky/struct_test.rb">
|
645
827
|
<provider selected="true" editor-type-id="text-editor">
|
646
|
-
<state relative-caret-position="
|
647
|
-
<caret line="
|
828
|
+
<state relative-caret-position="357">
|
829
|
+
<caret line="36" column="21" lean-forward="true" selection-start-line="36" selection-start-column="21" selection-end-line="36" selection-end-column="21" />
|
648
830
|
</state>
|
649
831
|
</provider>
|
650
832
|
</entry>
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ Initialize an instance using json data, including the Builder class on your clas
|
|
24
24
|
Once initialized just use the accessors as any other instance.
|
25
25
|
```ruby
|
26
26
|
class Issue
|
27
|
-
include Binky::
|
27
|
+
include Binky::Struct
|
28
28
|
alias :super_initialize :initialize
|
29
29
|
|
30
30
|
def initialize(json = nil)
|
@@ -38,21 +38,31 @@ Once initialized just use the accessors as any other instance.
|
|
38
38
|
|
39
39
|
### Used on ActiveRecord models
|
40
40
|
Binky-Builder includes another helper that can be used to initialize *ActiveRecord* models based on its column names.
|
41
|
+
In case not using column names but an array of method names, new accessors would be crated to access those methods.
|
41
42
|
```ruby
|
42
43
|
class Issue < ApplicationRecord
|
43
|
-
include Binky::
|
44
|
+
include Binky::Helper
|
44
45
|
end
|
45
46
|
|
46
|
-
issue = Issue.new.build_by_keys({id: 1234},Issue.column_names) # => Issue.column_names = id:
|
47
|
-
issue.
|
47
|
+
issue = Issue.new.build_by_keys({id: 1234,text: "hocus pocus"},Issue.column_names) # => Issue.column_names = id:
|
48
|
+
issue.as_json # => {id: 1234}
|
49
|
+
issue.to_h # => nil
|
50
|
+
|
51
|
+
issue = Issue.new.build_by_keys({id: 1234,text: "hocus pocus"}) # => Issue.column_names = id:
|
52
|
+
issue.id # => {id: 1234}
|
53
|
+
issue.text # => {text: "hocus pocus"}
|
54
|
+
issue.as_json #=> {id: 1234,text: "hocus pocus"}
|
55
|
+
issue.to_h # => nil
|
48
56
|
```
|
49
57
|
|
58
|
+
|
50
59
|
Call *build_by_keys* method once the model has been initialized passing a json message,
|
51
|
-
it
|
52
|
-
This method will also create an instance variable called *@to_hash* contains a pair-value hash as a result.
|
60
|
+
it would *yield* itself as a block in case you want to perform further actions.
|
53
61
|
```ruby
|
54
62
|
build_by_keys(json = {},keys = nil)
|
55
63
|
```
|
64
|
+
This method would also create an instance variable called *@to_h* contains a pair-value hash as a result.
|
65
|
+
*@to_h* instance variable won't be available if the class inherits from *ActiveRecord::Base*
|
56
66
|
|
57
67
|
### Auxiliary methods
|
58
68
|
Binky-Builder comes with two extra methods to search and create instance variable and methods.
|
data/lib/binky/builder.rb
CHANGED
@@ -7,14 +7,17 @@ module Binky
|
|
7
7
|
# Keys are given through a block.
|
8
8
|
# The result of it it's stored on a instance variable called to_hash and accessible through accessors with same name.
|
9
9
|
def build_by_keys(json = {}, keys = nil)
|
10
|
-
accessor_builder('to_hash',{})
|
11
10
|
k = keys || json&.keys
|
12
|
-
raise ArgumentError unless k&.respond_to?(:each)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
raise ArgumentError "keys argument is not an array" unless k&.respond_to?(:each)
|
12
|
+
accessor_builder('to_h',{}) unless self.class.method_defined?(:as_json)
|
13
|
+
json.transform_keys!(&:to_s)
|
14
|
+
k&.reject!{|ky| ky.end_with?('=')}
|
15
|
+
k&.each do |key|
|
16
|
+
self.send("#{key}=",nested_hash_value(json, key.to_s))
|
17
|
+
@to_h&.merge!({key.to_sym => nested_hash_value(json,key.to_s)})
|
18
|
+
end
|
17
19
|
yield self if block_given?
|
20
|
+
self
|
18
21
|
end
|
19
22
|
|
20
23
|
# Builds an instance variable as well as its class method accessors from a key value pair.
|
@@ -41,7 +44,6 @@ module Binky
|
|
41
44
|
obj[key]
|
42
45
|
elsif obj.respond_to?(:each)
|
43
46
|
r = nil
|
44
|
-
#The asterisk "splat" operator means you can pass multiple parameters in its place and the block will see them as an array.
|
45
47
|
obj.find do |*a|
|
46
48
|
r = nested_hash_value(a.last, key)
|
47
49
|
end
|
@@ -49,8 +51,12 @@ module Binky
|
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
52
|
-
def
|
53
|
-
|
54
|
+
def method_missing(name,*args)
|
55
|
+
accessor_builder name.to_s.chop, args[0]
|
56
|
+
end
|
57
|
+
|
58
|
+
def attribute_from_inner_key(elem, attr, in_key = nil)
|
59
|
+
{attr.to_sym => nested_hash_value(elem, in_key&.present? ? in_key : attr.to_s)}
|
54
60
|
end
|
55
61
|
end
|
56
62
|
|
@@ -59,22 +65,22 @@ module Binky
|
|
59
65
|
include Helper
|
60
66
|
|
61
67
|
def initialize(json = nil)
|
62
|
-
|
63
|
-
json
|
68
|
+
accessor_builder('to_h',{})
|
69
|
+
json&.each do |k, v|
|
64
70
|
self.send("#{k}=", v)
|
65
|
-
end
|
71
|
+
end
|
66
72
|
end
|
67
73
|
|
68
74
|
def method_missing(name, *args)
|
69
75
|
attribute = name.to_s.start_with?(/\d/) ? "_#{name.to_s}" : name.to_s
|
70
76
|
if attribute =~ /=$/
|
71
77
|
if args[0].respond_to?(:key?) || args[0].is_a?(Hash)
|
72
|
-
@
|
78
|
+
@to_h[attribute.chop] = self.class.new(args[0])
|
73
79
|
else
|
74
|
-
@
|
80
|
+
@to_h[attribute.chop] = args[0]
|
75
81
|
end
|
76
82
|
else
|
77
|
-
@
|
83
|
+
@to_h[attribute]
|
78
84
|
end
|
79
85
|
end
|
80
86
|
end
|
@@ -82,18 +88,7 @@ module Binky
|
|
82
88
|
module Builder
|
83
89
|
class Error < StandardError; end
|
84
90
|
include Helper
|
85
|
-
|
86
|
-
def initialize(json = {}, keys = nil)
|
87
|
-
k = keys || json&.keys
|
88
|
-
k&.reject! {|key| key.to_s.include?("=")}
|
89
|
-
json.transform_keys!(&:to_sym)
|
90
|
-
k&.each do |key|
|
91
|
-
self.send("#{key}=",nested_hash_value(json, key.to_sym))
|
92
|
-
end unless json.nil?
|
93
|
-
end
|
94
|
-
|
95
|
-
def method_missing(name,*args)
|
96
|
-
accessor_builder name.to_s.chop, args[0]
|
97
|
-
end
|
91
|
+
alias_method :initialize,:build_by_keys
|
98
92
|
end
|
93
|
+
|
99
94
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binky-builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduard Garcia Castello
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -18,6 +18,12 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
|
+
- ".idea/.rakeTasks"
|
22
|
+
- ".idea/binky-builder.iml"
|
23
|
+
- ".idea/inspectionProfiles/Project_Default.xml"
|
24
|
+
- ".idea/misc.xml"
|
25
|
+
- ".idea/modules.xml"
|
26
|
+
- ".idea/vcs.xml"
|
21
27
|
- ".idea/workspace.xml"
|
22
28
|
- ".travis.yml"
|
23
29
|
- CODE_OF_CONDUCT.md
|