netguru_bootstrapper 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6d4d90f25164896fc98135d7d661bf16c393c295
4
+ data.tar.gz: 5141258a1c255dc13c5246efa590e5e339b479f0
5
+ SHA512:
6
+ metadata.gz: 968f1c316151bec48840e0c7486e272148c81fcfee91d6be351f0edcd01ec09459c97a9f181ae73bccd9482c55767389a53ced86ff3f9214aca8473c80b3ecc5
7
+ data.tar.gz: 5bc38cce505eadcda91e021ac81a5b7346332e10f142bf07ef1c03afa35ef4309d4193a5429575773ff953865352287235a025f2c2ee3c25011f38145fcb3346
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in netguru_bootstrapper.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Netguru
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # NetguruBootstrapper
2
+
3
+ This gem bootstraps [Bootstrap](http://getbootstrap.com/) for Rails apps.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+ ```
9
+ gem 'netguru_bootstrapper'
10
+ ```
11
+
12
+ And then execute:
13
+ ```
14
+ $ bundle
15
+ ```
16
+
17
+ ## Usage
18
+ ```
19
+ $ rails g netguru_bootstrapper:bootstrap
20
+ ```
21
+
22
+ ## Files organization
23
+
24
+ ### Tree structure
25
+ ```
26
+ ├── application.scss
27
+ ├── components
28
+ │ └── _your-custom-components-go-here.scss
29
+ ├── controllers
30
+ │ └── _your-controller-based-styles-go-here.scss
31
+ ├── settings
32
+ │ ├── _bootstrap-components.scss
33
+ │ ├── _bootstrap-overrides.scss
34
+ │ ├── _bootstrap-variables.scss
35
+ │ ├── _custom-variables.scss
36
+ │ └── bootstrap-overrides
37
+ │ └── _bootstrap-overrides-go-here.scss
38
+ └── utilities
39
+ ├── _functions.scss
40
+ ├── _mixins.scss
41
+ ├── _shared.scss
42
+ └── _typography.scss
43
+ ```
44
+
45
+ ### Important files
46
+
47
+ #### <code>settings/bootstrap-components.scss</code>
48
+ This file is a copy of [bootstrap.scss](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/_bootstrap.scss) file from [bootstrap-sass](https://github.com/twbs/bootstrap-sass) gem. You can comment out components that you're not going to use.
49
+
50
+ #### <code>settings/bootstrap-variables.scss</code>
51
+ Copy of [bootstrap/variables.scss](https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss). To override variable simply uncomment line and remove <code>!default</code> flag.
52
+
53
+ For example:
54
+ ```scss
55
+ // $font-size-base: 14px !default;
56
+ ```
57
+
58
+ Becomes:
59
+ ```scss
60
+ $font-size-base: 16px;
61
+ ```
62
+
63
+ #### <code>settings/bootstrap-overrides.scss</code>
64
+
65
+ Similar to Boostrap Components - all overrides are commented out by default. After uncommenting an override you need to add proper file to <code>settings/bootstrap-overrides</code> directory.
66
+
67
+
68
+ ## Contributing
69
+
70
+ 1. Fork it ( https://github.com/netguru/netguru_bootstrapper/fork )
71
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
72
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
73
+ 4. Push to the branch (`git push origin my-new-feature`)
74
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,7 @@
1
+ require 'rails'
2
+ require 'netguru_bootstrapper/generators/netguru_bootstrapper/bootstrap_generator'
3
+
4
+ module Gemname
5
+ class Engine < Rails::Engine
6
+ end
7
+ end
@@ -0,0 +1,41 @@
1
+ require 'rails/generators'
2
+ require 'netguru_bootstrapper/structure_parser'
3
+
4
+ module NetguruBootstrapper
5
+ module Generators
6
+ class BootstrapGenerator < ::Rails::Generators::Base
7
+ desc 'Bootstrap CSS generator'
8
+ source_root File.expand_path('../../templates', __FILE__)
9
+
10
+ def create_root_file
11
+ template 'application.scss', "#{base_path}/application.scss"
12
+ end
13
+
14
+ def create_directories
15
+ structure.directories.each do |dir|
16
+ empty_directory "#{base_path}/#{dir}"
17
+ create_files(dir, structure.files[dir])
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def structure
24
+ StructureParser.new
25
+ end
26
+
27
+ def create_files(dir, files)
28
+ return create_file "#{base_path}/#{dir}/.gitkeep" if files.nil?
29
+ files.each { |file| copy_template(dir, file) }
30
+ end
31
+
32
+ def copy_template(dir, file)
33
+ template "#{dir}/#{file}.scss", "#{base_path}/#{dir}/#{file}.scss"
34
+ end
35
+
36
+ def base_path
37
+ 'app/assets/stylesheets'
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,13 @@
1
+ @import 'bootstrap-sprockets';
2
+
3
+ @import 'settings/z-index-variables';
4
+ @import 'settings/custom-variables';
5
+ @import 'settings/bootstrap-variables';
6
+
7
+ @import 'utilities/functions';
8
+ @import 'utilities/mixins';
9
+ @import 'utilities/shared';
10
+ @import 'utilities/typography';
11
+
12
+ @import 'settings/bootstrap-components';
13
+ @import 'settings/bootstrap-overrides';
@@ -0,0 +1,53 @@
1
+ // Please do not change the order of these files. More more information see:
2
+ // https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/_bootstrap.scss
3
+
4
+ // Core variables and mixins
5
+ @import "bootstrap/variables";
6
+ @import "bootstrap/mixins";
7
+
8
+ // Reset and dependencies
9
+ @import "bootstrap/normalize";
10
+ @import "bootstrap/print";
11
+ @import "bootstrap/glyphicons";
12
+
13
+ // Core CSS
14
+ @import "bootstrap/scaffolding";
15
+ @import "bootstrap/type";
16
+ @import "bootstrap/code";
17
+ @import "bootstrap/grid";
18
+ @import "bootstrap/tables";
19
+ @import "bootstrap/forms";
20
+ @import "bootstrap/buttons";
21
+
22
+ // Components
23
+ @import "bootstrap/component-animations";
24
+ @import "bootstrap/dropdowns";
25
+ @import "bootstrap/button-groups";
26
+ @import "bootstrap/input-groups";
27
+ @import "bootstrap/navs";
28
+ @import "bootstrap/navbar";
29
+ @import "bootstrap/breadcrumbs";
30
+ @import "bootstrap/pagination";
31
+ @import "bootstrap/pager";
32
+ @import "bootstrap/labels";
33
+ @import "bootstrap/badges";
34
+ @import "bootstrap/jumbotron";
35
+ @import "bootstrap/thumbnails";
36
+ @import "bootstrap/alerts";
37
+ @import "bootstrap/progress-bars";
38
+ @import "bootstrap/media";
39
+ @import "bootstrap/list-group";
40
+ @import "bootstrap/panels";
41
+ @import "bootstrap/responsive-embed";
42
+ @import "bootstrap/wells";
43
+ @import "bootstrap/close";
44
+
45
+ // Components w/ JavaScript
46
+ @import "bootstrap/modals";
47
+ @import "bootstrap/tooltip";
48
+ @import "bootstrap/popovers";
49
+ @import "bootstrap/carousel";
50
+
51
+ // Utility classes
52
+ @import "bootstrap/utilities";
53
+ @import "bootstrap/responsive-utilities";
@@ -0,0 +1,53 @@
1
+ // Please do not change the order of these files. More more information see:
2
+ // https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/_bootstrap.scss
3
+
4
+ // Core variables and mixins
5
+ // @import "bootstrap-overrides/variables";
6
+ // @import "bootstrap-overrides/mixins";
7
+
8
+ // Reset and dependencies
9
+ // @import "bootstrap-overrides/normalize";
10
+ // @import "bootstrap-overrides/print";
11
+ // @import "bootstrap-overrides/glyphicons";
12
+
13
+ // Core CSS
14
+ // @import "bootstrap-overrides/scaffolding";
15
+ // @import "bootstrap-overrides/type";
16
+ // @import "bootstrap-overrides/code";
17
+ // @import "bootstrap-overrides/grid";
18
+ // @import "bootstrap-overrides/tables";
19
+ // @import "bootstrap-overrides/forms";
20
+ // @import "bootstrap-overrides/buttons";
21
+
22
+ // Components
23
+ // @import "bootstrap-overrides/component-animations";
24
+ // @import "bootstrap-overrides/dropdowns";
25
+ // @import "bootstrap-overrides/button-groups";
26
+ // @import "bootstrap-overrides/input-groups";
27
+ // @import "bootstrap-overrides/navs";
28
+ // @import "bootstrap-overrides/navbar";
29
+ // @import "bootstrap-overrides/breadcrumbs";
30
+ // @import "bootstrap-overrides/pagination";
31
+ // @import "bootstrap-overrides/pager";
32
+ // @import "bootstrap-overrides/labels";
33
+ // @import "bootstrap-overrides/badges";
34
+ // @import "bootstrap-overrides/jumbotron";
35
+ // @import "bootstrap-overrides/thumbnails";
36
+ // @import "bootstrap-overrides/alerts";
37
+ // @import "bootstrap-overrides/progress-bars";
38
+ // @import "bootstrap-overrides/media";
39
+ // @import "bootstrap-overrides/list-group";
40
+ // @import "bootstrap-overrides/panels";
41
+ // @import "bootstrap-overrides/responsive-embed";
42
+ // @import "bootstrap-overrides/wells";
43
+ // @import "bootstrap-overrides/close";
44
+
45
+ // Components w/ JavaScript
46
+ // @import "bootstrap-overrides/modals";
47
+ // @import "bootstrap-overrides/tooltip";
48
+ // @import "bootstrap-overrides/popovers";
49
+ // @import "bootstrap-overrides/carousel";
50
+
51
+ // Utility classes
52
+ // @import "bootstrap-overrides/utilities";
53
+ // @import "bootstrap-overrides/responsive-utilities";