blueberry_rails 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b45cceda5339e79bf4160f739be691e6b4e1401
4
- data.tar.gz: 8ff940fa7c8c36af1de0a9d5ea4e822e0c7b5548
3
+ metadata.gz: c406dea7cfbeac218cb081773eeffd0a27c31f95
4
+ data.tar.gz: 371ddadce54b93bc4881e398a2529261cb004cdb
5
5
  SHA512:
6
- metadata.gz: dcbe8a8c0b1904375a7f9225ba491cb6d71de755ccf922bd62e80cd49b7d6cf3e760da4b7f57332ddfb7ea90cd4d8086ffdabf697e15939e95bbd249f8d4ca14
7
- data.tar.gz: c34444a140b05419785c9aff70aa42bc0f6a53a4b805d5d0ca12d5912e8c3a74b4955e3192f6976df9ca85afceb88894049843fe652e52eb891a3b6a62dab15c
6
+ metadata.gz: 9c0d5bb28b507c0591e3734d02da80c9527297e3431389021d969dfe67026c41be298ed049a0bf6957d562b13fc0fe3873c233eca809859e54d2a380a7f71348
7
+ data.tar.gz: 1e209b2600673e51bea02fa11f1681470e787c1ddedf016aa0e58cd36fd660013f3fd477807e937a3b77bc628faaccabca6b5c8233c60dcc71d0e761fb6bd24a
data/.rubocop.yml CHANGED
@@ -114,6 +114,9 @@ FormatString:
114
114
  Enabled: true
115
115
  EnforcedStyle: percent
116
116
 
117
+ FrozenStringLiteralComment:
118
+ Enabled: false
119
+
117
120
  GlobalVars:
118
121
  Enabled: true
119
122
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.0
data/circle.yml CHANGED
@@ -2,3 +2,4 @@ test:
2
2
  override:
3
3
  - bundle exec rake:
4
4
  parallel: true
5
+ timeout: 1400
@@ -88,10 +88,6 @@ module BlueberryRails
88
88
 
89
89
  remove_file 'app/assets/icons'
90
90
 
91
- replace_in_file 'config/initializers/assets.rb',
92
- '# Rails.application.config.assets.precompile += %w( search.js )',
93
- 'Rails.application.config.assets.precompile += %w( ie.css )'
94
-
95
91
  if options[:administration]
96
92
  directory 'admin_assets', 'app/assets'
97
93
 
@@ -112,6 +108,9 @@ module BlueberryRails
112
108
  end
113
109
  copy_file 'config/initializers/airbrake.rb',
114
110
  'config/initializers/airbrake.rb'
111
+
112
+ copy_file 'config/initializers/plurals.rb',
113
+ 'config/initializers/plurals.rb'
115
114
  end
116
115
 
117
116
  def create_pryrc
@@ -279,7 +278,7 @@ module BlueberryRails
279
278
 
280
279
  def cache_and_compress
281
280
  configure_environment 'production',
282
- 'config.static_cache_control = \'public, max-age=31536000\''
281
+ "config.public_file_server.headers = {\n 'Cache-Control' => 'public, max-age=31536000'\n }"
283
282
  configure_environment 'production',
284
283
  'config.middleware.insert_before ActionDispatch::Static, Rack::Deflater'
285
284
  end
@@ -375,7 +374,7 @@ module BlueberryRails
375
374
  directory 'gulp/tasks'
376
375
  directory 'gulp/util'
377
376
  copy_file 'gulp/gulpfile.js', 'gulpfile.js'
378
- copy_file 'gulp/package.json', 'package.json'
377
+ copy_file 'gulp/package.json', 'package.json', force: true
379
378
  end
380
379
  end
381
380
  end
@@ -19,8 +19,8 @@ module BlueberryRails
19
19
  class_option :devise_model, type: :string, aliases: '-M', default: 'User',
20
20
  desc: 'Name of devise model to generate'
21
21
 
22
- class_option :skip_test_unit, type: :boolean, aliases: '-T', default: true,
23
- desc: 'Skip Test::Unit files'
22
+ class_option :skip_test, type: :boolean, aliases: '-T', default: true,
23
+ desc: 'Skip Test files'
24
24
 
25
25
  class_option :skip_turbolinks, type: :boolean, default: true,
26
26
  desc: 'Skip turbolinks gem'
@@ -1,7 +1,7 @@
1
1
  module BlueberryRails
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'.freeze
3
3
 
4
- RUBY_VERSION = '2.3.1'
4
+ RUBY_VERSION = '2.4.0'.freeze
5
5
 
6
- RAILS_VERSION = '5.0.0.1'
6
+ RAILS_VERSION = '5.1.1'.freeze
7
7
  end
@@ -18,6 +18,7 @@ class BlueberryRailsTest < Minitest::Test
18
18
  create_project
19
19
 
20
20
  assert_exist_file 'config/initializers/simple_form.rb'
21
+ assert_exist_file 'config/initializers/plurals.rb'
21
22
  assert_exist_file '.hound.yml'
22
23
  assert_exist_file '.rubocop.yml'
23
24
  assert_exist_file 'circle.yml'
@@ -27,7 +28,7 @@ class BlueberryRailsTest < Minitest::Test
27
28
  assert_file_have_content 'bin/setup', 'bundle install --deployment'
28
29
  assert_file_have_content 'Procfile', 'bundle exec puma'
29
30
  assert_file_have_content 'config/puma.rb', 'preload_app!'
30
- assert_file_have_content 'config/environments/production.rb', 'static_cache_control'
31
+ assert_file_have_content 'config/environments/production.rb', 'Cache-Control'
31
32
  assert_file_have_content 'config/environments/production.rb', 'Rack::Deflater'
32
33
  assert_file_have_content 'Guardfile', 'factories'
33
34
  assert_file_have_content 'config/secrets.yml', 'staging'
@@ -6,6 +6,9 @@ gem 'airbrake'
6
6
  <% if !options[:gulp] -%>
7
7
  gem 'autoprefixer-rails'
8
8
  <% end -%>
9
+ <% if options[:administration] -%>
10
+ gem 'blueberry_admin'
11
+ <% end -%>
9
12
  gem 'coffee-rails', '~> 4.2'
10
13
  <% if options[:devise] -%>
11
14
  gem 'devise'
@@ -21,7 +24,7 @@ gem 'sassc-rails'
21
24
  gem 'simple_form'
22
25
  gem 'slim-rails'
23
26
  <% if options[:translation_engine] -%>
24
- gem 'translation_engine', github: 'blueberryapps/translation-engine', branch: 'rails-5-support'
27
+ gem 'translation_engine', github: 'blueberryapps/translation-engine'
25
28
  <% end -%>
26
29
  gem 'uglifier', '>= 1.3.0'
27
30
 
@@ -1,4 +1,4 @@
1
1
  $icon-font-path: 'bootstrap-sass/assets/fonts/bootstrap/'
2
2
 
3
- @import bootstrap-sass
3
+ @import blueberry_admin
4
4
  // @import admin/**/*
@@ -1,12 +1,9 @@
1
- .row
2
- .col-md-12
3
- .jumbotron
4
- .row
5
- .col-md-9
6
- h2 Resources
7
- col-md-3
8
- = link_to 'Nový resource', '#', class: 'btn-lg btn-success pull-right'
1
+ .content-header
2
+ h1
3
+ span.glyphicon.glyphicon-user
4
+ span.text =< t '.title'
9
5
 
10
- .row
11
- .col-md-12
12
- .panel.panel-default
6
+ ol.breadcrumb
7
+ li = link_to 'Home', [:admin, :root]
8
+ li.active
9
+ strong =< t '.title'
@@ -0,0 +1,2 @@
1
+ ul.sidebar-menu
2
+ li.logo = link_to image_tag('blueberry-logo.png'), admin_root_path
@@ -0,0 +1,10 @@
1
+ nav.navbar.navbar-static-top role="navigation"
2
+ .navbar-custom-menu
3
+ ul.nav.navbar-nav
4
+ li
5
+ = link_to '#'
6
+ i.glyphicon.glyphicon-user>
7
+ span.role = current_administrator.email.split('@').first
8
+ li
9
+ = link_to destroy_administrator_session_path, method: :delete, title: t('.logout')
10
+ i.glyphicon.glyphicon-log-out
@@ -1,9 +1,15 @@
1
1
  Airbrake.configure do |config|
2
- config.host = 'http://errors.blueberry.cz'
3
- config.project_id = -1
2
+ config.host = 'https://errors.blueberry.cz'
3
+ config.project_id = 1
4
4
  config.project_key = 'API_KEY'
5
5
 
6
6
  config.environment = Rails.env
7
7
  config.ignore_environments = %w(development test)
8
8
  config.blacklist_keys = [/password/i]
9
9
  end
10
+
11
+ Airbrake.add_filter do |notice|
12
+ if notice[:errors].any? { |error| error[:type] == 'ActiveRecord::RecordNotFound' }
13
+ notice.ignore!
14
+ end
15
+ end
@@ -0,0 +1 @@
1
+ I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization)
@@ -19,5 +19,12 @@ if %w(production staging).include? Rails.env
19
19
  # If true TranslationEngine will throw exceptions on connection problems
20
20
  # If false TranslationEngine will just log exception to Rails.logger
21
21
  config.raise_exceptions = Rails.env.development?
22
+
23
+ # Disables sending new translations to Translation Server
24
+ config.disable_sending_translations = Rails.env.production?
25
+
26
+ # Caches downloaded translations for given amount of seconds before checking
27
+ # for new ones
28
+ config.cache_timeout = Rails.env.production? ? 60 : 0
22
29
  end
23
30
  end
@@ -1,6 +1,6 @@
1
1
  module AdminHelper
2
2
  def simple_form_for(record, options = {}, &block)
3
- if controller.send(:_layout) == 'admin'
3
+ if controller.send(:_layout, ['layout']) == 'admin'
4
4
  options.reverse_merge!(wrapper: :vertical_form)
5
5
  end
6
6
  super
data/templates/puma.rb CHANGED
@@ -1,6 +1,6 @@
1
- workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2
- threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
3
- threads threads_count, threads_count
1
+ workers Integer(ENV['WEB_CONCURRENCY'] || 1)
2
+ threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 8)
3
+ threads Integer(threads_count / 2), threads_count
4
4
 
5
5
  preload_app!
6
6
 
@@ -11,11 +11,15 @@ html
11
11
  = csrf_meta_tags
12
12
 
13
13
  body class=body_class
14
- = render 'admin/partials/menu'
14
+ .wrapper
15
+ .sidebar
16
+ = render 'admin/partials/nav_left'
15
17
 
16
- .container
17
- .row = render 'application/flashes'
18
- = yield
18
+ .content-wrapper
19
+ .header
20
+ = render 'admin/partials/nav_top'
21
+ = render 'application/flashes'
22
+ = yield
19
23
 
20
24
  = javascript_include_tag :admin
21
25
  = yield :javascript
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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlueberryApps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2017-06-19 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: 5.0.0.1
33
+ version: 5.1.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: 5.0.0.1
40
+ version: 5.1.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +88,8 @@ files:
88
88
  - templates/admin_controllers/base_controller.rb
89
89
  - templates/admin_controllers/dashboard_controller.rb
90
90
  - templates/admin_views/dashboard/show.html.slim
91
- - templates/admin_views/partials/_menu.html.slim
91
+ - templates/admin_views/partials/_nav_left.html.slim
92
+ - templates/admin_views/partials/_nav_top.html.slim
92
93
  - templates/app.json.erb
93
94
  - templates/assets/icons/_font_icons.scss
94
95
  - templates/assets/images/blueberry-logo.png
@@ -117,6 +118,7 @@ files:
117
118
  - templates/assets/stylesheets/frontend/utils/renderto-debug.sass
118
119
  - templates/circle.yml.erb
119
120
  - templates/config/initializers/airbrake.rb
121
+ - templates/config/initializers/plurals.rb
120
122
  - templates/config/initializers/simple_form_bootstrap.rb
121
123
  - templates/config/initializers/translation_engine.rb
122
124
  - templates/controllers/errors_controller.rb
@@ -225,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
227
  version: '0'
226
228
  requirements: []
227
229
  rubyforge_project:
228
- rubygems_version: 2.5.1
230
+ rubygems_version: 2.6.8
229
231
  signing_key:
230
232
  specification_version: 4
231
233
  summary: A Rails app template by BlueberryApps
@@ -1,13 +0,0 @@
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