repres-bootstrap 1.4 → 1.5

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
  SHA1:
3
- metadata.gz: db3645ab0fdf4bd35ba65c70a9b5392c81ed4096
4
- data.tar.gz: 7eecb5eb5cce70aa7751a27330c06af6562ca8de
3
+ metadata.gz: 4dd76c51d78a9ae3f20c7cfdb62a3e424d9e2db1
4
+ data.tar.gz: eb5ce596a5354c1877cd8121c27b89fdddc506c1
5
5
  SHA512:
6
- metadata.gz: c1575da8a9eac9ed71e4cc46a57233a4f7bbb8bfb3d4579448a9451eaf7da3a9778f39e62bd930635fa5f17d6f8dcddbf273e0e0410d1e30ff0a59388b33c893
7
- data.tar.gz: db9fd164502ed6d47f2d12959064113aa7095ca4f2745777b290c5072f83e87c8417b698cb16d6548510df4c9a55be20077298c4f735820682f5ba62d5abd2fa
6
+ metadata.gz: 5c80bce9a578a75acd08ab3ec632d2e5ebce22e4a88f91456ffd738e27d56928125eb67b1bf69544ba23ad6632c7f4b29b4d3d2745990557cc20716731b083e5
7
+ data.tar.gz: fdab032960e98aa406520a287582e7b0fe3fdc68c669c6cb1bbbb23551c1c027f08e16db0c8bf329cb0ed39ca1ea713ffdcb45f179f8fcbe57ed0bca6c3b3d3b
data/README.md CHANGED
@@ -70,7 +70,7 @@ include Repres::Bootstrap::FormHelper
70
70
 
71
71
  ### Render the Script
72
72
 
73
- The Script partial includes the HTML script tags for Bootstrap and its extensions. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
73
+ The Script partial includes the HTML script tags for Bootstrap and its extensions. The [Boot CDN](http://cdn.bootcss.com/) server is supported by default. However, the :cdn option could be passed in to support other CDN servers. The CDN servers must syncrhonize with [cdnjs](https://github.com/cdnjs/cdnjs).
74
74
 
75
75
  The following code snippet does __not__ load any JavaScript library.
76
76
  ```erb
@@ -88,9 +88,9 @@ The following code snippet loads the latest Bootstrap JavaScript library.
88
88
 
89
89
  The following code snippet loads the Bootstrap JavaScript library with the given version.
90
90
  ```erb
91
- <%= render partial: 'repres/bootstrap/script', locals: { options: { bootstrap: { version: '3.3.5' } } } %>
91
+ <%= render partial: 'repres/bootstrap/script', locals: { options: { bootstrap: { version: '3.3.5', cdn: 'cdn.server.com' } } } %>
92
92
  <!-- or the following line works identically -->
93
- <%= bootstrap_script bootstrap: { version: '3.3.5' } %>
93
+ <%= bootstrap_script bootstrap: { version: '3.3.5', cdn: 'cdn.server.com' } %>
94
94
  ```
95
95
 
96
96
  The following JavaScript libraries are switchable, and the version can be configurable:
@@ -104,7 +104,7 @@ The following JavaScript libraries are switchable, and the version can be config
104
104
 
105
105
  ### Render the Style
106
106
 
107
- The Style partial includes the HTML style tags for Bootstrap and its extensions. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
107
+ The Style partial includes the HTML style tags for Bootstrap and its extensions. The [Boot CDN](http://cdn.bootcss.com/) server is supported by default. However, the :cdn option could be passed in to support other CDN servers. The CDN servers must syncrhonize with [cdnjs](https://github.com/cdnjs/cdnjs).
108
108
 
109
109
  The following code snippet does __not__ load any CSS library.
110
110
  ```erb
@@ -122,9 +122,9 @@ The following code snippet loads the latest Bootstrap CSS library.
122
122
 
123
123
  The following code snippet loads the Bootstrap CSS library with the given version.
124
124
  ```erb
125
- <%= render partial: 'repres/bootstrap/style', locals: { options: { bootstrap: { version: '3.3.5' } } } %>
125
+ <%= render partial: 'repres/bootstrap/style', locals: { options: { bootstrap: { version: '3.3.5', cdn: 'cdn.server.com' } } } %>
126
126
  <!-- or the following line works identically -->
127
- <%= bootstrap_style bootstrap: { version: '3.3.5' } %>
127
+ <%= bootstrap_style bootstrap: { version: '3.3.5', cdn: 'cdn.server.com' } %>
128
128
  ```
129
129
 
130
130
  The following CSS libraries are switchable, and the version can be configurable:
@@ -1,2 +1,2 @@
1
- class Repre::Bootstrap::ApplicationJob < ActiveJob::Base
1
+ class Repres::Bootstrap::ApplicationJob < ActiveJob::Base
2
2
  end
@@ -1,4 +1,4 @@
1
- class Repre::Bootstrap::ApplicationMailer < ActionMailer::Base
1
+ class Repres::Bootstrap::ApplicationMailer < ActionMailer::Base
2
2
  default from: 'from@example.com'
3
3
  layout 'mailer'
4
4
  end
@@ -1,3 +1,3 @@
1
- class Repre::Bootstrap::ApplicationRecord < ActiveRecord::Base
1
+ class Repres::Bootstrap::ApplicationRecord < ActiveRecord::Base
2
2
  self.abstract_class = true
3
3
  end
@@ -1,19 +1,19 @@
1
1
  <% options = defined?(options) ? options : nil %>
2
2
 
3
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap/#{library_version(:bootstrap, '3.3.7', options)}/js/bootstrap.min.js" if library_enabled?(:bootstrap, options) %>
3
+ <%= javascript_include_tag "//#{domain_name(:bootstrap, options)}/bootstrap/#{library_version(:bootstrap, '3.3.7', options)}/js/bootstrap.min.js" if library_enabled?(:bootstrap, options) %>
4
4
 
5
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-material-design/#{library_version(:'bootstrap-material-design', '4.0.2', options)}/bootstrap-material-design.umd.min.js" if library_enabled?(:'bootstrap-material-design', options) %>
6
- <%= javascript_include_tag "//cdn.bootcss.com/flat-ui/#{library_version(:'flat-ui', '2.3.0', options)}/js/flat-ui.min.js" if library_enabled?(:'flat-ui', options) %>
5
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-material-design', options)}/bootstrap-material-design/#{library_version(:'bootstrap-material-design', '4.0.2', options)}/bootstrap-material-design.umd.min.js" if library_enabled?(:'bootstrap-material-design', options) %>
6
+ <%= javascript_include_tag "//#{domain_name(:'flat-ui', options)}/flat-ui/#{library_version(:'flat-ui', '2.3.0', options)}/js/flat-ui.min.js" if library_enabled?(:'flat-ui', options) %>
7
7
 
8
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.2', options)}/js/bootstrap-datepicker.min.js" if library_enabled?(:'bootstrap-datepicker', options) %>
9
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/js/bootstrap-datetimepicker.min.js" if library_enabled?(:'bootstrap-datetimepicker', options) %>
8
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-datepicker', options)}/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.2', options)}/js/bootstrap-datepicker.min.js" if library_enabled?(:'bootstrap-datepicker', options) %>
9
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-datetimepicker', options)}/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/js/bootstrap-datetimepicker.min.js" if library_enabled?(:'bootstrap-datetimepicker', options) %>
10
10
 
11
11
  <% if library_enabled?(:'bootstrap-table', options) %>
12
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/bootstrap-table.min.js" %>
13
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/locale/bootstrap-table-zh-CN.min.js", charset: 'UTF-8' %>
12
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-table', options)}/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/bootstrap-table.min.js" %>
13
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-table', options)}/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/locale/bootstrap-table-zh-CN.min.js", charset: 'UTF-8' %>
14
14
  <% end %>
15
15
 
16
16
  <% if library_enabled?(:'bootstrap-fileinput', options) %>
17
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.4', options)}/js/fileinput.min.js" %>
18
- <%= javascript_include_tag "//cdn.bootcss.com/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.4', options)}/js/locales/zh.min.js", charset: 'UTF-8' %>
17
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-fileinput', options)}/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.4', options)}/js/fileinput.min.js" %>
18
+ <%= javascript_include_tag "//#{domain_name(:'bootstrap-fileinput', options)}/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.4', options)}/js/locales/zh.min.js", charset: 'UTF-8' %>
19
19
  <% end %>
@@ -1,14 +1,14 @@
1
1
  <% options = defined?(options) ? options : nil %>
2
2
 
3
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap/#{library_version :bootstrap, '3.3.7', options}/css/bootstrap.min.css", media: 'all' if library_enabled?(:bootstrap, options) %>
4
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap/#{library_version(:'bootstrap-theme', '3.3.7', options)}/css/bootstrap-theme.min.css", media: 'all' if library_enabled?(:'bootstrap-theme', options) %>
3
+ <%= stylesheet_link_tag "//#{domain_name(:bootstrap, options)}/bootstrap/#{library_version :bootstrap, '3.3.7', options}/css/bootstrap.min.css", media: 'all' if library_enabled?(:bootstrap, options) %>
4
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-theme', options)}/bootstrap/#{library_version(:'bootstrap-theme', '3.3.7', options)}/css/bootstrap-theme.min.css", media: 'all' if library_enabled?(:'bootstrap-theme', options) %>
5
5
 
6
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-material-design/#{library_version(:'bootstrap-material-design', '4.0.2', options)}/bootstrap-material-design.min.css", media: 'all' if library_enabled?(:'bootstrap-material-design', options) %>
7
- <%= stylesheet_link_tag "//cdn.bootcss.com/flat-ui/#{library_version(:'flat-ui', '2.3.0', options)}/css/flat-ui.min.css", media: 'all' if library_enabled?(:'flat-ui', options) %>
6
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-material-design', options)}/bootstrap-material-design/#{library_version(:'bootstrap-material-design', '4.0.2', options)}/bootstrap-material-design.min.css", media: 'all' if library_enabled?(:'bootstrap-material-design', options) %>
7
+ <%= stylesheet_link_tag "//#{domain_name(:'falt-ui', options)}/flat-ui/#{library_version(:'flat-ui', '2.3.0', options)}/css/flat-ui.min.css", media: 'all' if library_enabled?(:'flat-ui', options) %>
8
8
 
9
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.2', options)}/css/bootstrap-datepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datepicker', options) %>
10
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/css/bootstrap-datetimepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datetimepicker', options) %>
9
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-datepicker', options)}/bootstrap-datepicker/#{library_version(:'bootstrap-datepicker', '1.6.2', options)}/css/bootstrap-datepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datepicker', options) %>
10
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-datetimepicker', options)}/bootstrap-datetimepicker/#{library_version(:'bootstrap-datetimepicker', '4.17.37', options)}/css/bootstrap-datetimepicker.min.css", media: 'all' if library_enabled?(:'bootstrap-datetimepicker', options) %>
11
11
 
12
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/bootstrap-table.min.css", media: 'all' if library_enabled?(:'bootstrap-table', options) %>
12
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-table', options)}/bootstrap-table/#{library_version(:'bootstrap-table', '1.11.0', options)}/bootstrap-table.min.css", media: 'all' if library_enabled?(:'bootstrap-table', options) %>
13
13
 
14
- <%= stylesheet_link_tag "//cdn.bootcss.com/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.3', options)}/css/fileinput.min.css", media: 'all' if library_enabled?(:'bootstrap-fileinput', options) %>
14
+ <%= stylesheet_link_tag "//#{domain_name(:'bootstrap-fileinput', options)}/bootstrap-fileinput/#{library_version(:'bootstrap-fileinput', '4.3.3', options)}/css/fileinput.min.css", media: 'all' if library_enabled?(:'bootstrap-fileinput', options) %>
@@ -1,5 +1,5 @@
1
1
  module Repres
2
2
  module Bootstrap
3
- VERSION = '1.4'.freeze
3
+ VERSION = '1.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repres-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.4'
4
+ version: '1.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-13 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: '1.2'
41
41
  description: Repres (REsource PRESentation) is a series of resource presentation engines.
42
42
  The Bootstrap resource presentation engine includes Bootstrap-based resource presentation
43
43
  templates & snippets. Repres (资源表现)是一系列的资源表现引擎。Bootstrap 资源表现引擎包括基于Bootstrap的资源表现模版和片段。