twitter-bootstrap-components-rails 0.6.2 → 1.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
- SHA1:
3
- metadata.gz: b5423c52d71e50a78d2f9fd76f3e2a893b3f6600
4
- data.tar.gz: 4d58c84883ee21063a896c0bbefde458614b946d
2
+ SHA256:
3
+ metadata.gz: 36f0e363606d391707bc8eaaa97029de8731d451e200bda5991abb61899c284b
4
+ data.tar.gz: fa5e945a49baa565c32322857847cf71ee1fd7121f541cb67f8f3d4943f037ef
5
5
  SHA512:
6
- metadata.gz: 5bf709b2644d0826984d5d98e989638292a8129c9d28804adc18e94aee0fed3cdbba43342ce010cfb5373984ca72e29a5953d0a9784a10e39e4c72d8788ad2ed
7
- data.tar.gz: f001070fbc4e5ade59dfd9827b1f23a5b95ab135e5201b3068c21951acde0d218aae1c9d50d3385219af71cd7066057e143961f06d17427a3599502837347e98
6
+ metadata.gz: f3ca61b3854e563aa463f22a597b59fd8ff995c7576ef8b95836d728a159b89b0be377d1bc6567acc1995eba66dbe627b383dfd82cb87f2afb8c2d2f7dd3eedc
7
+ data.tar.gz: b3c390b9034b3e879456a2080467074264508f2fd2ddf547e900bb4eb2f1c54baf90d02370c2b5b8b4291f2dcf91598cba03a7b0bf5735ba3d07e25a094e7dbf
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Twitter::Bootstrap::Components::Rails
2
2
  Short description and motivation.
3
3
 
4
+ ## Upgrading to 1.0.0
5
+
6
+ Version 1.0.0 does not include jquery-rails by default anymore. You need to require
7
+ the gem by yourself or load jquery from a cdn.
8
+
9
+
4
10
  ## Usage
5
11
  Add the helper to your application controller.
6
12
 
@@ -8,7 +14,7 @@ Bootstrap v3
8
14
 
9
15
  ```ruby
10
16
  class ApplicationController < ActionController::Base
11
- helper Twitter::Bootstrap::Components::Rails::V3::ComponentsHelper
17
+ view_helper Twitter::Bootstrap::Components::Rails::V3::ComponentsHelper, as: :bootstrap_heper
12
18
  end
13
19
  ```
14
20
 
@@ -16,7 +22,7 @@ Bootstrap v4
16
22
 
17
23
  ```ruby
18
24
  class ApplicationController < ActionController::Base
19
- helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper
25
+ view_helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper, as: :bootstrap_heper
20
26
  end
21
27
  ```
22
28
 
@@ -0,0 +1,52 @@
1
+ module Twitter
2
+ module Bootstrap
3
+ module Components
4
+ module Rails
5
+ module V3
6
+ class ViewHelper < Rao::ViewHelper::Base
7
+ def alert(options, &block)
8
+ Twitter::Bootstrap::Components::V3::Alert.new(c, options, &block).perform
9
+ end
10
+
11
+ def badge(options = {}, &block)
12
+ Twitter::Bootstrap::Components::V3::Badge.new(c, options, &block).perform
13
+ end
14
+
15
+ def button(options = {}, &block)
16
+ Twitter::Bootstrap::Components::V3::Button.new(c, options, &block).perform
17
+ end
18
+
19
+ def button_group(options = {}, &block)
20
+ Twitter::Bootstrap::Components::V3::ButtonGroup.new(c, options, &block).perform
21
+ end
22
+
23
+ def responsive_media_object(options = {}, &block)
24
+ Twitter::Bootstrap::Components::V3::ResponsiveMediaObject.new(c, options, &block).perform
25
+ end
26
+
27
+ def media_object(options = {}, &block)
28
+ Twitter::Bootstrap::Components::V3::MediaObject.new(c, options, &block).perform
29
+ end
30
+
31
+ def thumbnail(options = {}, &block)
32
+ Twitter::Bootstrap::Components::V3::Thumbnail.new(c, options, &block).perform
33
+ end
34
+
35
+ def responsive_embed(options = {}, &block)
36
+ Twitter::Bootstrap::Components::V3::ResponsiveEmbed.new(c, options, &block).perform
37
+ end
38
+
39
+ # add ons
40
+ def form_for(object, *args, &block)
41
+ simple_form_for(object, *args, &block)
42
+ end
43
+
44
+ def navbar_brand(options = {}, &block)
45
+ Twitter::Bootstrap::Components::V3::NavbarBrand.new(c, options, &block).perform
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,140 @@
1
+ module Twitter
2
+ module Bootstrap
3
+ module Components
4
+ module Rails
5
+ module V4
6
+ class ViewHelper < Rao::ViewHelper::Base
7
+ def alert(options, &block)
8
+ Twitter::Bootstrap::Components::V4::Alert.new(c, options, &block).perform
9
+ end
10
+
11
+ def badge(options = {}, &block)
12
+ Twitter::Bootstrap::Components::V4::Badge.new(c, options, &block).perform
13
+ end
14
+
15
+ def breadcrumb(options)
16
+ Twitter::Bootstrap::Components::V4::Breadcrumb.new(options).perform
17
+ end
18
+
19
+ def button(options = {}, &block)
20
+ Twitter::Bootstrap::Components::V4::Button.new(c, options, &block).perform
21
+ end
22
+
23
+ def button_group(options = {}, &block)
24
+ Twitter::Bootstrap::Components::V4::ButtonGroup.new(c, options, &block).perform
25
+ end
26
+
27
+ def card(options = {}, &block)
28
+ Twitter::Bootstrap::Components::V4::Card.new(c, options, &block).perform
29
+ end
30
+
31
+ def carousel(options = {}, &block)
32
+ Twitter::Bootstrap::Components::V4::Carousel.new(c, options, &block).perform
33
+ end
34
+
35
+ def carousel_item(options = {}, &block)
36
+ Twitter::Bootstrap::Components::V4::CarouselItem.new(c, options, &block).perform
37
+ end
38
+
39
+ def collapse(options)
40
+ Twitter::Bootstrap::Components::V4::Collapse.new(options).perform
41
+ end
42
+
43
+ def dropdown(options)
44
+ Twitter::Bootstrap::Components::V4::Dropdown.new(options).perform
45
+ end
46
+
47
+ # add-on
48
+ def flash
49
+ Twitter::Bootstrap::Components::V4::Flash.new(c).perform
50
+ end
51
+
52
+ def form(options)
53
+ Twitter::Bootstrap::Components::V4::Form.new(options).perform
54
+ end
55
+
56
+ def portrait_card(options = {}, &block)
57
+ Twitter::Bootstrap::Components::V4::PortraitCard.new(c, options, &block).perform
58
+ end
59
+
60
+ # add-on
61
+ def form_for(object, *args, &block)
62
+ options = args.extract_options!
63
+ simple_form_for(object, *(args << options.merge(builder: Twitter::Bootstrap::Components::Rails::V4::DefaultFormBuilder, :defaults => { :input_html => { :class => "form-control" } })), &block)
64
+ end
65
+
66
+ def input_group(options)
67
+ Twitter::Bootstrap::Components::V4::InputGroup.new(options).perform
68
+ end
69
+
70
+ def jumbotron(options)
71
+ Twitter::Bootstrap::Components::V4::Jumbotron.new(options).perform
72
+ end
73
+
74
+ def list_group(options)
75
+ Twitter::Bootstrap::Components::V4::ListGroup.new(options).perform
76
+ end
77
+
78
+ def modal(options)
79
+ Twitter::Bootstrap::Components::V4::Modal.new(options).perform
80
+ end
81
+
82
+ def nav(options = {}, &block)
83
+ Twitter::Bootstrap::Components::V4::Nav.new(c, options, &block).perform
84
+ end
85
+
86
+ def nav_item(options = {}, &block)
87
+ Twitter::Bootstrap::Components::V4::NavItem.new(c, options, &block).perform
88
+ end
89
+
90
+ def navbar(options)
91
+ Twitter::Bootstrap::Components::V4::Navbar.new(options).perform
92
+ end
93
+
94
+ def navbar_brand(options = {}, &block)
95
+ Twitter::Bootstrap::Components::V4::NavbarBrand.new(c, options, &block).perform
96
+ end
97
+
98
+ def pagination(options)
99
+ Twitter::Bootstrap::Components::V4::Pagination.new(options).perform
100
+ end
101
+
102
+ def popover(options)
103
+ Twitter::Bootstrap::Components::V4::Popover.new(options).perform
104
+ end
105
+
106
+ def progress(options)
107
+ Twitter::Bootstrap::Components::V4::Progress.new(options).perform
108
+ end
109
+
110
+ def scrollspy(options)
111
+ Twitter::Bootstrap::Components::V4::Scrollspy.new(options).perform
112
+ end
113
+
114
+ def tooltip(options)
115
+ Twitter::Bootstrap::Components::V4::Tooltip.new(options).perform
116
+ end
117
+
118
+ # subhelpers
119
+
120
+ def card_block(options = {}, &block)
121
+ Twitter::Bootstrap::Components::V4::Card::Block.new(c, options, &block).perform
122
+ end
123
+
124
+ def card_header(options = {}, &block)
125
+ Twitter::Bootstrap::Components::V4::Card::Header.new(c, options, &block).perform
126
+ end
127
+
128
+ def card_blockquote(options = {}, &block)
129
+ Twitter::Bootstrap::Components::V4::Card::Blockquote.new(c, options, &block).perform
130
+ end
131
+
132
+ def card_footer(options = {}, &block)
133
+ Twitter::Bootstrap::Components::V4::Card::Footer.new(c, options, &block).perform
134
+ end
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
@@ -1,5 +1,5 @@
1
- require 'jquery-rails'
2
1
  require 'haml-rails'
2
+ require 'rao-view_helper'
3
3
 
4
4
  require "twitter/bootstrap/components/rails/engine"
5
5
 
@@ -2,7 +2,7 @@ module Twitter
2
2
  module Bootstrap
3
3
  module Components
4
4
  module Rails
5
- VERSION = '0.6.2'.freeze
5
+ VERSION = '1.0.0'.freeze
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-components-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-18 00:00:00.000000000 Z
11
+ date: 2019-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rao-view_helper
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: haml-rails
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -45,7 +59,7 @@ dependencies:
45
59
  - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '0'
48
- type: :runtime
62
+ type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
@@ -170,6 +184,8 @@ files:
170
184
  - app/helpers/twitter/bootstrap/components/rails/v4/components_helper.rb
171
185
  - app/mailers/twitter/bootstrap/components/rails/application_mailer.rb
172
186
  - app/models/twitter/bootstrap/components/rails/application_record.rb
187
+ - app/view_helpers/twitter/bootstrap/components/rails/v3/view_helper.rb
188
+ - app/view_helpers/twitter/bootstrap/components/rails/v4/view_helper.rb
173
189
  - app/views/layouts/twitter/bootstrap/components/rails/application.html.erb
174
190
  - app/views/twitter/bootstrap/components/v3/_alert.html.haml
175
191
  - app/views/twitter/bootstrap/components/v3/_badge.html.haml
@@ -205,7 +221,6 @@ files:
205
221
  - lib/twitter/bootstrap/components/rails.rb
206
222
  - lib/twitter/bootstrap/components/rails/engine.rb
207
223
  - lib/twitter/bootstrap/components/rails/version.rb
208
- - lib/twitter_bootstrap_components_rails.rb~
209
224
  homepage: https://github.com/robotex82/twitter-bootstrap-components-rails
210
225
  licenses:
211
226
  - MIT
@@ -225,8 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
240
  - !ruby/object:Gem::Version
226
241
  version: '0'
227
242
  requirements: []
228
- rubyforge_project:
229
- rubygems_version: 2.6.8
243
+ rubygems_version: 3.0.3
230
244
  signing_key:
231
245
  specification_version: 4
232
246
  summary: Twitter Bootstrap Components for Rails.
@@ -1 +0,0 @@
1
- require 'twitter/bootstrap/components/rails'