tabulous 0.0.2 → 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.
- data/CHANGELOG.rdoc +4 -0
- data/README.rdoc +6 -4
- data/lib/generators/tabs/tabs_generator.rb +3 -3
- data/lib/generators/tabs/templates/tabulous.rb +24 -25
- data/lib/tabulous/formatter.rb +2 -4
- data/lib/tabulous/railtie.rb +3 -9
- data/lib/tabulous/tab.rb +4 -30
- data/lib/tabulous/tabulous.rb +58 -38
- data/lib/tabulous/version.rb +1 -1
- data/lib/tasks/tabulous.rake +2 -2
- data/test/applications/main/{config/initializers → app/tabs}/tabulous.rb +38 -39
- data/test/applications/main/test/integration/actions_test.rb +36 -32
- data/test/applications/main/test/integration/active_tab_clickable_test.rb +36 -32
- data/test/applications/main/test/integration/always_render_subtabs_test.rb +36 -32
- data/test/applications/main/test/integration/css_no_scaffolding_test.rb +36 -32
- data/test/applications/main/test/integration/css_scaffolding_test.rb +36 -32
- data/test/applications/main/test/integration/display_text_test.rb +36 -32
- data/test/applications/main/test/integration/enabled_test.rb +36 -32
- data/test/applications/main/test/integration/html5_test.rb +36 -32
- data/test/applications/main/test/integration/path_test.rb +36 -32
- data/test/applications/main/test/integration/visible_test.rb +36 -32
- data/test/applications/main/test/unit/tabs_generator_test.rb +1 -1
- data/test/applications/simple_tabs/{config/initializers → app/tabs}/tabulous.rb +31 -32
- data/test/applications/subtabs/app/tabs/tabulous.rb +166 -0
- data/test/test_application_integration_test_helper.rb +1 -1
- data/test/{test_initializers → test_tab_files}/empty +0 -0
- data/test/test_tab_files/expected +59 -0
- data/test/test_tab_files/random_horizontal_whitespace +59 -0
- data/test/test_tab_files/random_vertical_whitespace +106 -0
- data/test/{test_initializers → test_tab_files}/text +0 -0
- data/test/test_tab_files/trailing_comments +59 -0
- data/test/units/tabulous_formatter_test.rb +8 -8
- metadata +13 -13
- data/test/applications/subtabs/config/initializers/tabulous.rb +0 -167
- data/test/test_initializers/expected +0 -55
- data/test/test_initializers/random_horizontal_whitespace +0 -55
- data/test/test_initializers/random_vertical_whitespace +0 -102
- data/test/test_initializers/trailing_comments +0 -55
@@ -1,102 +0,0 @@
|
|
1
|
-
Tabulous.setup do |config|
|
2
|
-
|
3
|
-
config.tabs = [
|
4
|
-
|
5
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
6
|
-
|
7
|
-
# TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? #
|
8
|
-
|
9
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
10
|
-
|
11
|
-
[ :home_tab , 'Explanation' , '/' , true , true ],
|
12
|
-
[ :galaxies_tab , 'Galaxies' , '/galaxies/elliptical_galaxies' , true , true ],
|
13
|
-
|
14
|
-
|
15
|
-
[ :elliptical_galaxies_subtab , 'Elliptical Galaxies' , '/galaxies/elliptical_galaxies' , true , true ],
|
16
|
-
[ :spiral_galaxies_subtab , 'Spiral Galaxies' , '/galaxies/spiral_galaxies' , true , true ],
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
[ :lenticular_galaxies_subtab , 'Lenticular Galaxies' , '/galaxies/lenticular_galaxies' , true , true ],
|
21
|
-
[ :planets_tab , 'Planets' , '/exoplanets' , true , true ],
|
22
|
-
[ :exoplanets_subtab , 'Exoplanets' , '/exoplanets' , true , true ],
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
[ :rogue_planets_subtab , 'Rogue Planets' , '/rogue_planets' , true , true ],
|
28
|
-
[ :stars_tab , 'Stars' , '/stars' , true , true ],
|
29
|
-
[ :hidden_tab , 'Hidden' , '/hidden/always_visible' , lambda { request.path =~ /(hidden|galaxies)/ } , true ],
|
30
|
-
[ :always_visible_subtab , 'Always Visible' , '/hidden/always_visible' , true , true ],
|
31
|
-
[ :always_hidden_subtab , 'Always Hidden' , '/hidden/always_hidden' , false , true ],
|
32
|
-
[ :disabled_tab , 'Disabled' , '/disabled/always_enabled' , true , lambda { request.path =~ /(disabled|stars)/ } ],
|
33
|
-
[ :always_enabled_subtab , 'Always Enabled' , '/disabled/always_enabled' , true , true ],
|
34
|
-
[ :always_disabled_subtab , 'Always Disabled' , '/disabled/always_disabled' , true , false ],
|
35
|
-
|
36
|
-
|
37
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
# TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? #
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
]
|
50
|
-
|
51
|
-
config.actions = [
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
#-----------------------------------------------------------------------------------------#
|
58
|
-
|
59
|
-
# CONTROLLER | ACTION | TAB #
|
60
|
-
|
61
|
-
|
62
|
-
#-----------------------------------------------------------------------------------------#
|
63
|
-
|
64
|
-
[ :home , :all_actions , :home_tab ],
|
65
|
-
[ :elliptical_galaxies , :all_actions , :elliptical_galaxies_subtab ],
|
66
|
-
[ :spiral_galaxies , :all_actions , :spiral_galaxies_subtab ],
|
67
|
-
[ :lenticular_galaxies , :all_actions , :lenticular_galaxies_subtab ],
|
68
|
-
[ :exoplanets , :all_actions , :exoplanets_subtab ],
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
[ :rogue_planets , :all_actions , :rogue_planets_subtab ],
|
77
|
-
|
78
|
-
[ :stars , :all_actions , :stars_tab ],
|
79
|
-
|
80
|
-
[ :misc , :always_visible , :always_visible_subtab ],
|
81
|
-
|
82
|
-
[ :misc , :always_hidden , :always_hidden_subtab ],
|
83
|
-
[ :misc , :always_enabled , :always_enabled_subtab ],
|
84
|
-
[ :misc , :always_disabled , :always_disabled_subtab ],
|
85
|
-
#-----------------------------------------------------------------------------------------#
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
# CONTROLLER | ACTION | TAB #
|
90
|
-
|
91
|
-
#-----------------------------------------------------------------------------------------#
|
92
|
-
]
|
93
|
-
|
94
|
-
config.css.scaffolding = true
|
95
|
-
config.css.background_color = '#cec'
|
96
|
-
config.css.text_color = '#464'
|
97
|
-
config.css.active_tab_color = '#fff'
|
98
|
-
config.css.hover_tab_color = '#dfd'
|
99
|
-
config.css.inactive_tab_color = '#aca'
|
100
|
-
config.css.inactive_text_color = '#8a8'
|
101
|
-
|
102
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
Tabulous.setup do |config|
|
2
|
-
|
3
|
-
config.tabs = [ # this comment should be preserved and not otherwise affect anything
|
4
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
5
|
-
# TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? #
|
6
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
7
|
-
[ :home_tab , 'Explanation' , '/' , true , true ], # this comment should be preserved and not otherwise affect anything
|
8
|
-
[ :galaxies_tab , 'Galaxies' , '/galaxies/elliptical_galaxies' , true , true ],
|
9
|
-
[ :elliptical_galaxies_subtab , 'Elliptical Galaxies' , '/galaxies/elliptical_galaxies' , true , true ],
|
10
|
-
[ :spiral_galaxies_subtab , 'Spiral Galaxies' , '/galaxies/spiral_galaxies' , true , true ],
|
11
|
-
[ :lenticular_galaxies_subtab , 'Lenticular Galaxies' , '/galaxies/lenticular_galaxies' , true , true ],
|
12
|
-
[ :planets_tab , 'Planets' , '/exoplanets' , true , true ], # this comment should be preserved and not otherwise affect anything
|
13
|
-
[ :exoplanets_subtab , 'Exoplanets' , '/exoplanets' , true , true ],
|
14
|
-
[ :rogue_planets_subtab , 'Rogue Planets' , '/rogue_planets' , true , true ],
|
15
|
-
[ :stars_tab , 'Stars' , '/stars' , true , true ],
|
16
|
-
[ :hidden_tab , 'Hidden' , '/hidden/always_visible' , lambda { request.path =~ /(hidden|galaxies)/ } , true ],
|
17
|
-
[ :always_visible_subtab , 'Always Visible' , '/hidden/always_visible' , true , true ],
|
18
|
-
[ :always_hidden_subtab , 'Always Hidden' , '/hidden/always_hidden' , false , true ],
|
19
|
-
[ :disabled_tab , 'Disabled' , '/disabled/always_enabled' , true , lambda { request.path =~ /(disabled|stars)/ } ],
|
20
|
-
[ :always_enabled_subtab , 'Always Enabled' , '/disabled/always_enabled' , true , true ],
|
21
|
-
[ :always_disabled_subtab , 'Always Disabled' , '/disabled/always_disabled' , true , false ], # this comment should be preserved and not otherwise affect anything
|
22
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
23
|
-
# TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? #
|
24
|
-
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#
|
25
|
-
] # this comment should be preserved and not otherwise affect anything
|
26
|
-
|
27
|
-
config.actions = [ # this comment should be preserved and not otherwise affect anything
|
28
|
-
#-----------------------------------------------------------------------------------------#
|
29
|
-
# CONTROLLER | ACTION | TAB #
|
30
|
-
#-----------------------------------------------------------------------------------------#
|
31
|
-
[ :home , :all_actions , :home_tab ], # this comment should be preserved and not otherwise affect anything
|
32
|
-
[ :elliptical_galaxies , :all_actions , :elliptical_galaxies_subtab ],
|
33
|
-
[ :spiral_galaxies , :all_actions , :spiral_galaxies_subtab ],
|
34
|
-
[ :lenticular_galaxies , :all_actions , :lenticular_galaxies_subtab ],
|
35
|
-
[ :exoplanets , :all_actions , :exoplanets_subtab ],
|
36
|
-
[ :rogue_planets , :all_actions , :rogue_planets_subtab ], # this comment should be preserved and not otherwise affect anything
|
37
|
-
[ :stars , :all_actions , :stars_tab ],
|
38
|
-
[ :misc , :always_visible , :always_visible_subtab ],
|
39
|
-
[ :misc , :always_hidden , :always_hidden_subtab ],
|
40
|
-
[ :misc , :always_enabled , :always_enabled_subtab ],
|
41
|
-
[ :misc , :always_disabled , :always_disabled_subtab ],
|
42
|
-
#-----------------------------------------------------------------------------------------#
|
43
|
-
# CONTROLLER | ACTION | TAB #
|
44
|
-
#-----------------------------------------------------------------------------------------#
|
45
|
-
] # this comment should be preserved and not otherwise affect anything
|
46
|
-
|
47
|
-
config.css.scaffolding = true
|
48
|
-
config.css.background_color = '#cec'
|
49
|
-
config.css.text_color = '#464'
|
50
|
-
config.css.active_tab_color = '#fff'
|
51
|
-
config.css.hover_tab_color = '#dfd'
|
52
|
-
config.css.inactive_tab_color = '#aca'
|
53
|
-
config.css.inactive_text_color = '#8a8'
|
54
|
-
|
55
|
-
end
|