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 +4 -4
- data/.rubocop.yml +3 -0
- data/.ruby-version +1 -1
- data/circle.yml +1 -0
- data/lib/blueberry_rails/app_builder.rb +5 -6
- data/lib/blueberry_rails/generators/app_generator.rb +2 -2
- data/lib/blueberry_rails/version.rb +3 -3
- data/spec/blueberry_rails_spec.rb +2 -1
- data/templates/Gemfile_custom.erb +4 -1
- data/templates/admin_assets/stylesheets/admin.sass +1 -1
- data/templates/admin_views/dashboard/show.html.slim +8 -11
- data/templates/admin_views/partials/_nav_left.html.slim +2 -0
- data/templates/admin_views/partials/_nav_top.html.slim +10 -0
- data/templates/config/initializers/airbrake.rb +8 -2
- data/templates/config/initializers/plurals.rb +1 -0
- data/templates/config/initializers/translation_engine.rb +7 -0
- data/templates/helpers/admin_helper.rb +1 -1
- data/templates/puma.rb +3 -3
- data/templates/views/layouts/admin.html.slim.erb +8 -4
- metadata +8 -6
- data/templates/admin_views/partials/_menu.html.slim +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c406dea7cfbeac218cb081773eeffd0a27c31f95
|
4
|
+
data.tar.gz: 371ddadce54b93bc4881e398a2529261cb004cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0d5bb28b507c0591e3734d02da80c9527297e3431389021d969dfe67026c41be298ed049a0bf6957d562b13fc0fe3873c233eca809859e54d2a380a7f71348
|
7
|
+
data.tar.gz: 1e209b2600673e51bea02fa11f1681470e787c1ddedf016aa0e58cd36fd660013f3fd477807e937a3b77bc628faaccabca6b5c8233c60dcc71d0e761fb6bd24a
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
data/circle.yml
CHANGED
@@ -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
|
-
|
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 :
|
23
|
-
desc: 'Skip Test
|
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'
|
@@ -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', '
|
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'
|
27
|
+
gem 'translation_engine', github: 'blueberryapps/translation-engine'
|
25
28
|
<% end -%>
|
26
29
|
gem 'uglifier', '>= 1.3.0'
|
27
30
|
|
@@ -1,12 +1,9 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
.
|
4
|
-
|
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
|
-
.
|
11
|
-
|
12
|
-
.
|
6
|
+
ol.breadcrumb
|
7
|
+
li = link_to 'Home', [:admin, :root]
|
8
|
+
li.active
|
9
|
+
strong =< t '.title'
|
@@ -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 = '
|
3
|
-
config.project_id =
|
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
|
data/templates/puma.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
workers Integer(ENV['WEB_CONCURRENCY'] ||
|
2
|
-
threads_count = Integer(ENV['RAILS_MAX_THREADS'] ||
|
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
|
-
|
14
|
+
.wrapper
|
15
|
+
.sidebar
|
16
|
+
= render 'admin/partials/nav_left'
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
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.
|
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:
|
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.
|
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.
|
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/
|
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.
|
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
|