blueberry_rails 0.3.10 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/blueberry_rails.gemspec +1 -1
  4. data/circle.yml +4 -0
  5. data/lib/blueberry_rails/action_helpers.rb +2 -3
  6. data/lib/blueberry_rails/app_builder.rb +11 -35
  7. data/lib/blueberry_rails/generators/app_generator.rb +1 -13
  8. data/lib/blueberry_rails/version.rb +2 -2
  9. data/spec/blueberry_rails_spec.rb +0 -13
  10. data/spec/support/blueberry_rails_helpers.rb +1 -3
  11. data/templates/Gemfile_custom.erb +5 -11
  12. data/templates/assets/stylesheets/application.sass +6 -14
  13. data/templates/assets/stylesheets/frontend/base/buttons.sass +3 -0
  14. data/templates/assets/stylesheets/frontend/base/typo.sass +3 -0
  15. data/templates/assets/stylesheets/frontend/common/bootstrap-override.sass +1 -2
  16. data/templates/assets/stylesheets/frontend/common/bootstrap.sass +50 -0
  17. data/templates/assets/stylesheets/frontend/common/variables.sass +30 -19
  18. data/templates/assets/stylesheets/frontend/components/blocks.sass +19 -0
  19. data/templates/assets/stylesheets/frontend/{base/fonts.sass → components/navbar.sass} +0 -0
  20. data/templates/assets/stylesheets/frontend/layout/body.sass +3 -0
  21. data/templates/assets/stylesheets/frontend/layout/footer.sass +3 -0
  22. data/templates/assets/stylesheets/frontend/layout/header.sass +3 -0
  23. data/templates/assets/stylesheets/frontend/utils/mixins.sass +16 -11
  24. data/templates/assets/stylesheets/frontend/utils/render-to.sass +40 -1
  25. data/templates/locales/cs/cs.rails.yml +10 -6
  26. data/templates/puma.rb +2 -1
  27. data/templates/spec/database_cleaner_setup.rb +2 -4
  28. data/templates/spec/factories_spec.rb +0 -1
  29. data/templates/views/application/_navbar.html.slim +2 -0
  30. data/templates/views/layouts/application.html.slim.erb +0 -1
  31. metadata +10 -17
  32. data/.travis.yml +0 -7
  33. data/templates/Capfile +0 -8
  34. data/templates/assets/stylesheets/frontend/components/navigation.sass +0 -0
  35. data/templates/assets/stylesheets/ie.sass +0 -0
  36. data/templates/assets/stylesheets/print.sass +0 -0
  37. data/templates/capistrano_dotenv.cap +0 -24
  38. data/templates/deploy.rb.erb +0 -28
  39. data/templates/deploy_production.rb.erb +0 -7
  40. data/templates/deploy_staging.rb.erb +0 -8
  41. data/templates/disable_xml_params.rb +0 -3
  42. data/templates/helpers/body_class_helper.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5596f930c3e53e38e875c66416bc9392965523c8
4
- data.tar.gz: e2591af5b3a01d05746ee80085c723946ae4c7a2
3
+ metadata.gz: 2b45cceda5339e79bf4160f739be691e6b4e1401
4
+ data.tar.gz: 8ff940fa7c8c36af1de0a9d5ea4e822e0c7b5548
5
5
  SHA512:
6
- metadata.gz: c22615911ac5ed27aea09cd160bff1bc1591ae8d9d45ddb20bbba44064d9b6b91158b47190def8843fda61d563483e1d5b191215134128bcd191adb6ab5e5112
7
- data.tar.gz: 80afcd4d330b76fcdcb0b5447f4ebfc85e30ce2d2e6e76928d6e6debf942a8faac541bd15d7fc3965806ec566a3c13d0be64fdb70291543a1022cf48f09d0f4c
6
+ metadata.gz: dcbe8a8c0b1904375a7f9225ba491cb6d71de755ccf922bd62e80cd49b7d6cf3e760da4b7f57332ddfb7ea90cd4d8086ffdabf697e15939e95bbd249f8d4ca14
7
+ data.tar.gz: c34444a140b05419785c9aff70aa42bc0f6a53a4b805d5d0ca12d5912e8c3a74b4955e3192f6976df9ca85afceb88894049843fe652e52eb891a3b6a62dab15c
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # Blueberry Rails [![Build Status](https://secure.travis-ci.org/blueberryapps/blueberry_rails.png?branch=master)](http://travis-ci.org/blueberryapps/blueberry_rails)
1
+ # Blueberry Rails [![CircleCI](https://circleci.com/gh/blueberryapps/blueberry_rails.svg?style=svg&circle-token=20a1f7352480b65bd50f523291beed7bfc082b07)](https://circleci.com/gh/blueberryapps/blueberry_rails)
2
2
 
3
- A Rails application template used at Blueberry Apps.
3
+ A Rails application template used at Blueberry.
4
+
5
+ [![blueberry](https://www.google.com/a/blueberryapps.com/images/logo.gif)](http://www.blueberry.cz)
4
6
 
5
7
  ## Installation
6
8
 
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.version = BlueberryRails::VERSION
9
9
  gem.authors = ['BlueberryApps']
10
10
  gem.email = ['jzajpt@blueberry.cz']
11
- gem.description = %q{A Rails app template by BlueberryApps }
11
+ gem.description = %q{A Rails app template by BlueberryApps}
12
12
  gem.summary = %q{A Rails app template by BlueberryApps}
13
13
  gem.homepage = 'https://github.com/blueberryapps/blueberry_rails'
14
14
  gem.license = 'MIT'
data/circle.yml ADDED
@@ -0,0 +1,4 @@
1
+ test:
2
+ override:
3
+ - bundle exec rake:
4
+ parallel: true
@@ -1,9 +1,8 @@
1
1
  module BlueberryRails
2
2
  module ActionHelpers
3
-
4
3
  def action_mailer_host(rails_env, host)
5
- host_config = "config.action_mailer.default_url_options = { host: '#{host}' }"
6
- configure_environment(rails_env, host_config)
4
+ host = "config.action_mailer.default_url_options = { host: '#{host}' }"
5
+ configure_environment(rails_env, host)
7
6
  end
8
7
 
9
8
  def configure_environment(rails_env, config)
@@ -25,11 +25,6 @@ module BlueberryRails
25
25
  after: " secret_key_base: <%= ENV[\"SECRET_KEY_BASE\"] %>\n"
26
26
  end
27
27
 
28
- def disable_xml_params
29
- copy_file 'disable_xml_params.rb',
30
- 'config/initializers/disable_xml_params.rb'
31
- end
32
-
33
28
  def hound_config
34
29
  copy_file '../.hound.yml', '.hound.yml'
35
30
  copy_file '../.rubocop.yml', '.rubocop.yml'
@@ -95,7 +90,7 @@ module BlueberryRails
95
90
 
96
91
  replace_in_file 'config/initializers/assets.rb',
97
92
  '# Rails.application.config.assets.precompile += %w( search.js )',
98
- 'Rails.application.config.assets.precompile += %w( print.css ie.css )'
93
+ 'Rails.application.config.assets.precompile += %w( ie.css )'
99
94
 
100
95
  if options[:administration]
101
96
  directory 'admin_assets', 'app/assets'
@@ -106,11 +101,6 @@ module BlueberryRails
106
101
  end
107
102
  end
108
103
 
109
- def copy_print_style
110
- copy_file 'assets/stylesheets/print.sass',
111
- 'app/assets/stylesheets/print.sass'
112
- end
113
-
114
104
  def copy_initializers
115
105
  if options[:translation_engine]
116
106
  copy_file 'config/initializers/translation_engine.rb',
@@ -133,6 +123,7 @@ module BlueberryRails
133
123
  end
134
124
 
135
125
  def create_puma_config
126
+ remove_file 'config/puma.rb'
136
127
  copy_file 'puma.rb', 'config/puma.rb'
137
128
  end
138
129
 
@@ -205,13 +196,13 @@ module BlueberryRails
205
196
  end
206
197
 
207
198
  def configure_i18n
208
- replace_in_file 'config/application.rb',
209
- "# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]",
210
- "config.i18n.load_path += Dir[Rails.root.join 'config/locales/**/*.{rb,yml}']"
199
+ inject_into_file "config/application.rb",
200
+ "\n\n config.i18n.load_path += Dir[Rails.root.join 'config/locales/**/*.{rb,yml}']",
201
+ before: "\n # Settings"
211
202
 
212
- replace_in_file 'config/application.rb',
213
- '# config.i18n.default_locale = :de',
214
- "config.i18n.available_locales = [:cs, :en]\n config.i18n.default_locale = :cs"
203
+ inject_into_file 'config/application.rb',
204
+ "\n\n config.i18n.available_locales = [:cs, :en]\n config.i18n.default_locale = :cs",
205
+ before: "\n # Settings"
215
206
 
216
207
  remove_file 'config/locales/en.yml'
217
208
  directory 'locales', 'config/locales'
@@ -237,12 +228,6 @@ module BlueberryRails
237
228
  add_file '.ruby-version', "#{version}\n"
238
229
  end
239
230
 
240
- def remove_routes_comment_lines
241
- replace_in_file 'config/routes.rb',
242
- /Rails.application\.routes\.draw do.*end/m,
243
- "Rails.application.routes.draw do\nend"
244
- end
245
-
246
231
  def install_devise
247
232
  generate 'devise:install'
248
233
  generate_root_controller_and_route
@@ -263,14 +248,6 @@ module BlueberryRails
263
248
  'config/locales/en/en.devise.yml'
264
249
  end
265
250
 
266
- def setup_capistrano
267
- copy_file 'Capfile', 'Capfile'
268
- template 'deploy.rb.erb', 'config/deploy.rb'
269
- template 'deploy_production.rb.erb', 'config/deploy/production.rb'
270
- template 'deploy_staging.rb.erb', 'config/deploy/staging.rb'
271
- template 'capistrano_dotenv.cap', 'lib/capistrano/tasks/dotenv.cap'
272
- end
273
-
274
251
  def configure_simple_form
275
252
  if options[:bootstrap]
276
253
  generate 'simple_form:install --bootstrap'
@@ -357,7 +334,6 @@ module BlueberryRails
357
334
 
358
335
  def generate_root_controller_and_route
359
336
  generate 'controller', 'root index'
360
- remove_routes_comment_lines
361
337
  inject_into_file 'config/routes.rb',
362
338
  " root to: 'root#index'\n",
363
339
  after: "Rails.application.routes.draw do\n"
@@ -387,9 +363,9 @@ module BlueberryRails
387
363
  "config.assets.paths << Rails.root.join('public', 'assets', 'javascripts')\n"
388
364
  end
389
365
 
390
- replace_in_file 'config/environments/development.rb',
391
- 'config.assets.digest = true',
392
- 'config.assets.digest = false'
366
+ inject_into_file 'config/environments/development.rb',
367
+ "config.assets.digest = false\n",
368
+ before: 'config.assets.quiet = true'
393
369
 
394
370
  copy_file 'gulp/rev_manifest.rb', 'config/initializers/rev_manifest.rb'
395
371
  copy_file 'gulp/global.coffee', 'gulp/assets/javascripts/global.coffee'
@@ -31,9 +31,6 @@ module BlueberryRails
31
31
  class_option :gulp, type: :boolean, aliases: '-g', default: false,
32
32
  desc: 'Include Gulp asset pipeline'
33
33
 
34
- class_option :capistrano, type: :boolean, aliases: '-c', default: false,
35
- desc: 'Include Capistrano'
36
-
37
34
  class_option :administration, type: :boolean, aliases: '-a', default: false,
38
35
  desc: 'Include Admin part of application'
39
36
 
@@ -149,16 +146,11 @@ module BlueberryRails
149
146
  end
150
147
 
151
148
  def create_assets
152
- if options[:bootstrap]
153
- build :copy_assets_directory
154
- else
155
- build :copy_print_style
156
- end
149
+ build :copy_assets_directory if options[:bootstrap]
157
150
  end
158
151
 
159
152
  def configure_app
160
153
  build :secret_token
161
- build :disable_xml_params
162
154
  build :setup_mailer_hosts
163
155
  build :create_pryrc
164
156
  build :create_procfile
@@ -189,10 +181,6 @@ module BlueberryRails
189
181
  else
190
182
  build :create_root_page
191
183
  end
192
- if options[:capistrano]
193
- say 'Setting up Capistrano'
194
- build :setup_capistrano
195
- end
196
184
  end
197
185
 
198
186
  def setup_git
@@ -1,7 +1,7 @@
1
1
  module BlueberryRails
2
- VERSION = '0.3.10'
2
+ VERSION = '0.4.0'
3
3
 
4
4
  RUBY_VERSION = '2.3.1'
5
5
 
6
- RAILS_VERSION = '4.2.7'
6
+ RAILS_VERSION = '5.0.0.1'
7
7
  end
@@ -6,8 +6,6 @@ class BlueberryRailsTest < Minitest::Test
6
6
 
7
7
  def setup
8
8
  remove_project_directory
9
- cmd 'dropdb test_project_development'
10
- cmd 'dropdb test_project_test'
11
9
  end
12
10
 
13
11
  def run
@@ -38,17 +36,6 @@ class BlueberryRailsTest < Minitest::Test
38
36
  assert run_rake
39
37
  end
40
38
 
41
- def test_rake_runs_with_capistrano_option
42
- create_project '--capistrano'
43
-
44
- assert_file_have_content 'Gemfile', 'capistrano'
45
-
46
- assert_exist_file 'Capfile'
47
- assert_exist_file 'config/deploy.rb'
48
- assert_exist_file 'config/deploy/production.rb'
49
- assert_exist_file 'config/deploy/staging.rb'
50
- end
51
-
52
39
  def test_rake_runs_with_no_devise_option
53
40
  create_project '--no-devise'
54
41
 
@@ -13,9 +13,7 @@ module BlueberryRailsHelpers
13
13
 
14
14
  def run_rake
15
15
  Dir.chdir(project_path) do
16
- cmd 'bundle exec rake db:create'
17
- cmd 'bundle exec rake db:migrate'
18
- cmd 'bundle exec rake db:test:prepare'
16
+ cmd 'bundle exec rake db:drop db:create db:migrate'
19
17
  cmd 'bundle exec rake'
20
18
  end
21
19
  end
@@ -6,7 +6,7 @@ gem 'airbrake'
6
6
  <% if !options[:gulp] -%>
7
7
  gem 'autoprefixer-rails'
8
8
  <% end -%>
9
- gem 'coffee-rails', '~> 4.1.0'
9
+ gem 'coffee-rails', '~> 4.2'
10
10
  <% if options[:devise] -%>
11
11
  gem 'devise'
12
12
  <% end -%>
@@ -15,15 +15,15 @@ gem 'flutie'
15
15
  gem 'jquery-rails'
16
16
  gem 'metamagic'
17
17
  gem 'pg'
18
+ gem 'puma', '~> 3.0'
18
19
  gem 'rails', '~> <%= BlueberryRails::RAILS_VERSION %>'
19
20
  gem 'sassc-rails'
20
21
  gem 'simple_form'
21
22
  gem 'slim-rails'
22
23
  <% if options[:translation_engine] -%>
23
- gem 'translation_engine', github: 'blueberryapps/translation-engine'
24
+ gem 'translation_engine', github: 'blueberryapps/translation-engine', branch: 'rails-5-support'
24
25
  <% end -%>
25
26
  gem 'uglifier', '>= 1.3.0'
26
- gem 'puma'
27
27
 
28
28
  source 'https://rails-assets.org' do
29
29
  <% if options[:bootstrap] -%>
@@ -36,25 +36,19 @@ group :development do
36
36
  gem 'awesome_print'
37
37
  gem 'better_errors'
38
38
  gem 'binding_of_caller'
39
- <% if options[:capistrano] -%>
40
- gem 'capistrano', '~> 3.0.0'
41
- gem 'capistrano-bundler'
42
- gem 'capistrano-rails'
43
- gem 'capistrano-rbenv'
44
- <% end -%>
45
39
  <% if options[:fontcustom] -%>
46
40
  gem 'fontcustom'
47
41
  <% end -%>
48
42
  gem 'guard-rspec'
49
43
  gem 'i18n_yaml_sorter'
50
44
  gem 'image_optimizer', '~> 1.3.0'
45
+ gem 'listen', '~> 3.0.5'
51
46
  gem 'mailcatcher'
52
47
  gem 'pry-rails'
53
- gem 'quiet_assets'
54
48
  gem 'rails-i18n-debug', github: 'XeeD/rails-i18n-debug'
55
49
  gem 'rubocop', require: false
56
- gem 'spring-commands-rspec'
57
50
  gem 'spring'
51
+ gem 'spring-watcher-listen', '~> 2.0.0'
58
52
  <% if options[:fontcustom] -%>
59
53
  gem 'svg_optimizer'
60
54
  <% end -%>
@@ -1,17 +1,9 @@
1
- /*contains system-shared css variables*/
1
+ // import custom bootstrap
2
2
  @import frontend/common/bootstrap-override
3
3
 
4
- /*contains global mixins, functions, helper selectors, etc.*/
4
+ // import app stylesheets
5
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/**/*
6
+ @import frontend/base/**/*
7
+ @import frontend/layout/**/*
8
+ @import frontend/components/**/*
9
+ @import frontend/pages/**/*
@@ -0,0 +1,3 @@
1
+ //
2
+ // Buttons
3
+ // -------------------------------
@@ -0,0 +1,3 @@
1
+ //
2
+ // Typo
3
+ // -------------------------------
@@ -1,4 +1,3 @@
1
1
  @import variables
2
-
3
- @import bootstrap-sass
2
+ @import bootstrap
4
3
  @import bootstrap-ms
@@ -0,0 +1,50 @@
1
+ // Core variables and mixins
2
+ @import "bootstrap-sass/bootstrap/variables"
3
+ @import "bootstrap-sass/bootstrap/mixins"
4
+
5
+ // Reset and dependencies
6
+ @import "bootstrap-sass/bootstrap/normalize"
7
+ @import "bootstrap-sass/bootstrap/print"
8
+ // @import "bootstrap-sass/bootstrap/glyphicons"
9
+
10
+ // Core CSS
11
+ @import "bootstrap-sass/bootstrap/scaffolding"
12
+ @import "bootstrap-sass/bootstrap/type"
13
+ @import "bootstrap-sass/bootstrap/code"
14
+ @import "bootstrap-sass/bootstrap/grid"
15
+ // @import "bootstrap-sass/bootstrap/tables"
16
+ @import "bootstrap-sass/bootstrap/forms"
17
+ @import "bootstrap-sass/bootstrap/buttons"
18
+
19
+ // Components
20
+ // @import "bootstrap-sass/bootstrap/component-animations"
21
+ // @import "bootstrap-sass/bootstrap/dropdowns"
22
+ // @import "bootstrap-sass/bootstrap/button-groups"
23
+ // @import "bootstrap-sass/bootstrap/input-groups"
24
+ // @import "bootstrap-sass/bootstrap/navs"
25
+ // @import "bootstrap-sass/bootstrap/navbar"
26
+ // @import "bootstrap-sass/bootstrap/breadcrumbs"
27
+ // @import "bootstrap-sass/bootstrap/pagination"
28
+ // @import "bootstrap-sass/bootstrap/pager"
29
+ // @import "bootstrap-sass/bootstrap/labels"
30
+ // @import "bootstrap-sass/bootstrap/badges"
31
+ // @import "bootstrap-sass/bootstrap/jumbotron"
32
+ // @import "bootstrap-sass/bootstrap/thumbnails"
33
+ // @import "bootstrap-sass/bootstrap/alerts"
34
+ // @import "bootstrap-sass/bootstrap/progress-bars"
35
+ // @import "bootstrap-sass/bootstrap/media"
36
+ // @import "bootstrap-sass/bootstrap/list-group"
37
+ // @import "bootstrap-sass/bootstrap/panels"
38
+ // @import "bootstrap-sass/bootstrap/responsive-embed"
39
+ // @import "bootstrap-sass/bootstrap/wells"
40
+ // @import "bootstrap-sass/bootstrap/close"
41
+
42
+ // Components w/ JavaScript
43
+ // @import "bootstrap-sass/bootstrap/modals"
44
+ // @import "bootstrap-sass/bootstrap/tooltip"
45
+ // @import "bootstrap-sass/bootstrap/popovers"
46
+ // @import "bootstrap-sass/bootstrap/carousel"
47
+
48
+ // Utility classes
49
+ @import "bootstrap-sass/bootstrap/utilities"
50
+ @import "bootstrap-sass/bootstrap/responsive-utilities"
@@ -1,26 +1,37 @@
1
- // Bootstap icons
2
- $icon-font-path: 'bootstrap-sass/assets/fonts/bootstrap/'
1
+ //
2
+ // Variables
3
+ // -------------------------------
3
4
 
4
5
  // 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%)
6
+ // $gray-darker: #123456
7
+ // $gray-dark: #123456
8
+ // $gray: #123456
9
+ // $gray-light: #123456
10
+ // $gray-lighter: #123456
11
11
 
12
- // Forms
13
- $input-height-base: 50px
12
+ // $brand-primary: #123456
14
13
 
15
- $line-height-base: 1.4
14
+ // Scaffolding
15
+ // $text-color: #123456
16
+ // $link-color: #123456
16
17
 
17
- // Titles
18
+ // Typography
19
+ // $font-size-base: 15px
20
+ // $line-height-base: 1.42
21
+ // $font-family-sans-serif: 'Open Sans', sans-serif
18
22
 
19
- $title-size-base: 25px
23
+ // $headings-font-family: $font-family-sans-serif
24
+ // $headings-font-weight: 600
25
+ // $headings-line-height: 1.2
26
+ // $headings-color: inherit
20
27
 
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
28
+ // Grid system
29
+ // $grid-gutter-width: 30px
30
+ // $grid-float-breakpoint: 1100px
31
+
32
+ // Navbar
33
+ // $navbar-default-color: #123456
34
+ // $navbar-default-bg: #123456
35
+
36
+ // $navbar-default-link-color: #123456
37
+ // $navbar-default-link-hover-color: #123456
@@ -0,0 +1,19 @@
1
+ //
2
+ // Body
3
+ // -------------------------------
4
+
5
+ .block
6
+ position: relative
7
+ padding: 1px 0
8
+ z-index: 10
9
+
10
+ .block-content
11
+ @extend .container
12
+ margin-top: rem(50)
13
+ margin-bottom: rem(50)
14
+ position: relative
15
+ z-index: 10
16
+
17
+ &:before,
18
+ &:after
19
+ display: none
@@ -0,0 +1,3 @@
1
+ //
2
+ // Body
3
+ // -------------------------------
@@ -0,0 +1,3 @@
1
+ //
2
+ // Footer
3
+ // -------------------------------
@@ -0,0 +1,3 @@
1
+ //
2
+ // Header
3
+ // -------------------------------
@@ -1,24 +1,29 @@
1
- =centered($args...)
1
+ //
2
+ // Mixins
3
+ // -------------------------------
4
+
5
+ =all-abs($dist: 0)
2
6
  position: absolute
3
- left: 50%
4
- top: 50%
5
- transform: translateX(-50%) translateY(-50%)
7
+ top: $dist
8
+ right: $dist
9
+ bottom: $dist
10
+ left: $dist
11
+
12
+ =all-fix($dist: 0)
13
+ position: fixed
14
+ top: $dist
15
+ right: $dist
16
+ bottom: $dist
17
+ left: $dist
6
18
 
7
19
  =antialiasing($type:antialiased)
8
20
  -webkit-font-smoothing: $type
9
21
  font-smoothing: $type
10
22
  font-smooth: always
11
23
 
12
- =pos($x, $y)
13
- position: absolute
14
- top: $x
15
- left: $y
16
-
17
24
  =display-flex
18
25
  display: flex
19
26
  flex-wrap: wrap
20
- align-items: flex-end
21
- justify-content: flex-start
22
27
  &:after,
23
28
  &:before
24
29
  display: none
@@ -4,7 +4,7 @@ $sm: "(min-width: #{$screen-sm-min}) and (max-width: #{$screen-sm-max})"
4
4
  $md: "(min-width: #{$screen-md-min}) and (max-width: #{$screen-md-max})"
5
5
  $lg: "(min-width: #{$screen-lg-min})"
6
6
 
7
- =render-to($type...)
7
+ =render-for($type...)
8
8
  @if $type == "xs"
9
9
  @for $i from 1 through length($type)
10
10
  @if nth($type, $i) == xs
@@ -22,6 +22,45 @@ $lg: "(min-width: #{$screen-lg-min})"
22
22
  @else if nth($type, $i) == lg
23
23
  @media #{$lg}
24
24
  @content
25
+ @else if nth($type, $i) == navbar-lg
26
+ @media (min-width: $grid-float-breakpoint)
27
+ @content
28
+ @else if nth($type, $i) == navbar-sm
29
+ @media (max-width: $grid-float-breakpoint - 1)
30
+ @content
31
+ @else
32
+ @media (max-width: $type)
33
+ @content
34
+
35
+ =render-up($type...)
36
+ @for $i from 1 through length($type)
37
+ @if nth($type, $i) == ms
38
+ @media (min-width: $screen-ms-min)
39
+ @content
40
+ @else if nth($type, $i) == sm
41
+ @media (min-width: $screen-sm-min)
42
+ @content
43
+ @else if nth($type, $i) == md
44
+ @media (min-width: $screen-md-min)
45
+ @content
46
+ @media (min-width: $type)
47
+ @content
48
+
49
+ =render-to($type...)
50
+ @if $type == "xs"
51
+ @for $i from 1 through length($type)
52
+ @if nth($type, $i) == xs
53
+ @media (max-width: $screen-xs-max-new)
54
+ @content
55
+ @else if nth($type, $i) == ms
56
+ @media (max-width: $screen-ms-max)
57
+ @content
58
+ @else if nth($type, $i) == sm
59
+ @media (max-width: $screen-sm-max)
60
+ @content
61
+ @else if nth($type, $i) == md
62
+ @media (max-width: $screen-md-max)
63
+ @content
25
64
  @else
26
65
  @media (max-width: $type)
27
66
  @content
@@ -1,5 +1,12 @@
1
1
  ---
2
2
  cs:
3
+ activerecord:
4
+ errors:
5
+ messages:
6
+ record_invalid: 'Validace je neúspešná: %{errors}'
7
+ restrict_dependent_destroy:
8
+ has_one: Nemůžu smazat položku protože existuje závislá/ý/é %{record}
9
+ has_many: Nemůžu smazat položku protože existuje závislé/ý %{record}
3
10
  date:
4
11
  abbr_day_names:
5
12
  - Ne
@@ -127,10 +134,7 @@ cs:
127
134
  not_a_number: není číslo
128
135
  not_an_integer: musí být celé číslo
129
136
  odd: musí být liché číslo
130
- record_invalid: 'Validace je neúspešná: %{errors}'
131
- restrict_dependent_destroy:
132
- one: Nemůžu smazat položku protože existuje závislá/ý/é %{record}
133
- many: Nemůžu smazat položku protože existuje závislé/ý %{record}
137
+ required: musí existovat
134
138
  taken: již databáze obsahuje
135
139
  too_long: je příliš dlouhý/á/é (max. %{count} znaků)
136
140
  too_short: je příliš krátký/á/é (min. %{count} znaků)
@@ -150,7 +154,7 @@ cs:
150
154
  submit:
151
155
  create: Vytvořit %{model}
152
156
  submit: Uložit %{model}
153
- update: Upravit %{model}
157
+ update: Aktualizovat %{model}
154
158
  number:
155
159
  currency:
156
160
  format:
@@ -207,5 +211,5 @@ cs:
207
211
  formats:
208
212
  default: "%a %d. %B %Y %H:%M %z"
209
213
  long: "%A %d. %B %Y %H:%M"
210
- short: "%d. %m. %Y %H:%M"
214
+ short: "%d. %m. %H:%M"
211
215
  pm: pm
data/templates/puma.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2
- threads_count = Integer(ENV['MAX_THREADS'] || 5)
2
+ threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
3
3
  threads threads_count, threads_count
4
4
 
5
5
  preload_app!
6
6
 
7
+ rackup DefaultRackup
7
8
  port ENV['PORT'] || 3000
8
9
  environment ENV['RACK_ENV'] || 'development'
9
10
 
@@ -1,14 +1,13 @@
1
1
  RSpec.configure do |config|
2
-
3
2
  config.before(:suite) do
4
- DatabaseCleaner.clean_with(:truncation)
3
+ DatabaseCleaner.clean_with :truncation, except: %w(ar_internal_metadata)
5
4
  end
6
5
 
7
6
  config.before(:each) do
8
7
  DatabaseCleaner.strategy = :transaction
9
8
  end
10
9
 
11
- config.before(:each, :js => true) do
10
+ config.before(:each, js: true) do
12
11
  DatabaseCleaner.strategy = :truncation
13
12
  end
14
13
 
@@ -19,5 +18,4 @@ RSpec.configure do |config|
19
18
  config.after(:each) do
20
19
  DatabaseCleaner.clean
21
20
  end
22
-
23
21
  end
@@ -11,4 +11,3 @@ FactoryGirl.factories.map(&:name).each do |factory_name|
11
11
  end
12
12
  end
13
13
  end
14
-
@@ -0,0 +1,2 @@
1
+ header
2
+ = render 'navbar'
@@ -10,7 +10,6 @@ html
10
10
  meta name='viewport' content='width=device-width, initial-scale=1.0'
11
11
  = render 'favicon'
12
12
  = stylesheet_link_tag :application, media: 'all'
13
- = stylesheet_link_tag :print, media: 'print'
14
13
  = csrf_meta_tags
15
14
 
16
15
  body class=body_class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueberry_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.10
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlueberryApps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-18 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.7
33
+ version: 5.0.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.7
40
+ version: 5.0.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: 'A Rails app template by BlueberryApps '
55
+ description: A Rails app template by BlueberryApps
56
56
  email:
57
57
  - jzajpt@blueberry.cz
58
58
  executables:
@@ -64,13 +64,13 @@ files:
64
64
  - ".hound.yml"
65
65
  - ".rubocop.yml"
66
66
  - ".ruby-version"
67
- - ".travis.yml"
68
67
  - Gemfile
69
68
  - LICENSE.txt
70
69
  - README.md
71
70
  - Rakefile
72
71
  - bin/blueberry_rails
73
72
  - blueberry_rails.gemspec
73
+ - circle.yml
74
74
  - lib/blueberry_rails.rb
75
75
  - lib/blueberry_rails/action_helpers.rb
76
76
  - lib/blueberry_rails/app_builder.rb
@@ -78,7 +78,6 @@ files:
78
78
  - lib/blueberry_rails/version.rb
79
79
  - spec/blueberry_rails_spec.rb
80
80
  - spec/support/blueberry_rails_helpers.rb
81
- - templates/Capfile
82
81
  - templates/Gemfile_custom.erb
83
82
  - templates/Procfile
84
83
  - templates/README.md.erb
@@ -98,13 +97,14 @@ files:
98
97
  - templates/assets/javascripts/frontend/.keep
99
98
  - templates/assets/stylesheets/application.sass
100
99
  - templates/assets/stylesheets/frontend/base/buttons.sass
101
- - templates/assets/stylesheets/frontend/base/fonts.sass
102
100
  - templates/assets/stylesheets/frontend/base/typo.sass
103
101
  - templates/assets/stylesheets/frontend/common/bootstrap-ms.sass
104
102
  - templates/assets/stylesheets/frontend/common/bootstrap-override.sass
103
+ - templates/assets/stylesheets/frontend/common/bootstrap.sass
105
104
  - templates/assets/stylesheets/frontend/common/variables.sass
106
105
  - templates/assets/stylesheets/frontend/components/.keep
107
- - templates/assets/stylesheets/frontend/components/navigation.sass
106
+ - templates/assets/stylesheets/frontend/components/blocks.sass
107
+ - templates/assets/stylesheets/frontend/components/navbar.sass
108
108
  - templates/assets/stylesheets/frontend/layout/body.sass
109
109
  - templates/assets/stylesheets/frontend/layout/footer.sass
110
110
  - templates/assets/stylesheets/frontend/layout/header.sass
@@ -115,19 +115,12 @@ files:
115
115
  - templates/assets/stylesheets/frontend/utils/mixins.sass
116
116
  - templates/assets/stylesheets/frontend/utils/render-to.sass
117
117
  - templates/assets/stylesheets/frontend/utils/renderto-debug.sass
118
- - templates/assets/stylesheets/ie.sass
119
- - templates/assets/stylesheets/print.sass
120
- - templates/capistrano_dotenv.cap
121
118
  - templates/circle.yml.erb
122
119
  - templates/config/initializers/airbrake.rb
123
120
  - templates/config/initializers/simple_form_bootstrap.rb
124
121
  - templates/config/initializers/translation_engine.rb
125
122
  - templates/controllers/errors_controller.rb
126
123
  - templates/database.yml.erb
127
- - templates/deploy.rb.erb
128
- - templates/deploy_production.rb.erb
129
- - templates/deploy_staging.rb.erb
130
- - templates/disable_xml_params.rb
131
124
  - templates/fontcustom.yml
132
125
  - templates/gitignore_custom.erb
133
126
  - templates/gulp/application.js.coffee
@@ -159,7 +152,6 @@ files:
159
152
  - templates/gulp/util/handleErrors.coffee
160
153
  - templates/helpers/admin_helper.rb
161
154
  - templates/helpers/application_helper.rb
162
- - templates/helpers/body_class_helper.rb
163
155
  - templates/locales/cs/cs.devise.yml
164
156
  - templates/locales/cs/cs.meta.yml
165
157
  - templates/locales/cs/cs.rails.yml
@@ -210,6 +202,7 @@ files:
210
202
  - templates/views/application/_footer.html.slim
211
203
  - templates/views/application/_gtm.html.slim
212
204
  - templates/views/application/_header.html.slim
205
+ - templates/views/application/_navbar.html.slim
213
206
  - templates/views/layouts/admin.html.slim.erb
214
207
  - templates/views/layouts/application.html.slim.erb
215
208
  homepage: https://github.com/blueberryapps/blueberry_rails
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- language: ruby
2
- script: 'bundle exec rake'
3
- rvm:
4
- - 2.3.1
5
- before_install:
6
- - gem cleanup bundler
7
- - gem update --system
data/templates/Capfile DELETED
@@ -1,8 +0,0 @@
1
- require 'capistrano/setup'
2
- require 'capistrano/deploy'
3
- require 'capistrano/bundler'
4
- require 'capistrano/rbenv'
5
- require 'capistrano/rails/assets'
6
- require 'capistrano/rails/migrations'
7
-
8
- Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
File without changes
File without changes
@@ -1,24 +0,0 @@
1
- namespace :deploy do
2
-
3
- after :updating, 'dotenv:symlink'
4
-
5
- end
6
-
7
- namespace :dotenv do
8
-
9
- desc "Symlink .env file"
10
- task :symlink do
11
- on roles(:app) do
12
- target = release_path.join('.env')
13
- source = shared_path.join('config/dotenv')
14
- unless test "[ -L #{target} ]"
15
- if test "[ -f #{target} ]"
16
- execute :rm, target
17
- end
18
- execute :ln, '-s', source, target
19
- end
20
- end
21
- end
22
-
23
- end
24
-
@@ -1,28 +0,0 @@
1
- set :application, '<%= app_name %>'
2
- set :repo_url, 'git@github.com:blueberryapps/<%= app_name %>.git'
3
- set :branch, 'master'
4
- set :scm, :git
5
-
6
- set :format, :pretty
7
- set :log_level, :debug
8
-
9
- set :linked_files, %w(config/database.yml)
10
- set :linked_dirs, %w(log tmp/pids tmp/cache tmp/sockets public/system)
11
-
12
- set :rbenv_type, :system
13
- set :rbenv_ruby, `git show #{fetch(:branch)}:.ruby-version`.strip
14
-
15
- set :keep_releases, 5
16
-
17
- namespace :deploy do
18
-
19
- desc 'Restart application'
20
- task :restart do
21
- on roles(:app), in: :sequence, wait: 5 do
22
- execute :touch, release_path.join('tmp/restart.txt')
23
- end
24
- end
25
-
26
- after :finishing, 'deploy:cleanup'
27
-
28
- end
@@ -1,7 +0,0 @@
1
- set :stage, :production
2
- set :rails_env, 'production'
3
- set :deploy_to, '/var/www/<%= app_name %>_com'
4
-
5
- server 'REPLACE_ME',
6
- user: '<%= app_name %>',
7
- roles: %w(web app db)
@@ -1,8 +0,0 @@
1
- set :stage, :staging
2
- set :deploy_to, '/var/www/<%= app_name %>_webapps_cz'
3
- set :rails_env, 'staging'
4
-
5
- server 'REPLACE_ME',
6
- user: '<%= app_name %>_webapps_cz',
7
- roles: %w(web app db)
8
-
@@ -1,3 +0,0 @@
1
- # Protect against injection attacks
2
- # http://www.kb.cert.org/vuls/id/380039
3
- ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
@@ -1,15 +0,0 @@
1
- module BodyClassHelper
2
- def body_class(options = {})
3
- extra_body_classes_symbol = options[:extra_body_classes_symbol] || :extra_body_classes
4
- qualified_controller_name = controller.controller_path.gsub('/','-')
5
- basic_body_class = "#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
6
-
7
- basic_body_class << ' development' if Rails.env.development?
8
-
9
- if content_for?(extra_body_classes_symbol)
10
- [basic_body_class, content_for(extra_body_classes_symbol)].join(' ')
11
- else
12
- basic_body_class
13
- end
14
- end
15
- end