binco 3.5.4 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efd4fbeb9efd8edfc62be0b72c9292e6f56144db034f8279e70a9cb209e1faac
|
4
|
+
data.tar.gz: 6859cdecb3c7bb284dd1d23252eeec18aab51ab0e2abc79b508b977d57272055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21e14f2a966d3d87ce38f3a2d95d7f1b1125ee2b4835326225591a9194cd0e5941a2d58eff8698d25d6a3c3fbf90efc24aa0b9a4c20e1bb7b9e54ea0d27966b2
|
7
|
+
data.tar.gz: d695a6e82e566f108c54158c1f701a05ddf67eb84a28b072825585622fb144ef66962b2ad81dc4103e06a18d27342cf7985de1a708965d4c598930a8ac78437b
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Binco
|
2
2
|
|
3
|
-
This is a wrapper for adding bootstrap to
|
3
|
+
This is a wrapper for adding bootstrap to your Rails 6 projects. By includinig this gem you'll add a series of helpers that work with the bootstrap CSS framework:
|
4
4
|
|
5
|
-
* [Bootstrap](https://github.com/twbs/bootstrap
|
6
|
-
* [Bootstrap Datepicker](https://github.com/
|
7
|
-
* [Select2](https://github.com/
|
5
|
+
* [Bootstrap](https://github.com/twbs/bootstrap)
|
6
|
+
* [Bootstrap Datepicker](https://github.com/uxsolutions/bootstrap-datepicker)
|
7
|
+
* [Select2](https://github.com/select2/select2)
|
8
8
|
* [Will paginate](https://github.com/mislav/will_paginate) (Optional)
|
9
9
|
* Links with `data: { confirm: 'Sure?' }` opens in Bootstrap Modal by default.
|
10
10
|
* Bootstrap Helpers
|
@@ -21,31 +21,64 @@ and run:
|
|
21
21
|
```
|
22
22
|
bundle install
|
23
23
|
```
|
24
|
+
|
25
|
+
then add our css/js dependencies using yarn
|
26
|
+
|
27
|
+
```
|
28
|
+
yarn add bootstrap select2 bootstrap-datepicker
|
29
|
+
```
|
30
|
+
|
24
31
|
### Automatic
|
25
32
|
Run `rails g binco:install`
|
26
33
|
|
27
|
-
This creates the `application.scss` with binco (and bootstrap) included, your `_bootstrap-overrides.scss
|
34
|
+
This creates the `application.scss` with binco (and bootstrap) included, your `_bootstrap-overrides.scss`.
|
28
35
|
|
29
36
|
### Manual Installation
|
30
37
|
In your application.scss add:
|
31
38
|
```
|
32
|
-
|
39
|
+
// Install bootstrap using yarn
|
40
|
+
// $ yarn add bootstrap
|
41
|
+
@import "bootstrap_variables";
|
42
|
+
@import "bootstrap/scss/bootstrap";
|
43
|
+
|
44
|
+
// Install select2 with yarn
|
45
|
+
// $ yarn add select2
|
46
|
+
// @import "select2/dist/css/select2";
|
47
|
+
|
48
|
+
@import "binco";
|
33
49
|
```
|
34
50
|
|
51
|
+
And uncomment the select2 part if you wish to use it.
|
52
|
+
|
35
53
|
In your application.js add:
|
36
54
|
```
|
37
|
-
|
55
|
+
require("bootstrap")
|
56
|
+
|
57
|
+
// Uncomment this lines if you are going to use select2 and/or bootstrap datepicker
|
58
|
+
// import $ from 'jquery'
|
59
|
+
// require('select2')
|
60
|
+
// require("bootstrap-datepicker")
|
38
61
|
```
|
39
62
|
|
40
63
|
#### Optional
|
41
64
|
For customization of datepicker make sure to include your locale js and send it as data attribute when creating a datepicker.
|
42
65
|
```
|
43
|
-
# app/
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
66
|
+
# app/javascripts/packs/application.js
|
67
|
+
|
68
|
+
$.fn.datepicker.dates['es'] = {
|
69
|
+
days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
|
70
|
+
daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"],
|
71
|
+
daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"],
|
72
|
+
months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
73
|
+
monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
|
74
|
+
today: "Hoy",
|
75
|
+
monthsTitle: "Meses",
|
76
|
+
clear: "Borrar",
|
77
|
+
weekStart: 1,
|
78
|
+
format: "yyyy-mm-dd"
|
79
|
+
};
|
80
|
+
|
81
|
+
$.fn.datepicker.defaults.language = "es"
|
49
82
|
```
|
50
83
|
|
51
84
|
## Usage
|
data/lib/binco/engine.rb
CHANGED
data/lib/binco/version.rb
CHANGED
@@ -17,10 +17,10 @@ module Binco
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def add_javascripts
|
20
|
-
inject_into_file 'app/
|
21
|
-
"\
|
22
|
-
"
|
23
|
-
"
|
20
|
+
inject_into_file 'app/javascript/packs/application.js', after: 'require("channels")' do
|
21
|
+
"\nimport $ from 'jquery'\n" +
|
22
|
+
"require('select2')\n" +
|
23
|
+
"require('bootstrap-datepicker')"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Camacho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -30,68 +30,20 @@ dependencies:
|
|
30
30
|
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '7'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: bootstrap
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '4.3'
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '4.3'
|
47
33
|
- !ruby/object:Gem::Dependency
|
48
34
|
name: jquery-rails
|
49
35
|
requirement: !ruby/object:Gem::Requirement
|
50
36
|
requirements:
|
51
37
|
- - ">="
|
52
38
|
- !ruby/object:Gem::Version
|
53
|
-
version: 4.3.
|
39
|
+
version: 4.3.1
|
54
40
|
type: :runtime
|
55
41
|
prerelease: false
|
56
42
|
version_requirements: !ruby/object:Gem::Requirement
|
57
43
|
requirements:
|
58
44
|
- - ">="
|
59
45
|
- !ruby/object:Gem::Version
|
60
|
-
version: 4.3.
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: select2-rails
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '4.0'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '4.0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: bootstrap-datepicker-rails
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 1.6.0
|
82
|
-
- - "~>"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '1.6'
|
85
|
-
type: :runtime
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: 1.6.0
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '1.6'
|
46
|
+
version: 4.3.1
|
95
47
|
- !ruby/object:Gem::Dependency
|
96
48
|
name: activesupport
|
97
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,8 +72,8 @@ dependencies:
|
|
120
72
|
- - "~>"
|
121
73
|
- !ruby/object:Gem::Version
|
122
74
|
version: '5.0'
|
123
|
-
description: This Gems wraps
|
124
|
-
|
75
|
+
description: This Gems wraps adds a collection of helpers to help you integrate bootstrap
|
76
|
+
into your Rails app.
|
125
77
|
email:
|
126
78
|
- victor@codn.mx
|
127
79
|
executables: []
|
@@ -209,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
161
|
- !ruby/object:Gem::Version
|
210
162
|
version: '0'
|
211
163
|
requirements: []
|
212
|
-
rubygems_version: 3.0.
|
164
|
+
rubygems_version: 3.0.3
|
213
165
|
signing_key:
|
214
166
|
specification_version: 4
|
215
167
|
summary: Bootstrap Sass for use in Ruby on Rails applications
|