bootstrap_it 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/Gemfile +9 -0
- data/README.md +582 -0
- data/Rakefile +6 -0
- data/bootstrap_it.gemspec +33 -0
- data/config.ru +7 -0
- data/lib/bootstrap_it.rb +9 -0
- data/lib/bootstrap_it/assets.rb +67 -0
- data/lib/bootstrap_it/config.rb +50 -0
- data/lib/bootstrap_it/engine.rb +25 -0
- data/lib/bootstrap_it/locales/en.yml +4 -0
- data/lib/bootstrap_it/locales/ru.yml +4 -0
- data/lib/bootstrap_it/version.rb +6 -0
- data/lib/bootstrap_it/view_helpers.rb +55 -0
- data/lib/bootstrap_it/view_helpers/breadcrumb.rb +19 -0
- data/lib/bootstrap_it/view_helpers/button.rb +116 -0
- data/lib/bootstrap_it/view_helpers/button_group.rb +32 -0
- data/lib/bootstrap_it/view_helpers/button_toolbar.rb +21 -0
- data/lib/bootstrap_it/view_helpers/dropdown_menu.rb +30 -0
- data/lib/bootstrap_it/view_helpers/form.rb +127 -0
- data/lib/bootstrap_it/view_helpers/grid.rb +75 -0
- data/lib/bootstrap_it/view_helpers/icon.rb +24 -0
- data/lib/bootstrap_it/view_helpers/list.rb +47 -0
- data/lib/bootstrap_it/view_helpers/misc.rb +144 -0
- data/lib/bootstrap_it/view_helpers/mixin.rb +279 -0
- data/lib/bootstrap_it/view_helpers/nav.rb +96 -0
- data/lib/bootstrap_it/view_helpers/pagination.rb +34 -0
- data/lib/bootstrap_it/view_helpers/table.rb +72 -0
- data/lib/bootstrap_it/view_helpers/text.rb +46 -0
- data/spec/assets/assets_spec.rb +51 -0
- data/spec/internal/app/assets/javascript/application.js +7 -0
- data/spec/internal/app/assets/javascript/user.js +1 -0
- data/spec/internal/app/assets/javascript/userfont.eot +0 -0
- data/spec/internal/app/assets/stylesheets/application.css +6 -0
- data/spec/internal/app/assets/stylesheets/user.css +1 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/routes.rb +3 -0
- data/spec/internal/db/schema.rb +3 -0
- data/spec/internal/log/.gitignore +1 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/lib/config_spec.rb +10 -0
- data/spec/lib/view_helpers_spec.rb +12 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/support/example_groups/assets_example_group.rb +84 -0
- data/spec/support/example_groups/view_helpers_example_group.rb +124 -0
- data/spec/view_helpers/breadcrumb_spec.rb +12 -0
- data/spec/view_helpers/button_group_spec.rb +40 -0
- data/spec/view_helpers/button_spec.rb +169 -0
- data/spec/view_helpers/button_toolbar_spec.rb +14 -0
- data/spec/view_helpers/dropdown_menu_spec.rb +41 -0
- data/spec/view_helpers/form_spec.rb +27 -0
- data/spec/view_helpers/grid_spec.rb +47 -0
- data/spec/view_helpers/icon_spec.rb +6 -0
- data/spec/view_helpers/list_spec.rb +50 -0
- data/spec/view_helpers/misc_spec.rb +117 -0
- data/spec/view_helpers/mixin_spec.rb +177 -0
- data/spec/view_helpers/nav_spec.rb +63 -0
- data/spec/view_helpers/pagination_spec.rb +36 -0
- data/spec/view_helpers/table_spec.rb +59 -0
- data/spec/view_helpers/text_spec.rb +13 -0
- data/spec/views/examples_spec.rb +250 -0
- data/upstream/bootstrap-3.0.3-dist.zip +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/javascript/bootstrap.js +2006 -0
- data/upstream/bootstrap/3.0.3/javascript/bootstrap.min.js +7 -0
- data/upstream/bootstrap/3.0.3/src/.editorconfig +11 -0
- data/upstream/bootstrap/3.0.3/src/.gitattributes +8 -0
- data/upstream/bootstrap/3.0.3/src/.gitignore +42 -0
- data/upstream/bootstrap/3.0.3/src/.travis.yml +10 -0
- data/upstream/bootstrap/3.0.3/src/CNAME +1 -0
- data/upstream/bootstrap/3.0.3/src/CONTRIBUTING.md +79 -0
- data/upstream/bootstrap/3.0.3/src/DOCS-LICENSE +319 -0
- data/upstream/bootstrap/3.0.3/src/Gruntfile.js +337 -0
- data/upstream/bootstrap/3.0.3/src/LICENSE +176 -0
- data/upstream/bootstrap/3.0.3/src/LICENSE-MIT +21 -0
- data/upstream/bootstrap/3.0.3/src/README.md +166 -0
- data/upstream/bootstrap/3.0.3/src/_config.yml +25 -0
- data/upstream/bootstrap/3.0.3/src/_includes/ads.html +1 -0
- data/upstream/bootstrap/3.0.3/src/_includes/footer.html +48 -0
- data/upstream/bootstrap/3.0.3/src/_includes/header.html +42 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-about.html +12 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-components.html +137 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-css.html +99 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-customize.html +40 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-getting-started.html +48 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-javascript.html +88 -0
- data/upstream/bootstrap/3.0.3/src/_includes/nav-main.html +37 -0
- data/upstream/bootstrap/3.0.3/src/_includes/old-bs-docs.html +8 -0
- data/upstream/bootstrap/3.0.3/src/_includes/social-buttons.html +16 -0
- data/upstream/bootstrap/3.0.3/src/_layouts/default.html +79 -0
- data/upstream/bootstrap/3.0.3/src/_layouts/home.html +47 -0
- data/upstream/bootstrap/3.0.3/src/about.html +94 -0
- data/upstream/bootstrap/3.0.3/src/bower.json +30 -0
- data/upstream/bootstrap/3.0.3/src/components.html +3714 -0
- data/upstream/bootstrap/3.0.3/src/composer.json +25 -0
- data/upstream/bootstrap/3.0.3/src/css.html +2673 -0
- data/upstream/bootstrap/3.0.3/src/customize.html +1715 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap-theme.css +397 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap-theme.min.css +7 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap.css +7118 -0
- data/upstream/bootstrap/3.0.3/src/dist/css/bootstrap.min.css +7 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/src/dist/js/bootstrap.js +2006 -0
- data/upstream/bootstrap/3.0.3/src/dist/js/bootstrap.min.js +7 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/css/docs.css +1196 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/css/pygments-manni.css +66 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/ico/favicon.png +0 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/application.js +103 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/customizer.js +332 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/filesaver.js +399 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/holder.js +500 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/ie8-responsive-file-warning.js +12 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/jszip.js +1474 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/less.js +9 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/raw-files.js +3 -0
- data/upstream/bootstrap/3.0.3/src/docs-assets/js/uglify.js +14 -0
- data/upstream/bootstrap/3.0.3/src/examples/carousel/carousel.css +148 -0
- data/upstream/bootstrap/3.0.3/src/examples/carousel/index.html +206 -0
- data/upstream/bootstrap/3.0.3/src/examples/grid/grid.css +28 -0
- data/upstream/bootstrap/3.0.3/src/examples/grid/index.html +148 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron-narrow/index.html +82 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron-narrow/jumbotron-narrow.css +79 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron/index.html +99 -0
- data/upstream/bootstrap/3.0.3/src/examples/jumbotron/jumbotron.css +5 -0
- data/upstream/bootstrap/3.0.3/src/examples/justified-nav/index.html +84 -0
- data/upstream/bootstrap/3.0.3/src/examples/justified-nav/justified-nav.css +88 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-fixed-top/index.html +91 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-fixed-top/navbar-fixed-top.css +4 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-static-top/index.html +92 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar-static-top/navbar-static-top.css +7 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar/index.html +88 -0
- data/upstream/bootstrap/3.0.3/src/examples/navbar/navbar.css +8 -0
- data/upstream/bootstrap/3.0.3/src/examples/non-responsive/index.html +101 -0
- data/upstream/bootstrap/3.0.3/src/examples/non-responsive/non-responsive.css +120 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/index.html +130 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/offcanvas.css +51 -0
- data/upstream/bootstrap/3.0.3/src/examples/offcanvas/offcanvas.js +5 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/carousel.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/grid.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/jumbotron-narrow.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/jumbotron.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/justified-nav.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar-fixed.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar-static.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/navbar.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/non-responsive.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/offcanvas.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sign-in.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/starter-template.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sticky-footer-navbar.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/sticky-footer.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/screenshots/theme.jpg +0 -0
- data/upstream/bootstrap/3.0.3/src/examples/signin/index.html +50 -0
- data/upstream/bootstrap/3.0.3/src/examples/signin/signin.css +40 -0
- data/upstream/bootstrap/3.0.3/src/examples/starter-template/index.html +68 -0
- data/upstream/bootstrap/3.0.3/src/examples/starter-template/starter-template.css +7 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer-navbar/index.html +91 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer-navbar/sticky-footer-navbar.css +45 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer/index.html +55 -0
- data/upstream/bootstrap/3.0.3/src/examples/sticky-footer/sticky-footer.css +38 -0
- data/upstream/bootstrap/3.0.3/src/examples/theme/index.html +384 -0
- data/upstream/bootstrap/3.0.3/src/examples/theme/theme.css +14 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.eot +0 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.svg +229 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/upstream/bootstrap/3.0.3/src/fonts/glyphicons-halflings-regular.woff +0 -0
- data/upstream/bootstrap/3.0.3/src/getting-started.html +1057 -0
- data/upstream/bootstrap/3.0.3/src/index.html +16 -0
- data/upstream/bootstrap/3.0.3/src/javascript.html +1995 -0
- data/upstream/bootstrap/3.0.3/src/js/.jshintrc +14 -0
- data/upstream/bootstrap/3.0.3/src/js/affix.js +126 -0
- data/upstream/bootstrap/3.0.3/src/js/alert.js +98 -0
- data/upstream/bootstrap/3.0.3/src/js/button.js +115 -0
- data/upstream/bootstrap/3.0.3/src/js/carousel.js +217 -0
- data/upstream/bootstrap/3.0.3/src/js/collapse.js +179 -0
- data/upstream/bootstrap/3.0.3/src/js/dropdown.js +154 -0
- data/upstream/bootstrap/3.0.3/src/js/modal.js +246 -0
- data/upstream/bootstrap/3.0.3/src/js/popover.js +117 -0
- data/upstream/bootstrap/3.0.3/src/js/scrollspy.js +158 -0
- data/upstream/bootstrap/3.0.3/src/js/tab.js +135 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/index.html +52 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/affix.js +25 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/alert.js +62 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/button.js +122 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/carousel.js +87 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/collapse.js +164 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/dropdown.js +219 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/modal.js +196 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/phantom.js +69 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/popover.js +133 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/scrollspy.js +37 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/tab.js +86 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/tooltip.js +437 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/unit/transition.js +13 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/jquery.js +6 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/qunit.css +232 -0
- data/upstream/bootstrap/3.0.3/src/js/tests/vendor/qunit.js +1510 -0
- data/upstream/bootstrap/3.0.3/src/js/tooltip.js +386 -0
- data/upstream/bootstrap/3.0.3/src/js/transition.js +56 -0
- data/upstream/bootstrap/3.0.3/src/less/alerts.less +67 -0
- data/upstream/bootstrap/3.0.3/src/less/badges.less +51 -0
- data/upstream/bootstrap/3.0.3/src/less/bootstrap.less +49 -0
- data/upstream/bootstrap/3.0.3/src/less/breadcrumbs.less +23 -0
- data/upstream/bootstrap/3.0.3/src/less/button-groups.less +227 -0
- data/upstream/bootstrap/3.0.3/src/less/buttons.less +155 -0
- data/upstream/bootstrap/3.0.3/src/less/carousel.less +232 -0
- data/upstream/bootstrap/3.0.3/src/less/close.less +33 -0
- data/upstream/bootstrap/3.0.3/src/less/code.less +53 -0
- data/upstream/bootstrap/3.0.3/src/less/component-animations.less +29 -0
- data/upstream/bootstrap/3.0.3/src/less/dropdowns.less +187 -0
- data/upstream/bootstrap/3.0.3/src/less/forms.less +375 -0
- data/upstream/bootstrap/3.0.3/src/less/glyphicons.less +237 -0
- data/upstream/bootstrap/3.0.3/src/less/grid.less +79 -0
- data/upstream/bootstrap/3.0.3/src/less/input-groups.less +136 -0
- data/upstream/bootstrap/3.0.3/src/less/jumbotron.less +46 -0
- data/upstream/bootstrap/3.0.3/src/less/labels.less +64 -0
- data/upstream/bootstrap/3.0.3/src/less/list-group.less +88 -0
- data/upstream/bootstrap/3.0.3/src/less/media.less +56 -0
- data/upstream/bootstrap/3.0.3/src/less/mixins.less +845 -0
- data/upstream/bootstrap/3.0.3/src/less/modals.less +129 -0
- data/upstream/bootstrap/3.0.3/src/less/navbar.less +612 -0
- data/upstream/bootstrap/3.0.3/src/less/navs.less +242 -0
- data/upstream/bootstrap/3.0.3/src/less/normalize.less +406 -0
- data/upstream/bootstrap/3.0.3/src/less/pager.less +55 -0
- data/upstream/bootstrap/3.0.3/src/less/pagination.less +85 -0
- data/upstream/bootstrap/3.0.3/src/less/panels.less +182 -0
- data/upstream/bootstrap/3.0.3/src/less/popovers.less +133 -0
- data/upstream/bootstrap/3.0.3/src/less/print.less +105 -0
- data/upstream/bootstrap/3.0.3/src/less/progress-bars.less +80 -0
- data/upstream/bootstrap/3.0.3/src/less/responsive-utilities.less +209 -0
- data/upstream/bootstrap/3.0.3/src/less/scaffolding.less +119 -0
- data/upstream/bootstrap/3.0.3/src/less/tables.less +231 -0
- data/upstream/bootstrap/3.0.3/src/less/theme.less +247 -0
- data/upstream/bootstrap/3.0.3/src/less/thumbnails.less +36 -0
- data/upstream/bootstrap/3.0.3/src/less/tooltip.less +95 -0
- data/upstream/bootstrap/3.0.3/src/less/type.less +281 -0
- data/upstream/bootstrap/3.0.3/src/less/utilities.less +56 -0
- data/upstream/bootstrap/3.0.3/src/less/variables.less +642 -0
- data/upstream/bootstrap/3.0.3/src/less/wells.less +29 -0
- data/upstream/bootstrap/3.0.3/src/package.json +51 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap-theme.css +397 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap-theme.min.css +7 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap.css +7118 -0
- data/upstream/bootstrap/3.0.3/stylesheets/bootstrap.min.css +7 -0
- data/upstream/font-awesome-4.0.3.zip +0 -0
- data/upstream/font-awesome/4.0.3/fonts/FontAwesome.otf +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.eot +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.svg +414 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.ttf +0 -0
- data/upstream/font-awesome/4.0.3/fonts/fontawesome-webfont.woff +0 -0
- data/upstream/font-awesome/4.0.3/stylesheets/font-awesome.css +1338 -0
- data/upstream/font-awesome/4.0.3/stylesheets/font-awesome.min.css +4 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/bordered-pulled.less +16 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/core.less +12 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/fixed-width.less +6 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/font-awesome.less +17 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/icons.less +412 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/larger.less +13 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/list.less +19 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/mixins.less +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/path.less +14 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/rotated-flipped.less +9 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/spinning.less +30 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/stacked.less +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/less/variables.less +381 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_bordered-pulled.scss +16 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_core.scss +12 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_fixed-width.scss +6 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_icons.scss +412 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_larger.scss +13 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_list.scss +19 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_mixins.scss +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_path.scss +14 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_rotated-flipped.scss +9 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_spinning.scss +30 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_stacked.scss +20 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/_variables.scss +381 -0
- data/upstream/font-awesome/4.0.3/stylesheets/scss/font-awesome.scss +17 -0
- metadata +505 -0
@@ -0,0 +1,169 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::Button do
|
4
|
+
it { expect(helper).to render_with 'button.btn.btn-default[@type="button"]' }
|
5
|
+
|
6
|
+
it 'allows `submit` type' do
|
7
|
+
expect(helper type: 'submit').to render_with(
|
8
|
+
'button.btn.btn-default[@type="submit"]'
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'allows `a` tag' do
|
13
|
+
expect(helper tag: :a).to render_with 'a.btn.btn-default[@role="button"]'
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'allows `input` tag' do
|
17
|
+
expect(helper tag: :input).to render_with(
|
18
|
+
'input.btn.btn-default[@type="button"]'
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'allows `input` with `submit` type' do
|
23
|
+
expect(helper tag: :input, type: :submit).to render_with(
|
24
|
+
'input.btn.btn-default[@type="submit"]'
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'changes custom tags to `button`' do
|
29
|
+
expect(helper tag: :p).to render_with 'button.btn.btn-default'
|
30
|
+
end
|
31
|
+
|
32
|
+
# method returns safety
|
33
|
+
it { expect(helper).to have_safe_method :icon }
|
34
|
+
|
35
|
+
# behaviour
|
36
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::Activable }
|
37
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::Disableable }
|
38
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::Sizable }
|
39
|
+
it { expect(helper).to be_kind_of WrapIt::TextContainer }
|
40
|
+
|
41
|
+
# appearence
|
42
|
+
it { expect(helper).to have_enum :appearence }
|
43
|
+
|
44
|
+
# icons
|
45
|
+
it 'renders icon throw options' do
|
46
|
+
expect(helper icon: :bell).to render_with(
|
47
|
+
'button.btn.btn-default > i.fa.fa-bell'
|
48
|
+
)
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'renders icon with helper' do
|
52
|
+
expect(helper { |b| b.icon :star }).to render_with(
|
53
|
+
'button.btn.btn-default > i.fa.fa-star'
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
57
|
+
# block
|
58
|
+
it { expect(helper).to have_flag(:block).with(html_class: ['btn-block']) }
|
59
|
+
|
60
|
+
# radios
|
61
|
+
it 'renders radio' do
|
62
|
+
expect(helper(
|
63
|
+
'text',
|
64
|
+
name: 'group-name',
|
65
|
+
id: 'option1',
|
66
|
+
value: 'v1',
|
67
|
+
class: 'someclass',
|
68
|
+
helper_name: 'radio'
|
69
|
+
)).to render_with(
|
70
|
+
'label.btn.btn-default.someclass[text()="text"][@label_for="option1"]' \
|
71
|
+
' > input[@type="radio"][@name="group-name"][@id="option1"]' \
|
72
|
+
'[@value="v1"]'
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# checkboxes
|
77
|
+
it 'renders chackbox' do
|
78
|
+
expect(helper(
|
79
|
+
'text',
|
80
|
+
name: 'group-name',
|
81
|
+
id: 'option1',
|
82
|
+
value: 'v1',
|
83
|
+
class: 'someclass',
|
84
|
+
helper_name: 'checkbox'
|
85
|
+
)).to render_with(
|
86
|
+
'label.btn.btn-default.someclass[text()="text"] >' \
|
87
|
+
' input[@type="checkbox"][@name="group-name"]' \
|
88
|
+
'[@id="option1"][@value="v1"]'
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
# toggling
|
93
|
+
it { expect(helper).to have_flag :toggle }
|
94
|
+
it { expect(helper :toggle).to render_with 'button[@data-toggle="button"]' }
|
95
|
+
|
96
|
+
# state text
|
97
|
+
it 'extracts state text from options' do
|
98
|
+
expect(helper loading_text: 'text').to render_with(
|
99
|
+
'button[@data-loading-text="text"]'
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
103
|
+
# options cleaning
|
104
|
+
it 'removes button-specific options' do
|
105
|
+
expect(helper(
|
106
|
+
icon: :bell,
|
107
|
+
block: true,
|
108
|
+
toggle: false,
|
109
|
+
some_text: false
|
110
|
+
)).to_not have_option :icon, :block, :toggle, :some_text
|
111
|
+
end
|
112
|
+
|
113
|
+
# class constants
|
114
|
+
it { expect(described_class.html_class_prefix).to eq 'btn-' }
|
115
|
+
end
|
116
|
+
|
117
|
+
describe BootstrapIt::ViewHelpers::DropdownButton do
|
118
|
+
# behaviour
|
119
|
+
it 'subclassed from DropdownMenuWrapper' do
|
120
|
+
expect(helper).to be_kind_of BootstrapIt::ViewHelpers::DropdownMenuWrapper
|
121
|
+
end
|
122
|
+
|
123
|
+
# dropdown
|
124
|
+
it 'renders dropdown toggle' do
|
125
|
+
expect(helper('action text') { |b| b.divider }).to render_with(
|
126
|
+
'div.btn-group > button.dropdown-toggle[@data-toggle="dropdown"]' \
|
127
|
+
'[text()="action text"] > span.caret'
|
128
|
+
)
|
129
|
+
end
|
130
|
+
|
131
|
+
it 'renders dropdown menu' do
|
132
|
+
expect(helper('action text') { |b| b.divider }).to render_with(
|
133
|
+
'div.btn-group > button + ul.dropdown-menu > li.divider'
|
134
|
+
)
|
135
|
+
end
|
136
|
+
# splitted dropdown
|
137
|
+
it { expect(helper).to have_flag :splitted }
|
138
|
+
|
139
|
+
it 'renders splitted toggle button' do
|
140
|
+
expect(
|
141
|
+
helper(:splitted, :danger, 'action') { |b| b.divider }
|
142
|
+
).to render_with 'div.btn-group > button.btn-danger[text()="action"]'
|
143
|
+
end
|
144
|
+
|
145
|
+
it 'renders spliited toggle' do
|
146
|
+
expect(
|
147
|
+
helper(:splitted, :danger, 'action') { |b| b.divider }
|
148
|
+
).to render_with(
|
149
|
+
'div.btn-group' \
|
150
|
+
' > button.btn-danger.dropdown-toggle[@data-toggle="dropdown"]' \
|
151
|
+
' > span.caret'
|
152
|
+
)
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'renders splitted dropdown menu' do
|
156
|
+
expect(
|
157
|
+
helper(:splitted, :danger, 'action') { |b| b.divider }
|
158
|
+
).to render_with 'div.btn-group > ul.dropdown-menu > li.divider'
|
159
|
+
end
|
160
|
+
|
161
|
+
# dropup
|
162
|
+
it { expect(helper).to have_flag :dropup }
|
163
|
+
|
164
|
+
it 'renders dropup' do
|
165
|
+
expect(
|
166
|
+
helper(:dropup) { |b| b.divider }
|
167
|
+
).to render_with 'div.btn-group.dropup'
|
168
|
+
end
|
169
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::ButtonToolbar do
|
4
|
+
it { expect(helper).to render_with 'div.btn-toolbar[@role="toolbar"]' }
|
5
|
+
|
6
|
+
it 'reders button group' do
|
7
|
+
expect(
|
8
|
+
helper { |h| h.button_group { |g| g.button 'test' } }
|
9
|
+
).to render_with(
|
10
|
+
'div.btn-toolbar > div.btn-group' \
|
11
|
+
' > button.btn.btn-default[text()="test"]'
|
12
|
+
)
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::DropdownMenu do
|
4
|
+
it { expect(helper).to render_with 'ul.dropdown-menu[@role="menu"]' }
|
5
|
+
|
6
|
+
it 'reders devider' do
|
7
|
+
expect(helper { |h| h.divider }).to render_with(
|
8
|
+
'ul > li.divider[@role="presentation"]'
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'renders header' do
|
13
|
+
expect(helper { |h| h.header 'test' }).to render_with(
|
14
|
+
'ul > li.dropdown-header[@role="presentation"]'
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'renders link item' do
|
19
|
+
expect(helper { |h| h.link_item 'test', 'http://url' }).to render_with(
|
20
|
+
'ul > li[@role="presentation"]' \
|
21
|
+
' > a[@href="http://url"][@role="menuitem"][@tabindex="-1"]'
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'renders disabled link item' do
|
26
|
+
expect(
|
27
|
+
helper { |h| h.link_item 'test', :disabled, 'http://url' }
|
28
|
+
).to render_with(
|
29
|
+
'ul > li.disabled[@role="presentation"]' \
|
30
|
+
' > a[@href="http://url"][@role="menuitem"][@tabindex="-1"]'
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'supports right-align' do
|
35
|
+
expect(helper align: :right).to render_with 'ul.dropdown-menu.pull-right'
|
36
|
+
end
|
37
|
+
|
38
|
+
# options cleaning
|
39
|
+
it { expect(helper align: 'right').to_not have_option :align }
|
40
|
+
it { expect(helper align: :none).to_not have_option :align }
|
41
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::Input do
|
4
|
+
it { expect(helper).to render_with 'input.form-control[@type="text"]' }
|
5
|
+
|
6
|
+
it 'accepts valid input types' do
|
7
|
+
expect(helper type: 'password').to render_with(
|
8
|
+
'input.form-control[@type="password"]'
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'accepts string arguments as values' do
|
13
|
+
expect(helper {'10'}).to render_with 'input.form-control[@value="10"]'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe BootstrapIt::ViewHelpers::Form do
|
18
|
+
it { expect(helper).to render_with 'form[@role="form"]' }
|
19
|
+
|
20
|
+
# kind
|
21
|
+
it 'has `kind` enum' do
|
22
|
+
expect(helper).to have_enum(:kind).with(
|
23
|
+
html_class_prefix: 'form-',
|
24
|
+
values: [:inline, :horizontal]
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::Grid do
|
4
|
+
it { expect(helper).to render_with 'div.container' }
|
5
|
+
|
6
|
+
it 'renders child rows' do
|
7
|
+
expect(BootstrapIt::ViewHelpers::GridRow).to receive(:new).and_call_original
|
8
|
+
helper.row
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe BootstrapIt::ViewHelpers::GridRow do
|
13
|
+
it { expect(helper).to render_with 'div.row' }
|
14
|
+
|
15
|
+
it 'renders child cells' do
|
16
|
+
expect(BootstrapIt::ViewHelpers::GridCell).to receive(:new).and_call_original
|
17
|
+
helper.cell
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'renders clearfix' do
|
21
|
+
expect(helper { |h| h.clear }).to render_with(
|
22
|
+
'div.row > div.clearfix.visible-md'
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'renders clearfix with custom attributes' do
|
27
|
+
expect(helper { |h| h.clear :hidden_large }).to render_with(
|
28
|
+
'div.row > div.clearfix.hidden-lg'
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
# method returns safety
|
33
|
+
it { expect(helper).to have_safe_method :clear }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe BootstrapIt::ViewHelpers::GridCell do
|
37
|
+
it { expect(helper).to render_with 'div.col-md-3' }
|
38
|
+
|
39
|
+
it 'renders child rows' do
|
40
|
+
expect(BootstrapIt::ViewHelpers::GridRow).to receive(:new).and_call_original
|
41
|
+
helper.row
|
42
|
+
end
|
43
|
+
|
44
|
+
# behaviour
|
45
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::SizableColumn }
|
46
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::PlacableColumn }
|
47
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::ListItem do
|
4
|
+
it { expect(helper).to render_with 'li' }
|
5
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::Disableable }
|
6
|
+
it { expect(helper).to be_kind_of WrapIt::TextContainer }
|
7
|
+
end
|
8
|
+
|
9
|
+
describe BootstrapIt::ViewHelpers::ListLinkItem do
|
10
|
+
it { expect(helper).to be_kind_of WrapIt::Link }
|
11
|
+
|
12
|
+
it { expect(helper).to render_with 'li > a' }
|
13
|
+
|
14
|
+
it 'passes `li` or `li_options` as options to li' do
|
15
|
+
%i(li li_options).each do |key|
|
16
|
+
@helper = nil
|
17
|
+
expect(helper(key => {class: 'list'})).to render_with 'li.list > a'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'passes `li_*` options to li' do
|
22
|
+
expect(helper(li_class: 'list')).to render_with 'li.list > a'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'passes `li_*` arguments to li' do
|
26
|
+
expect(helper(:li_active)).to render_with 'li.active > a'
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'passes `active` and `disable` arguments to li' do
|
30
|
+
%i(active disabled disable).each do |key|
|
31
|
+
@helper = nil
|
32
|
+
html_class = key == :disable ? :disabled : key
|
33
|
+
expect(helper(key)).to render_with "li.#{html_class} > a"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'passes `active` and `disable` options to li' do
|
38
|
+
%i(active disabled disable).each do |key|
|
39
|
+
@helper = nil
|
40
|
+
html_class = key == :disable ? :disabled : key
|
41
|
+
expect(helper(key => true)).to render_with "li.#{html_class} > a"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'keeps not related to list optioins and arguments' do
|
46
|
+
expect(
|
47
|
+
helper('text', 'url', li_class: 'list', class: 'link')
|
48
|
+
).to render_with 'li.list > a.link[@href="url"][text()="text"]'
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,117 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe BootstrapIt::ViewHelpers::Jumbotron do
|
4
|
+
it { expect(helper).to render_with 'div.jumbotron' }
|
5
|
+
|
6
|
+
# full_width
|
7
|
+
it { expect(helper).to have_flag :full_width }
|
8
|
+
it 'makes full width jumbotron' do
|
9
|
+
expect(helper :full_width).to render_with 'div.jumbotron > div.container'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe BootstrapIt::ViewHelpers::PageHeader do
|
14
|
+
it { expect(helper).to render_with 'div.page-header' }
|
15
|
+
end
|
16
|
+
|
17
|
+
describe BootstrapIt::ViewHelpers::Alert do
|
18
|
+
it { expect(helper).to render_with 'div.alert.alert-success' }
|
19
|
+
|
20
|
+
# behaviour
|
21
|
+
it { expect(helper).to be_kind_of WrapIt::TextContainer }
|
22
|
+
|
23
|
+
# appearence
|
24
|
+
it 'has appearence enum' do
|
25
|
+
expect(helper).to have_enum(:appearence).with(
|
26
|
+
values: %i(success info warning danger),
|
27
|
+
default: :success,
|
28
|
+
html_class_prefix: 'alert-'
|
29
|
+
)
|
30
|
+
end
|
31
|
+
|
32
|
+
# dismissable
|
33
|
+
it 'has dismissable switch' do
|
34
|
+
expect(helper).to have_flag(:dismissable)
|
35
|
+
.with(html_class: ['alert-dismissable'])
|
36
|
+
end
|
37
|
+
it 'renders dismissable alert with button' do
|
38
|
+
expect(helper(:dismissable, 'Some text')).to render_with(
|
39
|
+
'div.alert.alert-success.alert-dismissable[text()="Some text"]' \
|
40
|
+
' > button.close[@type="button"][@data-dismiss="alert"]' \
|
41
|
+
'[@aria-hidden="true"]'
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
45
|
+
# links
|
46
|
+
it 'renders link with alert-link class' do
|
47
|
+
expect(helper { |h| h.link 'test', 'url' }).to render_with(
|
48
|
+
'div.alert.alert-success' \
|
49
|
+
' > a.alert-link[@href="url"][text()="test"]'
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
it { expect(helper.class.html_class_prefix).to eq 'alert-' }
|
54
|
+
end
|
55
|
+
|
56
|
+
describe BootstrapIt::ViewHelpers::ProgressBar do
|
57
|
+
it 'renders with all needed atrributes' do
|
58
|
+
expect(helper).to render_with(
|
59
|
+
'div.progress-bar[@role="progressbar"][@aria-valuenow="0"]' \
|
60
|
+
'[@aria-valuemin="0"][@aria-valuemax="100"][@style="width: 0%"]' \
|
61
|
+
' > span.sr-only[text()="0% Complete"]'
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
# custom text
|
66
|
+
it 'renders with custom text' do
|
67
|
+
expect(helper('custom text')).to render_with(
|
68
|
+
'div.progress-bar > span.sr-only[text()="custom text"]'
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# complete
|
73
|
+
it 'accepts integer arguments as complete percents' do
|
74
|
+
expect(helper(60)).to render_with(
|
75
|
+
'div.progress-bar[@aria-valuenow="60"][@style="width: 60%"]' \
|
76
|
+
' > span.sr-only[text()="60% Complete"]'
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
# behaviour
|
81
|
+
it { expect(helper).to be_kind_of WrapIt::TextContainer }
|
82
|
+
|
83
|
+
# appearence
|
84
|
+
it 'has appearence enum' do
|
85
|
+
expect(helper).to have_enum(:appearence).with(
|
86
|
+
values: %i(success info warning danger),
|
87
|
+
html_class_prefix: 'progress-bar-'
|
88
|
+
)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe BootstrapIt::ViewHelpers::Progress do
|
93
|
+
it 'renders with all needed atrributes' do
|
94
|
+
expect(helper).to render_with(
|
95
|
+
'div.progress > div.progress-bar[@role="progressbar"]' \
|
96
|
+
'[@aria-valuenow="0"][@aria-valuemin="0"][@aria-valuemax="100"]' \
|
97
|
+
'[@style="width: 0%"] > span.sr-only[text()="0% Complete"]'
|
98
|
+
)
|
99
|
+
end
|
100
|
+
|
101
|
+
# behaviour
|
102
|
+
it { expect(helper).to be_kind_of BootstrapIt::ViewHelpers::Activable }
|
103
|
+
|
104
|
+
# striped
|
105
|
+
it 'has striped switch' do
|
106
|
+
expect(helper).to have_flag(:striped)
|
107
|
+
.with(html_class: ['progress-striped'])
|
108
|
+
end
|
109
|
+
|
110
|
+
# second bar
|
111
|
+
it 'renders second bar' do
|
112
|
+
expect(helper(10) { |h| h.bar 30 }).to render_with(
|
113
|
+
'div.progress > div.progress-bar[@aria-valuenow="10"]' \
|
114
|
+
' + div.progress-bar[@aria-valuenow="30"]'
|
115
|
+
)
|
116
|
+
end
|
117
|
+
end
|