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.
File without changes
@@ -0,0 +1,37 @@
1
+ require 'test_helper'
2
+
3
+ class SectionTest < MiniTest::Unit::TestCase
4
+ def setup
5
+ Configy.section = nil
6
+ end
7
+
8
+ def test_should_default_to_development
9
+ assert_equal "development", Configy.section
10
+ end
11
+
12
+ def test_should_detect_rails3_environment
13
+ rails3_obj = MiniTest::Mock.new
14
+ rails3_obj.expect :env, "staging"
15
+
16
+ with_const(:Rails, rails3_obj) do
17
+ assert_equal "staging", Configy.section
18
+ end
19
+ end
20
+
21
+ def test_should_detect_rails2_environment
22
+ with_const( :RAILS_ENV, "test" ) do
23
+ assert_equal "test", Configy.section
24
+ end
25
+ end
26
+
27
+ def test_should_detect_rack_environment
28
+ with_const( :RACK_ENV, "production" ) do
29
+ assert_equal "production", Configy.section
30
+ end
31
+ end
32
+
33
+ def test_should_be_able_to_override
34
+ Configy.section = "custom"
35
+ assert_equal "custom", Configy.section
36
+ end
37
+ end
@@ -0,0 +1,945 @@
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
+ 11
76
+ SectionTest
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
+ 11
99
+ SectionTest
100
+ i
101
+ 86
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
+ 15
174
+ 99
175
+ 7
176
+ 12
177
+ 7
178
+ 13
179
+ 65
180
+ 67
181
+ 49
182
+ 2
183
+ 0
184
+ 49
185
+ 3
186
+ 4
187
+ 11
188
+ I
189
+ 5
190
+ I
191
+ 0
192
+ I
193
+ 0
194
+ I
195
+ 0
196
+ n
197
+ p
198
+ 14
199
+ x
200
+ 5
201
+ setup
202
+ M
203
+ 1
204
+ n
205
+ n
206
+ x
207
+ 5
208
+ setup
209
+ i
210
+ 12
211
+ 45
212
+ 0
213
+ 1
214
+ 1
215
+ 13
216
+ 18
217
+ 2
218
+ 49
219
+ 2
220
+ 1
221
+ 15
222
+ 11
223
+ I
224
+ 3
225
+ I
226
+ 0
227
+ I
228
+ 0
229
+ I
230
+ 0
231
+ n
232
+ p
233
+ 3
234
+ x
235
+ 7
236
+ Configy
237
+ n
238
+ x
239
+ 8
240
+ section=
241
+ p
242
+ 5
243
+ I
244
+ 0
245
+ I
246
+ 4
247
+ I
248
+ 0
249
+ I
250
+ 5
251
+ I
252
+ c
253
+ x
254
+ 61
255
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
256
+ p
257
+ 0
258
+ x
259
+ 17
260
+ method_visibility
261
+ x
262
+ 15
263
+ add_defn_method
264
+ x
265
+ 34
266
+ test_should_default_to_development
267
+ M
268
+ 1
269
+ n
270
+ n
271
+ x
272
+ 34
273
+ test_should_default_to_development
274
+ i
275
+ 15
276
+ 5
277
+ 7
278
+ 0
279
+ 64
280
+ 45
281
+ 1
282
+ 2
283
+ 49
284
+ 3
285
+ 0
286
+ 47
287
+ 49
288
+ 4
289
+ 2
290
+ 11
291
+ I
292
+ 3
293
+ I
294
+ 0
295
+ I
296
+ 0
297
+ I
298
+ 0
299
+ n
300
+ p
301
+ 5
302
+ s
303
+ 11
304
+ development
305
+ x
306
+ 7
307
+ Configy
308
+ n
309
+ x
310
+ 7
311
+ section
312
+ x
313
+ 12
314
+ assert_equal
315
+ p
316
+ 5
317
+ I
318
+ 0
319
+ I
320
+ 8
321
+ I
322
+ 0
323
+ I
324
+ 9
325
+ I
326
+ f
327
+ x
328
+ 61
329
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
330
+ p
331
+ 0
332
+ x
333
+ 37
334
+ test_should_detect_rails3_environment
335
+ M
336
+ 1
337
+ n
338
+ n
339
+ x
340
+ 37
341
+ test_should_detect_rails3_environment
342
+ i
343
+ 52
344
+ 45
345
+ 0
346
+ 1
347
+ 43
348
+ 2
349
+ 13
350
+ 71
351
+ 3
352
+ 47
353
+ 9
354
+ 23
355
+ 47
356
+ 49
357
+ 4
358
+ 0
359
+ 13
360
+ 47
361
+ 49
362
+ 5
363
+ 0
364
+ 15
365
+ 8
366
+ 26
367
+ 49
368
+ 3
369
+ 0
370
+ 19
371
+ 0
372
+ 15
373
+ 20
374
+ 0
375
+ 7
376
+ 6
377
+ 7
378
+ 7
379
+ 64
380
+ 49
381
+ 8
382
+ 2
383
+ 15
384
+ 5
385
+ 7
386
+ 9
387
+ 20
388
+ 0
389
+ 56
390
+ 10
391
+ 47
392
+ 50
393
+ 11
394
+ 2
395
+ 11
396
+ I
397
+ 5
398
+ I
399
+ 1
400
+ I
401
+ 0
402
+ I
403
+ 0
404
+ n
405
+ p
406
+ 12
407
+ x
408
+ 8
409
+ MiniTest
410
+ n
411
+ x
412
+ 4
413
+ Mock
414
+ x
415
+ 3
416
+ new
417
+ x
418
+ 8
419
+ allocate
420
+ x
421
+ 10
422
+ initialize
423
+ x
424
+ 3
425
+ env
426
+ s
427
+ 7
428
+ staging
429
+ x
430
+ 6
431
+ expect
432
+ x
433
+ 5
434
+ Rails
435
+ M
436
+ 1
437
+ p
438
+ 2
439
+ x
440
+ 9
441
+ for_block
442
+ t
443
+ n
444
+ x
445
+ 37
446
+ test_should_detect_rails3_environment
447
+ i
448
+ 15
449
+ 5
450
+ 7
451
+ 0
452
+ 64
453
+ 45
454
+ 1
455
+ 2
456
+ 49
457
+ 3
458
+ 0
459
+ 47
460
+ 49
461
+ 4
462
+ 2
463
+ 11
464
+ I
465
+ 4
466
+ I
467
+ 0
468
+ I
469
+ 0
470
+ I
471
+ 0
472
+ I
473
+ -2
474
+ p
475
+ 5
476
+ s
477
+ 7
478
+ staging
479
+ x
480
+ 7
481
+ Configy
482
+ n
483
+ x
484
+ 7
485
+ section
486
+ x
487
+ 12
488
+ assert_equal
489
+ p
490
+ 5
491
+ I
492
+ 0
493
+ I
494
+ 10
495
+ I
496
+ 0
497
+ I
498
+ 11
499
+ I
500
+ f
501
+ x
502
+ 61
503
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
504
+ p
505
+ 0
506
+ x
507
+ 10
508
+ with_const
509
+ p
510
+ 9
511
+ I
512
+ 0
513
+ I
514
+ c
515
+ I
516
+ 0
517
+ I
518
+ d
519
+ I
520
+ 1d
521
+ I
522
+ e
523
+ I
524
+ 28
525
+ I
526
+ 10
527
+ I
528
+ 34
529
+ x
530
+ 61
531
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
532
+ p
533
+ 1
534
+ x
535
+ 10
536
+ rails3_obj
537
+ x
538
+ 37
539
+ test_should_detect_rails2_environment
540
+ M
541
+ 1
542
+ n
543
+ n
544
+ x
545
+ 37
546
+ test_should_detect_rails2_environment
547
+ i
548
+ 13
549
+ 5
550
+ 7
551
+ 0
552
+ 7
553
+ 1
554
+ 64
555
+ 56
556
+ 2
557
+ 47
558
+ 50
559
+ 3
560
+ 2
561
+ 11
562
+ I
563
+ 4
564
+ I
565
+ 0
566
+ I
567
+ 0
568
+ I
569
+ 0
570
+ n
571
+ p
572
+ 4
573
+ x
574
+ 9
575
+ RAILS_ENV
576
+ s
577
+ 4
578
+ test
579
+ M
580
+ 1
581
+ p
582
+ 2
583
+ x
584
+ 9
585
+ for_block
586
+ t
587
+ n
588
+ x
589
+ 37
590
+ test_should_detect_rails2_environment
591
+ i
592
+ 15
593
+ 5
594
+ 7
595
+ 0
596
+ 64
597
+ 45
598
+ 1
599
+ 2
600
+ 49
601
+ 3
602
+ 0
603
+ 47
604
+ 49
605
+ 4
606
+ 2
607
+ 11
608
+ I
609
+ 4
610
+ I
611
+ 0
612
+ I
613
+ 0
614
+ I
615
+ 0
616
+ I
617
+ -2
618
+ p
619
+ 5
620
+ s
621
+ 4
622
+ test
623
+ x
624
+ 7
625
+ Configy
626
+ n
627
+ x
628
+ 7
629
+ section
630
+ x
631
+ 12
632
+ assert_equal
633
+ p
634
+ 5
635
+ I
636
+ 0
637
+ I
638
+ 16
639
+ I
640
+ 0
641
+ I
642
+ 17
643
+ I
644
+ f
645
+ x
646
+ 61
647
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
648
+ p
649
+ 0
650
+ x
651
+ 10
652
+ with_const
653
+ p
654
+ 5
655
+ I
656
+ 0
657
+ I
658
+ 15
659
+ I
660
+ 0
661
+ I
662
+ 16
663
+ I
664
+ d
665
+ x
666
+ 61
667
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
668
+ p
669
+ 0
670
+ x
671
+ 35
672
+ test_should_detect_rack_environment
673
+ M
674
+ 1
675
+ n
676
+ n
677
+ x
678
+ 35
679
+ test_should_detect_rack_environment
680
+ i
681
+ 13
682
+ 5
683
+ 7
684
+ 0
685
+ 7
686
+ 1
687
+ 64
688
+ 56
689
+ 2
690
+ 47
691
+ 50
692
+ 3
693
+ 2
694
+ 11
695
+ I
696
+ 4
697
+ I
698
+ 0
699
+ I
700
+ 0
701
+ I
702
+ 0
703
+ n
704
+ p
705
+ 4
706
+ x
707
+ 8
708
+ RACK_ENV
709
+ s
710
+ 10
711
+ production
712
+ M
713
+ 1
714
+ p
715
+ 2
716
+ x
717
+ 9
718
+ for_block
719
+ t
720
+ n
721
+ x
722
+ 35
723
+ test_should_detect_rack_environment
724
+ i
725
+ 15
726
+ 5
727
+ 7
728
+ 0
729
+ 64
730
+ 45
731
+ 1
732
+ 2
733
+ 49
734
+ 3
735
+ 0
736
+ 47
737
+ 49
738
+ 4
739
+ 2
740
+ 11
741
+ I
742
+ 4
743
+ I
744
+ 0
745
+ I
746
+ 0
747
+ I
748
+ 0
749
+ I
750
+ -2
751
+ p
752
+ 5
753
+ s
754
+ 10
755
+ production
756
+ x
757
+ 7
758
+ Configy
759
+ n
760
+ x
761
+ 7
762
+ section
763
+ x
764
+ 12
765
+ assert_equal
766
+ p
767
+ 5
768
+ I
769
+ 0
770
+ I
771
+ 1c
772
+ I
773
+ 0
774
+ I
775
+ 1d
776
+ I
777
+ f
778
+ x
779
+ 61
780
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
781
+ p
782
+ 0
783
+ x
784
+ 10
785
+ with_const
786
+ p
787
+ 5
788
+ I
789
+ 0
790
+ I
791
+ 1b
792
+ I
793
+ 0
794
+ I
795
+ 1c
796
+ I
797
+ d
798
+ x
799
+ 61
800
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
801
+ p
802
+ 0
803
+ x
804
+ 31
805
+ test_should_be_able_to_override
806
+ M
807
+ 1
808
+ n
809
+ n
810
+ x
811
+ 31
812
+ test_should_be_able_to_override
813
+ i
814
+ 29
815
+ 45
816
+ 0
817
+ 1
818
+ 7
819
+ 2
820
+ 64
821
+ 13
822
+ 18
823
+ 2
824
+ 49
825
+ 3
826
+ 1
827
+ 15
828
+ 15
829
+ 5
830
+ 7
831
+ 2
832
+ 64
833
+ 45
834
+ 0
835
+ 4
836
+ 49
837
+ 5
838
+ 0
839
+ 47
840
+ 49
841
+ 6
842
+ 2
843
+ 11
844
+ I
845
+ 3
846
+ I
847
+ 0
848
+ I
849
+ 0
850
+ I
851
+ 0
852
+ n
853
+ p
854
+ 7
855
+ x
856
+ 7
857
+ Configy
858
+ n
859
+ s
860
+ 6
861
+ custom
862
+ x
863
+ 8
864
+ section=
865
+ n
866
+ x
867
+ 7
868
+ section
869
+ x
870
+ 12
871
+ assert_equal
872
+ p
873
+ 7
874
+ I
875
+ 0
876
+ I
877
+ 21
878
+ I
879
+ 0
880
+ I
881
+ 22
882
+ I
883
+ e
884
+ I
885
+ 23
886
+ I
887
+ 1d
888
+ x
889
+ 61
890
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
891
+ p
892
+ 0
893
+ p
894
+ 13
895
+ I
896
+ 2
897
+ I
898
+ 4
899
+ I
900
+ 10
901
+ I
902
+ 8
903
+ I
904
+ 1e
905
+ I
906
+ c
907
+ I
908
+ 2c
909
+ I
910
+ 15
911
+ I
912
+ 3a
913
+ I
914
+ 1b
915
+ I
916
+ 48
917
+ I
918
+ 21
919
+ I
920
+ 56
921
+ x
922
+ 61
923
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
924
+ p
925
+ 0
926
+ x
927
+ 13
928
+ attach_method
929
+ p
930
+ 5
931
+ I
932
+ 0
933
+ I
934
+ 1
935
+ I
936
+ 9
937
+ I
938
+ 3
939
+ I
940
+ 2c
941
+ x
942
+ 61
943
+ /Users/gabevarela/work/ruby/gems/configy/test/section_test.rb
944
+ p
945
+ 0