blueberry_rails 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +12 -1
- data/blueberry_rails.gemspec +17 -18
- data/lib/blueberry_rails/action_helpers.rb +4 -0
- data/lib/blueberry_rails/app_builder.rb +151 -18
- data/lib/blueberry_rails/generators/app_generator.rb +60 -2
- data/lib/blueberry_rails/version.rb +1 -1
- data/spec/blueberry_rails_spec.rb +42 -1
- data/spec/support/blueberry_rails_helpers.rb +1 -1
- data/templates/Gemfile_custom.erb +20 -5
- data/templates/admin_assets/javascripts/admin.coffee +6 -0
- data/templates/admin_assets/javascripts/admin/.keep +0 -0
- data/templates/admin_assets/stylesheets/admin.sass +4 -0
- data/templates/admin_assets/stylesheets/admin/.keep +0 -0
- data/templates/admin_controllers/base_controller.rb +6 -0
- data/templates/admin_controllers/dashboard_controller.rb +6 -0
- data/templates/admin_views/dashboard/show.html.slim +12 -0
- data/templates/admin_views/partials/_menu.html.slim +13 -0
- data/templates/assets/icons/_font_icons.scss +18 -0
- data/templates/assets/images/blueberry-logo.png +0 -0
- data/templates/assets/javascripts/application.coffee +6 -0
- data/templates/assets/javascripts/common/.keep +0 -0
- data/templates/assets/javascripts/frontend/.keep +0 -0
- data/templates/assets/stylesheets/application.sass +17 -0
- data/templates/assets/stylesheets/frontend/base/buttons.sass +0 -0
- data/templates/assets/stylesheets/frontend/base/fonts.sass +0 -0
- data/templates/assets/stylesheets/frontend/base/typo.sass +0 -0
- data/templates/assets/stylesheets/frontend/common/bootstrap-ms.sass +128 -0
- data/templates/assets/stylesheets/frontend/common/bootstrap-override.sass +4 -0
- data/templates/assets/stylesheets/frontend/common/variables.sass +26 -0
- data/templates/assets/stylesheets/frontend/components/.keep +0 -0
- data/templates/assets/stylesheets/frontend/components/navigation.sass +0 -0
- data/templates/assets/stylesheets/frontend/layout/body.sass +0 -0
- data/templates/assets/stylesheets/frontend/layout/footer.sass +0 -0
- data/templates/assets/stylesheets/frontend/layout/header.sass +0 -0
- data/templates/assets/stylesheets/frontend/pages/.keep +0 -0
- data/templates/assets/stylesheets/frontend/third-party/includes.sass +1 -0
- data/templates/assets/stylesheets/frontend/utils/functions.sass +23 -0
- data/templates/assets/stylesheets/frontend/utils/make-columns.sass +67 -0
- data/templates/assets/stylesheets/frontend/utils/mixins.sass +24 -0
- data/templates/assets/stylesheets/frontend/utils/render-to.sass +27 -0
- data/templates/assets/stylesheets/frontend/utils/renderto-debug.sass +22 -0
- data/templates/assets/stylesheets/ie.sass +0 -0
- data/templates/assets/stylesheets/print.sass +0 -0
- data/templates/config/initializers/airbrake.rb +6 -0
- data/templates/config/initializers/simple_form_bootstrap.rb +151 -0
- data/templates/config/initializers/translation_engine.rb +23 -0
- data/templates/controllers/errors_controller.rb +13 -0
- data/templates/fontcustom.yml +22 -0
- data/templates/helpers/application_helper.rb +23 -0
- data/templates/helpers/body_class_helper.rb +16 -0
- data/templates/helpers/gtm_helper.rb +30 -0
- data/templates/helpers/images_helper.rb +13 -0
- data/templates/locales/cs/cs.devise.yml +69 -0
- data/templates/locales/cs/cs.meta.yml +5 -0
- data/templates/locales/cs/cs.rails.yml +211 -0
- data/templates/locales/cs/cs.yml +4 -0
- data/templates/locales/en/en.meta.yml +5 -0
- data/templates/locales/en/en.yml +4 -0
- data/templates/public/icons/android-icon-144x144.png +0 -0
- data/templates/public/icons/android-icon-192x192.png +0 -0
- data/templates/public/icons/android-icon-36x36.png +0 -0
- data/templates/public/icons/android-icon-48x48.png +0 -0
- data/templates/public/icons/android-icon-72x72.png +0 -0
- data/templates/public/icons/android-icon-96x96.png +0 -0
- data/templates/public/icons/apple-icon-114x114.png +0 -0
- data/templates/public/icons/apple-icon-120x120.png +0 -0
- data/templates/public/icons/apple-icon-144x144.png +0 -0
- data/templates/public/icons/apple-icon-152x152.png +0 -0
- data/templates/public/icons/apple-icon-180x180.png +0 -0
- data/templates/public/icons/apple-icon-57x57.png +0 -0
- data/templates/public/icons/apple-icon-60x60.png +0 -0
- data/templates/public/icons/apple-icon-72x72.png +0 -0
- data/templates/public/icons/apple-icon-76x76.png +0 -0
- data/templates/public/icons/apple-icon-precomposed.png +0 -0
- data/templates/public/icons/apple-icon.png +0 -0
- data/templates/public/icons/favicon-16x16.png +0 -0
- data/templates/public/icons/favicon-32x32.png +0 -0
- data/templates/public/icons/favicon-96x96.png +0 -0
- data/templates/public/icons/favicon.ico +0 -0
- data/templates/public/icons/ms-icon-144x144.png +0 -0
- data/templates/public/icons/ms-icon-150x150.png +0 -0
- data/templates/public/icons/ms-icon-310x310.png +0 -0
- data/templates/public/icons/ms-icon-70x70.png +0 -0
- data/templates/{root_controller_spec.rb → spec/controllers/root_controller_spec.rb} +0 -0
- data/templates/{database_cleaner_setup.rb → spec/database_cleaner_setup.rb} +0 -0
- data/templates/spec/factories/administrators.rb +6 -0
- data/templates/{users_factory.rb → spec/factories/users.rb} +0 -0
- data/templates/{factories_spec.rb → spec/factories_spec.rb} +0 -0
- data/templates/{factory_girl_syntax.rb → spec/factory_girl_syntax.rb} +0 -0
- data/templates/{mail_body_helpers.rb → spec/mail_body_helpers.rb} +0 -0
- data/templates/{spec_helper.rb → spec/spec_helper.rb} +5 -0
- data/templates/tasks/icons.rake +19 -0
- data/templates/tasks/images.rake +12 -0
- data/templates/travis.yml.erb +19 -18
- data/templates/views/application/_favicon.html.slim +16 -0
- data/templates/views/application/_flashes.html.slim +5 -0
- data/templates/views/application/_footer.html.slim +1 -0
- data/templates/views/application/_gtm.html.slim +7 -0
- data/templates/views/application/_header.html.slim +1 -0
- data/templates/views/layouts/admin.html.slim.erb +21 -0
- data/templates/views/layouts/application.html.slim.erb +26 -0
- metadata +95 -12
- data/templates/_flashes.html.slim +0 -5
- data/templates/layout.html.slim +0 -15
@@ -38,7 +38,7 @@ class BlueberryRailsTest < Minitest::Test
|
|
38
38
|
assert_exist_file 'config/deploy/staging.rb'
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
41
|
+
def test_rake_runs_with_no_devise_option
|
42
42
|
create_project '--no-devise'
|
43
43
|
|
44
44
|
assert run_rake
|
@@ -49,6 +49,47 @@ class BlueberryRailsTest < Minitest::Test
|
|
49
49
|
|
50
50
|
assert_exist_file 'config/initializers/simple_form.rb'
|
51
51
|
assert_exist_file 'config/initializers/simple_form_bootstrap.rb'
|
52
|
+
|
53
|
+
assert_file_have_content 'config/initializers/simple_form_bootstrap.rb', 'form-control-wrapper'
|
54
|
+
|
55
|
+
assert run_rake
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_rake_runs_with_translation_engine_option
|
59
|
+
create_project '--translation_engine'
|
60
|
+
|
61
|
+
assert_exist_file 'config/initializers/translation_engine.rb'
|
62
|
+
assert_file_have_content 'Gemfile', 'translation_engine'
|
63
|
+
|
64
|
+
assert run_rake
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_rake_runs_with_administration_option
|
68
|
+
create_project '--bootstrap --administration'
|
69
|
+
|
70
|
+
assert_exist_file 'app/controllers/admin/dashboard_controller.rb'
|
71
|
+
assert_exist_file 'app/views/admin/dashboard/show.html.slim'
|
72
|
+
assert_file_have_content 'config/routes.rb', 'namespace :admin'
|
73
|
+
|
74
|
+
assert run_rake
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_rake_runs_with_custom_errors_option
|
78
|
+
create_project '--custom-errors'
|
79
|
+
|
80
|
+
assert_exist_file 'app/controllers/errors_controller.rb'
|
81
|
+
assert_file_have_content 'config/application.rb', 'config.exceptions_app'
|
82
|
+
|
83
|
+
assert run_rake
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_rake_runs_with_fontcustom_option
|
87
|
+
create_project '--fontcustom'
|
88
|
+
|
89
|
+
assert_exist_file 'lib/tasks/icons.rake'
|
90
|
+
assert_exist_file 'fontcustom.yml'
|
91
|
+
assert_exist_file "app/assets/icons/_font_icons.scss"
|
92
|
+
|
52
93
|
assert run_rake
|
53
94
|
end
|
54
95
|
|
@@ -6,9 +6,6 @@ gem 'airbrake'
|
|
6
6
|
<% if !options[:gulp] -%>
|
7
7
|
gem 'autoprefixer-rails'
|
8
8
|
<% end -%>
|
9
|
-
<% if options[:bootstrap] -%>
|
10
|
-
gem 'bootstrap-sass'
|
11
|
-
<% end -%>
|
12
9
|
gem 'coffee-rails', '~> 4.1.0'
|
13
10
|
<% if options[:devise] -%>
|
14
11
|
gem 'devise'
|
@@ -16,14 +13,26 @@ gem 'devise'
|
|
16
13
|
gem 'dotenv-rails'
|
17
14
|
gem 'flutie'
|
18
15
|
gem 'jquery-rails'
|
16
|
+
gem 'metamagic'
|
19
17
|
gem 'pg'
|
20
18
|
gem 'rails', '~> <%= BlueberryRails::RAILS_VERSION %>'
|
21
19
|
gem 'sass-rails', '~> 5.0'
|
22
20
|
gem 'simple_form'
|
23
21
|
gem 'slim-rails'
|
22
|
+
<% if options[:translation_engine] -%>
|
23
|
+
gem 'translation_engine',
|
24
|
+
git: 'https://github.com/blueberryapps/translation-engine.git'
|
25
|
+
<% end -%>
|
24
26
|
gem 'uglifier', '>= 1.3.0'
|
25
27
|
gem 'unicorn'
|
26
28
|
|
29
|
+
source 'https://rails-assets.org' do
|
30
|
+
<% if options[:bootstrap] -%>
|
31
|
+
gem 'rails-assets-bootstrap-sass'
|
32
|
+
<% end -%>
|
33
|
+
gem 'rails-assets-jquery-ujs'
|
34
|
+
end
|
35
|
+
|
27
36
|
group :development do
|
28
37
|
gem 'awesome_print'
|
29
38
|
gem 'better_errors'
|
@@ -33,15 +42,22 @@ group :development do
|
|
33
42
|
gem 'capistrano-bundler'
|
34
43
|
gem 'capistrano-rails'
|
35
44
|
gem 'capistrano-rbenv'
|
45
|
+
<% end -%>
|
46
|
+
<% if options[:fontcustom] -%>
|
47
|
+
gem 'fontcustom'
|
36
48
|
<% end -%>
|
37
49
|
gem 'guard-rspec'
|
50
|
+
gem 'image_optimizer', '~> 1.3.0'
|
38
51
|
gem 'mailcatcher'
|
39
52
|
gem 'pry-rails'
|
40
53
|
gem 'quiet_assets'
|
41
54
|
gem 'rails-i18n-debug', github: 'XeeD/rails-i18n-debug'
|
42
55
|
gem 'rubocop', require: false
|
43
|
-
gem 'spring'
|
44
56
|
gem 'spring-commands-rspec'
|
57
|
+
gem 'spring'
|
58
|
+
<% if options[:fontcustom] -%>
|
59
|
+
gem 'svg_optimizer'
|
60
|
+
<% end -%>
|
45
61
|
end
|
46
62
|
|
47
63
|
group :development, :test do
|
@@ -63,4 +79,3 @@ group :test do
|
|
63
79
|
gem 'simplecov', require: false
|
64
80
|
gem 'webmock'
|
65
81
|
end
|
66
|
-
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
nav.admin.navbar.navbar-inverse role='navigation'
|
2
|
+
.container
|
3
|
+
.navbar-header
|
4
|
+
button.navbar-toggle.collapsed data-target='#bs-example-navbar-collapse-1' data-toggle='collapse' type='button'
|
5
|
+
span.sr-only Toggle navigation
|
6
|
+
span.icon-bar
|
7
|
+
span.icon-bar
|
8
|
+
span.icon-bar
|
9
|
+
= link_to 'LOGO', root_path, target: :_blank
|
10
|
+
|
11
|
+
#bs-example-navbar-collapse-1.collapse.navbar-collapse
|
12
|
+
ul.nav.navbar-nav.navbar-right
|
13
|
+
li = link_to 'Odhlásit se', destroy_administrator_session_path, method: :delete
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= font_face(url: "font-url", path: @font_path_alt) %>
|
2
|
+
|
3
|
+
[data-icon]:before { content: attr(data-icon); }
|
4
|
+
|
5
|
+
@mixin fontcustom {
|
6
|
+
<%= glyph_properties %>
|
7
|
+
}
|
8
|
+
|
9
|
+
%fontcustom,
|
10
|
+
[data-icon]:before,
|
11
|
+
<%= glyph_selectors %> {
|
12
|
+
<%= glyph_properties %>
|
13
|
+
}
|
14
|
+
|
15
|
+
<%= glyphs %>
|
16
|
+
|
17
|
+
<% @glyphs.each do |name, value| %>
|
18
|
+
$font-<%= font_name.gsub(/[^\w\d_]/, '-') %>-<%= name.to_s %>: "\<%= value[:codepoint].to_s(16) %>";<% end %>
|
Binary file
|
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*contains system-shared css variables*/
|
2
|
+
@import frontend/common/bootstrap-override
|
3
|
+
|
4
|
+
/*contains global mixins, functions, helper selectors, etc.*/
|
5
|
+
@import frontend/utils/**/*
|
6
|
+
|
7
|
+
/*contains global styles, such as resets, typography, colors, etc*/
|
8
|
+
// @import frontend/base/**/*
|
9
|
+
|
10
|
+
/*contains each self-contained component in its own .scss partial*/
|
11
|
+
// @import frontend/components/**/*
|
12
|
+
|
13
|
+
/*contains styling for larger layout components; e.g. nav, header, footer, etc.*/
|
14
|
+
// @import frontend/layout/**/*
|
15
|
+
|
16
|
+
/*contains page-specific styling, if necessary*/
|
17
|
+
// @import frontend/pages/**/*
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,128 @@
|
|
1
|
+
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3.
|
2
|
+
//
|
3
|
+
// This is a hack to fill the gap between 480 and 767 pixels - a missing range
|
4
|
+
// in the bootstrap responsive grid structure. Use these classes to style pages
|
5
|
+
// on cellphones when they transition from portrait to landscape.
|
6
|
+
//
|
7
|
+
// Contains:
|
8
|
+
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout
|
9
|
+
// Visibility classes for the Mid-Small layout
|
10
|
+
// Redefined visibility classes for the Extra Small layout
|
11
|
+
//
|
12
|
+
// See https://github.com/twbs/bootstrap/issues/10203 for more info.
|
13
|
+
// Original gist: https://gist.github.com/andyl/6360906
|
14
|
+
//
|
15
|
+
// Instructions: Add the following to the end of bootstrap.scss
|
16
|
+
//
|
17
|
+
// @import "bootstrap-ms"
|
18
|
+
//
|
19
|
+
|
20
|
+
// Mid-Small breakpoint
|
21
|
+
$screen-ms: 480px !default
|
22
|
+
$screen-ms-min: $screen-ms !default
|
23
|
+
$screen-ms-max: $screen-sm-min - 1 !default
|
24
|
+
|
25
|
+
// Redefined Extra Small max value (Can't override non-default variables in SASS)
|
26
|
+
$screen-xs-max-new: $screen-ms-min - 1 !default
|
27
|
+
|
28
|
+
// Common styles (see make-grid-columns() in bootstrap/mixins/_grid-framework.scss)
|
29
|
+
.col-ms-1,
|
30
|
+
.col-ms-2,
|
31
|
+
.col-ms-3,
|
32
|
+
.col-ms-4,
|
33
|
+
.col-ms-5,
|
34
|
+
.col-ms-6,
|
35
|
+
.col-ms-7,
|
36
|
+
.col-ms-8,
|
37
|
+
.col-ms-9,
|
38
|
+
.col-ms-10,
|
39
|
+
.col-ms-11,
|
40
|
+
.col-ms-12
|
41
|
+
position: relative
|
42
|
+
// Prevent columns from collapsing when empty
|
43
|
+
min-height: 1px
|
44
|
+
// Inner gutter via padding
|
45
|
+
padding-left: $grid-gutter-width / 2
|
46
|
+
padding-right: $grid-gutter-width / 2
|
47
|
+
|
48
|
+
// Misc. class adjustments for col-ms
|
49
|
+
@media (min-width: $screen-ms) and (max-width: $screen-ms-max)
|
50
|
+
.container
|
51
|
+
max-width: $screen-sm - 20px
|
52
|
+
.hidden-xs
|
53
|
+
display: block !important
|
54
|
+
|
55
|
+
// col-ms grid
|
56
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
57
|
+
+make-grid(xs)
|
58
|
+
|
59
|
+
// Visibility utilities
|
60
|
+
+responsive-invisibility(".visible-xs, .visible-ms")
|
61
|
+
|
62
|
+
.visible-xs-block,
|
63
|
+
.visible-xs-inline,
|
64
|
+
.visible-xs-inline-block,
|
65
|
+
.visible-ms-block,
|
66
|
+
.visible-ms-inline,
|
67
|
+
.visible-ms-inline-block
|
68
|
+
display: none !important
|
69
|
+
|
70
|
+
@media (max-width: $screen-xs-max-new)
|
71
|
+
+responsive-visibility(".visible-xs")
|
72
|
+
|
73
|
+
.visible-xs-block
|
74
|
+
@media (max-width: $screen-xs-max-new)
|
75
|
+
display: block !important
|
76
|
+
|
77
|
+
.visible-xs-inline
|
78
|
+
@media (max-width: $screen-xs-max-new)
|
79
|
+
display: inline !important
|
80
|
+
|
81
|
+
.visible-xs-inline-block
|
82
|
+
@media (max-width: $screen-xs-max-new)
|
83
|
+
display: inline-block !important
|
84
|
+
|
85
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
86
|
+
+responsive-visibility(".visible-ms")
|
87
|
+
|
88
|
+
.visible-ms-block
|
89
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
90
|
+
display: block !important
|
91
|
+
|
92
|
+
.visible-ms-inline
|
93
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
94
|
+
display: inline !important
|
95
|
+
|
96
|
+
.visible-ms-inline-block
|
97
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
98
|
+
display: inline-block !important
|
99
|
+
|
100
|
+
@media (max-width: $screen-xs-max-new)
|
101
|
+
+responsive-invisibility(".hidden-xs")
|
102
|
+
|
103
|
+
@media (min-width: $screen-ms-min) and (max-width: $screen-ms-max)
|
104
|
+
+responsive-invisibility(".hidden-ms")
|
105
|
+
|
106
|
+
// An extension of andyl's hack – https://gist.github.com/andyl/6360906
|
107
|
+
// in a mixin version.
|
108
|
+
|
109
|
+
=make-ms-column($columns, $gutter: $grid-gutter-width)
|
110
|
+
position: relative
|
111
|
+
min-height: 1px
|
112
|
+
padding-left: $gutter / 2
|
113
|
+
padding-right: $gutter / 2
|
114
|
+
@media (min-width: $screen-ms-min)
|
115
|
+
float: left
|
116
|
+
width: percentage($columns / $grid-columns)
|
117
|
+
|
118
|
+
=make-ms-column-offset($columns)
|
119
|
+
@media (min-width: $screen-ms-min)
|
120
|
+
margin-left: percentage($columns / $grid-columns)
|
121
|
+
|
122
|
+
=make-ms-column-push($columns)
|
123
|
+
@media (min-width: $screen-ms-min)
|
124
|
+
left: percentage($columns / $grid-columns)
|
125
|
+
|
126
|
+
=make-ms-column-pull($columns)
|
127
|
+
@media (min-width: $screen-ms-min)
|
128
|
+
right: percentage($columns / $grid-columns)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
// Bootstap icons
|
2
|
+
$icon-font-path: 'bootstrap-sass/assets/fonts/bootstrap/'
|
3
|
+
|
4
|
+
// Colors
|
5
|
+
$gray-base: #000
|
6
|
+
$gray-dark: lighten($gray-base, 20%)
|
7
|
+
$gray-light: lighten($gray-base, 30%)
|
8
|
+
$gray-lighter: lighten($gray-base, 60%)
|
9
|
+
$gray-exlight: lighten($gray-light, 60%)
|
10
|
+
$gray-soft: lighten($gray-light, 65%)
|
11
|
+
|
12
|
+
// Forms
|
13
|
+
$input-height-base: 50px
|
14
|
+
|
15
|
+
$line-height-base: 1.4
|
16
|
+
|
17
|
+
// Titles
|
18
|
+
|
19
|
+
$title-size-base: 25px
|
20
|
+
|
21
|
+
$font-size-h1: 3.167rem !default
|
22
|
+
$font-size-h2: 3.056rem !default
|
23
|
+
$font-size-h3: ceil(($title-size-base * 1.12)) !default
|
24
|
+
$font-size-h4: ceil(($title-size-base * 0.8)) !default
|
25
|
+
$font-size-h5: ceil(($title-size-base * 0.6)) !default
|
26
|
+
$font-size-h6: ceil(($title-size-base * 0.5)) !default
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
// include files
|