effective_bootstrap 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (335) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +93 -0
  4. data/app/assets/icons/activity.svg +13 -0
  5. data/app/assets/icons/airplay.svg +14 -0
  6. data/app/assets/icons/alert-circle.svg +15 -0
  7. data/app/assets/icons/alert-octagon.svg +15 -0
  8. data/app/assets/icons/alert-triangle.svg +15 -0
  9. data/app/assets/icons/align-center.svg +16 -0
  10. data/app/assets/icons/align-justify.svg +16 -0
  11. data/app/assets/icons/align-left.svg +16 -0
  12. data/app/assets/icons/align-right.svg +16 -0
  13. data/app/assets/icons/anchor.svg +15 -0
  14. data/app/assets/icons/aperture.svg +19 -0
  15. data/app/assets/icons/arrow-down-circle.svg +15 -0
  16. data/app/assets/icons/arrow-down-left.svg +14 -0
  17. data/app/assets/icons/arrow-down-right.svg +14 -0
  18. data/app/assets/icons/arrow-down.svg +14 -0
  19. data/app/assets/icons/arrow-left-circle.svg +15 -0
  20. data/app/assets/icons/arrow-left.svg +14 -0
  21. data/app/assets/icons/arrow-right-circle.svg +15 -0
  22. data/app/assets/icons/arrow-right.svg +14 -0
  23. data/app/assets/icons/arrow-up-circle.svg +15 -0
  24. data/app/assets/icons/arrow-up-left.svg +14 -0
  25. data/app/assets/icons/arrow-up-right.svg +14 -0
  26. data/app/assets/icons/arrow-up.svg +14 -0
  27. data/app/assets/icons/at-sign.svg +14 -0
  28. data/app/assets/icons/award.svg +14 -0
  29. data/app/assets/icons/bar-chart-2.svg +15 -0
  30. data/app/assets/icons/bar-chart.svg +15 -0
  31. data/app/assets/icons/battery-charging.svg +15 -0
  32. data/app/assets/icons/battery.svg +14 -0
  33. data/app/assets/icons/bell-off.svg +14 -0
  34. data/app/assets/icons/bell.svg +13 -0
  35. data/app/assets/icons/bluetooth.svg +13 -0
  36. data/app/assets/icons/bold.svg +14 -0
  37. data/app/assets/icons/book-open.svg +14 -0
  38. data/app/assets/icons/book.svg +14 -0
  39. data/app/assets/icons/bookmark.svg +13 -0
  40. data/app/assets/icons/box.svg +15 -0
  41. data/app/assets/icons/briefcase.svg +14 -0
  42. data/app/assets/icons/calendar.svg +16 -0
  43. data/app/assets/icons/camera-off.svg +14 -0
  44. data/app/assets/icons/camera.svg +14 -0
  45. data/app/assets/icons/cast.svg +14 -0
  46. data/app/assets/icons/check-circle.svg +14 -0
  47. data/app/assets/icons/check-square.svg +14 -0
  48. data/app/assets/icons/check.svg +13 -0
  49. data/app/assets/icons/chevron-down.svg +13 -0
  50. data/app/assets/icons/chevron-left.svg +13 -0
  51. data/app/assets/icons/chevron-right.svg +13 -0
  52. data/app/assets/icons/chevron-up.svg +13 -0
  53. data/app/assets/icons/chevrons-down.svg +14 -0
  54. data/app/assets/icons/chevrons-left.svg +14 -0
  55. data/app/assets/icons/chevrons-right.svg +14 -0
  56. data/app/assets/icons/chevrons-up.svg +14 -0
  57. data/app/assets/icons/chrome.svg +17 -0
  58. data/app/assets/icons/circle.svg +13 -0
  59. data/app/assets/icons/clipboard.svg +14 -0
  60. data/app/assets/icons/clock.svg +14 -0
  61. data/app/assets/icons/cloud-drizzle.svg +19 -0
  62. data/app/assets/icons/cloud-lightning.svg +14 -0
  63. data/app/assets/icons/cloud-off.svg +14 -0
  64. data/app/assets/icons/cloud-rain.svg +16 -0
  65. data/app/assets/icons/cloud-snow.svg +19 -0
  66. data/app/assets/icons/cloud.svg +13 -0
  67. data/app/assets/icons/code.svg +14 -0
  68. data/app/assets/icons/codepen.svg +17 -0
  69. data/app/assets/icons/command.svg +13 -0
  70. data/app/assets/icons/compass.svg +14 -0
  71. data/app/assets/icons/copy.svg +14 -0
  72. data/app/assets/icons/corner-down-left.svg +14 -0
  73. data/app/assets/icons/corner-down-right.svg +14 -0
  74. data/app/assets/icons/corner-left-down.svg +14 -0
  75. data/app/assets/icons/corner-left-up.svg +14 -0
  76. data/app/assets/icons/corner-right-down.svg +14 -0
  77. data/app/assets/icons/corner-right-up.svg +14 -0
  78. data/app/assets/icons/corner-up-left.svg +14 -0
  79. data/app/assets/icons/corner-up-right.svg +14 -0
  80. data/app/assets/icons/cpu.svg +22 -0
  81. data/app/assets/icons/credit-card.svg +14 -0
  82. data/app/assets/icons/crop.svg +14 -0
  83. data/app/assets/icons/crosshair.svg +17 -0
  84. data/app/assets/icons/database.svg +15 -0
  85. data/app/assets/icons/delete.svg +15 -0
  86. data/app/assets/icons/disc.svg +14 -0
  87. data/app/assets/icons/dollar-sign.svg +14 -0
  88. data/app/assets/icons/download-cloud.svg +15 -0
  89. data/app/assets/icons/download.svg +15 -0
  90. data/app/assets/icons/droplet.svg +13 -0
  91. data/app/assets/icons/edit-2.svg +13 -0
  92. data/app/assets/icons/edit-3.svg +14 -0
  93. data/app/assets/icons/edit.svg +14 -0
  94. data/app/assets/icons/external-link.svg +15 -0
  95. data/app/assets/icons/eye-off.svg +14 -0
  96. data/app/assets/icons/eye.svg +14 -0
  97. data/app/assets/icons/facebook.svg +13 -0
  98. data/app/assets/icons/fast-forward.svg +14 -0
  99. data/app/assets/icons/feather.svg +15 -0
  100. data/app/assets/icons/file-minus.svg +15 -0
  101. data/app/assets/icons/file-plus.svg +16 -0
  102. data/app/assets/icons/file-text.svg +17 -0
  103. data/app/assets/icons/file.svg +14 -0
  104. data/app/assets/icons/film.svg +20 -0
  105. data/app/assets/icons/filter.svg +13 -0
  106. data/app/assets/icons/flag.svg +14 -0
  107. data/app/assets/icons/folder-minus.svg +14 -0
  108. data/app/assets/icons/folder-plus.svg +15 -0
  109. data/app/assets/icons/folder.svg +13 -0
  110. data/app/assets/icons/git-branch.svg +16 -0
  111. data/app/assets/icons/git-commit.svg +15 -0
  112. data/app/assets/icons/git-merge.svg +15 -0
  113. data/app/assets/icons/git-pull-request.svg +16 -0
  114. data/app/assets/icons/github.svg +13 -0
  115. data/app/assets/icons/gitlab.svg +13 -0
  116. data/app/assets/icons/globe.svg +15 -0
  117. data/app/assets/icons/grid.svg +16 -0
  118. data/app/assets/icons/hard-drive.svg +16 -0
  119. data/app/assets/icons/hash.svg +16 -0
  120. data/app/assets/icons/headphones.svg +14 -0
  121. data/app/assets/icons/heart.svg +13 -0
  122. data/app/assets/icons/help-circle.svg +15 -0
  123. data/app/assets/icons/home.svg +14 -0
  124. data/app/assets/icons/image.svg +15 -0
  125. data/app/assets/icons/inbox.svg +14 -0
  126. data/app/assets/icons/info.svg +15 -0
  127. data/app/assets/icons/instagram.svg +15 -0
  128. data/app/assets/icons/italic.svg +15 -0
  129. data/app/assets/icons/layers.svg +15 -0
  130. data/app/assets/icons/layout.svg +15 -0
  131. data/app/assets/icons/life-buoy.svg +19 -0
  132. data/app/assets/icons/link-2.svg +14 -0
  133. data/app/assets/icons/link.svg +14 -0
  134. data/app/assets/icons/linkedin.svg +15 -0
  135. data/app/assets/icons/list.svg +18 -0
  136. data/app/assets/icons/loader.svg +20 -0
  137. data/app/assets/icons/lock.svg +14 -0
  138. data/app/assets/icons/log-in.svg +15 -0
  139. data/app/assets/icons/log-out.svg +15 -0
  140. data/app/assets/icons/mail.svg +14 -0
  141. data/app/assets/icons/map-pin.svg +14 -0
  142. data/app/assets/icons/map.svg +15 -0
  143. data/app/assets/icons/maximize-2.svg +16 -0
  144. data/app/assets/icons/maximize.svg +13 -0
  145. data/app/assets/icons/menu.svg +15 -0
  146. data/app/assets/icons/message-circle.svg +13 -0
  147. data/app/assets/icons/message-square.svg +13 -0
  148. data/app/assets/icons/mic-off.svg +17 -0
  149. data/app/assets/icons/mic.svg +16 -0
  150. data/app/assets/icons/minimize-2.svg +16 -0
  151. data/app/assets/icons/minimize.svg +13 -0
  152. data/app/assets/icons/minus-circle.svg +14 -0
  153. data/app/assets/icons/minus-square.svg +14 -0
  154. data/app/assets/icons/minus.svg +13 -0
  155. data/app/assets/icons/monitor.svg +15 -0
  156. data/app/assets/icons/moon.svg +13 -0
  157. data/app/assets/icons/more-horizontal.svg +15 -0
  158. data/app/assets/icons/more-vertical.svg +15 -0
  159. data/app/assets/icons/move.svg +18 -0
  160. data/app/assets/icons/music.svg +14 -0
  161. data/app/assets/icons/navigation-2.svg +13 -0
  162. data/app/assets/icons/navigation.svg +13 -0
  163. data/app/assets/icons/octagon.svg +13 -0
  164. data/app/assets/icons/package.svg +16 -0
  165. data/app/assets/icons/paperclip.svg +13 -0
  166. data/app/assets/icons/pause-circle.svg +15 -0
  167. data/app/assets/icons/pause.svg +14 -0
  168. data/app/assets/icons/percent.svg +15 -0
  169. data/app/assets/icons/phone-call.svg +13 -0
  170. data/app/assets/icons/phone-forwarded.svg +15 -0
  171. data/app/assets/icons/phone-incoming.svg +15 -0
  172. data/app/assets/icons/phone-missed.svg +15 -0
  173. data/app/assets/icons/phone-off.svg +14 -0
  174. data/app/assets/icons/phone-outgoing.svg +15 -0
  175. data/app/assets/icons/phone.svg +13 -0
  176. data/app/assets/icons/pie-chart.svg +14 -0
  177. data/app/assets/icons/play-circle.svg +14 -0
  178. data/app/assets/icons/play.svg +13 -0
  179. data/app/assets/icons/plus-circle.svg +15 -0
  180. data/app/assets/icons/plus-square.svg +15 -0
  181. data/app/assets/icons/plus.svg +14 -0
  182. data/app/assets/icons/pocket.svg +14 -0
  183. data/app/assets/icons/power.svg +14 -0
  184. data/app/assets/icons/printer.svg +15 -0
  185. data/app/assets/icons/radio.svg +14 -0
  186. data/app/assets/icons/refresh-ccw.svg +15 -0
  187. data/app/assets/icons/refresh-cw.svg +15 -0
  188. data/app/assets/icons/repeat.svg +16 -0
  189. data/app/assets/icons/rewind.svg +14 -0
  190. data/app/assets/icons/rotate-ccw.svg +14 -0
  191. data/app/assets/icons/rotate-cw.svg +14 -0
  192. data/app/assets/icons/rss.svg +15 -0
  193. data/app/assets/icons/save.svg +15 -0
  194. data/app/assets/icons/scissors.svg +17 -0
  195. data/app/assets/icons/search.svg +14 -0
  196. data/app/assets/icons/send.svg +14 -0
  197. data/app/assets/icons/server.svg +16 -0
  198. data/app/assets/icons/settings.svg +14 -0
  199. data/app/assets/icons/share-2.svg +17 -0
  200. data/app/assets/icons/share.svg +15 -0
  201. data/app/assets/icons/shield-off.svg +15 -0
  202. data/app/assets/icons/shield.svg +13 -0
  203. data/app/assets/icons/shopping-bag.svg +15 -0
  204. data/app/assets/icons/shopping-cart.svg +15 -0
  205. data/app/assets/icons/shuffle.svg +17 -0
  206. data/app/assets/icons/sidebar.svg +14 -0
  207. data/app/assets/icons/skip-back.svg +14 -0
  208. data/app/assets/icons/skip-forward.svg +14 -0
  209. data/app/assets/icons/slack.svg +17 -0
  210. data/app/assets/icons/slash.svg +14 -0
  211. data/app/assets/icons/sliders.svg +21 -0
  212. data/app/assets/icons/smartphone.svg +14 -0
  213. data/app/assets/icons/speaker.svg +15 -0
  214. data/app/assets/icons/spinner.svg +1 -0
  215. data/app/assets/icons/square.svg +13 -0
  216. data/app/assets/icons/star.svg +13 -0
  217. data/app/assets/icons/stop-circle.svg +14 -0
  218. data/app/assets/icons/sun.svg +21 -0
  219. data/app/assets/icons/sunrise.svg +20 -0
  220. data/app/assets/icons/sunset.svg +20 -0
  221. data/app/assets/icons/tablet.svg +22 -0
  222. data/app/assets/icons/tag.svg +14 -0
  223. data/app/assets/icons/target.svg +15 -0
  224. data/app/assets/icons/terminal.svg +14 -0
  225. data/app/assets/icons/thermometer.svg +13 -0
  226. data/app/assets/icons/thumbs-down.svg +13 -0
  227. data/app/assets/icons/thumbs-up.svg +13 -0
  228. data/app/assets/icons/toggle-left.svg +14 -0
  229. data/app/assets/icons/toggle-right.svg +14 -0
  230. data/app/assets/icons/trash-2.svg +16 -0
  231. data/app/assets/icons/trash.svg +14 -0
  232. data/app/assets/icons/trending-down.svg +14 -0
  233. data/app/assets/icons/trending-up.svg +14 -0
  234. data/app/assets/icons/triangle.svg +13 -0
  235. data/app/assets/icons/truck.svg +16 -0
  236. data/app/assets/icons/tv.svg +14 -0
  237. data/app/assets/icons/twitter.svg +13 -0
  238. data/app/assets/icons/type.svg +15 -0
  239. data/app/assets/icons/umbrella.svg +13 -0
  240. data/app/assets/icons/underline.svg +14 -0
  241. data/app/assets/icons/unlock.svg +14 -0
  242. data/app/assets/icons/upload-cloud.svg +16 -0
  243. data/app/assets/icons/upload.svg +15 -0
  244. data/app/assets/icons/user-check.svg +15 -0
  245. data/app/assets/icons/user-minus.svg +15 -0
  246. data/app/assets/icons/user-plus.svg +16 -0
  247. data/app/assets/icons/user-x.svg +16 -0
  248. data/app/assets/icons/user.svg +14 -0
  249. data/app/assets/icons/users.svg +16 -0
  250. data/app/assets/icons/video-off.svg +14 -0
  251. data/app/assets/icons/video.svg +14 -0
  252. data/app/assets/icons/voicemail.svg +15 -0
  253. data/app/assets/icons/volume-1.svg +14 -0
  254. data/app/assets/icons/volume-2.svg +14 -0
  255. data/app/assets/icons/volume-x.svg +15 -0
  256. data/app/assets/icons/volume.svg +13 -0
  257. data/app/assets/icons/watch.svg +15 -0
  258. data/app/assets/icons/wifi-off.svg +19 -0
  259. data/app/assets/icons/wifi.svg +16 -0
  260. data/app/assets/icons/wind.svg +13 -0
  261. data/app/assets/icons/x-circle.svg +15 -0
  262. data/app/assets/icons/x-square.svg +15 -0
  263. data/app/assets/icons/x.svg +14 -0
  264. data/app/assets/icons/zap-off.svg +16 -0
  265. data/app/assets/icons/zap.svg +13 -0
  266. data/app/assets/icons/zoom-in.svg +16 -0
  267. data/app/assets/icons/zoom-out.svg +15 -0
  268. data/app/assets/javascripts/effective_bootstrap.js +9 -0
  269. data/app/assets/javascripts/effective_bootstrap/base.js.coffee +37 -0
  270. data/app/assets/javascripts/effective_date/initialize.js.coffee +4 -0
  271. data/app/assets/javascripts/effective_date/input.js +5 -0
  272. data/app/assets/javascripts/effective_datetime/bootstrap-datetimepicker.js +2637 -0
  273. data/app/assets/javascripts/effective_datetime/initialize.js.coffee +4 -0
  274. data/app/assets/javascripts/effective_datetime/input.js +5 -0
  275. data/app/assets/javascripts/effective_datetime/moment.js +4535 -0
  276. data/app/assets/javascripts/effective_datetime/overrides.js.coffee +38 -0
  277. data/app/assets/javascripts/effective_datetime/turbolinks.js.coffee +5 -0
  278. data/app/assets/javascripts/effective_phone/initialize.js.coffee +4 -0
  279. data/app/assets/javascripts/effective_phone/input.js +2 -0
  280. data/app/assets/javascripts/effective_phone/jquery.maskedInput.js +182 -0
  281. data/app/assets/javascripts/effective_price/input.js.coffee +34 -0
  282. data/app/assets/javascripts/effective_select/initialize.js.coffee +45 -0
  283. data/app/assets/javascripts/effective_select/input.js +3 -0
  284. data/app/assets/javascripts/effective_select/overrides.js.coffee +45 -0
  285. data/app/assets/javascripts/effective_select/select2.js +5746 -0
  286. data/app/assets/javascripts/effective_time/initialize.js.coffee +4 -0
  287. data/app/assets/javascripts/effective_time/input.js +5 -0
  288. data/app/assets/stylesheets/effective_bootstrap.scss +8 -0
  289. data/app/assets/stylesheets/effective_bootstrap/base.scss +11 -0
  290. data/app/assets/stylesheets/effective_bootstrap/icons.scss +27 -0
  291. data/app/assets/stylesheets/effective_date/input.scss +1 -0
  292. data/app/assets/stylesheets/effective_datetime/bootstrap-datetimepicker.scss +374 -0
  293. data/app/assets/stylesheets/effective_datetime/input.scss +2 -0
  294. data/app/assets/stylesheets/effective_datetime/overrides.scss +28 -0
  295. data/app/assets/stylesheets/effective_select/bootstrap-theme.css +564 -0
  296. data/app/assets/stylesheets/effective_select/input.scss +3 -0
  297. data/app/assets/stylesheets/effective_select/overrides.scss +92 -0
  298. data/app/assets/stylesheets/effective_select/select2.css +484 -0
  299. data/app/assets/stylesheets/effective_time/input.scss +1 -0
  300. data/app/helpers/effective_bootstrap_helper.rb +52 -0
  301. data/app/helpers/effective_form_builder_helper.rb +23 -0
  302. data/app/helpers/effective_icons_helper.rb +46 -0
  303. data/app/models/effective/access_denied.rb +17 -0
  304. data/app/models/effective/form_builder.rb +100 -0
  305. data/app/models/effective/form_input.rb +319 -0
  306. data/app/models/effective/form_inputs/check_box.rb +62 -0
  307. data/app/models/effective/form_inputs/checks.rb +73 -0
  308. data/app/models/effective/form_inputs/collection_input.rb +144 -0
  309. data/app/models/effective/form_inputs/date_field.rb +22 -0
  310. data/app/models/effective/form_inputs/datetime_field.rb +53 -0
  311. data/app/models/effective/form_inputs/email_field.rb +15 -0
  312. data/app/models/effective/form_inputs/error_field.rb +47 -0
  313. data/app/models/effective/form_inputs/form_group.rb +26 -0
  314. data/app/models/effective/form_inputs/number_field.rb +6 -0
  315. data/app/models/effective/form_inputs/password_field.rb +24 -0
  316. data/app/models/effective/form_inputs/phone_field.rb +34 -0
  317. data/app/models/effective/form_inputs/price_field.rb +37 -0
  318. data/app/models/effective/form_inputs/radios.rb +74 -0
  319. data/app/models/effective/form_inputs/select.rb +87 -0
  320. data/app/models/effective/form_inputs/static_field.rb +20 -0
  321. data/app/models/effective/form_inputs/submit.rb +42 -0
  322. data/app/models/effective/form_inputs/text_area.rb +11 -0
  323. data/app/models/effective/form_inputs/text_field.rb +6 -0
  324. data/app/models/effective/form_inputs/time_field.rb +22 -0
  325. data/app/models/effective/form_inputs/url_field.rb +15 -0
  326. data/app/views/effective/style_guide/__fields.html.haml +42 -0
  327. data/app/views/effective/style_guide/__inline_fields.html.haml +4 -0
  328. data/app/views/effective/style_guide/_effective_form_with.html.haml +23 -0
  329. data/app/views/effective/style_guide/_feather_icons.html.haml +9 -0
  330. data/config/effective_bootstrap.rb +24 -0
  331. data/lib/effective_bootstrap.rb +31 -0
  332. data/lib/effective_bootstrap/engine.rb +11 -0
  333. data/lib/effective_bootstrap/version.rb +3 -0
  334. data/lib/generators/effective_bootstrap/install_generator.rb +14 -0
  335. metadata +419 -0
@@ -0,0 +1,23 @@
1
+ - url = effective_style_guide.style_guide_path
2
+
3
+ %h4 Vertical
4
+ = effective_form_with model: Effective::StyleGuide.new, url: url do |f|
5
+ = render '_fields', f: f, uid: 1
6
+ %hr
7
+ = effective_form_with model: Effective::StyleGuide.new.tap { |s| s.valid? }, url: url do |f|
8
+ = render '_fields', f: f, uid: 2
9
+ %hr
10
+
11
+ = effective_form_with model: Effective::StyleGuide.new, url: url, layout: :horizontal do |f|
12
+ = render '_fields', f: f, uid: 2
13
+ %hr
14
+ = effective_form_with model: Effective::StyleGuide.new.tap { |s| s.valid? }, url: url, layout: :horizontal do |f|
15
+ = render '_fields', f: f, uid: 3
16
+ %hr
17
+
18
+ %h4 Inline
19
+ = effective_form_with model: Effective::StyleGuide.new, url: url, layout: :inline do |f|
20
+ = render '_inline_fields', f: f, uid: 4
21
+ %hr
22
+ = effective_form_with model: Effective::StyleGuide.new.tap { |s| s.valid? }, url: url, layout: :inline do |f|
23
+ = render '_inline_fields', f: f, uid: 5
@@ -0,0 +1,9 @@
1
+ %p These icons are a combination of #{link_to 'Feather', 'https://feathericons.com/'} and #{link_to 'FontAwesome', 'https://fontawesome.com/'} icons.
2
+
3
+ .row.text-center
4
+ - Dir["#{__dir__}/../../../assets/icons/*.svg"].map { |path| path.split('/').last.chomp('.svg') }.each do |name|
5
+ .col-sm-2.my-3
6
+ = icon(name)
7
+ %br
8
+ %small= name
9
+
@@ -0,0 +1,24 @@
1
+ EffectiveBootstrap.setup do |config|
2
+ # Authorization Method
3
+ #
4
+ # This method is called by all controller actions with the appropriate action and resource
5
+ # If it raises an exception or returns false, an Effective::AccessDenied Error will be raised
6
+ #
7
+ # Use via Proc:
8
+ # Proc.new { |controller, action, resource| authorize!(action, resource) } # CanCan
9
+ # Proc.new { |controller, action, resource| can?(action, resource) } # CanCan with skip_authorization_check
10
+ # Proc.new { |controller, action, resource| authorize "#{action}?", resource } # Pundit
11
+ # Proc.new { |controller, action, resource| current_user.is?(:admin) } # Custom logic
12
+ #
13
+ # Use via Boolean:
14
+ # config.authorization_method = true # Always authorized
15
+ # config.authorization_method = false # Always unauthorized
16
+ #
17
+ # Use via Method (probably in your application_controller.rb):
18
+ # config.authorization_method = :my_authorization_method
19
+ # def my_authorization_method(resource, action)
20
+ # true
21
+ # end
22
+ config.authorization_method = Proc.new { |controller, action, resource| authorize!(action, resource) }
23
+
24
+ end
@@ -0,0 +1,31 @@
1
+ require 'inline_svg'
2
+ require 'effective_bootstrap/engine'
3
+ require 'effective_bootstrap/version'
4
+
5
+ module EffectiveBootstrap
6
+
7
+ # The following are all valid config keys
8
+ mattr_accessor :authorization_method
9
+
10
+ def self.setup
11
+ yield self
12
+ end
13
+
14
+ def self.authorized?(controller, action, resource)
15
+ @_exceptions ||= [Effective::AccessDenied, (CanCan::AccessDenied if defined?(CanCan)), (Pundit::NotAuthorizedError if defined?(Pundit))].compact
16
+
17
+ return !!authorization_method unless authorization_method.respond_to?(:call)
18
+ controller = controller.controller if controller.respond_to?(:controller)
19
+
20
+ begin
21
+ !!(controller || self).instance_exec((controller || self), action, resource, &authorization_method)
22
+ rescue *@_exceptions
23
+ false
24
+ end
25
+ end
26
+
27
+ def self.authorize!(controller, action, resource)
28
+ raise Effective::AccessDenied unless authorized?(controller, action, resource)
29
+ end
30
+
31
+ end
@@ -0,0 +1,11 @@
1
+ module EffectiveBootstrap
2
+ class Engine < ::Rails::Engine
3
+ engine_name 'effective_bootstrap'
4
+
5
+ # Set up our default configuration options.
6
+ initializer 'effective_bootstrap.defaults', before: :load_config_initializers do |app|
7
+ eval File.read("#{config.root}/config/effective_bootstrap.rb")
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module EffectiveBootstrap
2
+ VERSION = '0.0.1'.freeze
3
+ end
@@ -0,0 +1,14 @@
1
+ module EffectiveBootstrap
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ desc 'Creates an EffectiveBootstrap initializer in your application.'
5
+
6
+ source_root File.expand_path('../../templates', __FILE__)
7
+
8
+ def copy_initializer
9
+ template ('../' * 3) + 'config/effective_bootstrap.rb', 'config/initializers/effective_bootstrap.rb'
10
+ end
11
+
12
+ end
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,419 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: effective_bootstrap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Code and Effect
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-02-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bootstrap
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 4.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 4.0.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: inline_svg
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Everything you need to get set up with bootstrap 4.
56
+ email:
57
+ - info@codeandeffect.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.md
64
+ - app/assets/icons/activity.svg
65
+ - app/assets/icons/airplay.svg
66
+ - app/assets/icons/alert-circle.svg
67
+ - app/assets/icons/alert-octagon.svg
68
+ - app/assets/icons/alert-triangle.svg
69
+ - app/assets/icons/align-center.svg
70
+ - app/assets/icons/align-justify.svg
71
+ - app/assets/icons/align-left.svg
72
+ - app/assets/icons/align-right.svg
73
+ - app/assets/icons/anchor.svg
74
+ - app/assets/icons/aperture.svg
75
+ - app/assets/icons/arrow-down-circle.svg
76
+ - app/assets/icons/arrow-down-left.svg
77
+ - app/assets/icons/arrow-down-right.svg
78
+ - app/assets/icons/arrow-down.svg
79
+ - app/assets/icons/arrow-left-circle.svg
80
+ - app/assets/icons/arrow-left.svg
81
+ - app/assets/icons/arrow-right-circle.svg
82
+ - app/assets/icons/arrow-right.svg
83
+ - app/assets/icons/arrow-up-circle.svg
84
+ - app/assets/icons/arrow-up-left.svg
85
+ - app/assets/icons/arrow-up-right.svg
86
+ - app/assets/icons/arrow-up.svg
87
+ - app/assets/icons/at-sign.svg
88
+ - app/assets/icons/award.svg
89
+ - app/assets/icons/bar-chart-2.svg
90
+ - app/assets/icons/bar-chart.svg
91
+ - app/assets/icons/battery-charging.svg
92
+ - app/assets/icons/battery.svg
93
+ - app/assets/icons/bell-off.svg
94
+ - app/assets/icons/bell.svg
95
+ - app/assets/icons/bluetooth.svg
96
+ - app/assets/icons/bold.svg
97
+ - app/assets/icons/book-open.svg
98
+ - app/assets/icons/book.svg
99
+ - app/assets/icons/bookmark.svg
100
+ - app/assets/icons/box.svg
101
+ - app/assets/icons/briefcase.svg
102
+ - app/assets/icons/calendar.svg
103
+ - app/assets/icons/camera-off.svg
104
+ - app/assets/icons/camera.svg
105
+ - app/assets/icons/cast.svg
106
+ - app/assets/icons/check-circle.svg
107
+ - app/assets/icons/check-square.svg
108
+ - app/assets/icons/check.svg
109
+ - app/assets/icons/chevron-down.svg
110
+ - app/assets/icons/chevron-left.svg
111
+ - app/assets/icons/chevron-right.svg
112
+ - app/assets/icons/chevron-up.svg
113
+ - app/assets/icons/chevrons-down.svg
114
+ - app/assets/icons/chevrons-left.svg
115
+ - app/assets/icons/chevrons-right.svg
116
+ - app/assets/icons/chevrons-up.svg
117
+ - app/assets/icons/chrome.svg
118
+ - app/assets/icons/circle.svg
119
+ - app/assets/icons/clipboard.svg
120
+ - app/assets/icons/clock.svg
121
+ - app/assets/icons/cloud-drizzle.svg
122
+ - app/assets/icons/cloud-lightning.svg
123
+ - app/assets/icons/cloud-off.svg
124
+ - app/assets/icons/cloud-rain.svg
125
+ - app/assets/icons/cloud-snow.svg
126
+ - app/assets/icons/cloud.svg
127
+ - app/assets/icons/code.svg
128
+ - app/assets/icons/codepen.svg
129
+ - app/assets/icons/command.svg
130
+ - app/assets/icons/compass.svg
131
+ - app/assets/icons/copy.svg
132
+ - app/assets/icons/corner-down-left.svg
133
+ - app/assets/icons/corner-down-right.svg
134
+ - app/assets/icons/corner-left-down.svg
135
+ - app/assets/icons/corner-left-up.svg
136
+ - app/assets/icons/corner-right-down.svg
137
+ - app/assets/icons/corner-right-up.svg
138
+ - app/assets/icons/corner-up-left.svg
139
+ - app/assets/icons/corner-up-right.svg
140
+ - app/assets/icons/cpu.svg
141
+ - app/assets/icons/credit-card.svg
142
+ - app/assets/icons/crop.svg
143
+ - app/assets/icons/crosshair.svg
144
+ - app/assets/icons/database.svg
145
+ - app/assets/icons/delete.svg
146
+ - app/assets/icons/disc.svg
147
+ - app/assets/icons/dollar-sign.svg
148
+ - app/assets/icons/download-cloud.svg
149
+ - app/assets/icons/download.svg
150
+ - app/assets/icons/droplet.svg
151
+ - app/assets/icons/edit-2.svg
152
+ - app/assets/icons/edit-3.svg
153
+ - app/assets/icons/edit.svg
154
+ - app/assets/icons/external-link.svg
155
+ - app/assets/icons/eye-off.svg
156
+ - app/assets/icons/eye.svg
157
+ - app/assets/icons/facebook.svg
158
+ - app/assets/icons/fast-forward.svg
159
+ - app/assets/icons/feather.svg
160
+ - app/assets/icons/file-minus.svg
161
+ - app/assets/icons/file-plus.svg
162
+ - app/assets/icons/file-text.svg
163
+ - app/assets/icons/file.svg
164
+ - app/assets/icons/film.svg
165
+ - app/assets/icons/filter.svg
166
+ - app/assets/icons/flag.svg
167
+ - app/assets/icons/folder-minus.svg
168
+ - app/assets/icons/folder-plus.svg
169
+ - app/assets/icons/folder.svg
170
+ - app/assets/icons/git-branch.svg
171
+ - app/assets/icons/git-commit.svg
172
+ - app/assets/icons/git-merge.svg
173
+ - app/assets/icons/git-pull-request.svg
174
+ - app/assets/icons/github.svg
175
+ - app/assets/icons/gitlab.svg
176
+ - app/assets/icons/globe.svg
177
+ - app/assets/icons/grid.svg
178
+ - app/assets/icons/hard-drive.svg
179
+ - app/assets/icons/hash.svg
180
+ - app/assets/icons/headphones.svg
181
+ - app/assets/icons/heart.svg
182
+ - app/assets/icons/help-circle.svg
183
+ - app/assets/icons/home.svg
184
+ - app/assets/icons/image.svg
185
+ - app/assets/icons/inbox.svg
186
+ - app/assets/icons/info.svg
187
+ - app/assets/icons/instagram.svg
188
+ - app/assets/icons/italic.svg
189
+ - app/assets/icons/layers.svg
190
+ - app/assets/icons/layout.svg
191
+ - app/assets/icons/life-buoy.svg
192
+ - app/assets/icons/link-2.svg
193
+ - app/assets/icons/link.svg
194
+ - app/assets/icons/linkedin.svg
195
+ - app/assets/icons/list.svg
196
+ - app/assets/icons/loader.svg
197
+ - app/assets/icons/lock.svg
198
+ - app/assets/icons/log-in.svg
199
+ - app/assets/icons/log-out.svg
200
+ - app/assets/icons/mail.svg
201
+ - app/assets/icons/map-pin.svg
202
+ - app/assets/icons/map.svg
203
+ - app/assets/icons/maximize-2.svg
204
+ - app/assets/icons/maximize.svg
205
+ - app/assets/icons/menu.svg
206
+ - app/assets/icons/message-circle.svg
207
+ - app/assets/icons/message-square.svg
208
+ - app/assets/icons/mic-off.svg
209
+ - app/assets/icons/mic.svg
210
+ - app/assets/icons/minimize-2.svg
211
+ - app/assets/icons/minimize.svg
212
+ - app/assets/icons/minus-circle.svg
213
+ - app/assets/icons/minus-square.svg
214
+ - app/assets/icons/minus.svg
215
+ - app/assets/icons/monitor.svg
216
+ - app/assets/icons/moon.svg
217
+ - app/assets/icons/more-horizontal.svg
218
+ - app/assets/icons/more-vertical.svg
219
+ - app/assets/icons/move.svg
220
+ - app/assets/icons/music.svg
221
+ - app/assets/icons/navigation-2.svg
222
+ - app/assets/icons/navigation.svg
223
+ - app/assets/icons/octagon.svg
224
+ - app/assets/icons/package.svg
225
+ - app/assets/icons/paperclip.svg
226
+ - app/assets/icons/pause-circle.svg
227
+ - app/assets/icons/pause.svg
228
+ - app/assets/icons/percent.svg
229
+ - app/assets/icons/phone-call.svg
230
+ - app/assets/icons/phone-forwarded.svg
231
+ - app/assets/icons/phone-incoming.svg
232
+ - app/assets/icons/phone-missed.svg
233
+ - app/assets/icons/phone-off.svg
234
+ - app/assets/icons/phone-outgoing.svg
235
+ - app/assets/icons/phone.svg
236
+ - app/assets/icons/pie-chart.svg
237
+ - app/assets/icons/play-circle.svg
238
+ - app/assets/icons/play.svg
239
+ - app/assets/icons/plus-circle.svg
240
+ - app/assets/icons/plus-square.svg
241
+ - app/assets/icons/plus.svg
242
+ - app/assets/icons/pocket.svg
243
+ - app/assets/icons/power.svg
244
+ - app/assets/icons/printer.svg
245
+ - app/assets/icons/radio.svg
246
+ - app/assets/icons/refresh-ccw.svg
247
+ - app/assets/icons/refresh-cw.svg
248
+ - app/assets/icons/repeat.svg
249
+ - app/assets/icons/rewind.svg
250
+ - app/assets/icons/rotate-ccw.svg
251
+ - app/assets/icons/rotate-cw.svg
252
+ - app/assets/icons/rss.svg
253
+ - app/assets/icons/save.svg
254
+ - app/assets/icons/scissors.svg
255
+ - app/assets/icons/search.svg
256
+ - app/assets/icons/send.svg
257
+ - app/assets/icons/server.svg
258
+ - app/assets/icons/settings.svg
259
+ - app/assets/icons/share-2.svg
260
+ - app/assets/icons/share.svg
261
+ - app/assets/icons/shield-off.svg
262
+ - app/assets/icons/shield.svg
263
+ - app/assets/icons/shopping-bag.svg
264
+ - app/assets/icons/shopping-cart.svg
265
+ - app/assets/icons/shuffle.svg
266
+ - app/assets/icons/sidebar.svg
267
+ - app/assets/icons/skip-back.svg
268
+ - app/assets/icons/skip-forward.svg
269
+ - app/assets/icons/slack.svg
270
+ - app/assets/icons/slash.svg
271
+ - app/assets/icons/sliders.svg
272
+ - app/assets/icons/smartphone.svg
273
+ - app/assets/icons/speaker.svg
274
+ - app/assets/icons/spinner.svg
275
+ - app/assets/icons/square.svg
276
+ - app/assets/icons/star.svg
277
+ - app/assets/icons/stop-circle.svg
278
+ - app/assets/icons/sun.svg
279
+ - app/assets/icons/sunrise.svg
280
+ - app/assets/icons/sunset.svg
281
+ - app/assets/icons/tablet.svg
282
+ - app/assets/icons/tag.svg
283
+ - app/assets/icons/target.svg
284
+ - app/assets/icons/terminal.svg
285
+ - app/assets/icons/thermometer.svg
286
+ - app/assets/icons/thumbs-down.svg
287
+ - app/assets/icons/thumbs-up.svg
288
+ - app/assets/icons/toggle-left.svg
289
+ - app/assets/icons/toggle-right.svg
290
+ - app/assets/icons/trash-2.svg
291
+ - app/assets/icons/trash.svg
292
+ - app/assets/icons/trending-down.svg
293
+ - app/assets/icons/trending-up.svg
294
+ - app/assets/icons/triangle.svg
295
+ - app/assets/icons/truck.svg
296
+ - app/assets/icons/tv.svg
297
+ - app/assets/icons/twitter.svg
298
+ - app/assets/icons/type.svg
299
+ - app/assets/icons/umbrella.svg
300
+ - app/assets/icons/underline.svg
301
+ - app/assets/icons/unlock.svg
302
+ - app/assets/icons/upload-cloud.svg
303
+ - app/assets/icons/upload.svg
304
+ - app/assets/icons/user-check.svg
305
+ - app/assets/icons/user-minus.svg
306
+ - app/assets/icons/user-plus.svg
307
+ - app/assets/icons/user-x.svg
308
+ - app/assets/icons/user.svg
309
+ - app/assets/icons/users.svg
310
+ - app/assets/icons/video-off.svg
311
+ - app/assets/icons/video.svg
312
+ - app/assets/icons/voicemail.svg
313
+ - app/assets/icons/volume-1.svg
314
+ - app/assets/icons/volume-2.svg
315
+ - app/assets/icons/volume-x.svg
316
+ - app/assets/icons/volume.svg
317
+ - app/assets/icons/watch.svg
318
+ - app/assets/icons/wifi-off.svg
319
+ - app/assets/icons/wifi.svg
320
+ - app/assets/icons/wind.svg
321
+ - app/assets/icons/x-circle.svg
322
+ - app/assets/icons/x-square.svg
323
+ - app/assets/icons/x.svg
324
+ - app/assets/icons/zap-off.svg
325
+ - app/assets/icons/zap.svg
326
+ - app/assets/icons/zoom-in.svg
327
+ - app/assets/icons/zoom-out.svg
328
+ - app/assets/javascripts/effective_bootstrap.js
329
+ - app/assets/javascripts/effective_bootstrap/base.js.coffee
330
+ - app/assets/javascripts/effective_date/initialize.js.coffee
331
+ - app/assets/javascripts/effective_date/input.js
332
+ - app/assets/javascripts/effective_datetime/bootstrap-datetimepicker.js
333
+ - app/assets/javascripts/effective_datetime/initialize.js.coffee
334
+ - app/assets/javascripts/effective_datetime/input.js
335
+ - app/assets/javascripts/effective_datetime/moment.js
336
+ - app/assets/javascripts/effective_datetime/overrides.js.coffee
337
+ - app/assets/javascripts/effective_datetime/turbolinks.js.coffee
338
+ - app/assets/javascripts/effective_phone/initialize.js.coffee
339
+ - app/assets/javascripts/effective_phone/input.js
340
+ - app/assets/javascripts/effective_phone/jquery.maskedInput.js
341
+ - app/assets/javascripts/effective_price/input.js.coffee
342
+ - app/assets/javascripts/effective_select/initialize.js.coffee
343
+ - app/assets/javascripts/effective_select/input.js
344
+ - app/assets/javascripts/effective_select/overrides.js.coffee
345
+ - app/assets/javascripts/effective_select/select2.js
346
+ - app/assets/javascripts/effective_time/initialize.js.coffee
347
+ - app/assets/javascripts/effective_time/input.js
348
+ - app/assets/stylesheets/effective_bootstrap.scss
349
+ - app/assets/stylesheets/effective_bootstrap/base.scss
350
+ - app/assets/stylesheets/effective_bootstrap/icons.scss
351
+ - app/assets/stylesheets/effective_date/input.scss
352
+ - app/assets/stylesheets/effective_datetime/bootstrap-datetimepicker.scss
353
+ - app/assets/stylesheets/effective_datetime/input.scss
354
+ - app/assets/stylesheets/effective_datetime/overrides.scss
355
+ - app/assets/stylesheets/effective_select/bootstrap-theme.css
356
+ - app/assets/stylesheets/effective_select/input.scss
357
+ - app/assets/stylesheets/effective_select/overrides.scss
358
+ - app/assets/stylesheets/effective_select/select2.css
359
+ - app/assets/stylesheets/effective_time/input.scss
360
+ - app/helpers/effective_bootstrap_helper.rb
361
+ - app/helpers/effective_form_builder_helper.rb
362
+ - app/helpers/effective_icons_helper.rb
363
+ - app/models/effective/access_denied.rb
364
+ - app/models/effective/form_builder.rb
365
+ - app/models/effective/form_input.rb
366
+ - app/models/effective/form_inputs/check_box.rb
367
+ - app/models/effective/form_inputs/checks.rb
368
+ - app/models/effective/form_inputs/collection_input.rb
369
+ - app/models/effective/form_inputs/date_field.rb
370
+ - app/models/effective/form_inputs/datetime_field.rb
371
+ - app/models/effective/form_inputs/email_field.rb
372
+ - app/models/effective/form_inputs/error_field.rb
373
+ - app/models/effective/form_inputs/form_group.rb
374
+ - app/models/effective/form_inputs/number_field.rb
375
+ - app/models/effective/form_inputs/password_field.rb
376
+ - app/models/effective/form_inputs/phone_field.rb
377
+ - app/models/effective/form_inputs/price_field.rb
378
+ - app/models/effective/form_inputs/radios.rb
379
+ - app/models/effective/form_inputs/select.rb
380
+ - app/models/effective/form_inputs/static_field.rb
381
+ - app/models/effective/form_inputs/submit.rb
382
+ - app/models/effective/form_inputs/text_area.rb
383
+ - app/models/effective/form_inputs/text_field.rb
384
+ - app/models/effective/form_inputs/time_field.rb
385
+ - app/models/effective/form_inputs/url_field.rb
386
+ - app/views/effective/style_guide/__fields.html.haml
387
+ - app/views/effective/style_guide/__inline_fields.html.haml
388
+ - app/views/effective/style_guide/_effective_form_with.html.haml
389
+ - app/views/effective/style_guide/_feather_icons.html.haml
390
+ - config/effective_bootstrap.rb
391
+ - lib/effective_bootstrap.rb
392
+ - lib/effective_bootstrap/engine.rb
393
+ - lib/effective_bootstrap/version.rb
394
+ - lib/generators/effective_bootstrap/install_generator.rb
395
+ homepage: https://github.com/code-and-effect/effective_bootstrap
396
+ licenses:
397
+ - MIT
398
+ metadata: {}
399
+ post_install_message:
400
+ rdoc_options: []
401
+ require_paths:
402
+ - lib
403
+ required_ruby_version: !ruby/object:Gem::Requirement
404
+ requirements:
405
+ - - ">="
406
+ - !ruby/object:Gem::Version
407
+ version: '0'
408
+ required_rubygems_version: !ruby/object:Gem::Requirement
409
+ requirements:
410
+ - - ">="
411
+ - !ruby/object:Gem::Version
412
+ version: '0'
413
+ requirements: []
414
+ rubyforge_project:
415
+ rubygems_version: 2.4.5.1
416
+ signing_key:
417
+ specification_version: 4
418
+ summary: Everything you need to get set up with bootstrap 4.
419
+ test_files: []