less-rails-bootstrap 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG.md +39 -64
- data/README.md +30 -5
- data/lib/generators/less_rails_bootstrap/custom_bootstrap/custom_bootstrap_generator.rb +67 -0
- data/lib/less/rails/bootstrap/version.rb +1 -1
- data/scripts/update_bootstrap.sh +4 -6
- metadata +14 -29
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YzBkMGEyODJjZWJhNjM1MmI3ZDJkYmUwM2NiM2ZkNGZkY2Y2Zjg0OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZDU0MTk2ZTM4YTI4NTQ2NDUwZTUwZjg3MDRkOTc0NjM5ZDg5OGRkZA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDE1M2JkYTNmYWE4YTI1NTY3YmE2MmFmYzg4ZmRmYmQ3MDQ0MTUwZWM4ZDA4
|
10
|
+
ZDdkYzE2M2U3YTY1ZmE2NmEwNjY5OThiZmE4NTk0NTU2MjAyNWMzZjQxMWQw
|
11
|
+
OGJlNjU5ODgyZTRkZWJhZTgwZmY5OWVhM2YzYWRkMmZiZDA1NjU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NzQ2ODk5MWY3ZGUwMWY3ZjhmOGQ0OTU2ZDEwYjUyYmVkZjYyNGFlZDNjNGQz
|
14
|
+
NDIzNDRiZDQ0NmE2YWIwM2QwODAzYTg3NDkwYjFjMDVhMGZjOWM1ODYzYmU2
|
15
|
+
NTNjODg1YTEzY2VmNjZiOWM4ODJkZjYzNzgyYTNjMzNjOTdmYzU=
|
data/CHANGELOG.md
CHANGED
@@ -1,154 +1,129 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
=========
|
3
1
|
|
4
|
-
3.0.
|
2
|
+
# 3.0.2 - 2013-09-01
|
3
|
+
|
4
|
+
* Cross platform update script.
|
5
|
+
* Implement Rails generator to simplify customization of Bootstrap.
|
6
|
+
* Generate bootstrap.js from twitter/bootstrap/Gruntfile.js
|
7
|
+
|
8
|
+
# 3.0.1 - 2013-08-29
|
9
|
+
|
10
|
+
* Another proper 3.0.0 bootstrap release.
|
11
|
+
|
12
|
+
# 3.0.0.1 - 2013-08-20
|
5
13
|
|
6
14
|
* proper 3.0.0 release
|
7
15
|
|
8
|
-
3.0.0 (yanked) - 20
|
16
|
+
# 3.0.0 (yanked) - 2013-08-20
|
9
17
|
|
10
18
|
* Update boostrap to 3.0.0
|
11
19
|
|
12
|
-
2.3.3 - 03
|
20
|
+
# 2.3.3 - 2013-03-07
|
13
21
|
|
14
22
|
* Update boostrap to 2.3.2.
|
15
23
|
|
16
|
-
|
17
|
-
2.3.2 - 03/06/2013
|
24
|
+
# 2.3.2 - 2013-03-07
|
18
25
|
|
19
26
|
* Update to less-rails 2.3.1. Really uses less v1.3.3
|
20
27
|
* Update boostrap to 2.3.1.
|
21
28
|
|
22
|
-
|
23
|
-
2.3.1 - 03/06/2013
|
29
|
+
# 2.3.1 - 2013-03-06
|
24
30
|
|
25
31
|
* Update to less-rails 2.3.0.
|
26
32
|
|
27
|
-
|
28
|
-
2.3.0 - 02/24/2013
|
33
|
+
# 2.3.0 - 2013-01-24
|
29
34
|
|
30
35
|
* Update boostrap to 2.3.0. Thanks to all that helped!
|
31
36
|
|
32
|
-
|
33
|
-
2.2.1 - 01/14/2013
|
37
|
+
# 2.2.1 - 2013-01-14
|
34
38
|
|
35
39
|
* Update bootstrap to 2.2.2. Thanks to @trentclowater
|
36
40
|
|
37
|
-
|
38
|
-
2.2.0 - 10/31/2012
|
41
|
+
# 2.2.0 - 2012-10-31
|
39
42
|
|
40
43
|
* Update bootstrap to 2.2.1. Thanks to @spider-network
|
41
44
|
|
42
|
-
|
43
|
-
2.1.1 - 09/05/2012
|
45
|
+
# 2.1.1 - 2012-09-05
|
44
46
|
|
45
47
|
* Use bootstrap 2.1.1. Thanks @erdah.
|
46
48
|
|
47
|
-
|
48
|
-
2.1.0 - 08/21/2012
|
49
|
+
# 2.1.0 - 2012-08-20
|
49
50
|
|
50
51
|
* Use bootstrap 2.1.0. Thanks @vickash.
|
51
52
|
|
52
|
-
|
53
|
-
2.0.13 - 06/07/2012
|
53
|
+
# 2.0.13 - 2012-06-07
|
54
54
|
|
55
55
|
* Update to bootstrap 2.0.4.
|
56
56
|
|
57
|
-
|
58
|
-
2.0.12 - 04/25/2012
|
57
|
+
# 2.0.12 - 2012-04-25
|
59
58
|
|
60
59
|
* Work with latest less.rb v2.2.1.
|
61
60
|
|
62
|
-
|
63
|
-
2.0.11 - 04/25/2012
|
61
|
+
# 2.0.11 - 2012-04-25
|
64
62
|
|
65
63
|
* Update to bootstrap 2.0.3.
|
66
64
|
|
67
|
-
|
68
|
-
2.0.10 - 04/04/2012
|
65
|
+
# 2.0.10 - 2012-04-04
|
69
66
|
|
70
67
|
* Include a way to require the responsive responsive file.
|
71
68
|
|
72
|
-
|
73
|
-
2.0.9 - 04/04/2012
|
69
|
+
# 2.0.9 - 2012-04-04
|
74
70
|
|
75
71
|
* Bumping the less-rails depedency so everyone can use therubyracer 0.10.0.
|
76
72
|
|
77
|
-
|
78
|
-
2.0.8 - 03/13/2012
|
73
|
+
# 2.0.8 - 2012-03-13
|
79
74
|
|
80
75
|
* Fix icon sprite paths. Seems they are real paths now.
|
81
76
|
|
82
|
-
|
83
|
-
2.0.7 - 03/13/2012
|
77
|
+
# 2.0.7 - 2012-03-13
|
84
78
|
|
85
79
|
* Update to official bootstrap 2.0.2
|
86
80
|
|
87
|
-
|
88
|
-
2.0.6 - 02/15/2012
|
81
|
+
# 2.0.6 - 2012-02-15
|
89
82
|
|
90
83
|
* Update to official bootstrap 2.0.1
|
91
84
|
|
92
|
-
|
93
|
-
2.0.5 - 02/15/2012
|
85
|
+
# 2.0.5 - 2012-02-15
|
94
86
|
|
95
87
|
* Fix .nav-list .active > a:hover Fixes #30
|
96
88
|
|
97
|
-
|
98
|
-
2.0.3, 2.0.4 - 02-03/2012
|
89
|
+
# 2.0.3, 2.0.4 - 02-03/2012
|
99
90
|
|
100
91
|
* Fix IE9 background hack from bootstrap upstream.
|
101
92
|
* Misc border-radius 0px fixes.
|
102
93
|
|
103
|
-
|
104
|
-
2.0.2 - 02/01/2012
|
94
|
+
# 2.0.2 - 2012-02-01
|
105
95
|
|
106
96
|
* Change require order for tooltip.js [Rufus Post]
|
107
97
|
|
108
|
-
|
109
|
-
2.0.1 - 01/31/2012
|
98
|
+
# 2.0.1 - 2012-01-31
|
110
99
|
|
111
100
|
* Package up Glyphicons and use less-rails' asset-url() helper.
|
112
101
|
|
113
|
-
|
114
|
-
2.0.0 - 01/31/2012
|
102
|
+
# 2.0.0 - 2012-01-31
|
115
103
|
|
116
104
|
* Update to Twitter Bootstrap 2.0.0
|
117
105
|
|
118
|
-
|
119
|
-
1.4.1 - 11/18/2011
|
120
|
-
------------------
|
106
|
+
# 1.4.1 - 2011-11-18
|
121
107
|
|
122
108
|
* Update to use less-rails ~> 2.1.0
|
123
109
|
|
124
|
-
|
125
|
-
1.4.0 - 11/05/2011
|
126
|
-
------------------
|
110
|
+
# 1.4.0 - 2011-11-05
|
127
111
|
|
128
112
|
* Bootstrap update (f92759b36db43e782e4235f1f214ac5851383f9b)
|
129
113
|
|
130
|
-
|
131
|
-
1.3.3 - 10/09/2011
|
132
|
-
------------------
|
114
|
+
# 1.3.3 - 2011-10-09
|
133
115
|
|
134
116
|
* Move bootstrap LESS files to vendor/frameworks. Should fix assets:precompile bugs.
|
135
117
|
* New test setup and hopefully a more sane engine initializer.
|
136
118
|
|
137
|
-
|
138
|
-
1.3.2 - 09/28/2011
|
139
|
-
------------------
|
119
|
+
# 1.3.2 - 2011-09-28
|
140
120
|
|
141
121
|
* Require less-rails properly. Thanks Benoit Bénézech (bbenezech).
|
142
122
|
|
143
|
-
|
144
|
-
1.3.1 - 09/26/2011
|
145
|
-
------------------
|
123
|
+
# 1.3.1 - 2011-09-26
|
146
124
|
|
147
125
|
* Require twipsy before popover [stratequip]
|
148
126
|
|
149
|
-
|
150
|
-
1.3.0 - 09/25/2011
|
151
|
-
------------------
|
127
|
+
# 1.3.0 - 2011-09-25
|
152
128
|
|
153
129
|
* Initial 1.3.0 release (68605bdd51760a929cc661607f06f479c53b0bee)
|
154
|
-
|
data/README.md
CHANGED
@@ -26,14 +26,39 @@ gem 'less-rails-bootstrap'
|
|
26
26
|
|
27
27
|
## Basic CSS Use
|
28
28
|
|
29
|
+
### Simple way
|
30
|
+
|
29
31
|
Get the full Bootstrap stylesheet with a single line in your `application.css`.
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
```
|
34
|
+
/*
|
35
|
+
*= require twitter/bootstrap
|
36
|
+
*/
|
37
|
+
```
|
38
|
+
|
39
|
+
### Advanced way
|
40
|
+
|
41
|
+
In case when you just want to modify several LESS variables (i.e. change text color, etc.) and don't want to thinking about [Full Control & Customization](https://github.com/metaskills/less-rails-bootstrap-test#full-control--customization) you can run Rails generator:
|
42
|
+
|
43
|
+
```
|
44
|
+
rails generate less_rails_bootstrap:custom_bootstrap
|
45
|
+
```
|
46
|
+
|
47
|
+
It generates three files:
|
48
|
+
|
49
|
+
* `app/assets/stylesheets/custom_bootstrap/custom_bootstrap.less` - auto-generated file base on bootstrap.less file from original Twitter Bootstrap. Don't modify it!
|
50
|
+
* `app/assets/stylesheets/custom_bootstrap/variables.less` - in this file you can override Twitter Bootstrap variables or define own
|
51
|
+
* `app/assets/stylesheets/custom_bootstrap/mixins.less` - in this file you can override Twitter Bootstrap mixins or define own
|
52
|
+
|
53
|
+
Then just add single line to `application.css`.
|
54
|
+
|
55
|
+
```
|
56
|
+
/*
|
57
|
+
*= require custom_bootstrap/custom_bootstrap
|
58
|
+
*/
|
59
|
+
```
|
35
60
|
|
36
|
-
Please see the [less-rails-bootstrap-test](http://github.com/metaskills/less-rails-bootstrap-test) repo for examples that customize the CSS output by using LESS. The "CSS Tests Suites" section of the README and code is what you want to focus on. Also, check out the [LESS syntax](http://lesscss.org/).
|
61
|
+
> Please see the [less-rails-bootstrap-test](http://github.com/metaskills/less-rails-bootstrap-test) repo for examples that customize the CSS output by using LESS. The "CSS Tests Suites" section of the README and code is what you want to focus on. Also, check out the [LESS syntax](http://lesscss.org/).
|
37
62
|
|
38
63
|
## Basic JavaScript Use
|
39
64
|
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module LessRailsBootstrap
|
2
|
+
module Generators
|
3
|
+
class CustomBootstrapGenerator < Rails::Generators::Base
|
4
|
+
|
5
|
+
desc 'Generate custom_bootstrap.less for override Twitter Bootstrap variables and mixins'
|
6
|
+
|
7
|
+
def create_custom_bootstrap
|
8
|
+
create_file 'app/assets/stylesheets/custom_bootstrap/custom_bootstrap.less' do
|
9
|
+
gem_app_dir = File.expand_path('../../../../../app', __FILE__)
|
10
|
+
source_file = File.join(gem_app_dir, 'frameworks', 'twitter', 'bootstrap', 'bootstrap.less')
|
11
|
+
|
12
|
+
lines = File.readlines(source_file)
|
13
|
+
|
14
|
+
lines = change_paths_to_less_files(lines)
|
15
|
+
lines = insert_custom_less_files(lines)
|
16
|
+
lines = insert_header(lines)
|
17
|
+
|
18
|
+
lines.join
|
19
|
+
end
|
20
|
+
|
21
|
+
create_file 'app/assets/stylesheets/custom_bootstrap/variables.less', skip: true do
|
22
|
+
"// Use this file to override Twitter Bootstrap variables or define own variables.\n"
|
23
|
+
end
|
24
|
+
|
25
|
+
create_file 'app/assets/stylesheets/custom_bootstrap/mixins.less', skip: true do
|
26
|
+
"// Use this file to override Twitter Bootstrap mixins or define own mixins.\n"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def insert_header(lines)
|
33
|
+
header_lines = []
|
34
|
+
header_lines << "// #{'!' * 51}\n"
|
35
|
+
header_lines << "// !!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!\n"
|
36
|
+
header_lines << "// #{'!' * 51}\n"
|
37
|
+
header_lines << "\n"
|
38
|
+
|
39
|
+
header_lines + lines
|
40
|
+
end
|
41
|
+
|
42
|
+
def change_paths_to_less_files(lines)
|
43
|
+
lines.each do |line|
|
44
|
+
line.gsub!(/(@import ")(.+)(";)/, '\1twitter/bootstrap/\2\3')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def insert_custom_less_files(lines)
|
49
|
+
lines.inject([]) do |result, line|
|
50
|
+
result << line
|
51
|
+
|
52
|
+
case line
|
53
|
+
when /variables.less/
|
54
|
+
result << %Q(@import "custom_bootstrap/variables.less"; // Modify this for custom colors, font-sizes, etc\n)
|
55
|
+
when /mixins.less/
|
56
|
+
result << %Q(@import "custom_bootstrap/mixins.less"; // Modify this for custom mixins\n)
|
57
|
+
end
|
58
|
+
|
59
|
+
result
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
data/scripts/update_bootstrap.sh
CHANGED
@@ -76,14 +76,12 @@ for f in $bs_dir/less/*.less; do
|
|
76
76
|
done
|
77
77
|
|
78
78
|
info "Apply patches..."
|
79
|
-
|
80
|
-
sed
|
79
|
+
[[ $(uname -s) == 'Darwin' ]] && ioption=(-i "") || ioption=(-i)
|
80
|
+
sed "${ioption[@]}" 's#^\(@icon-font-path:[[:space:]]*\"\).*\(\";\)#\1twitter/bootstrap/\2#g' $lrb_fw_dir/variables.less
|
81
|
+
sed "${ioption[@]}" 's#url(#asset-url(#g' $lrb_fw_dir/*.less
|
81
82
|
|
82
83
|
info "Generate bootstrap.js..."
|
83
|
-
|
84
|
-
bn=$(basename $f)
|
85
|
-
echo "//= require twitter/bootstrap/$bn" >> $lrb_bootstrap_js
|
86
|
-
done
|
84
|
+
sed -n "s#.*'js/\([a-z]\{1,\}\.js\)'.*#//= require twitter/bootstrap/\1#p" twitter/bootstrap/Gruntfile.js >> $lrb_bootstrap_js
|
87
85
|
|
88
86
|
info "Generate bootstrap.css.less..."
|
89
87
|
mkdir -p $lrb_styles_dir
|
metadata
CHANGED
@@ -1,80 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: less-rails-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 3.0.1
|
4
|
+
version: 3.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Ken Collins
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-09-01 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: less-rails
|
16
|
-
type: :runtime
|
17
14
|
requirement: !ruby/object:Gem::Requirement
|
18
15
|
requirements:
|
19
16
|
- - ~>
|
20
17
|
- !ruby/object:Gem::Version
|
21
18
|
version: 2.3.1
|
22
|
-
none: false
|
23
19
|
version_requirements: !ruby/object:Gem::Requirement
|
24
20
|
requirements:
|
25
21
|
- - ~>
|
26
22
|
- !ruby/object:Gem::Version
|
27
23
|
version: 2.3.1
|
28
|
-
|
24
|
+
type: :runtime
|
29
25
|
prerelease: false
|
26
|
+
name: less-rails
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
|
-
name: minitest
|
32
|
-
type: :development
|
33
28
|
requirement: !ruby/object:Gem::Requirement
|
34
29
|
requirements:
|
35
30
|
- - ! '>='
|
36
31
|
- !ruby/object:Gem::Version
|
37
32
|
version: '0'
|
38
|
-
none: false
|
39
33
|
version_requirements: !ruby/object:Gem::Requirement
|
40
34
|
requirements:
|
41
35
|
- - ! '>='
|
42
36
|
- !ruby/object:Gem::Version
|
43
37
|
version: '0'
|
44
|
-
|
38
|
+
type: :development
|
45
39
|
prerelease: false
|
40
|
+
name: minitest
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
|
-
name: guard-minitest
|
48
|
-
type: :development
|
49
42
|
requirement: !ruby/object:Gem::Requirement
|
50
43
|
requirements:
|
51
44
|
- - ! '>='
|
52
45
|
- !ruby/object:Gem::Version
|
53
46
|
version: '0'
|
54
|
-
none: false
|
55
47
|
version_requirements: !ruby/object:Gem::Requirement
|
56
48
|
requirements:
|
57
49
|
- - ! '>='
|
58
50
|
- !ruby/object:Gem::Version
|
59
51
|
version: '0'
|
60
|
-
|
52
|
+
type: :development
|
61
53
|
prerelease: false
|
54
|
+
name: guard-minitest
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
|
-
name: rails
|
64
|
-
type: :development
|
65
56
|
requirement: !ruby/object:Gem::Requirement
|
66
57
|
requirements:
|
67
58
|
- - ~>
|
68
59
|
- !ruby/object:Gem::Version
|
69
60
|
version: '3.1'
|
70
|
-
none: false
|
71
61
|
version_requirements: !ruby/object:Gem::Requirement
|
72
62
|
requirements:
|
73
63
|
- - ~>
|
74
64
|
- !ruby/object:Gem::Version
|
75
65
|
version: '3.1'
|
76
|
-
|
66
|
+
type: :development
|
77
67
|
prerelease: false
|
68
|
+
name: rails
|
78
69
|
description: CSS toolkit from Twitter For Rails 3.1 Asset Pipeline. Best one of all!
|
79
70
|
email:
|
80
71
|
- ken@metaskills.net
|
@@ -149,6 +140,7 @@ files:
|
|
149
140
|
- app/frameworks/twitter/bootstrap/variables.less
|
150
141
|
- app/frameworks/twitter/bootstrap/wells.less
|
151
142
|
- less-rails-bootstrap.gemspec
|
143
|
+
- lib/generators/less_rails_bootstrap/custom_bootstrap/custom_bootstrap_generator.rb
|
152
144
|
- lib/less-rails-bootstrap.rb
|
153
145
|
- lib/less/rails/bootstrap.rb
|
154
146
|
- lib/less/rails/bootstrap/engine.rb
|
@@ -167,6 +159,7 @@ files:
|
|
167
159
|
- test/spec_helper.rb
|
168
160
|
homepage: http://github.com/metaskills/less-rails-bootstrap
|
169
161
|
licenses: []
|
162
|
+
metadata: {}
|
170
163
|
post_install_message:
|
171
164
|
rdoc_options: []
|
172
165
|
require_paths:
|
@@ -175,25 +168,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
168
|
requirements:
|
176
169
|
- - ! '>='
|
177
170
|
- !ruby/object:Gem::Version
|
178
|
-
segments:
|
179
|
-
- 0
|
180
|
-
hash: -2979729463445026121
|
181
171
|
version: '0'
|
182
|
-
none: false
|
183
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
173
|
requirements:
|
185
174
|
- - ! '>='
|
186
175
|
- !ruby/object:Gem::Version
|
187
|
-
segments:
|
188
|
-
- 0
|
189
|
-
hash: -2979729463445026121
|
190
176
|
version: '0'
|
191
|
-
none: false
|
192
177
|
requirements: []
|
193
178
|
rubyforge_project:
|
194
|
-
rubygems_version:
|
179
|
+
rubygems_version: 2.0.7
|
195
180
|
signing_key:
|
196
|
-
specification_version:
|
181
|
+
specification_version: 4
|
197
182
|
summary: CSS toolkit from Twitter For Rails 3.1 Asset Pipeline
|
198
183
|
test_files:
|
199
184
|
- test/cases/engine_spec.rb
|