rails_init_gem 0.0.5

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,91 @@
1
+ !function ($) {
2
+
3
+ $(function(){
4
+
5
+ // IE10 viewport hack for Surface/desktop Windows 8 bug
6
+ //
7
+ // See Getting Started docs for more information
8
+ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
9
+ var msViewportStyle = document.createElement("style");
10
+ msViewportStyle.appendChild(
11
+ document.createTextNode(
12
+ "@-ms-viewport{width:auto!important}"
13
+ )
14
+ );
15
+ document.getElementsByTagName("head")[0].
16
+ appendChild(msViewportStyle);
17
+ }
18
+
19
+
20
+ var $window = $(window)
21
+ var $body = $(document.body)
22
+
23
+ var navHeight = $('.navbar').outerHeight(true) + 10
24
+
25
+ $body.scrollspy({
26
+ target: '.bs-sidebar',
27
+ offset: navHeight
28
+ })
29
+
30
+ $window.on('load', function () {
31
+ $body.scrollspy('refresh')
32
+ })
33
+
34
+ $('.bs-docs-container [href=#]').click(function (e) {
35
+ e.preventDefault()
36
+ })
37
+
38
+ // back to top
39
+ setTimeout(function () {
40
+ var $sideBar = $('.bs-sidebar')
41
+
42
+ $sideBar.affix({
43
+ offset: {
44
+ top: function () {
45
+ var offsetTop = $sideBar.offset().top
46
+ var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10)
47
+ var navOuterHeight = $('.bs-docs-nav').height()
48
+
49
+ return (this.top = offsetTop - navOuterHeight - sideBarMargin)
50
+ }
51
+ , bottom: function () {
52
+ return (this.bottom = $('.bs-footer').outerHeight(true))
53
+ }
54
+ }
55
+ })
56
+ }, 100)
57
+
58
+ setTimeout(function () {
59
+ $('.bs-top').affix()
60
+ }, 100)
61
+
62
+ // tooltip demo
63
+ $('.tooltip-demo').tooltip({
64
+ selector: "[data-toggle=tooltip]",
65
+ container: "body"
66
+ })
67
+
68
+ $('.tooltip-test').tooltip()
69
+ $('.popover-test').popover()
70
+
71
+ $('.bs-docs-navbar').tooltip({
72
+ selector: "a[data-toggle=tooltip]",
73
+ container: ".bs-docs-navbar .nav"
74
+ })
75
+
76
+ // popover demo
77
+ $("[data-toggle=popover]")
78
+ .popover()
79
+
80
+ // button state demo
81
+ $('#fat-btn')
82
+ .click(function () {
83
+ var btn = $(this)
84
+ btn.button('loading')
85
+ setTimeout(function () {
86
+ btn.button('reset')
87
+ }, 3000)
88
+ })
89
+ })
90
+
91
+ }(jQuery)
@@ -0,0 +1,17 @@
1
+ development:
2
+ adapter: sqlite3
3
+ encoding: utf8
4
+ database: db/development.sqlite3
5
+ pool: 5
6
+ timeout: 5000
7
+ production:
8
+ adapter: postgresql
9
+ encoding: utf8
10
+ database: Ww_production
11
+ username: "EXAMPLE_USERNAME"
12
+ pool: 5
13
+ test:
14
+ adapter: sqlite3
15
+ database: db/test.sqlite3
16
+ pool: 5
17
+ timeout: 5000