binco 3.5.4 → 4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fcae1db9cb9ef7ff353f19af0ab04e6586c22b59f9c18e4e52160c058e3498c
4
- data.tar.gz: c65c189dd631c692e8bb2a23ed82e760aceadb7a4afad46d172e9f61fc9df5cc
3
+ metadata.gz: efd4fbeb9efd8edfc62be0b72c9292e6f56144db034f8279e70a9cb209e1faac
4
+ data.tar.gz: 6859cdecb3c7bb284dd1d23252eeec18aab51ab0e2abc79b508b977d57272055
5
5
  SHA512:
6
- metadata.gz: 6e554d0afb4bd8785ea039b1497bd7b94db9dc21f0723a9ce60b0d1f87537764a4290e2ed8d1fb5c6f640bd18949f301c098bd1df95e34d77468dce0bc2ab6f8
7
- data.tar.gz: e2695c66c4cc07c2dc9e8961d3514e41bbb31cd35643ae0220e07e05f10e496d3172a240c954005452f20c6ef2fc76be9345cefd5e3f92648a3a0cbdf6cce3c3
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 a project. By includinig this gem you'll add:
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-sass)
6
- * [Bootstrap Datepicker](https://github.com/Nerian/bootstrap-datepicker-rails)
7
- * [Select2](https://github.com/argerim/select2-rails)
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` file and insert assets into javascript manifest.
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
- @include "binco"
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
- //= require binco
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/assets/javascripts/application.js
44
-
45
- //= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js
46
- //= require select2_locale_es
47
-
48
- $.fn.datepicker.defaults.language = 'es'
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
@@ -1,6 +1,3 @@
1
- @import "bootstrap_variables";
2
- @import "bootstrap";
3
- @import "select2";
4
1
  @import "select2-bootstrap4";
5
2
  @import "select2-bootstrap4-errors";
6
3
  @import "datepicker";
@@ -1,7 +1,4 @@
1
1
  require 'jquery-rails'
2
- require 'bootstrap'
3
- require 'select2-rails'
4
- require 'bootstrap-datepicker-rails'
5
2
 
6
3
  module Binco
7
4
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module Binco
2
- VERSION = '3.5.4'
2
+ VERSION = '4.0.0'
3
3
  end
@@ -17,10 +17,10 @@ module Binco
17
17
  end
18
18
 
19
19
  def add_javascripts
20
- inject_into_file 'app/assets/javascripts/application.js', after: '//= require turbolinks' do
21
- "\n//= require binco\n" +
22
- "//= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js\n" +
23
- "//= require select2_locale_es"
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
@@ -1 +1,10 @@
1
+ // Install bootstrap using yarn
2
+ // $ yarn add bootstrap
3
+ @import "bootstrap_variables";
4
+ @import "bootstrap/scss/bootstrap";
5
+
6
+ // Install select2 with yarn
7
+ // $ yarn add select2
8
+ @import "select2/dist/css/select2";
9
+
1
10
  @import "binco";
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: 3.5.4
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: 2019-12-26 00:00:00.000000000 Z
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.0
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.0
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 the bootstrap-sass gem and adds a collection of helpers
124
- to help you integrate bootstrap into your Rails app.
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.1
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