configy 0.0.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ require 'test_helper'
2
+
3
+ class LoadPathTest < MiniTest::Unit::TestCase
4
+ def setup
5
+ Configy.load_path = nil
6
+ end
7
+
8
+ def test_should_default_to_config
9
+ assert_equal "config", Configy.load_path
10
+ end
11
+
12
+ def test_should_detect_rails3_config_dir
13
+ rails3_obj = MiniTest::Mock.new
14
+ rails3_obj.expect :root, Pathname.new("path/to/rails/root")
15
+
16
+ with_const(:Rails, rails3_obj) do
17
+ assert_equal Rails.root.join("config"), Configy.load_path
18
+ end
19
+ end
20
+
21
+ def test_should_detect_rails2_config_dir
22
+ with_const( :RAILS_ROOT, "path/to/rails/root" ) do
23
+ assert_equal "#{RAILS_ROOT}/config", Configy.load_path
24
+ end
25
+ end
26
+
27
+ def test_should_detect_rack_config_dir
28
+ with_const( :RACK_ROOT, "path/to/rack/root" ) do
29
+ assert_equal "#{RACK_ROOT}/config", Configy.load_path
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,917 @@
1
+ !RBIX
2
+ 0
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 44
13
+ 5
14
+ 7
15
+ 0
16
+ 64
17
+ 47
18
+ 49
19
+ 1
20
+ 1
21
+ 15
22
+ 99
23
+ 7
24
+ 2
25
+ 45
26
+ 3
27
+ 4
28
+ 43
29
+ 5
30
+ 43
31
+ 6
32
+ 65
33
+ 49
34
+ 7
35
+ 3
36
+ 13
37
+ 99
38
+ 12
39
+ 7
40
+ 8
41
+ 12
42
+ 7
43
+ 9
44
+ 12
45
+ 65
46
+ 12
47
+ 49
48
+ 10
49
+ 4
50
+ 15
51
+ 49
52
+ 8
53
+ 0
54
+ 15
55
+ 2
56
+ 11
57
+ I
58
+ 6
59
+ I
60
+ 0
61
+ I
62
+ 0
63
+ I
64
+ 0
65
+ n
66
+ p
67
+ 11
68
+ s
69
+ 11
70
+ test_helper
71
+ x
72
+ 7
73
+ require
74
+ x
75
+ 12
76
+ LoadPathTest
77
+ x
78
+ 8
79
+ MiniTest
80
+ n
81
+ x
82
+ 4
83
+ Unit
84
+ x
85
+ 8
86
+ TestCase
87
+ x
88
+ 10
89
+ open_class
90
+ x
91
+ 14
92
+ __class_init__
93
+ M
94
+ 1
95
+ n
96
+ n
97
+ x
98
+ 12
99
+ LoadPathTest
100
+ i
101
+ 72
102
+ 5
103
+ 66
104
+ 99
105
+ 7
106
+ 0
107
+ 7
108
+ 1
109
+ 65
110
+ 67
111
+ 49
112
+ 2
113
+ 0
114
+ 49
115
+ 3
116
+ 4
117
+ 15
118
+ 99
119
+ 7
120
+ 4
121
+ 7
122
+ 5
123
+ 65
124
+ 67
125
+ 49
126
+ 2
127
+ 0
128
+ 49
129
+ 3
130
+ 4
131
+ 15
132
+ 99
133
+ 7
134
+ 6
135
+ 7
136
+ 7
137
+ 65
138
+ 67
139
+ 49
140
+ 2
141
+ 0
142
+ 49
143
+ 3
144
+ 4
145
+ 15
146
+ 99
147
+ 7
148
+ 8
149
+ 7
150
+ 9
151
+ 65
152
+ 67
153
+ 49
154
+ 2
155
+ 0
156
+ 49
157
+ 3
158
+ 4
159
+ 15
160
+ 99
161
+ 7
162
+ 10
163
+ 7
164
+ 11
165
+ 65
166
+ 67
167
+ 49
168
+ 2
169
+ 0
170
+ 49
171
+ 3
172
+ 4
173
+ 11
174
+ I
175
+ 5
176
+ I
177
+ 0
178
+ I
179
+ 0
180
+ I
181
+ 0
182
+ n
183
+ p
184
+ 12
185
+ x
186
+ 5
187
+ setup
188
+ M
189
+ 1
190
+ n
191
+ n
192
+ x
193
+ 5
194
+ setup
195
+ i
196
+ 12
197
+ 45
198
+ 0
199
+ 1
200
+ 1
201
+ 13
202
+ 18
203
+ 2
204
+ 49
205
+ 2
206
+ 1
207
+ 15
208
+ 11
209
+ I
210
+ 3
211
+ I
212
+ 0
213
+ I
214
+ 0
215
+ I
216
+ 0
217
+ n
218
+ p
219
+ 3
220
+ x
221
+ 7
222
+ Configy
223
+ n
224
+ x
225
+ 10
226
+ load_path=
227
+ p
228
+ 5
229
+ I
230
+ 0
231
+ I
232
+ 4
233
+ I
234
+ 0
235
+ I
236
+ 5
237
+ I
238
+ c
239
+ x
240
+ 63
241
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
242
+ p
243
+ 0
244
+ x
245
+ 17
246
+ method_visibility
247
+ x
248
+ 15
249
+ add_defn_method
250
+ x
251
+ 29
252
+ test_should_default_to_config
253
+ M
254
+ 1
255
+ n
256
+ n
257
+ x
258
+ 29
259
+ test_should_default_to_config
260
+ i
261
+ 15
262
+ 5
263
+ 7
264
+ 0
265
+ 64
266
+ 45
267
+ 1
268
+ 2
269
+ 49
270
+ 3
271
+ 0
272
+ 47
273
+ 49
274
+ 4
275
+ 2
276
+ 11
277
+ I
278
+ 3
279
+ I
280
+ 0
281
+ I
282
+ 0
283
+ I
284
+ 0
285
+ n
286
+ p
287
+ 5
288
+ s
289
+ 6
290
+ config
291
+ x
292
+ 7
293
+ Configy
294
+ n
295
+ x
296
+ 9
297
+ load_path
298
+ x
299
+ 12
300
+ assert_equal
301
+ p
302
+ 5
303
+ I
304
+ 0
305
+ I
306
+ 8
307
+ I
308
+ 0
309
+ I
310
+ 9
311
+ I
312
+ f
313
+ x
314
+ 63
315
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
316
+ p
317
+ 0
318
+ x
319
+ 36
320
+ test_should_detect_rails3_config_dir
321
+ M
322
+ 1
323
+ n
324
+ n
325
+ x
326
+ 36
327
+ test_should_detect_rails3_config_dir
328
+ i
329
+ 79
330
+ 45
331
+ 0
332
+ 1
333
+ 43
334
+ 2
335
+ 13
336
+ 71
337
+ 3
338
+ 47
339
+ 9
340
+ 23
341
+ 47
342
+ 49
343
+ 4
344
+ 0
345
+ 13
346
+ 47
347
+ 49
348
+ 5
349
+ 0
350
+ 15
351
+ 8
352
+ 26
353
+ 49
354
+ 3
355
+ 0
356
+ 19
357
+ 0
358
+ 15
359
+ 20
360
+ 0
361
+ 7
362
+ 6
363
+ 45
364
+ 7
365
+ 8
366
+ 13
367
+ 71
368
+ 3
369
+ 47
370
+ 9
371
+ 57
372
+ 47
373
+ 49
374
+ 4
375
+ 0
376
+ 13
377
+ 7
378
+ 9
379
+ 64
380
+ 47
381
+ 49
382
+ 5
383
+ 1
384
+ 15
385
+ 8
386
+ 63
387
+ 7
388
+ 9
389
+ 64
390
+ 49
391
+ 3
392
+ 1
393
+ 49
394
+ 10
395
+ 2
396
+ 15
397
+ 5
398
+ 7
399
+ 11
400
+ 20
401
+ 0
402
+ 56
403
+ 12
404
+ 47
405
+ 50
406
+ 13
407
+ 2
408
+ 11
409
+ I
410
+ 6
411
+ I
412
+ 1
413
+ I
414
+ 0
415
+ I
416
+ 0
417
+ n
418
+ p
419
+ 14
420
+ x
421
+ 8
422
+ MiniTest
423
+ n
424
+ x
425
+ 4
426
+ Mock
427
+ x
428
+ 3
429
+ new
430
+ x
431
+ 8
432
+ allocate
433
+ x
434
+ 10
435
+ initialize
436
+ x
437
+ 4
438
+ root
439
+ x
440
+ 8
441
+ Pathname
442
+ n
443
+ s
444
+ 18
445
+ path/to/rails/root
446
+ x
447
+ 6
448
+ expect
449
+ x
450
+ 5
451
+ Rails
452
+ M
453
+ 1
454
+ p
455
+ 2
456
+ x
457
+ 9
458
+ for_block
459
+ t
460
+ n
461
+ x
462
+ 36
463
+ test_should_detect_rails3_config_dir
464
+ i
465
+ 24
466
+ 5
467
+ 45
468
+ 0
469
+ 1
470
+ 49
471
+ 2
472
+ 0
473
+ 7
474
+ 3
475
+ 64
476
+ 49
477
+ 4
478
+ 1
479
+ 45
480
+ 5
481
+ 6
482
+ 49
483
+ 7
484
+ 0
485
+ 47
486
+ 49
487
+ 8
488
+ 2
489
+ 11
490
+ I
491
+ 4
492
+ I
493
+ 0
494
+ I
495
+ 0
496
+ I
497
+ 0
498
+ I
499
+ -2
500
+ p
501
+ 9
502
+ x
503
+ 5
504
+ Rails
505
+ n
506
+ x
507
+ 4
508
+ root
509
+ s
510
+ 6
511
+ config
512
+ x
513
+ 4
514
+ join
515
+ x
516
+ 7
517
+ Configy
518
+ n
519
+ x
520
+ 9
521
+ load_path
522
+ x
523
+ 12
524
+ assert_equal
525
+ p
526
+ 5
527
+ I
528
+ 0
529
+ I
530
+ 10
531
+ I
532
+ 0
533
+ I
534
+ 11
535
+ I
536
+ 18
537
+ x
538
+ 63
539
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
540
+ p
541
+ 0
542
+ x
543
+ 10
544
+ with_const
545
+ p
546
+ 9
547
+ I
548
+ 0
549
+ I
550
+ c
551
+ I
552
+ 0
553
+ I
554
+ d
555
+ I
556
+ 1d
557
+ I
558
+ e
559
+ I
560
+ 43
561
+ I
562
+ 10
563
+ I
564
+ 4f
565
+ x
566
+ 63
567
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
568
+ p
569
+ 1
570
+ x
571
+ 10
572
+ rails3_obj
573
+ x
574
+ 36
575
+ test_should_detect_rails2_config_dir
576
+ M
577
+ 1
578
+ n
579
+ n
580
+ x
581
+ 36
582
+ test_should_detect_rails2_config_dir
583
+ i
584
+ 13
585
+ 5
586
+ 7
587
+ 0
588
+ 7
589
+ 1
590
+ 64
591
+ 56
592
+ 2
593
+ 47
594
+ 50
595
+ 3
596
+ 2
597
+ 11
598
+ I
599
+ 4
600
+ I
601
+ 0
602
+ I
603
+ 0
604
+ I
605
+ 0
606
+ n
607
+ p
608
+ 4
609
+ x
610
+ 10
611
+ RAILS_ROOT
612
+ s
613
+ 18
614
+ path/to/rails/root
615
+ M
616
+ 1
617
+ p
618
+ 2
619
+ x
620
+ 9
621
+ for_block
622
+ t
623
+ n
624
+ x
625
+ 36
626
+ test_should_detect_rails2_config_dir
627
+ i
628
+ 23
629
+ 5
630
+ 45
631
+ 0
632
+ 1
633
+ 47
634
+ 49
635
+ 2
636
+ 0
637
+ 7
638
+ 3
639
+ 63
640
+ 2
641
+ 45
642
+ 4
643
+ 5
644
+ 49
645
+ 6
646
+ 0
647
+ 47
648
+ 49
649
+ 7
650
+ 2
651
+ 11
652
+ I
653
+ 4
654
+ I
655
+ 0
656
+ I
657
+ 0
658
+ I
659
+ 0
660
+ I
661
+ -2
662
+ p
663
+ 8
664
+ x
665
+ 10
666
+ RAILS_ROOT
667
+ n
668
+ x
669
+ 4
670
+ to_s
671
+ s
672
+ 7
673
+ /config
674
+ x
675
+ 7
676
+ Configy
677
+ n
678
+ x
679
+ 9
680
+ load_path
681
+ x
682
+ 12
683
+ assert_equal
684
+ p
685
+ 5
686
+ I
687
+ 0
688
+ I
689
+ 16
690
+ I
691
+ 0
692
+ I
693
+ 17
694
+ I
695
+ 17
696
+ x
697
+ 63
698
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
699
+ p
700
+ 0
701
+ x
702
+ 10
703
+ with_const
704
+ p
705
+ 5
706
+ I
707
+ 0
708
+ I
709
+ 15
710
+ I
711
+ 0
712
+ I
713
+ 16
714
+ I
715
+ d
716
+ x
717
+ 63
718
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
719
+ p
720
+ 0
721
+ x
722
+ 34
723
+ test_should_detect_rack_config_dir
724
+ M
725
+ 1
726
+ n
727
+ n
728
+ x
729
+ 34
730
+ test_should_detect_rack_config_dir
731
+ i
732
+ 13
733
+ 5
734
+ 7
735
+ 0
736
+ 7
737
+ 1
738
+ 64
739
+ 56
740
+ 2
741
+ 47
742
+ 50
743
+ 3
744
+ 2
745
+ 11
746
+ I
747
+ 4
748
+ I
749
+ 0
750
+ I
751
+ 0
752
+ I
753
+ 0
754
+ n
755
+ p
756
+ 4
757
+ x
758
+ 9
759
+ RACK_ROOT
760
+ s
761
+ 17
762
+ path/to/rack/root
763
+ M
764
+ 1
765
+ p
766
+ 2
767
+ x
768
+ 9
769
+ for_block
770
+ t
771
+ n
772
+ x
773
+ 34
774
+ test_should_detect_rack_config_dir
775
+ i
776
+ 23
777
+ 5
778
+ 45
779
+ 0
780
+ 1
781
+ 47
782
+ 49
783
+ 2
784
+ 0
785
+ 7
786
+ 3
787
+ 63
788
+ 2
789
+ 45
790
+ 4
791
+ 5
792
+ 49
793
+ 6
794
+ 0
795
+ 47
796
+ 49
797
+ 7
798
+ 2
799
+ 11
800
+ I
801
+ 4
802
+ I
803
+ 0
804
+ I
805
+ 0
806
+ I
807
+ 0
808
+ I
809
+ -2
810
+ p
811
+ 8
812
+ x
813
+ 9
814
+ RACK_ROOT
815
+ n
816
+ x
817
+ 4
818
+ to_s
819
+ s
820
+ 7
821
+ /config
822
+ x
823
+ 7
824
+ Configy
825
+ n
826
+ x
827
+ 9
828
+ load_path
829
+ x
830
+ 12
831
+ assert_equal
832
+ p
833
+ 5
834
+ I
835
+ 0
836
+ I
837
+ 1c
838
+ I
839
+ 0
840
+ I
841
+ 1d
842
+ I
843
+ 17
844
+ x
845
+ 63
846
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
847
+ p
848
+ 0
849
+ x
850
+ 10
851
+ with_const
852
+ p
853
+ 5
854
+ I
855
+ 0
856
+ I
857
+ 1b
858
+ I
859
+ 0
860
+ I
861
+ 1c
862
+ I
863
+ d
864
+ x
865
+ 63
866
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
867
+ p
868
+ 0
869
+ p
870
+ 11
871
+ I
872
+ 2
873
+ I
874
+ 4
875
+ I
876
+ 10
877
+ I
878
+ 8
879
+ I
880
+ 1e
881
+ I
882
+ c
883
+ I
884
+ 2c
885
+ I
886
+ 15
887
+ I
888
+ 3a
889
+ I
890
+ 1b
891
+ I
892
+ 48
893
+ x
894
+ 63
895
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
896
+ p
897
+ 0
898
+ x
899
+ 13
900
+ attach_method
901
+ p
902
+ 5
903
+ I
904
+ 0
905
+ I
906
+ 1
907
+ I
908
+ 9
909
+ I
910
+ 3
911
+ I
912
+ 2c
913
+ x
914
+ 63
915
+ /Users/gabevarela/work/ruby/gems/configy/test/load_path_test.rb
916
+ p
917
+ 0