binky-builder 0.3.0 → 0.5.2
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 +243 -112
- data/README.md +10 -4
- data/lib/binky/builder.rb +22 -25
- 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: fe99fd93ec07d283c7943a29aa9173271689daf1683b1a7a4e863b01142e3a3b
|
4
|
+
data.tar.gz: 34545763117bfdc5f0d0efde8aa6760be2b29f0968bd6e1368442093684e1417
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c865d81ec3920b4dc46052259338e5ac55207ec03b3da45d6b5d5feb28c8ab00a5b192a91f5e7665dd45b444fa8b5c3f09c694c8ed3b3fe23f93acd82001bd
|
7
|
+
data.tar.gz: 2c68c2d9aeeb59554f39e5c08690b41d34ae504b51c119ca38d731b627e121b06881e01ef9c4423361934454effc4eed8fea88cecb205cf5f64b07af358a9200
|
data/.gitignore
CHANGED
data/.idea/workspace.xml
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
|
-
<list default="true" id="c1900bce-76f3-4483-9969-b14ec05dbe50" name="Default Changelist" comment="">
|
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,8 +16,8 @@
|
|
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="267">
|
20
|
+
<caret line="66" column="8" selection-start-line="66" selection-start-column="8" selection-end-line="66" selection-end-column="8" />
|
23
21
|
</state>
|
24
22
|
</provider>
|
25
23
|
</entry>
|
@@ -27,56 +25,53 @@
|
|
27
25
|
<file pinned="false" current-in-tab="false">
|
28
26
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/string.rb">
|
29
27
|
<provider selected="true" editor-type-id="text-editor">
|
30
|
-
<state relative-caret-position="
|
31
|
-
<caret line="
|
28
|
+
<state relative-caret-position="423">
|
29
|
+
<caret line="1305" column="8" selection-start-line="1305" selection-start-column="8" selection-end-line="1305" selection-end-column="8" />
|
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://$APPLICATION_HOME_DIR$/rubystubs26/
|
35
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/array.rb">
|
38
36
|
<provider selected="true" editor-type-id="text-editor">
|
39
|
-
<state relative-caret-position="
|
40
|
-
<caret line="
|
37
|
+
<state relative-caret-position="423">
|
38
|
+
<caret line="1176" column="8" selection-start-line="1176" selection-start-column="8" selection-end-line="1176" selection-end-column="8" />
|
41
39
|
</state>
|
42
40
|
</provider>
|
43
41
|
</entry>
|
44
42
|
</file>
|
45
|
-
<file pinned="false" current-in-tab="
|
46
|
-
<entry file="file://$
|
43
|
+
<file pinned="false" current-in-tab="false">
|
44
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/hash.rb">
|
47
45
|
<provider selected="true" editor-type-id="text-editor">
|
48
|
-
<state relative-caret-position="
|
49
|
-
<caret line="
|
46
|
+
<state relative-caret-position="352">
|
47
|
+
<caret line="588" column="8" selection-start-line="588" selection-start-column="8" selection-end-line="588" selection-end-column="8" />
|
50
48
|
</state>
|
51
49
|
</provider>
|
52
50
|
</entry>
|
53
51
|
</file>
|
54
|
-
<file pinned="false" current-in-tab="
|
55
|
-
<entry file="file://$PROJECT_DIR$/
|
56
|
-
<provider selected="true" editor-type-id="
|
57
|
-
<state
|
58
|
-
<
|
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 />
|
52
|
+
<file pinned="false" current-in-tab="true">
|
53
|
+
<entry file="file://$PROJECT_DIR$/lib/binky/builder/version.rb">
|
54
|
+
<provider selected="true" editor-type-id="text-editor">
|
55
|
+
<state relative-caret-position="52">
|
56
|
+
<caret line="2" column="20" selection-start-line="2" selection-start-column="20" selection-end-line="2" selection-end-column="20" />
|
62
57
|
</state>
|
63
58
|
</provider>
|
64
59
|
</entry>
|
65
60
|
</file>
|
66
61
|
<file pinned="false" current-in-tab="false">
|
67
|
-
<entry file="file://$PROJECT_DIR$/test/
|
62
|
+
<entry file="file://$PROJECT_DIR$/test/binky/builder_test.rb">
|
68
63
|
<provider selected="true" editor-type-id="text-editor">
|
69
|
-
<state relative-caret-position="
|
70
|
-
<caret line="
|
64
|
+
<state relative-caret-position="3146">
|
65
|
+
<caret line="121" lean-forward="true" selection-start-line="121" selection-end-line="121" />
|
71
66
|
</state>
|
72
67
|
</provider>
|
73
68
|
</entry>
|
74
69
|
</file>
|
75
70
|
<file pinned="false" current-in-tab="false">
|
76
|
-
<entry file="file://$
|
71
|
+
<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">
|
77
72
|
<provider selected="true" editor-type-id="text-editor">
|
78
|
-
<state relative-caret-position="
|
79
|
-
<caret line="
|
73
|
+
<state relative-caret-position="5980">
|
74
|
+
<caret line="230" selection-start-line="230" selection-end-line="230" />
|
80
75
|
</state>
|
81
76
|
</provider>
|
82
77
|
</entry>
|
@@ -84,7 +79,7 @@
|
|
84
79
|
<file pinned="false" current-in-tab="false">
|
85
80
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/module.rb">
|
86
81
|
<provider selected="true" editor-type-id="text-editor">
|
87
|
-
<state relative-caret-position="
|
82
|
+
<state relative-caret-position="18694">
|
88
83
|
<caret line="719" column="33" selection-start-line="719" selection-start-column="18" selection-end-line="719" selection-end-column="33" />
|
89
84
|
</state>
|
90
85
|
</provider>
|
@@ -93,7 +88,7 @@
|
|
93
88
|
<file pinned="false" current-in-tab="false">
|
94
89
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/basic_object.rb">
|
95
90
|
<provider selected="true" editor-type-id="text-editor">
|
96
|
-
<state relative-caret-position="
|
91
|
+
<state relative-caret-position="189">
|
97
92
|
<caret line="231" column="8" selection-start-line="231" selection-start-column="8" selection-end-line="231" selection-end-column="8" />
|
98
93
|
</state>
|
99
94
|
</provider>
|
@@ -102,8 +97,8 @@
|
|
102
97
|
<file pinned="false" current-in-tab="false">
|
103
98
|
<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">
|
104
99
|
<provider selected="true" editor-type-id="text-editor">
|
105
|
-
<state relative-caret-position="
|
106
|
-
<caret line="
|
100
|
+
<state relative-caret-position="189">
|
101
|
+
<caret line="100" selection-start-line="100" selection-end-line="100" />
|
107
102
|
</state>
|
108
103
|
</provider>
|
109
104
|
</entry>
|
@@ -122,6 +117,8 @@
|
|
122
117
|
<find>instance_</find>
|
123
118
|
<find>instance_method</find>
|
124
119
|
<find>block</find>
|
120
|
+
<find>to_hash</find>
|
121
|
+
<find>MyBuilder</find>
|
125
122
|
</findStrings>
|
126
123
|
</component>
|
127
124
|
<component name="Git.Settings">
|
@@ -133,8 +130,9 @@
|
|
133
130
|
<option value="$PROJECT_DIR$/lib/binky/builder/builder_helper.rb" />
|
134
131
|
<option value="$PROJECT_DIR$/binky-builder.gemspec" />
|
135
132
|
<option value="$PROJECT_DIR$/README.md" />
|
136
|
-
<option value="$PROJECT_DIR
|
133
|
+
<option value="$PROJECT_DIR$/.gitignore" />
|
137
134
|
<option value="$PROJECT_DIR$/lib/binky/builder.rb" />
|
135
|
+
<option value="$PROJECT_DIR$/test/binky/builder_test.rb" />
|
138
136
|
<option value="$PROJECT_DIR$/lib/binky/builder/version.rb" />
|
139
137
|
</list>
|
140
138
|
</option>
|
@@ -158,54 +156,65 @@
|
|
158
156
|
</component>
|
159
157
|
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
160
158
|
<component name="ProjectView">
|
161
|
-
<navigator proportions="" version="1">
|
159
|
+
<navigator currentView="Scope" currentSubView="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope" proportions="" version="1">
|
162
160
|
<foldersAlwaysOnTop value="true" />
|
163
161
|
</navigator>
|
164
162
|
<panes>
|
165
|
-
<pane id="
|
166
|
-
<subPane>
|
163
|
+
<pane id="Scope">
|
164
|
+
<subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope">
|
167
165
|
<expand>
|
168
166
|
<path>
|
169
|
-
<item name="binky-builder" type="
|
170
|
-
<item name="binky-builder" type="
|
167
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
168
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
171
169
|
</path>
|
172
170
|
<path>
|
173
|
-
<item name="binky-builder" type="
|
174
|
-
<item name="binky-builder" type="
|
175
|
-
<item name="lib" type="
|
171
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
172
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
173
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
176
174
|
</path>
|
177
175
|
<path>
|
178
|
-
<item name="binky-builder" type="
|
179
|
-
<item name="binky-builder" type="
|
180
|
-
<item name="lib" type="
|
181
|
-
<item name="binky" type="
|
176
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
177
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
178
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
179
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
182
180
|
</path>
|
183
181
|
<path>
|
184
|
-
<item name="binky-builder" type="
|
185
|
-
<item name="binky-builder" type="
|
186
|
-
<item name="lib" type="
|
187
|
-
<item name="binky" type="
|
188
|
-
<item name="builder" type="
|
182
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
183
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
184
|
+
<item name="lib" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
185
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
186
|
+
<item name="builder" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
189
187
|
</path>
|
190
188
|
<path>
|
191
|
-
<item name="binky-builder" type="
|
192
|
-
<item name="binky-builder" type="
|
193
|
-
<item name="test" type="
|
189
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
190
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
191
|
+
<item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
194
192
|
</path>
|
193
|
+
<path>
|
194
|
+
<item name="binky-builder" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
|
195
|
+
<item name="~/RubymineProjects/binky-builder" type="442cc68d:ScopeViewTreeModel$RootNode" />
|
196
|
+
<item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
197
|
+
<item name="binky" type="9f88c78c:ScopeViewTreeModel$FileNode" />
|
198
|
+
</path>
|
199
|
+
</expand>
|
200
|
+
<select />
|
201
|
+
</subPane>
|
202
|
+
</pane>
|
203
|
+
<pane id="ProjectPane">
|
204
|
+
<subPane>
|
205
|
+
<expand>
|
195
206
|
<path>
|
196
207
|
<item name="binky-builder" type="b2602c69:ProjectViewProjectNode" />
|
197
208
|
<item name="binky-builder" type="462c0819:PsiDirectoryNode" />
|
198
|
-
<item name="test" type="462c0819:PsiDirectoryNode" />
|
199
|
-
<item name="binky" type="462c0819:PsiDirectoryNode" />
|
200
209
|
</path>
|
201
210
|
</expand>
|
202
211
|
<select />
|
203
212
|
</subPane>
|
204
213
|
</pane>
|
205
|
-
<pane id="Scope" />
|
206
214
|
</panes>
|
207
215
|
</component>
|
208
216
|
<component name="PropertiesComponent">
|
217
|
+
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
209
218
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
210
219
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/../vortrics" />
|
211
220
|
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
@@ -360,7 +369,11 @@
|
|
360
369
|
<updated>1596190242171</updated>
|
361
370
|
<workItem from="1596190243364" duration="5305000" />
|
362
371
|
<workItem from="1596196456720" duration="5542000" />
|
363
|
-
<workItem from="1596439308667" duration="
|
372
|
+
<workItem from="1596439308667" duration="19176000" />
|
373
|
+
<workItem from="1596462743515" duration="6742000" />
|
374
|
+
<workItem from="1596538937194" duration="1082000" />
|
375
|
+
<workItem from="1596613602740" duration="3179000" />
|
376
|
+
<workItem from="1596616805310" duration="6190000" />
|
364
377
|
</task>
|
365
378
|
<task id="LOCAL-00001" summary="Binky Builder gem initial commit.">
|
366
379
|
<created>1596191104643</created>
|
@@ -425,43 +438,120 @@
|
|
425
438
|
<option name="project" value="LOCAL" />
|
426
439
|
<updated>1596447831202</updated>
|
427
440
|
</task>
|
428
|
-
<
|
441
|
+
<task id="LOCAL-00010" summary="Binky Builder gem initial commit.">
|
442
|
+
<created>1596461165447</created>
|
443
|
+
<option name="number" value="00010" />
|
444
|
+
<option name="presentableId" value="LOCAL-00010" />
|
445
|
+
<option name="project" value="LOCAL" />
|
446
|
+
<updated>1596461165447</updated>
|
447
|
+
</task>
|
448
|
+
<task id="LOCAL-00011" summary="Binky Builder gem initial commit.">
|
449
|
+
<created>1596462191383</created>
|
450
|
+
<option name="number" value="00011" />
|
451
|
+
<option name="presentableId" value="LOCAL-00011" />
|
452
|
+
<option name="project" value="LOCAL" />
|
453
|
+
<updated>1596462191383</updated>
|
454
|
+
</task>
|
455
|
+
<task id="LOCAL-00012" summary="Binky Builder gem initial commit.">
|
456
|
+
<created>1596463070270</created>
|
457
|
+
<option name="number" value="00012" />
|
458
|
+
<option name="presentableId" value="LOCAL-00012" />
|
459
|
+
<option name="project" value="LOCAL" />
|
460
|
+
<updated>1596463070270</updated>
|
461
|
+
</task>
|
462
|
+
<task id="LOCAL-00013" summary="Binky Builder gem initial commit.">
|
463
|
+
<created>1596467478817</created>
|
464
|
+
<option name="number" value="00013" />
|
465
|
+
<option name="presentableId" value="LOCAL-00013" />
|
466
|
+
<option name="project" value="LOCAL" />
|
467
|
+
<updated>1596467478817</updated>
|
468
|
+
</task>
|
469
|
+
<task id="LOCAL-00014" summary="Binky Builder gem initial commit.">
|
470
|
+
<created>1596469840825</created>
|
471
|
+
<option name="number" value="00014" />
|
472
|
+
<option name="presentableId" value="LOCAL-00014" />
|
473
|
+
<option name="project" value="LOCAL" />
|
474
|
+
<updated>1596469840825</updated>
|
475
|
+
</task>
|
476
|
+
<task id="LOCAL-00015" summary="Binky Builder gem initial commit.">
|
477
|
+
<created>1596469918368</created>
|
478
|
+
<option name="number" value="00015" />
|
479
|
+
<option name="presentableId" value="LOCAL-00015" />
|
480
|
+
<option name="project" value="LOCAL" />
|
481
|
+
<updated>1596469918368</updated>
|
482
|
+
</task>
|
483
|
+
<task id="LOCAL-00016" summary="Binky Builder gem initial commit.">
|
484
|
+
<created>1596469949471</created>
|
485
|
+
<option name="number" value="00016" />
|
486
|
+
<option name="presentableId" value="LOCAL-00016" />
|
487
|
+
<option name="project" value="LOCAL" />
|
488
|
+
<updated>1596469949471</updated>
|
489
|
+
</task>
|
490
|
+
<task id="LOCAL-00017" summary="Binky Builder gem initial commit.">
|
491
|
+
<created>1596470177093</created>
|
492
|
+
<option name="number" value="00017" />
|
493
|
+
<option name="presentableId" value="LOCAL-00017" />
|
494
|
+
<option name="project" value="LOCAL" />
|
495
|
+
<updated>1596470177093</updated>
|
496
|
+
</task>
|
497
|
+
<task id="LOCAL-00018" summary="Binky Builder gem initial commit.">
|
498
|
+
<created>1596616508792</created>
|
499
|
+
<option name="number" value="00018" />
|
500
|
+
<option name="presentableId" value="LOCAL-00018" />
|
501
|
+
<option name="project" value="LOCAL" />
|
502
|
+
<updated>1596616508792</updated>
|
503
|
+
</task>
|
504
|
+
<task id="LOCAL-00019" summary="Binky Builder gem initial commit.">
|
505
|
+
<created>1596616621095</created>
|
506
|
+
<option name="number" value="00019" />
|
507
|
+
<option name="presentableId" value="LOCAL-00019" />
|
508
|
+
<option name="project" value="LOCAL" />
|
509
|
+
<updated>1596616621095</updated>
|
510
|
+
</task>
|
511
|
+
<task id="LOCAL-00020" summary="Binky Builder gem initial commit.">
|
512
|
+
<created>1596628497674</created>
|
513
|
+
<option name="number" value="00020" />
|
514
|
+
<option name="presentableId" value="LOCAL-00020" />
|
515
|
+
<option name="project" value="LOCAL" />
|
516
|
+
<updated>1596628497674</updated>
|
517
|
+
</task>
|
518
|
+
<option name="localTasksCounter" value="21" />
|
429
519
|
<servers />
|
430
520
|
</component>
|
431
521
|
<component name="TestHistory">
|
432
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
522
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 51m 44s.xml">
|
433
523
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
434
524
|
</history-entry>
|
435
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
525
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 51m 46s.xml">
|
436
526
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
437
527
|
</history-entry>
|
438
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
528
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 52m 49s.xml">
|
439
529
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
440
530
|
</history-entry>
|
441
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
531
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 52m 51s.xml">
|
442
532
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
443
533
|
</history-entry>
|
444
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
534
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 52m 54s.xml">
|
445
535
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
446
536
|
</history-entry>
|
447
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
537
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 53m 40s.xml">
|
448
538
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
449
539
|
</history-entry>
|
450
|
-
<history-entry file="
|
451
|
-
<configuration name="
|
540
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 53m 59s.xml">
|
541
|
+
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
452
542
|
</history-entry>
|
453
|
-
<history-entry file="
|
454
|
-
<configuration name="
|
543
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 54m 01s.xml">
|
544
|
+
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
455
545
|
</history-entry>
|
456
|
-
<history-entry file="
|
457
|
-
<configuration name="
|
546
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 54m 02s.xml">
|
547
|
+
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
458
548
|
</history-entry>
|
459
|
-
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.
|
549
|
+
<history-entry file="Run_test_'builder_test'__binky-builder - 2020.08.05 at 13h 54m 04s.xml">
|
460
550
|
<configuration name="Run test 'builder_test': binky-builder" configurationId="TestUnitRunConfigurationType" />
|
461
551
|
</history-entry>
|
462
552
|
</component>
|
463
553
|
<component name="TimeTrackingManager">
|
464
|
-
<option name="totallyTimeSpent" value="
|
554
|
+
<option name="totallyTimeSpent" value="47216000" />
|
465
555
|
</component>
|
466
556
|
<component name="ToolWindowManager">
|
467
557
|
<frame x="1920" y="28" width="1920" height="1052" extended-state="6" />
|
@@ -472,8 +562,8 @@
|
|
472
562
|
<window_info id="Favorites" order="2" side_tool="true" />
|
473
563
|
<window_info anchor="bottom" id="Message" order="0" />
|
474
564
|
<window_info anchor="bottom" id="Find" order="1" weight="0.32976827" />
|
475
|
-
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.
|
476
|
-
<window_info anchor="bottom" id="Debug" order="3" weight="0.
|
565
|
+
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.15400411" />
|
566
|
+
<window_info anchor="bottom" id="Debug" order="3" weight="0.35523614" />
|
477
567
|
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
478
568
|
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
479
569
|
<window_info anchor="bottom" id="TODO" order="6" />
|
@@ -500,47 +590,62 @@
|
|
500
590
|
<breakpoints>
|
501
591
|
<line-breakpoint enabled="true" type="ruby-line">
|
502
592
|
<url>file://$PROJECT_DIR$/test/binky/builder_test.rb</url>
|
503
|
-
<line>
|
504
|
-
<option name="timeStamp" value="
|
505
|
-
</line-breakpoint>
|
506
|
-
<line-breakpoint enabled="true" type="ruby-line">
|
507
|
-
<url>file://$PROJECT_DIR$/lib/binky/builder.rb</url>
|
508
|
-
<line>93</line>
|
509
|
-
<option name="timeStamp" value="6" />
|
593
|
+
<line>69</line>
|
594
|
+
<option name="timeStamp" value="7" />
|
510
595
|
</line-breakpoint>
|
511
596
|
</breakpoints>
|
512
597
|
</breakpoint-manager>
|
513
598
|
</component>
|
514
599
|
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
515
|
-
<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="
|
516
|
-
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_test__binky_builder.rcov" NAME="All tests in test: binky-builder Coverage Results" MODIFIED="
|
517
|
-
<SUITE FILE_PATH="coverage/binky_builder@Run_test__builder_test___binky_builder.rcov" NAME="Run test 'builder_test': binky-builder Coverage Results" MODIFIED="
|
600
|
+
<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" />
|
601
|
+
<SUITE FILE_PATH="coverage/binky_builder@All_tests_in_test__binky_builder.rcov" NAME="All tests in test: binky-builder Coverage Results" MODIFIED="1596469552101" 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" />
|
602
|
+
<SUITE FILE_PATH="coverage/binky_builder@Run_test__builder_test___binky_builder.rcov" NAME="Run test 'builder_test': binky-builder Coverage Results" MODIFIED="1596628442977" 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" />
|
518
603
|
<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" />
|
519
604
|
</component>
|
520
605
|
<component name="debuggerHistoryManager">
|
521
606
|
<expressions id="evaluateExpression">
|
522
607
|
<expression>
|
523
|
-
<expression-string
|
608
|
+
<expression-string>self.to_h</expression-string>
|
524
609
|
<language-id>ruby</language-id>
|
525
610
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
526
611
|
</expression>
|
527
612
|
<expression>
|
528
|
-
<expression-string
|
613
|
+
<expression-string>self</expression-string>
|
529
614
|
<language-id>ruby</language-id>
|
530
615
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
531
616
|
</expression>
|
532
617
|
<expression>
|
533
|
-
<expression-string
|
618
|
+
<expression-string>elements</expression-string>
|
534
619
|
<language-id>ruby</language-id>
|
535
620
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
536
621
|
</expression>
|
537
622
|
<expression>
|
538
|
-
<expression-string
|
623
|
+
<expression-string>elements.to_h</expression-string>
|
539
624
|
<language-id>ruby</language-id>
|
540
625
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
541
626
|
</expression>
|
542
627
|
<expression>
|
543
|
-
<expression-string>
|
628
|
+
<expression-string>elements.to_hash</expression-string>
|
629
|
+
<language-id>ruby</language-id>
|
630
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
631
|
+
</expression>
|
632
|
+
<expression>
|
633
|
+
<expression-string>elements.as_json</expression-string>
|
634
|
+
<language-id>ruby</language-id>
|
635
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
636
|
+
</expression>
|
637
|
+
<expression>
|
638
|
+
<expression-string>e.to_hash[:items][0]["fromString"]</expression-string>
|
639
|
+
<language-id>ruby</language-id>
|
640
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
641
|
+
</expression>
|
642
|
+
<expression>
|
643
|
+
<expression-string>e.to_hash[:items][0][:fromString]</expression-string>
|
644
|
+
<language-id>ruby</language-id>
|
645
|
+
<evaluation-mode>EXPRESSION</evaluation-mode>
|
646
|
+
</expression>
|
647
|
+
<expression>
|
648
|
+
<expression-string>e.to_hash[:items][0]</expression-string>
|
544
649
|
<language-id>ruby</language-id>
|
545
650
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
546
651
|
</expression>
|
@@ -554,16 +659,21 @@
|
|
554
659
|
<entry file="file://$PROJECT_DIR$/.travis.yml">
|
555
660
|
<provider selected="true" editor-type-id="text-editor" />
|
556
661
|
</entry>
|
557
|
-
<entry file="file://$PROJECT_DIR$/.gitignore">
|
558
|
-
<provider selected="true" editor-type-id="text-editor" />
|
559
|
-
</entry>
|
560
662
|
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
561
663
|
<provider selected="true" editor-type-id="text-editor" />
|
562
664
|
</entry>
|
665
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/object.rb">
|
666
|
+
<provider selected="true" editor-type-id="text-editor">
|
667
|
+
<state relative-caret-position="18668">
|
668
|
+
<caret line="718" column="8" selection-start-line="718" selection-start-column="8" selection-end-line="718" selection-end-column="8" />
|
669
|
+
</state>
|
670
|
+
</provider>
|
671
|
+
</entry>
|
672
|
+
<entry file="file://$PROJECT_DIR$/Gemfile.lock" />
|
563
673
|
<entry file="file://$PROJECT_DIR$/binky-builder.gemspec">
|
564
674
|
<provider selected="true" editor-type-id="text-editor">
|
565
|
-
<state relative-caret-position="
|
566
|
-
<caret line="
|
675
|
+
<state relative-caret-position="546">
|
676
|
+
<caret line="21" column="56" selection-start-line="21" selection-start-column="56" selection-end-line="21" selection-end-column="56" />
|
567
677
|
</state>
|
568
678
|
</provider>
|
569
679
|
</entry>
|
@@ -574,62 +684,83 @@
|
|
574
684
|
</state>
|
575
685
|
</provider>
|
576
686
|
</entry>
|
687
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
688
|
+
<provider selected="true" editor-type-id="text-editor">
|
689
|
+
<state relative-caret-position="208">
|
690
|
+
<caret line="8" column="8" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
|
691
|
+
</state>
|
692
|
+
</provider>
|
693
|
+
</entry>
|
577
694
|
<entry file="file://$PROJECT_DIR$/README.md">
|
578
695
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
579
696
|
<state split_layout="SPLIT">
|
580
|
-
<first_editor relative-caret-position="
|
581
|
-
<caret line="
|
697
|
+
<first_editor relative-caret-position="1144">
|
698
|
+
<caret line="44" column="5" selection-start-line="44" selection-start-column="5" selection-end-line="44" selection-end-column="5" />
|
582
699
|
</first_editor>
|
583
700
|
<second_editor />
|
584
701
|
</state>
|
585
702
|
</provider>
|
586
703
|
</entry>
|
587
|
-
<entry file="file://$
|
704
|
+
<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">
|
588
705
|
<provider selected="true" editor-type-id="text-editor">
|
589
|
-
<state relative-caret-position="
|
590
|
-
<caret line="
|
706
|
+
<state relative-caret-position="5980">
|
707
|
+
<caret line="230" selection-start-line="230" selection-end-line="230" />
|
591
708
|
</state>
|
592
709
|
</provider>
|
593
710
|
</entry>
|
594
711
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/module.rb">
|
595
712
|
<provider selected="true" editor-type-id="text-editor">
|
596
|
-
<state relative-caret-position="
|
713
|
+
<state relative-caret-position="18694">
|
597
714
|
<caret line="719" column="33" selection-start-line="719" selection-start-column="18" selection-end-line="719" selection-end-column="33" />
|
598
715
|
</state>
|
599
716
|
</provider>
|
600
717
|
</entry>
|
601
|
-
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/
|
718
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/hash.rb">
|
602
719
|
<provider selected="true" editor-type-id="text-editor">
|
603
|
-
<state relative-caret-position="
|
604
|
-
<caret line="
|
720
|
+
<state relative-caret-position="352">
|
721
|
+
<caret line="588" column="8" selection-start-line="588" selection-start-column="8" selection-end-line="588" selection-end-column="8" />
|
605
722
|
</state>
|
606
723
|
</provider>
|
607
724
|
</entry>
|
608
|
-
<entry file="file://$
|
725
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/array.rb">
|
609
726
|
<provider selected="true" editor-type-id="text-editor">
|
610
|
-
<state relative-caret-position="
|
611
|
-
<caret line="
|
727
|
+
<state relative-caret-position="423">
|
728
|
+
<caret line="1176" column="8" selection-start-line="1176" selection-start-column="8" selection-end-line="1176" selection-end-column="8" />
|
612
729
|
</state>
|
613
730
|
</provider>
|
614
731
|
</entry>
|
615
732
|
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/string.rb">
|
616
733
|
<provider selected="true" editor-type-id="text-editor">
|
617
|
-
<state relative-caret-position="
|
618
|
-
<caret line="
|
734
|
+
<state relative-caret-position="423">
|
735
|
+
<caret line="1305" column="8" selection-start-line="1305" selection-start-column="8" selection-end-line="1305" selection-end-column="8" />
|
736
|
+
</state>
|
737
|
+
</provider>
|
738
|
+
</entry>
|
739
|
+
<entry file="file://$APPLICATION_HOME_DIR$/rubystubs26/basic_object.rb">
|
740
|
+
<provider selected="true" editor-type-id="text-editor">
|
741
|
+
<state relative-caret-position="189">
|
742
|
+
<caret line="231" column="8" selection-start-line="231" selection-start-column="8" selection-end-line="231" selection-end-column="8" />
|
743
|
+
</state>
|
744
|
+
</provider>
|
745
|
+
</entry>
|
746
|
+
<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">
|
747
|
+
<provider selected="true" editor-type-id="text-editor">
|
748
|
+
<state relative-caret-position="189">
|
749
|
+
<caret line="100" selection-start-line="100" selection-end-line="100" />
|
619
750
|
</state>
|
620
751
|
</provider>
|
621
752
|
</entry>
|
622
753
|
<entry file="file://$PROJECT_DIR$/lib/binky/builder.rb">
|
623
754
|
<provider selected="true" editor-type-id="text-editor">
|
624
|
-
<state relative-caret-position="
|
625
|
-
<caret line="
|
755
|
+
<state relative-caret-position="267">
|
756
|
+
<caret line="66" column="8" selection-start-line="66" selection-start-column="8" selection-end-line="66" selection-end-column="8" />
|
626
757
|
</state>
|
627
758
|
</provider>
|
628
759
|
</entry>
|
629
760
|
<entry file="file://$PROJECT_DIR$/test/binky/builder_test.rb">
|
630
761
|
<provider selected="true" editor-type-id="text-editor">
|
631
|
-
<state relative-caret-position="
|
632
|
-
<caret line="
|
762
|
+
<state relative-caret-position="3146">
|
763
|
+
<caret line="121" lean-forward="true" selection-start-line="121" selection-end-line="121" />
|
633
764
|
</state>
|
634
765
|
</provider>
|
635
766
|
</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,13 +38,19 @@ 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
|
+
|
50
|
+
issue = Issue.new.build_by_keys({id: 1234,text: "hocus pocus"}) # => Issue.column_names = id:
|
51
|
+
issue.id # => {id: 1234}
|
52
|
+
issue.text # => {text: "hocus pocus"}
|
53
|
+
issue.to_hash #=> {id: 1234,text: "hocus pocus"}
|
48
54
|
```
|
49
55
|
|
50
56
|
Call *build_by_keys* method once the model has been initialized passing a json message,
|
data/lib/binky/builder.rb
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
require "binky/builder/version"
|
2
2
|
|
3
3
|
module Binky
|
4
|
-
module
|
4
|
+
module Helper
|
5
5
|
|
6
6
|
# Parses a given json structure looking for specific keys inside the structure.
|
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
|
-
|
11
|
+
raise ArgumentError "keys argument is not an array" unless k&.respond_to?(:each)
|
12
|
+
accessor_builder('to_h',{})
|
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
|
16
19
|
yield self if block_given?
|
20
|
+
self
|
17
21
|
end
|
18
22
|
|
19
23
|
# Builds an instance variable as well as its class method accessors from a key value pair.
|
@@ -40,7 +44,6 @@ module Binky
|
|
40
44
|
obj[key]
|
41
45
|
elsif obj.respond_to?(:each)
|
42
46
|
r = nil
|
43
|
-
#The asterisk "splat" operator means you can pass multiple parameters in its place and the block will see them as an array.
|
44
47
|
obj.find do |*a|
|
45
48
|
r = nested_hash_value(a.last, key)
|
46
49
|
end
|
@@ -48,14 +51,18 @@ module Binky
|
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
51
|
-
def
|
52
|
-
|
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)}
|
53
60
|
end
|
54
61
|
end
|
55
62
|
|
56
|
-
module
|
63
|
+
module Struct
|
57
64
|
class Error < StandardError; end
|
58
|
-
include
|
65
|
+
include Helper
|
59
66
|
|
60
67
|
def initialize(json = nil)
|
61
68
|
@attributes = {}
|
@@ -78,20 +85,10 @@ module Binky
|
|
78
85
|
end
|
79
86
|
end
|
80
87
|
|
81
|
-
module
|
88
|
+
module Builder
|
82
89
|
class Error < StandardError; end
|
83
|
-
include
|
84
|
-
|
85
|
-
def initialize(json = {}, keys = nil)
|
86
|
-
k = keys || json&.keys
|
87
|
-
k&.reject! {|key| key.to_s.include?("=")}
|
88
|
-
k&.each do |key|
|
89
|
-
self.send("#{key}=",nested_hash_value(json, key.to_sym))
|
90
|
-
end unless json.nil?
|
91
|
-
end
|
92
|
-
|
93
|
-
def method_missing(name,*args)
|
94
|
-
accessor_builder name.to_s.chop, args[0]
|
95
|
-
end
|
90
|
+
include Helper
|
91
|
+
alias_method :initialize,:build_by_keys
|
96
92
|
end
|
93
|
+
|
97
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
|
+
version: 0.5.2
|
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-05 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
|