rails_select_on_includes 0.5.4 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd168b938b107e45a0a6458f6182a49e19f35a41
4
- data.tar.gz: d195767090589cb6dc6662c1c62abb78d2858000
3
+ metadata.gz: fdd354db4009d6e0c4c40221bad19154f1e9cec5
4
+ data.tar.gz: cb4b7b875b789b4b30ac4bbf34871925e7369627
5
5
  SHA512:
6
- metadata.gz: f7663c9f4e186cdf785f4d017d8f3d8d9a344d28a63eab13c613eb629b45b233a603c743714b8b39c0f4609536bfa8f81546f0d55b2efe2827469f846aa2e3ae
7
- data.tar.gz: c7afd745e5f6e68cc83ec9c014ddfa3dfabea721f1b4f7089046b0a166a1f31e0a4bd45575647397d503175ef47ebfc7707d122ecf226d045af759df424f7767
6
+ metadata.gz: 98edd5f5bf633ddecde9deba40f809d9eb141d68f6283f57a1d5ce801760f5f792a04deabc4fa9d0dc477f6e5648c750d975f09dcf8b63cc41d63cbe76ec71de
7
+ data.tar.gz: e947fe4263df0ebb145810acefaddfa23da1467daf312c5703d7e574872bcac4f7399917a7cc7623eaf1b6b20fa9d4b1b28d3f60f1cb22fc5ec763b4ff4a450a
data/.idea/workspace.xml CHANGED
@@ -9,7 +9,6 @@
9
9
  <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
10
10
  <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
11
11
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/rails_select_on_includes.rb" afterPath="$PROJECT_DIR$/lib/rails_select_on_includes.rb" />
12
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/rails_select_on_includes/version.rb" afterPath="$PROJECT_DIR$/lib/rails_select_on_includes/version.rb" />
13
12
  </list>
14
13
  <ignored path="rails_select_on_includes.iws" />
15
14
  <ignored path=".idea/workspace.xml" />
@@ -31,19 +30,12 @@
31
30
  </component>
32
31
  <component name="FileEditorManager">
33
32
  <leaf>
34
- <file leaf-file-name="rails_select_on_includes.rb" pinned="false" current-in-tab="true">
33
+ <file leaf-file-name="rails_select_on_includes.rb" pinned="false" current-in-tab="false">
35
34
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
36
35
  <provider selected="true" editor-type-id="text-editor">
37
- <state vertical-scroll-proportion="0.16017798">
38
- <caret line="65" column="0" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" />
39
- <folding>
40
- <element signature="e#153#2272#0" expanded="false" />
41
- <element signature="e#2340#2490#0" expanded="false" />
42
- <element signature="e#2548#3832#0" expanded="false" />
43
- <element signature="e#2553#3828#1" expanded="false" />
44
- <element signature="e#3876#5218#0" expanded="false" />
45
- <element signature="e#3881#5214#1" expanded="false" />
46
- </folding>
36
+ <state vertical-scroll-proportion="0.0">
37
+ <caret line="64" column="54" selection-start-line="64" selection-start-column="54" selection-end-line="64" selection-end-column="54" />
38
+ <folding />
47
39
  </state>
48
40
  </provider>
49
41
  </entry>
@@ -52,8 +44,10 @@
52
44
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes/version.rb">
53
45
  <provider selected="true" editor-type-id="text-editor">
54
46
  <state vertical-scroll-proportion="0.0">
55
- <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
56
- <folding />
47
+ <caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
48
+ <folding>
49
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
50
+ </folding>
57
51
  </state>
58
52
  </provider>
59
53
  </entry>
@@ -68,11 +62,11 @@
68
62
  </provider>
69
63
  </entry>
70
64
  </file>
71
- <file leaf-file-name="rails_select_on_includes.gemspec" pinned="false" current-in-tab="false">
65
+ <file leaf-file-name="rails_select_on_includes.gemspec" pinned="false" current-in-tab="true">
72
66
  <entry file="file://$PROJECT_DIR$/rails_select_on_includes.gemspec">
73
67
  <provider selected="true" editor-type-id="text-editor">
74
- <state vertical-scroll-proportion="0.0">
75
- <caret line="19" column="23" selection-start-line="19" selection-start-column="23" selection-end-line="19" selection-end-column="23" />
68
+ <state vertical-scroll-proportion="0.5549133">
69
+ <caret line="16" column="96" selection-start-line="16" selection-start-column="96" selection-end-line="16" selection-end-column="96" />
76
70
  <folding />
77
71
  </state>
78
72
  </provider>
@@ -90,18 +84,18 @@
90
84
  </file>
91
85
  <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
92
86
  <entry file="file://$PROJECT_DIR$/README.md">
93
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
94
- <state />
95
- </provider>
96
87
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
97
88
  <state split_layout="FIRST">
98
89
  <first_editor vertical-scroll-proportion="0.0">
99
- <caret line="26" column="0" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
90
+ <caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
100
91
  <folding />
101
92
  </first_editor>
102
93
  <second_editor />
103
94
  </state>
104
95
  </provider>
96
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
97
+ <state />
98
+ </provider>
105
99
  </entry>
106
100
  </file>
107
101
  </leaf>
@@ -110,7 +104,7 @@
110
104
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
111
105
  <option name="RECENT_BRANCH_BY_REPOSITORY">
112
106
  <map>
113
- <entry key="$PROJECT_DIR$" value="rails_5" />
107
+ <entry key="$PROJECT_DIR$" value="rails_4" />
114
108
  </map>
115
109
  </option>
116
110
  </component>
@@ -119,9 +113,9 @@
119
113
  <list>
120
114
  <option value="$PROJECT_DIR$/.gitignore" />
121
115
  <option value="$PROJECT_DIR$/README.md" />
122
- <option value="$PROJECT_DIR$/rails_select_on_includes.gemspec" />
123
- <option value="$PROJECT_DIR$/lib/rails_select_on_includes/version.rb" />
124
116
  <option value="$PROJECT_DIR$/lib/rails_select_on_includes.rb" />
117
+ <option value="$PROJECT_DIR$/lib/rails_select_on_includes/version.rb" />
118
+ <option value="$PROJECT_DIR$/rails_select_on_includes.gemspec" />
125
119
  </list>
126
120
  </option>
127
121
  </component>
@@ -161,7 +155,6 @@
161
155
  <sortByType />
162
156
  </navigator>
163
157
  <panes>
164
- <pane id="Scope" />
165
158
  <pane id="ProjectPane">
166
159
  <subPane>
167
160
  <PATH>
@@ -215,6 +208,7 @@
215
208
  </subPane>
216
209
  </pane>
217
210
  <pane id="Scratches" />
211
+ <pane id="Scope" />
218
212
  </panes>
219
213
  </component>
220
214
  <component name="PropertiesComponent">
@@ -425,19 +419,31 @@
425
419
  <option name="project" value="LOCAL" />
426
420
  <updated>1487140804921</updated>
427
421
  </task>
428
- <option name="localTasksCounter" value="9" />
422
+ <task id="LOCAL-00009" summary="refactored to class_eval">
423
+ <created>1487274511446</created>
424
+ <option name="number" value="00009" />
425
+ <option name="project" value="LOCAL" />
426
+ <updated>1487274511446</updated>
427
+ </task>
428
+ <task id="LOCAL-00010" summary="close err on load, same class now is used for rails 4">
429
+ <created>1487284823632</created>
430
+ <option name="number" value="00010" />
431
+ <option name="project" value="LOCAL" />
432
+ <updated>1487284823632</updated>
433
+ </task>
434
+ <option name="localTasksCounter" value="11" />
429
435
  <servers />
430
436
  </component>
431
437
  <component name="ToolWindowManager">
432
438
  <frame x="65" y="24" width="1855" height="1056" extended-state="6" />
433
439
  <editor active="false" />
434
440
  <layout>
435
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20066334" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
441
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20066334" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
436
442
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294979" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
437
443
  <window_info id="Event Log" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.35102266" sideWeight="0.5002764" order="4" side_tool="false" content_ui="tabs" />
438
444
  <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
439
445
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32946378" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
440
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3966597" sideWeight="0.4997236" order="10" side_tool="false" content_ui="tabs" />
446
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3966597" sideWeight="0.4997236" order="10" side_tool="false" content_ui="tabs" />
441
447
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2498618" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
442
448
  <window_info id="Terminal" active="false" anchor="bottom" auto_hide="true" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3810021" sideWeight="0.4997236" order="11" side_tool="false" content_ui="tabs" />
443
449
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@@ -475,25 +481,57 @@
475
481
  <MESSAGE value="0.5.1 with types on virtual attributes" />
476
482
  <MESSAGE value="https://github.com/alekseyl/rails_select_on_includes/issues/3&#10;&#10;done." />
477
483
  <MESSAGE value="refactored to class_eval" />
478
- <option name="LAST_COMMIT_MESSAGE" value="refactored to class_eval" />
484
+ <MESSAGE value="close err on load, same class now is used for rails 4" />
485
+ <option name="LAST_COMMIT_MESSAGE" value="close err on load, same class now is used for rails 4" />
479
486
  </component>
480
487
  <component name="XDebuggerManager">
481
488
  <breakpoint-manager />
482
489
  <watches-manager />
483
490
  </component>
484
491
  <component name="editorHistoryManager">
492
+ <entry file="file://$PROJECT_DIR$/Gemfile">
493
+ <provider selected="true" editor-type-id="text-editor">
494
+ <state vertical-scroll-proportion="0.0">
495
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
496
+ <folding />
497
+ </state>
498
+ </provider>
499
+ </entry>
500
+ <entry file="file://$PROJECT_DIR$/rails_select_on_includes.gemspec">
501
+ <provider selected="true" editor-type-id="text-editor">
502
+ <state vertical-scroll-proportion="0.0">
503
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
504
+ <folding />
505
+ </state>
506
+ </provider>
507
+ </entry>
508
+ <entry file="file://$PROJECT_DIR$/.gitignore">
509
+ <provider selected="true" editor-type-id="text-editor">
510
+ <state vertical-scroll-proportion="0.0">
511
+ <caret line="0" column="6" selection-start-line="0" selection-start-column="6" selection-end-line="0" selection-end-column="6" />
512
+ <folding />
513
+ </state>
514
+ </provider>
515
+ </entry>
516
+ <entry file="file://$PROJECT_DIR$/README.md">
517
+ <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
518
+ <state split_layout="FIRST">
519
+ <first_editor vertical-scroll-proportion="0.0">
520
+ <caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
521
+ <folding />
522
+ </first_editor>
523
+ <second_editor />
524
+ </state>
525
+ </provider>
526
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
527
+ <state />
528
+ </provider>
529
+ </entry>
485
530
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
486
531
  <provider selected="true" editor-type-id="text-editor">
487
532
  <state vertical-scroll-proportion="0.0">
488
533
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
489
- <folding>
490
- <element signature="e#153#2272#0" expanded="false" />
491
- <element signature="e#2340#2490#0" expanded="false" />
492
- <element signature="e#2548#3832#0" expanded="false" />
493
- <element signature="e#2553#3828#1" expanded="false" />
494
- <element signature="e#3876#5218#0" expanded="false" />
495
- <element signature="e#3881#5214#1" expanded="false" />
496
- </folding>
534
+ <folding />
497
535
  </state>
498
536
  </provider>
499
537
  </entry>
@@ -501,7 +539,9 @@
501
539
  <provider selected="true" editor-type-id="text-editor">
502
540
  <state vertical-scroll-proportion="0.0">
503
541
  <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
504
- <folding />
542
+ <folding>
543
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
544
+ </folding>
505
545
  </state>
506
546
  </provider>
507
547
  </entry>
@@ -530,9 +570,6 @@
530
570
  </provider>
531
571
  </entry>
532
572
  <entry file="file://$PROJECT_DIR$/README.md">
533
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
534
- <state />
535
- </provider>
536
573
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
537
574
  <state split_layout="FIRST">
538
575
  <first_editor vertical-scroll-proportion="0.0">
@@ -542,19 +579,15 @@
542
579
  <second_editor />
543
580
  </state>
544
581
  </provider>
582
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
583
+ <state />
584
+ </provider>
545
585
  </entry>
546
586
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
547
587
  <provider selected="true" editor-type-id="text-editor">
548
588
  <state vertical-scroll-proportion="0.0">
549
589
  <caret line="15" column="55" selection-start-line="15" selection-start-column="55" selection-end-line="15" selection-end-column="55" />
550
- <folding>
551
- <element signature="e#153#2272#0" expanded="false" />
552
- <element signature="e#2340#2490#0" expanded="false" />
553
- <element signature="e#2548#3832#0" expanded="false" />
554
- <element signature="e#2553#3828#1" expanded="false" />
555
- <element signature="e#3876#5218#0" expanded="false" />
556
- <element signature="e#3881#5214#1" expanded="false" />
557
- </folding>
590
+ <folding />
558
591
  </state>
559
592
  </provider>
560
593
  </entry>
@@ -562,7 +595,9 @@
562
595
  <provider selected="true" editor-type-id="text-editor">
563
596
  <state vertical-scroll-proportion="0.0">
564
597
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
565
- <folding />
598
+ <folding>
599
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
600
+ </folding>
566
601
  </state>
567
602
  </provider>
568
603
  </entry>
@@ -591,9 +626,6 @@
591
626
  </provider>
592
627
  </entry>
593
628
  <entry file="file://$PROJECT_DIR$/README.md">
594
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
595
- <state />
596
- </provider>
597
629
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
598
630
  <state split_layout="FIRST">
599
631
  <first_editor vertical-scroll-proportion="0.0">
@@ -603,6 +635,9 @@
603
635
  <second_editor />
604
636
  </state>
605
637
  </provider>
638
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
639
+ <state />
640
+ </provider>
606
641
  </entry>
607
642
  <entry file="file://$PROJECT_DIR$/rails_select_on_includes.gemspec">
608
643
  <provider selected="true" editor-type-id="text-editor">
@@ -621,9 +656,6 @@
621
656
  </provider>
622
657
  </entry>
623
658
  <entry file="file://$PROJECT_DIR$/README.md">
624
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
625
- <state />
626
- </provider>
627
659
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
628
660
  <state split_layout="FIRST">
629
661
  <first_editor vertical-scroll-proportion="0.0">
@@ -633,19 +665,15 @@
633
665
  <second_editor />
634
666
  </state>
635
667
  </provider>
668
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
669
+ <state />
670
+ </provider>
636
671
  </entry>
637
672
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
638
673
  <provider selected="true" editor-type-id="text-editor">
639
674
  <state vertical-scroll-proportion="0.0">
640
675
  <caret line="36" column="26" selection-start-line="36" selection-start-column="26" selection-end-line="36" selection-end-column="37" />
641
- <folding>
642
- <element signature="e#153#2272#0" expanded="false" />
643
- <element signature="e#2340#2490#0" expanded="false" />
644
- <element signature="e#2548#3832#0" expanded="false" />
645
- <element signature="e#2553#3828#1" expanded="false" />
646
- <element signature="e#3876#5218#0" expanded="false" />
647
- <element signature="e#3881#5214#1" expanded="false" />
648
- </folding>
676
+ <folding />
649
677
  </state>
650
678
  </provider>
651
679
  </entry>
@@ -653,7 +681,9 @@
653
681
  <provider selected="true" editor-type-id="text-editor">
654
682
  <state vertical-scroll-proportion="0.0">
655
683
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
656
- <folding />
684
+ <folding>
685
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
686
+ </folding>
657
687
  </state>
658
688
  </provider>
659
689
  </entry>
@@ -674,9 +704,6 @@
674
704
  </provider>
675
705
  </entry>
676
706
  <entry file="file://$PROJECT_DIR$/README.md">
677
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
678
- <state />
679
- </provider>
680
707
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
681
708
  <state split_layout="FIRST">
682
709
  <first_editor vertical-scroll-proportion="0.0">
@@ -686,19 +713,15 @@
686
713
  <second_editor />
687
714
  </state>
688
715
  </provider>
716
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
717
+ <state />
718
+ </provider>
689
719
  </entry>
690
720
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
691
721
  <provider selected="true" editor-type-id="text-editor">
692
722
  <state vertical-scroll-proportion="0.0">
693
723
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
694
- <folding>
695
- <element signature="e#153#2272#0" expanded="false" />
696
- <element signature="e#2340#2490#0" expanded="false" />
697
- <element signature="e#2548#3832#0" expanded="false" />
698
- <element signature="e#2553#3828#1" expanded="false" />
699
- <element signature="e#3876#5218#0" expanded="false" />
700
- <element signature="e#3881#5214#1" expanded="false" />
701
- </folding>
724
+ <folding />
702
725
  </state>
703
726
  </provider>
704
727
  </entry>
@@ -706,7 +729,9 @@
706
729
  <provider selected="true" editor-type-id="text-editor">
707
730
  <state vertical-scroll-proportion="0.0">
708
731
  <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
709
- <folding />
732
+ <folding>
733
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
734
+ </folding>
710
735
  </state>
711
736
  </provider>
712
737
  </entry>
@@ -727,9 +752,6 @@
727
752
  </provider>
728
753
  </entry>
729
754
  <entry file="file://$PROJECT_DIR$/README.md">
730
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
731
- <state />
732
- </provider>
733
755
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
734
756
  <state split_layout="FIRST">
735
757
  <first_editor vertical-scroll-proportion="0.0">
@@ -739,19 +761,15 @@
739
761
  <second_editor />
740
762
  </state>
741
763
  </provider>
764
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
765
+ <state />
766
+ </provider>
742
767
  </entry>
743
768
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
744
769
  <provider selected="true" editor-type-id="text-editor">
745
770
  <state vertical-scroll-proportion="0.0">
746
771
  <caret line="39" column="9" selection-start-line="39" selection-start-column="9" selection-end-line="39" selection-end-column="9" />
747
- <folding>
748
- <element signature="e#153#2272#0" expanded="false" />
749
- <element signature="e#2340#2490#0" expanded="false" />
750
- <element signature="e#2548#3832#0" expanded="false" />
751
- <element signature="e#2553#3828#1" expanded="false" />
752
- <element signature="e#3876#5218#0" expanded="false" />
753
- <element signature="e#3881#5214#1" expanded="false" />
754
- </folding>
772
+ <folding />
755
773
  </state>
756
774
  </provider>
757
775
  </entry>
@@ -759,7 +777,9 @@
759
777
  <provider selected="true" editor-type-id="text-editor">
760
778
  <state vertical-scroll-proportion="0.0">
761
779
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
762
- <folding />
780
+ <folding>
781
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
782
+ </folding>
763
783
  </state>
764
784
  </provider>
765
785
  </entry>
@@ -780,9 +800,6 @@
780
800
  </provider>
781
801
  </entry>
782
802
  <entry file="file://$PROJECT_DIR$/README.md">
783
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
784
- <state />
785
- </provider>
786
803
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
787
804
  <state split_layout="FIRST">
788
805
  <first_editor vertical-scroll-proportion="0.0">
@@ -792,19 +809,15 @@
792
809
  <second_editor />
793
810
  </state>
794
811
  </provider>
812
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
813
+ <state />
814
+ </provider>
795
815
  </entry>
796
816
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
797
817
  <provider selected="true" editor-type-id="text-editor">
798
818
  <state vertical-scroll-proportion="0.0">
799
819
  <caret line="25" column="25" selection-start-line="22" selection-start-column="8" selection-end-line="25" selection-end-column="25" />
800
- <folding>
801
- <element signature="e#153#2272#0" expanded="false" />
802
- <element signature="e#2340#2490#0" expanded="false" />
803
- <element signature="e#2548#3832#0" expanded="false" />
804
- <element signature="e#2553#3828#1" expanded="false" />
805
- <element signature="e#3876#5218#0" expanded="false" />
806
- <element signature="e#3881#5214#1" expanded="false" />
807
- </folding>
820
+ <folding />
808
821
  </state>
809
822
  </provider>
810
823
  </entry>
@@ -825,9 +838,6 @@
825
838
  </provider>
826
839
  </entry>
827
840
  <entry file="file://$PROJECT_DIR$/README.md">
828
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
829
- <state />
830
- </provider>
831
841
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
832
842
  <state split_layout="FIRST">
833
843
  <first_editor vertical-scroll-proportion="0.0">
@@ -837,19 +847,15 @@
837
847
  <second_editor />
838
848
  </state>
839
849
  </provider>
850
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
851
+ <state />
852
+ </provider>
840
853
  </entry>
841
854
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
842
855
  <provider selected="true" editor-type-id="text-editor">
843
856
  <state vertical-scroll-proportion="0.0">
844
857
  <caret line="25" column="25" selection-start-line="22" selection-start-column="8" selection-end-line="25" selection-end-column="25" />
845
- <folding>
846
- <element signature="e#153#2272#0" expanded="false" />
847
- <element signature="e#2340#2490#0" expanded="false" />
848
- <element signature="e#2548#3832#0" expanded="false" />
849
- <element signature="e#2553#3828#1" expanded="false" />
850
- <element signature="e#3876#5218#0" expanded="false" />
851
- <element signature="e#3881#5214#1" expanded="false" />
852
- </folding>
858
+ <folding />
853
859
  </state>
854
860
  </provider>
855
861
  </entry>
@@ -870,9 +876,6 @@
870
876
  </provider>
871
877
  </entry>
872
878
  <entry file="file://$PROJECT_DIR$/README.md">
873
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
874
- <state />
875
- </provider>
876
879
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
877
880
  <state split_layout="FIRST">
878
881
  <first_editor vertical-scroll-proportion="0.0">
@@ -882,19 +885,15 @@
882
885
  <second_editor />
883
886
  </state>
884
887
  </provider>
888
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
889
+ <state />
890
+ </provider>
885
891
  </entry>
886
892
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
887
893
  <provider selected="true" editor-type-id="text-editor">
888
894
  <state vertical-scroll-proportion="0.0">
889
895
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
890
- <folding>
891
- <element signature="e#153#2272#0" expanded="false" />
892
- <element signature="e#2340#2490#0" expanded="false" />
893
- <element signature="e#2548#3832#0" expanded="false" />
894
- <element signature="e#2553#3828#1" expanded="false" />
895
- <element signature="e#3876#5218#0" expanded="false" />
896
- <element signature="e#3881#5214#1" expanded="false" />
897
- </folding>
896
+ <folding />
898
897
  </state>
899
898
  </provider>
900
899
  </entry>
@@ -907,9 +906,6 @@
907
906
  </provider>
908
907
  </entry>
909
908
  <entry file="file://$PROJECT_DIR$/README.md">
910
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
911
- <state />
912
- </provider>
913
909
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
914
910
  <state split_layout="FIRST">
915
911
  <first_editor vertical-scroll-proportion="0.0">
@@ -919,6 +915,9 @@
919
915
  <second_editor />
920
916
  </state>
921
917
  </provider>
918
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
919
+ <state />
920
+ </provider>
922
921
  </entry>
923
922
  <entry file="file://$PROJECT_DIR$/.gitignore">
924
923
  <provider selected="true" editor-type-id="text-editor">
@@ -929,18 +928,18 @@
929
928
  </provider>
930
929
  </entry>
931
930
  <entry file="file://$PROJECT_DIR$/README.md">
932
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
933
- <state />
934
- </provider>
935
931
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
936
932
  <state split_layout="FIRST">
937
933
  <first_editor vertical-scroll-proportion="0.0">
938
- <caret line="26" column="0" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
934
+ <caret line="22" column="0" selection-start-line="22" selection-start-column="0" selection-end-line="22" selection-end-column="0" />
939
935
  <folding />
940
936
  </first_editor>
941
937
  <second_editor />
942
938
  </state>
943
939
  </provider>
940
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
941
+ <state />
942
+ </provider>
944
943
  </entry>
945
944
  <entry file="file://$PROJECT_DIR$/Gemfile">
946
945
  <provider selected="true" editor-type-id="text-editor">
@@ -950,10 +949,10 @@
950
949
  </state>
951
950
  </provider>
952
951
  </entry>
953
- <entry file="file://$PROJECT_DIR$/rails_select_on_includes.gemspec">
952
+ <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
954
953
  <provider selected="true" editor-type-id="text-editor">
955
954
  <state vertical-scroll-proportion="0.0">
956
- <caret line="19" column="23" selection-start-line="19" selection-start-column="23" selection-end-line="19" selection-end-column="23" />
955
+ <caret line="64" column="54" selection-start-line="64" selection-start-column="54" selection-end-line="64" selection-end-column="54" />
957
956
  <folding />
958
957
  </state>
959
958
  </provider>
@@ -961,23 +960,18 @@
961
960
  <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes/version.rb">
962
961
  <provider selected="true" editor-type-id="text-editor">
963
962
  <state vertical-scroll-proportion="0.0">
964
- <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
965
- <folding />
963
+ <caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
964
+ <folding>
965
+ <marker date="1500544028285" expanded="true" signature="28:52" placeholder=" ... end" />
966
+ </folding>
966
967
  </state>
967
968
  </provider>
968
969
  </entry>
969
- <entry file="file://$PROJECT_DIR$/lib/rails_select_on_includes.rb">
970
+ <entry file="file://$PROJECT_DIR$/rails_select_on_includes.gemspec">
970
971
  <provider selected="true" editor-type-id="text-editor">
971
- <state vertical-scroll-proportion="0.16017798">
972
- <caret line="65" column="0" selection-start-line="65" selection-start-column="0" selection-end-line="65" selection-end-column="0" />
973
- <folding>
974
- <element signature="e#153#2272#0" expanded="false" />
975
- <element signature="e#2340#2490#0" expanded="false" />
976
- <element signature="e#2548#3832#0" expanded="false" />
977
- <element signature="e#2553#3828#1" expanded="false" />
978
- <element signature="e#3876#5218#0" expanded="false" />
979
- <element signature="e#3881#5214#1" expanded="false" />
980
- </folding>
972
+ <state vertical-scroll-proportion="0.5549133">
973
+ <caret line="16" column="96" selection-start-line="16" selection-start-column="96" selection-end-line="16" selection-end-column="96" />
974
+ <folding />
981
975
  </state>
982
976
  </provider>
983
977
  </entry>
@@ -1,3 +1,3 @@
1
1
  module RailsSelectOnIncludes
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.6"
3
3
  end
@@ -1,7 +1,8 @@
1
1
  require 'active_support/deprecation'
2
2
  require 'active_support/core_ext/string/filters'
3
3
 
4
- ::ActiveRecord::Associations::JoinDependency::Aliases.class_eval do
4
+
5
+ ::ActiveRecord::Associations::JoinDependency::Aliases.class_eval do # :nodoc:
5
6
  def initialize(tables)
6
7
  @tables = tables
7
8
  @alias_cache = tables.each_with_object({}) { |table,h|
@@ -27,21 +28,21 @@ require 'active_support/core_ext/string/filters'
27
28
  select_values.each do |sv|
28
29
  # if sv is symbol that we assume that its a base table column and it will be aliased and added as usual
29
30
  # all we need is some specials joins+select from related tables
30
- if sv.is_a?(Hash)
31
- flatten_hash_values(sv).each{|sub_sv| @base_class_node_aliases << [sub_sv, sub_sv]; @virtual_attributes_names << sub_sv }
32
- elsif sv.is_a?(String)
33
- # this is the case of long raw select
34
- sv.split( ", " ).each do |sub_sv|
35
- if sub_sv[/.+ as .+/i]
36
- selected_column = sub_sv[/ as .+/i][4..-1]
37
- @base_class_node_aliases << [selected_column, selected_column]
38
- @virtual_attributes_names << selected_column
39
- elsif sub_sv[/.+\.[^\*]+/]
40
- selected_column = sub_sv[/\..+/][1..-1]
41
- @base_class_node_aliases << [selected_column, selected_column]
42
- @virtual_attributes_names << selected_column
31
+ case sv
32
+ when Hash
33
+ flatten_hash_values(sv).each { |sub_sv| add_virtual_attribute(sub_sv) }
34
+ when String
35
+ sv.split( ", " ).each do |sub_sv|
36
+ if sub_sv[/.+ as .+/i]
37
+ add_virtual_attribute(sub_sv[/ as .+/i][4..-1].strip)
38
+ elsif sub_sv[/.+\.[^\*]+/]
39
+ add_virtual_attribute(sub_sv[/\..+/][1..-1].strip)
40
+ end
43
41
  end
44
- end
42
+ when Arel::Nodes::As
43
+ add_virtual_attribute(sv.right)
44
+ when Arel::Nodes::Function
45
+ add_virtual_attribute(sv.alias) if sv.alias.present?
45
46
  end
46
47
  end
47
48
  end
@@ -54,6 +55,11 @@ require 'active_support/core_ext/string/filters'
54
55
  def flatten_hash_values( some_hash )
55
56
  some_hash.values.map{ |value| value.is_a?(Hash) ? flatten_hash_values( value ) : value }.flatten
56
57
  end
58
+
59
+ def add_virtual_attribute(selected_column)
60
+ @base_class_node_aliases << [selected_column, selected_column]
61
+ @virtual_attributes_names << selected_column
62
+ end
57
63
  end
58
64
 
59
65
  ::ActiveRecord::Associations::JoinDependency::JoinBase.class_eval do
@@ -132,141 +138,4 @@ end
132
138
  end
133
139
  end
134
140
 
135
- # module ActiveRecord
136
- # module Associations
137
- # class JoinDependency # :nodoc:
138
- # # class Aliases # :nodoc:
139
- # # def initialize(tables)
140
- # # @tables = tables
141
- # # @alias_cache = tables.each_with_object({}) { |table,h|
142
- # # h[table.node] = table.columns.each_with_object({}) { |column,i|
143
- # # i[column.name] = column.alias
144
- # # }
145
- # # }
146
- # # @name_and_alias_cache = tables.each_with_object({}) { |table,h|
147
- # # h[table.node] = table.columns.map { |column|
148
- # # [column.name, column.alias]
149
- # # }
150
- # # @base_class_node_aliases ||= h[table.node] if table.node.is_a?(ActiveRecord::Associations::JoinDependency::JoinBase)
151
- # # }
152
- # #
153
- # # @virtual_attributes_names = []
154
- # # end
155
- # # # valid formats are:
156
- # # # 1 'table_name.column' or 'table_name.column as column_1' will be parsed! distinct on can be used also
157
- # # # 2 {table_name: column} or { table_name: [column1, column2] }
158
- # # # 3 table_name: 2
159
- # # def update_aliases_to_select_values( select_values )
160
- # # return if select_values.blank?
161
- # # select_values.each do |sv|
162
- # # # if sv is symbol that we assume that its a base table column and it will be aliased and added as usual
163
- # # # all we need is some specials joins+select from related tables
164
- # # if sv.is_a?(Hash)
165
- # # flatten_hash_values(sv).each{|sub_sv| @base_class_node_aliases << [sub_sv, sub_sv]; @virtual_attributes_names << sub_sv }
166
- # # elsif sv.is_a?(String)
167
- # # # this is the case of long raw select
168
- # # sv.split( ", " ).each do |sub_sv|
169
- # # if sub_sv[/.+ as .+/i]
170
- # # selected_column = sub_sv[/ as .+/i][4..-1]
171
- # # @base_class_node_aliases << [selected_column, selected_column]
172
- # # @virtual_attributes_names << selected_column
173
- # # elsif sub_sv[/.+\.[^\*]+/]
174
- # # selected_column = sub_sv[/\..+/][1..-1]
175
- # # @base_class_node_aliases << [selected_column, selected_column]
176
- # # @virtual_attributes_names << selected_column
177
- # # end
178
- # # end
179
- # # end
180
- # # end
181
- # # end
182
- # #
183
- # # def slice_selected_attr_types( column_types )
184
- # # column_types.slice( *@virtual_attributes_names )
185
- # # end
186
- # #
187
- # # private
188
- # # def flatten_hash_values( some_hash )
189
- # # some_hash.values.map{ |value| value.is_a?(Hash) ? flatten_hash_values( value ) : value }.flatten
190
- # # end
191
- # # end
192
- #
193
- # # class JoinPart
194
- # # def instantiate(row, aliases, column_types = {}, &block)
195
- # # base_klass.instantiate(extract_record(row, aliases), column_types, &block)
196
- # # end
197
- # # end
198
- #
199
- # # def instantiate(result_set, aliases)
200
- # # primary_key = aliases.column_alias(join_root, join_root.primary_key)
201
- # #
202
- # # seen = Hash.new { |i, object_id|
203
- # # i[object_id] = Hash.new { |j, child_class|
204
- # # j[child_class] = {}
205
- # # }
206
- # # }
207
- # #
208
- # # model_cache = Hash.new { |h,klass| h[klass] = {} }
209
- # # parents = model_cache[join_root]
210
- # # column_aliases = aliases.column_aliases join_root
211
- # #
212
- # # message_bus = ActiveSupport::Notifications.instrumenter
213
- # #
214
- # # payload = {
215
- # # record_count: result_set.length,
216
- # # class_name: join_root.base_klass.name
217
- # # }
218
- # #
219
- # # message_bus.instrument('instantiation.active_record', payload) do
220
- # # result_set.each { |row_hash|
221
- # # parent_key = primary_key ? row_hash[primary_key] : row_hash
222
- # # # DISTINCTION PART > join_root.instantiate(row_hash, column_aliases, aliases.slice_selected_attr_types( result_set.column_types ) )
223
- # # # PREVIOUS > join_root.instantiate(row_hash, column_aliases )
224
- # # parent = parents[parent_key] ||= join_root.instantiate(row_hash, column_aliases, aliases.slice_selected_attr_types( result_set.column_types ) )
225
- # # construct(parent, join_root, row_hash, result_set, seen, model_cache, aliases)
226
- # # }
227
- # # end
228
- # # parents.values
229
- # # end
230
- #
231
- # end
232
- # end
233
- # end
234
-
235
- # module ActiveRecord
236
- # module FinderMethods
237
- #
238
- # # def find_with_associations
239
- # # # NOTE: the JoinDependency constructed here needs to know about
240
- # # # any joins already present in `self`, so pass them in
241
- # # #
242
- # # # failing to do so means that in cases like activerecord/test/cases/associations/inner_join_association_test.rb:136
243
- # # # incorrect SQL is generated. In that case, the join dependency for
244
- # # # SpecialCategorizations is constructed without knowledge of the
245
- # # # preexisting join in joins_values to categorizations (by way of
246
- # # # the `has_many :through` for categories).
247
- # # #
248
- # # join_dependency = construct_join_dependency(joins_values)
249
- # #
250
- # # aliases = join_dependency.aliases
251
- # # relation = select aliases.columns
252
- # # relation = apply_join_dependency(relation, join_dependency)
253
- # #
254
- # # if block_given?
255
- # # yield relation
256
- # # else
257
- # # if ActiveRecord::NullRelation === relation
258
- # # []
259
- # # else
260
- # # arel = relation.arel
261
- # # rows = connection.select_all(arel, 'SQL', relation.bound_attributes)
262
- # # #1 DISTINCTION IS HERE:
263
- # # # now we gently mokey-patching existing column aliases with select values
264
- # # aliases.update_aliases_to_select_values(values[:select]) unless values[:select].blank?
265
- # #
266
- # # join_dependency.instantiate(rows, aliases)
267
- # # end
268
- # # end
269
- # # end
270
- # end
271
- # end
272
141
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_select_on_includes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord