twbs_sass_rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +12 -0
  3. data/CONTRIBUTING.md +45 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +142 -0
  6. data/LICENSE +30 -0
  7. data/README.md +138 -0
  8. data/Rakefile +108 -0
  9. data/VERSION +1 -0
  10. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  11. data/app/assets/fonts/fontawesome-webfont.svg +399 -0
  12. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  13. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  14. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  15. data/app/assets/fonts/glyphicons-halflings-regular.svg +228 -0
  16. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  17. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  18. data/gemfiles/Gemfile.rails-3.2.x +9 -0
  19. data/gemfiles/Gemfile.rails-4.0.x +9 -0
  20. data/lib/generators/twbs_sass_rails/install/install_generator.rb +31 -0
  21. data/lib/generators/twbs_sass_rails/install/templates/application.css +15 -0
  22. data/lib/generators/twbs_sass_rails/install/templates/application.js +17 -0
  23. data/lib/generators/twbs_sass_rails/install/templates/twbs-variables.css.less +5 -0
  24. data/lib/generators/twbs_sass_rails/install/templates/twbs.css.less +10 -0
  25. data/lib/generators/twbs_sass_rails/install/templates/twbs.js.coffee +7 -0
  26. data/lib/tasks/twbs_sass_rails_tasks.rake +4 -0
  27. data/lib/twbs_sass_rails/engine.rb +7 -0
  28. data/lib/twbs_sass_rails/version.rb +3 -0
  29. data/lib/twbs_sass_rails.rb +4 -0
  30. data/test/dummy/README.rdoc +28 -0
  31. data/test/dummy/Rakefile +6 -0
  32. data/test/dummy/app/assets/images/.keep +0 -0
  33. data/test/dummy/app/assets/javascripts/application.js +14 -0
  34. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  35. data/test/dummy/app/assets/stylesheets/default-twbs.css.less +1 -0
  36. data/test/dummy/app/assets/stylesheets/test.css.less +5 -0
  37. data/test/dummy/app/assets/stylesheets/twbs-variables.css.less +6 -0
  38. data/test/dummy/app/assets/stylesheets/twbs.css.less +10 -0
  39. data/test/dummy/app/controllers/application_controller.rb +5 -0
  40. data/test/dummy/app/controllers/concerns/.keep +0 -0
  41. data/test/dummy/app/helpers/application_helper.rb +2 -0
  42. data/test/dummy/app/mailers/.keep +0 -0
  43. data/test/dummy/app/models/.keep +0 -0
  44. data/test/dummy/app/models/concerns/.keep +0 -0
  45. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/test/dummy/bin/bundle +3 -0
  47. data/test/dummy/bin/rails +4 -0
  48. data/test/dummy/bin/rake +4 -0
  49. data/test/dummy/config/application.rb +27 -0
  50. data/test/dummy/config/boot.rb +5 -0
  51. data/test/dummy/config/database.yml +25 -0
  52. data/test/dummy/config/environment.rb +5 -0
  53. data/test/dummy/config/environments/development.rb +29 -0
  54. data/test/dummy/config/environments/production.rb +80 -0
  55. data/test/dummy/config/environments/test.rb +36 -0
  56. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  57. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  58. data/test/dummy/config/initializers/inflections.rb +16 -0
  59. data/test/dummy/config/initializers/mime_types.rb +5 -0
  60. data/test/dummy/config/initializers/secret_token.rb +18 -0
  61. data/test/dummy/config/initializers/session_store.rb +3 -0
  62. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  63. data/test/dummy/config/locales/en.yml +23 -0
  64. data/test/dummy/config/routes.rb +56 -0
  65. data/test/dummy/config.ru +4 -0
  66. data/test/dummy/db/.keep +0 -0
  67. data/test/dummy/lib/assets/.keep +0 -0
  68. data/test/dummy/log/.keep +0 -0
  69. data/test/dummy/public/404.html +58 -0
  70. data/test/dummy/public/422.html +58 -0
  71. data/test/dummy/public/500.html +57 -0
  72. data/test/dummy/public/favicon.ico +0 -0
  73. data/test/generators/default_rails_assets/application.css +13 -0
  74. data/test/generators/default_rails_assets/application.js +16 -0
  75. data/test/generators/install_generator_test.rb +47 -0
  76. data/test/integration/assets_precompile_integration_test.rb +49 -0
  77. data/test/integration/twbs_sass_rails_integration_test.rb +37 -0
  78. data/test/test_helper.rb +38 -0
  79. data/twbs_sass_rails.gemspec +34 -0
  80. data/vendor/assets/javascripts/respond.js +342 -0
  81. data/vendor/assets/javascripts/twbs/bootstrap/affix.js +126 -0
  82. data/vendor/assets/javascripts/twbs/bootstrap/alert.js +98 -0
  83. data/vendor/assets/javascripts/twbs/bootstrap/button.js +109 -0
  84. data/vendor/assets/javascripts/twbs/bootstrap/carousel.js +217 -0
  85. data/vendor/assets/javascripts/twbs/bootstrap/collapse.js +179 -0
  86. data/vendor/assets/javascripts/twbs/bootstrap/dropdown.js +154 -0
  87. data/vendor/assets/javascripts/twbs/bootstrap/modal.js +246 -0
  88. data/vendor/assets/javascripts/twbs/bootstrap/popover.js +117 -0
  89. data/vendor/assets/javascripts/twbs/bootstrap/scrollspy.js +158 -0
  90. data/vendor/assets/javascripts/twbs/bootstrap/tab.js +135 -0
  91. data/vendor/assets/javascripts/twbs/bootstrap/tooltip.js +386 -0
  92. data/vendor/assets/javascripts/twbs/bootstrap/transition.js +56 -0
  93. data/vendor/assets/javascripts/twbs/bootstrap.js +12 -0
  94. data/vendor/assets/stylesheets/fontawesome/bootstrap.less +84 -0
  95. data/vendor/assets/stylesheets/fontawesome/core.less +129 -0
  96. data/vendor/assets/stylesheets/fontawesome/extras.less +93 -0
  97. data/vendor/assets/stylesheets/fontawesome/font-awesome.less +33 -0
  98. data/vendor/assets/stylesheets/fontawesome/icons.less +381 -0
  99. data/vendor/assets/stylesheets/fontawesome/mixins.less +48 -0
  100. data/vendor/assets/stylesheets/fontawesome/path.less +14 -0
  101. data/vendor/assets/stylesheets/fontawesome/variables.less +735 -0
  102. data/vendor/assets/stylesheets/twbs/bootstrap/alerts.less +67 -0
  103. data/vendor/assets/stylesheets/twbs/bootstrap/badges.less +51 -0
  104. data/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.less +58 -0
  105. data/vendor/assets/stylesheets/twbs/bootstrap/breadcrumbs.less +23 -0
  106. data/vendor/assets/stylesheets/twbs/bootstrap/button-groups.less +248 -0
  107. data/vendor/assets/stylesheets/twbs/bootstrap/buttons.less +160 -0
  108. data/vendor/assets/stylesheets/twbs/bootstrap/carousel.less +209 -0
  109. data/vendor/assets/stylesheets/twbs/bootstrap/close.less +33 -0
  110. data/vendor/assets/stylesheets/twbs/bootstrap/code.less +56 -0
  111. data/vendor/assets/stylesheets/twbs/bootstrap/component-animations.less +29 -0
  112. data/vendor/assets/stylesheets/twbs/bootstrap/dropdowns.less +193 -0
  113. data/vendor/assets/stylesheets/twbs/bootstrap/forms.less +362 -0
  114. data/vendor/assets/stylesheets/twbs/bootstrap/glyphicons.less +236 -0
  115. data/vendor/assets/stylesheets/twbs/bootstrap/grid.less +346 -0
  116. data/vendor/assets/stylesheets/twbs/bootstrap/input-groups.less +127 -0
  117. data/vendor/assets/stylesheets/twbs/bootstrap/jumbotron.less +40 -0
  118. data/vendor/assets/stylesheets/twbs/bootstrap/labels.less +58 -0
  119. data/vendor/assets/stylesheets/twbs/bootstrap/list-group.less +88 -0
  120. data/vendor/assets/stylesheets/twbs/bootstrap/media.less +56 -0
  121. data/vendor/assets/stylesheets/twbs/bootstrap/mixins.less +744 -0
  122. data/vendor/assets/stylesheets/twbs/bootstrap/modals.less +141 -0
  123. data/vendor/assets/stylesheets/twbs/bootstrap/navbar.less +621 -0
  124. data/vendor/assets/stylesheets/twbs/bootstrap/navs.less +248 -0
  125. data/vendor/assets/stylesheets/twbs/bootstrap/normalize.less +396 -0
  126. data/vendor/assets/stylesheets/twbs/bootstrap/pager.less +55 -0
  127. data/vendor/assets/stylesheets/twbs/bootstrap/pagination.less +85 -0
  128. data/vendor/assets/stylesheets/twbs/bootstrap/panels.less +148 -0
  129. data/vendor/assets/stylesheets/twbs/bootstrap/popovers.less +133 -0
  130. data/vendor/assets/stylesheets/twbs/bootstrap/print.less +100 -0
  131. data/vendor/assets/stylesheets/twbs/bootstrap/progress-bars.less +95 -0
  132. data/vendor/assets/stylesheets/twbs/bootstrap/responsive-utilities.less +220 -0
  133. data/vendor/assets/stylesheets/twbs/bootstrap/scaffolding.less +130 -0
  134. data/vendor/assets/stylesheets/twbs/bootstrap/tables.less +238 -0
  135. data/vendor/assets/stylesheets/twbs/bootstrap/theme.less +241 -0
  136. data/vendor/assets/stylesheets/twbs/bootstrap/thumbnails.less +32 -0
  137. data/vendor/assets/stylesheets/twbs/bootstrap/tooltip.less +95 -0
  138. data/vendor/assets/stylesheets/twbs/bootstrap/type.less +242 -0
  139. data/vendor/assets/stylesheets/twbs/bootstrap/utilities.less +42 -0
  140. data/vendor/assets/stylesheets/twbs/bootstrap/variables.less +628 -0
  141. data/vendor/assets/stylesheets/twbs/bootstrap/wells.less +29 -0
  142. data/vendor/assets/stylesheets/twbs/bootstrap.less +1 -0
  143. metadata +388 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b4ab951d2c05d424af00b83f3782ff795b81f499
4
+ data.tar.gz: 62256265e159fb8349cf8ef245327d1635f98baa
5
+ SHA512:
6
+ metadata.gz: d35e19e6213681f5ade6bcc7284689e1e89c5be9f290292f08554adb5663e40217e7dd0414a08ef21438e8bcb65e1b7e87bbc8bc8e28e8c1c3b17296800bc96f
7
+ data.tar.gz: 6199124a1a168bffeee9da894010703b4b5474a4e862f0a9bf9e835d0d27b5b591d227d50046704b52c495894b00467e31f7f730c0f3322c2103106a939c39bd
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ Changelog
2
+ =========
3
+
4
+ 0.1.0
5
+ -----
6
+ * Bootstrap 3.0 @ [73f10843a4](https://github.com/twbs/bootstrap/commit/73f10843a487ee94bed755ecfd7c853cb657bf38)
7
+ * Fontawesome 3.2.1 @ [906345058f](https://github.com/FortAwesome/Font-Awesome/commit/906345058f738c2b931f89754a319ed108e17bd8)
8
+ * Respond.js 1.3.0 @ [ad87635f83](https://github.com/scottjehl/Respond/commit/ad87635f83f8b811e1da53c082325a4b35960771)
9
+
10
+ 0.0.1
11
+ -----
12
+ * First public version
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,45 @@
1
+ # Contributing to Bootstrap
2
+
3
+ Looking to contribute something to Twbs Sass Rails? **Here's how you can help.**
4
+
5
+
6
+
7
+ ## Reporting issues
8
+
9
+ We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Twbs Sass Rails core. Please read the following guidelines before opening any issue.
10
+
11
+ 1. **Search for existing issues.**
12
+ 2. **Create an isolated and reproducible test case.**
13
+ 3. **Include a live example if possible.**
14
+ 4. **Share as much information as possible.** Include at least Rails version and gem version. Also include steps to reproduce the bug.
15
+
16
+
17
+
18
+ ## Key branches
19
+
20
+ - `master` is the latest, deployed version. **Never pull against this branch.**
21
+ - `develop` is the official development branch for the next release.
22
+
23
+ Take a look at [git-flow, A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/)
24
+
25
+
26
+
27
+ ## Pull requests
28
+
29
+ - Try to submit pull requests against the `develop` branch for easier merging
30
+ - Try not to pollute your pull request with unintended changes--keep them simple and small
31
+ - **Test. Code coverage should never go below 100%.** If you find a bug, write at first a failing test case and then fix it.
32
+
33
+
34
+
35
+ ## Coding standards
36
+
37
+ ### Ruby
38
+
39
+ - [Ruby Styleguide](https://github.com/styleguide/ruby)
40
+
41
+
42
+
43
+ ## License
44
+
45
+ By contributing your code, you agree to license your contribution under the terms of the [BSD 2-Clause License](LICENSE)
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,142 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ twbs_sass_rails (0.0.1)
5
+ less-rails
6
+ rails (>= 3.2.14)
7
+ therubyracer
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actionmailer (4.0.0)
13
+ actionpack (= 4.0.0)
14
+ mail (~> 2.5.3)
15
+ actionpack (4.0.0)
16
+ activesupport (= 4.0.0)
17
+ builder (~> 3.1.0)
18
+ erubis (~> 2.7.0)
19
+ rack (~> 1.5.2)
20
+ rack-test (~> 0.6.2)
21
+ activemodel (4.0.0)
22
+ activesupport (= 4.0.0)
23
+ builder (~> 3.1.0)
24
+ activerecord (4.0.0)
25
+ activemodel (= 4.0.0)
26
+ activerecord-deprecated_finders (~> 1.0.2)
27
+ activesupport (= 4.0.0)
28
+ arel (~> 4.0.0)
29
+ activerecord-deprecated_finders (1.0.3)
30
+ activesupport (4.0.0)
31
+ i18n (~> 0.6, >= 0.6.4)
32
+ minitest (~> 4.2)
33
+ multi_json (~> 1.3)
34
+ thread_safe (~> 0.1)
35
+ tzinfo (~> 0.3.37)
36
+ ansi (1.4.3)
37
+ arel (4.0.0)
38
+ atomic (1.1.13)
39
+ builder (3.1.4)
40
+ capybara (2.1.0)
41
+ mime-types (>= 1.16)
42
+ nokogiri (>= 1.3.3)
43
+ rack (>= 1.0.0)
44
+ rack-test (>= 0.5.4)
45
+ xpath (~> 2.0)
46
+ colorize (0.5.8)
47
+ columnize (0.3.6)
48
+ commonjs (0.2.6)
49
+ coveralls (0.6.7)
50
+ colorize
51
+ multi_json (~> 1.3)
52
+ rest-client
53
+ simplecov (>= 0.7)
54
+ thor
55
+ debugger (1.6.1)
56
+ columnize (>= 0.3.1)
57
+ debugger-linecache (~> 1.2.0)
58
+ debugger-ruby_core_source (~> 1.2.3)
59
+ debugger-linecache (1.2.0)
60
+ debugger-ruby_core_source (1.2.3)
61
+ erubis (2.7.0)
62
+ hike (1.2.3)
63
+ i18n (0.6.5)
64
+ less (2.3.2)
65
+ commonjs (~> 0.2.6)
66
+ less-rails (2.3.3)
67
+ actionpack (>= 3.1)
68
+ less (~> 2.3.1)
69
+ libv8 (3.16.14.3)
70
+ mail (2.5.4)
71
+ mime-types (~> 1.16)
72
+ treetop (~> 1.4.8)
73
+ mime-types (1.24)
74
+ mini_portile (0.5.1)
75
+ minitest (4.7.5)
76
+ multi_json (1.7.9)
77
+ nokogiri (1.6.0)
78
+ mini_portile (~> 0.5.0)
79
+ polyglot (0.3.3)
80
+ rack (1.5.2)
81
+ rack-test (0.6.2)
82
+ rack (>= 1.0)
83
+ rails (4.0.0)
84
+ actionmailer (= 4.0.0)
85
+ actionpack (= 4.0.0)
86
+ activerecord (= 4.0.0)
87
+ activesupport (= 4.0.0)
88
+ bundler (>= 1.3.0, < 2.0)
89
+ railties (= 4.0.0)
90
+ sprockets-rails (~> 2.0.0)
91
+ railties (4.0.0)
92
+ actionpack (= 4.0.0)
93
+ activesupport (= 4.0.0)
94
+ rake (>= 0.8.7)
95
+ thor (>= 0.18.1, < 2.0)
96
+ rake (10.1.0)
97
+ ref (1.0.5)
98
+ rest-client (1.6.7)
99
+ mime-types (>= 1.16)
100
+ simplecov (0.7.1)
101
+ multi_json (~> 1.0)
102
+ simplecov-html (~> 0.7.1)
103
+ simplecov-html (0.7.1)
104
+ sprockets (2.10.0)
105
+ hike (~> 1.2)
106
+ multi_json (~> 1.0)
107
+ rack (~> 1.0)
108
+ tilt (~> 1.1, != 1.3.0)
109
+ sprockets-rails (2.0.0)
110
+ actionpack (>= 3.0)
111
+ activesupport (>= 3.0)
112
+ sprockets (~> 2.8)
113
+ sqlite3 (1.3.8)
114
+ therubyracer (0.12.0)
115
+ libv8 (~> 3.16.14.0)
116
+ ref
117
+ thor (0.18.1)
118
+ thread_safe (0.1.2)
119
+ atomic
120
+ tilt (1.4.1)
121
+ treetop (1.4.15)
122
+ polyglot
123
+ polyglot (>= 0.3.1)
124
+ turn (0.9.6)
125
+ ansi
126
+ tzinfo (0.3.37)
127
+ xpath (2.0.0)
128
+ nokogiri (~> 1.3)
129
+
130
+ PLATFORMS
131
+ ruby
132
+
133
+ DEPENDENCIES
134
+ capybara
135
+ coveralls
136
+ debugger
137
+ minitest (~> 4)
138
+ rake
139
+ simplecov
140
+ sqlite3
141
+ turn
142
+ twbs_sass_rails!
data/LICENSE ADDED
@@ -0,0 +1,30 @@
1
+ Copyright (c) 2013, diowa
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+ 2. Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
17
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
20
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
+
24
+ Twitter Bootstrap is licensed under the Apache License, Version 2.0
25
+
26
+ Font Awesome is licensed under the MIT License
27
+
28
+ Font Awesome font is licensed under the SIL Open Font License
29
+
30
+ Font Awesome pictograms are licensed under the CC BY 3.0 License
data/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Twbs Sass Rails
2
+ [![Build Status](https://secure.travis-ci.org/diowa/twbs_sass_rails.png?branch=master)](https://travis-ci.org/diowa/twbs_sass_rails)
3
+ [![Dependency Status](https://gemnasium.com/diowa/twbs_sass_rails.png)](https://gemnasium.com/diowa/twbs_sass_rails)
4
+ [![Code Climate](https://codeclimate.com/github/diowa/twbs_sass_rails.png)](https://codeclimate.com/github/diowa/twbs_sass_rails)
5
+ [![Coverage Status](https://coveralls.io/repos/diowa/twbs_sass_rails/badge.png?branch=master)](https://coveralls.io/r/diowa/twbs_sass_rails)
6
+
7
+ Brings [Bootstrap](http://getbootstrap.com/) and [Font Awesome](http://fontawesome.io) assets into your Rails application. **In Less, at the moment.**
8
+
9
+
10
+
11
+ ## Quick start
12
+
13
+ Add the gem to your Gemfile
14
+ ```rb
15
+ gem 'twbs_sass_rails'
16
+ ```
17
+
18
+ Run the generator
19
+ ```bash
20
+ $ rails g twbs_sass_rails:install
21
+ ```
22
+
23
+
24
+
25
+ ## Customization
26
+
27
+ ### Variables
28
+ Use `twbs-variables.css.less` to override Bootstrap defaults:
29
+ ```css
30
+ /* New variables */
31
+ @flat-ui-emerald: #2ecc71;
32
+ @flat-ui-nephritis: #27ae60;
33
+
34
+ @flat-ui-peter-river: #3498db;
35
+ @flat-ui-belize-hole: #2980b9;
36
+
37
+ /* Overrides */
38
+ @brand-primary: @flat-ui-belize-hole;
39
+ @brand-success: @flat-ui-nephritis;
40
+ ```
41
+ **NOTE**: Remember to import `twbs-variables.css.less` instead of `twbs/bootstrap/variables` in any new LESS file.
42
+
43
+ ### Icon Font
44
+ Twbs Sass Rails defaults with Font Awesome. If you want to switch to Glyphicons, edit your `twbs.css.less` as the following:
45
+ ```css
46
+ @import "twbs/bootstrap/glyphicons";
47
+ //@import "fontawesome/font-awesome";
48
+ ```
49
+
50
+ ### Bootstrap theme
51
+ If you want to use the [Bootstrap theme](http://getbootstrap.com/examples/theme/), uncomment `//@import "twbs/bootstrap/theme"` in your `twbs.css.less`.
52
+
53
+ ### Custom LESS components
54
+ If you want to exclude some LESS components, remove `@import "twbs/bootstrap";` from your `twbs.css.less` and add the components you need, e.g.:
55
+ ```css
56
+ // Core variables and mixins
57
+ @import "twbs/bootstrap/variables";
58
+ @import "twbs/bootstrap/mixins";
59
+
60
+ // Reset
61
+ @import "twbs/bootstrap/normalize";
62
+ @import "twbs/bootstrap/print";
63
+ /* ... */
64
+ ```
65
+ Take a look at [the whole list of LESS components](/vendor/assets/stylesheets/twbs/bootstrap/bootstrap.less). **Respect the order of the files and remember to edit paths**.
66
+
67
+ ### Custom Javascript components
68
+ If you want to exclude some Javascript components, remove `//= require twbs/bootstrap` from `twbs.js.coffee` and add the components you need, e.g:
69
+ ```js
70
+ /* ... */
71
+ //= require jquery_ujs
72
+ //= require twbs/bootstrap/transition
73
+ //= require twbs/bootstrap/alert
74
+ //= require twbs/bootstrap/button
75
+ //= require turbolinks
76
+ /* ... */
77
+ ```
78
+ Take a look at [the whole list of Javascript components](/vendor/assets/javascripts/twbs/bootstrap.js). **Respect the order of the files and remember to edit paths**.
79
+
80
+
81
+
82
+ ## Testing
83
+
84
+ To launch the tests against Rails 4, run from the root folder of the repository:
85
+ ```bash
86
+ BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rails-4.0.x rake
87
+ ```
88
+
89
+ For Rails 3.2 run instead:
90
+ ```bash
91
+ BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rails-3.2.x rake
92
+ ```
93
+
94
+
95
+
96
+ ## Versioning
97
+
98
+ For transparency and insight into our release cycle, and for striving to maintain backward compatibility, Twbs Sass Rails will be maintained under the Semantic Versioning guidelines as much as possible. Twbs Sass Rails will not follow Bootstrap's version number.
99
+
100
+ Releases will be numbered with the following format:
101
+
102
+ `<major>.<minor>.<patch>`
103
+
104
+ And constructed with the following guidelines:
105
+
106
+ * Breaking backward compatibility bumps the major (and resets the minor and patch)
107
+ * New additions without breaking backward compatibility bumps the minor (and resets the patch)
108
+ * Bug fixes and misc changes bumps the patch
109
+
110
+ For more information on SemVer, please visit [http://semver.org/](http://semver.org/).
111
+
112
+
113
+
114
+ ## Authors
115
+
116
+ **Geremia Taglialatela**
117
+
118
+ + http://github.com/tagliala
119
+ + http://twitter.com/gtagliala
120
+
121
+ **Cesidio Di Landa**
122
+
123
+ + http://github.com/cesidio
124
+ + http://twitter.com/cesid
125
+
126
+
127
+
128
+ ## Copyright and license
129
+
130
+ Copyright 2013 diowa under [the BSD 2-Clause license](LICENSE).
131
+
132
+ Twitter Bootstrap is licensed under the Apache License, Version 2.0
133
+
134
+ Font Awesome is licensed under the MIT License
135
+
136
+ Font Awesome font is licensed under the SIL Open Font License
137
+
138
+ Font Awesome pictograms are licensed under the CC BY 3.0 License
data/Rakefile ADDED
@@ -0,0 +1,108 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'TwbsSassRails'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ Bundler::GemHelper.install_tasks
18
+
19
+ require 'rake/testtask'
20
+
21
+ Rake::TestTask.new(:test) do |t|
22
+ t.libs << 'lib'
23
+ t.libs << 'test'
24
+ t.pattern = 'test/**/*_test.rb'
25
+ t.verbose = false
26
+ end
27
+
28
+ task default: :test
29
+
30
+ SOURCE_FILES = {
31
+ bootstrap_stylesheets: File.expand_path('src/twbs/bootstrap/less/*.less'),
32
+ bootstrap_javascripts: File.expand_path('src/twbs/bootstrap/js/*.js'),
33
+ fontawesome_stylesheets: File.expand_path('src/FortAwesome/Font-Awesome/less/*.less'),
34
+ glyphicons_fonts: File.expand_path('src/twbs/bootstrap/fonts/glyphicons-halflings-regular.*'),
35
+ fontawesome_fonts: File.expand_path('src/FortAwesome/Font-Awesome/font/fontawesome-webfont.*'),
36
+ }
37
+
38
+ DESTINATION_FOLDERS = {
39
+ bootstrap_stylesheets: File.expand_path('vendor/assets/stylesheets/twbs/bootstrap'),
40
+ bootstrap_javascripts: File.expand_path('vendor/assets/javascripts/twbs/bootstrap'),
41
+ fontawesome_stylesheets: File.expand_path('vendor/assets/stylesheets/fontawesome'),
42
+ glyphicons_fonts: File.expand_path('app/assets/fonts'),
43
+ fontawesome_fonts: File.expand_path('app/assets/fonts'),
44
+ }
45
+
46
+ desc "Update assets"
47
+ task :update_assets do
48
+ puts 'Updating submodules...'
49
+ `git submodule update --init`
50
+ `git submodule foreach git pull origin master`
51
+
52
+ puts 'Preparing destination folders...'
53
+ remove_content_from_destination_folders
54
+
55
+ puts 'Copying new assets...'
56
+ copy_source_files_to_destination_folders
57
+
58
+ puts 'Removing unneeded assets...'
59
+ FileUtils.rm_rf "#{DESTINATION_FOLDERS[:fontawesome_stylesheets]}/font-awesome-ie7.less"
60
+
61
+ puts 'Adding respond.js...'
62
+ FileUtils.cp File.expand_path('src/scottjehl/Respond/respond.src.js'), File.expand_path('vendor/assets/javascripts/respond.js')
63
+
64
+ puts 'Updating font paths...'
65
+ update_fontawesome_paths
66
+ update_glyphicons_paths
67
+
68
+ puts 'Disabling glyphicons...'
69
+ disable_glyphicons
70
+
71
+ puts 'Done. RUN TESTS NOW!'
72
+ end
73
+
74
+ def remove_content_from_destination_folders
75
+ DESTINATION_FOLDERS.each do |_, v|
76
+ FileUtils.rm_rf Dir.glob("#{v}/*")
77
+ end
78
+ end
79
+
80
+ def copy_source_files_to_destination_folders
81
+ SOURCE_FILES.each do |k, v|
82
+ FileUtils.cp Dir.glob(v), DESTINATION_FOLDERS[k]
83
+ end
84
+ end
85
+
86
+ def update_fontawesome_paths
87
+ file_name = "#{DESTINATION_FOLDERS[:fontawesome_stylesheets]}/path.less"
88
+ text = File.read(file_name)
89
+ text.gsub! /url\(\'@{FontAwesomePath}\/([\w\-.#]+)[^\)]*\)/, "asset-url('\\1')"
90
+ text.gsub! "fontawesome-webfont.eot') format('embedded-opentype')", "fontawesome-webfont.eot?\#iefix') format('embedded-opentype')"
91
+ text.gsub! "// src: asset-url('FontAwesome.otf') format('opentype'); // used when developing fonts", ''
92
+ File.open(file_name, 'w') { |file| file.puts text }
93
+ end
94
+
95
+ def update_glyphicons_paths
96
+ icon_font_name = File.read("#{DESTINATION_FOLDERS[:bootstrap_stylesheets]}/variables.less").match(/@icon\-font\-name:\s+"([^\"]+)"/)[1]
97
+ file_name = "#{DESTINATION_FOLDERS[:bootstrap_stylesheets]}/glyphicons.less"
98
+ text = File.read(file_name)
99
+ text.gsub! /url\(\'@{icon-font-path}@{icon-font-name}/, "asset-url('#{icon_font_name}"
100
+ File.open(file_name, 'w') { |file| file.puts text }
101
+ end
102
+
103
+ def disable_glyphicons
104
+ file_name = "#{DESTINATION_FOLDERS[:bootstrap_stylesheets]}/bootstrap.less"
105
+ text = File.read(file_name)
106
+ text.gsub! "@import \"glyphicons.less\";\n", ''
107
+ File.open(file_name, 'w') { |file| file.puts text }
108
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0