cybele 2.0.0 → 2.1.0
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 +5 -5
- data/.flayignore +1 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +14 -0
- data/README.md +3 -3
- data/cybele.gemspec +2 -2
- data/lib/cybele.rb +1 -1
- data/lib/cybele/app_builder.rb +1 -1
- data/lib/cybele/generators/app_generator.rb +4 -13
- data/lib/cybele/helpers/active_storage.rb +40 -0
- data/lib/cybele/helpers/devise.rb +7 -1
- data/lib/cybele/helpers/error_pages.rb +1 -1
- data/lib/cybele/helpers/general.rb +0 -4
- data/lib/cybele/helpers/staging.rb +0 -4
- data/lib/cybele/version.rb +2 -2
- data/spec/features/new_default_project_spec.rb +1 -10
- data/spec/features/new_not_default_project_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -1
- data/templates/Gemfile.erb +6 -3
- data/templates/README.md.erb +1 -1
- data/templates/{paperclip/paperclip_env_sample.erb → active_storage/amazon_env_all.erb} +2 -2
- data/templates/app_files/app/assets/javascripts/application.js +1 -8
- data/templates/app_files/app/assets/javascripts/hq/application.js +0 -7
- data/templates/app_files/app/views/layouts/application.html.haml.erb +2 -4
- data/templates/app_files/app/views/layouts/hq/application.html.haml.erb +2 -3
- data/templates/app_files/bootstrap_Gemfile.erb +2 -2
- data/templates/cybele_gitignore +3 -0
- data/templates/devise/devise_protect_from_forgery.rb.erb +2 -0
- data/templates/docker/Dockerfile.erb +1 -1
- data/templates/dotenv/.env.local.erb +0 -2
- data/templates/dotenv/.env.production.erb +0 -2
- data/templates/dotenv/.env.sample.erb +2 -2
- data/templates/dotenv/.env.staging.erb +0 -2
- data/templates/sidekiq/sidekiq.rb.erb +3 -4
- data/templates/sidekiq/sidekiq_Gemfile.erb +2 -2
- data/templates/simple_form/simple_form_Gemfile.erb +1 -1
- metadata +13 -21
- data/lib/cybele/helpers/paperclip.rb +0 -33
- data/spec/support/paperclip_test_helper.rb +0 -38
- data/templates/paperclip/paperclip.rb.erb +0 -11
- data/templates/paperclip/paperclip_Gemfile.erb +0 -4
- data/templates/paperclip/paperclip_env_local.erb +0 -6
- data/templates/paperclip/paperclip_env_production.erb +0 -6
- data/templates/paperclip/paperclip_env_staging.erb +0 -6
- data/templates/paperclip/paperclip_settings.yml.erb +0 -10
- data/templates/secrets.yml.erb +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 265c511e24b5aa4e0e12b5e2c2c3d262564f70293052c4705f2817976b5f73f3
|
|
4
|
+
data.tar.gz: c02bb3c18aee4fc5f202add2c74e6a6f77f9e40c66f979c4d8ea31526701fbb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a0ca4fba87a8933618aec2d0bce1c90f3e690ff131e175e3572a1943bb4dd632231e36eebcbc9a6ef377dfe87dc01acf17e07a328b263973cd0bd439a2f24225
|
|
7
|
+
data.tar.gz: 25e9d9cac664756a1925c8eb523b32e237babf5c0b51012bf1702c19ad9669383b788fa8ba9f2992e3e359a02fe111b45f1e5cb51b0c29cb1ae65110b703f2dd
|
data/.flayignore
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.5.1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
|
|
2
2
|
#### [Current]
|
|
3
|
+
* [52832d1](../../commit/52832d1) - __(İsmail Akbudak)__ Fix pronto warnings
|
|
4
|
+
* [148c6d4](../../commit/148c6d4) - __(İsmail Akbudak)__ Update CHANGELOG file
|
|
5
|
+
* [ee9d462](../../commit/ee9d462) - __(İsmail AKBUDAK)__ Merge pull request [#127](../../issues/127) from lab2023/feature/update_ruby_rails_to_latest_version
|
|
6
|
+
|
|
7
|
+
KBP-207 #time 2d - Update rails, ruby and some gems version to latest version
|
|
8
|
+
* [bf9734d](../../commit/bf9734d) - __(İsmail Akbudak)__ Fix rails version control spec error
|
|
9
|
+
* [5187400](../../commit/5187400) - __(Hamdi Bayhan)__ KBP-207 #time 30m - Add AWS S3 settings for environment variable and remove unnecessary secret key file
|
|
10
|
+
* [f1137c1](../../commit/f1137c1) - __(Hamdi Bayhan)__ KBP-207 #time 2d - Update rails, ruby and some gems version to latest version
|
|
11
|
+
* [55026e7](../../commit/55026e7) - __(İsmail Akbudak)__ Merge tag 'v2.0.0' into develop
|
|
12
|
+
|
|
13
|
+
v2.0.0
|
|
14
|
+
|
|
15
|
+
#### v2.0.0
|
|
16
|
+
* [4f57300](../../commit/4f57300) - __(İsmail Akbudak)__ Update CHANGELOG file
|
|
3
17
|
* [320d265](../../commit/320d265) - __(İsmail AKBUDAK)__ Update README.md
|
|
4
18
|
* [2b203bd](../../commit/2b203bd) - __(İsmail Akbudak)__ Update README file
|
|
5
19
|
* [69f24dc](../../commit/69f24dc) - __(İsmail Akbudak)__ Merged in feature/remove_env_local_from_gitignore (pull request [#41](../../issues/41))
|
data/README.md
CHANGED
|
@@ -13,8 +13,8 @@ western colonies from around the 6th century BCE.
|
|
|
13
13
|
|
|
14
14
|
Before generating your application, you will need:
|
|
15
15
|
|
|
16
|
-
* Ruby ~> 2.
|
|
17
|
-
* Rails ~> 5.
|
|
16
|
+
* Ruby ~> 2.5.1
|
|
17
|
+
* Rails ~> 5.2.0
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
@@ -74,4 +74,4 @@ Once you've made your great commits:
|
|
|
74
74
|
|
|
75
75
|
## License
|
|
76
76
|
|
|
77
|
-
Copyright © 2013-
|
|
77
|
+
Copyright © 2013-2018 [lab2023 - information technologies](http://lab2023.com)
|
data/cybele.gemspec
CHANGED
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.require_paths = %w[lib]
|
|
25
25
|
|
|
26
26
|
spec.add_dependency 'bundler', '~> 1.5'
|
|
27
|
-
spec.add_runtime_dependency 'rails',
|
|
27
|
+
spec.add_runtime_dependency 'rails', Cybele::RAILS_VERSION
|
|
28
28
|
spec.add_development_dependency 'pronto', '~> 0.9.5'
|
|
29
29
|
spec.add_development_dependency 'pronto-fasterer', '~> 0.9.0'
|
|
30
30
|
spec.add_development_dependency 'pronto-flay', '~> 0.9.0'
|
|
@@ -34,4 +34,4 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.add_development_dependency 'thor', '~> 0.19.4'
|
|
35
35
|
|
|
36
36
|
spec.extra_rdoc_files = %w[README.md MIT-LICENSE]
|
|
37
|
-
end
|
|
37
|
+
end
|
data/lib/cybele.rb
CHANGED
|
@@ -13,13 +13,13 @@ require 'cybele/helpers/recipient_interceptor'
|
|
|
13
13
|
require 'cybele/helpers/haml'
|
|
14
14
|
require 'cybele/helpers/locale_language'
|
|
15
15
|
require 'cybele/helpers/mailer'
|
|
16
|
-
require 'cybele/helpers/paperclip'
|
|
17
16
|
require 'cybele/helpers/devise'
|
|
18
17
|
require 'cybele/helpers/docker'
|
|
19
18
|
require 'cybele/helpers/error_pages'
|
|
20
19
|
require 'cybele/helpers/audited'
|
|
21
20
|
require 'cybele/helpers/routes'
|
|
22
21
|
require 'cybele/helpers/general'
|
|
22
|
+
require 'cybele/helpers/active_storage'
|
|
23
23
|
require 'cybele/helpers/basic_authentication'
|
|
24
24
|
require 'cybele/helpers/app_files/assets_files'
|
|
25
25
|
require 'cybele/helpers/app_files/controller_files'
|
data/lib/cybele/app_builder.rb
CHANGED
|
@@ -13,7 +13,6 @@ module Cybele
|
|
|
13
13
|
include Cybele::Helpers::Haml
|
|
14
14
|
include Cybele::Helpers::LocaleLanguage
|
|
15
15
|
include Cybele::Helpers::Mailer
|
|
16
|
-
include Cybele::Helpers::Paperclip
|
|
17
16
|
include Cybele::Helpers::Devise
|
|
18
17
|
include Cybele::Helpers::ErrorPages
|
|
19
18
|
include Cybele::Helpers::Audited
|
|
@@ -30,6 +29,7 @@ module Cybele
|
|
|
30
29
|
include Cybele::Helpers::Docker
|
|
31
30
|
include Cybele::Helpers::Pronto
|
|
32
31
|
include Cybele::Helpers::General
|
|
32
|
+
include Cybele::Helpers::ActiveStorage
|
|
33
33
|
|
|
34
34
|
def setup_gitignore_files
|
|
35
35
|
remove_file '.gitignore', force: true
|
|
@@ -99,11 +99,6 @@ module Cybele
|
|
|
99
99
|
build :add_editor_config
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
def setup_ruby_version
|
|
103
|
-
say 'Add .ruby-version file', :green
|
|
104
|
-
build :add_ruby_version
|
|
105
|
-
end
|
|
106
|
-
|
|
107
102
|
def setup_cybele_version
|
|
108
103
|
say 'Add .VERSION.txt file', :green
|
|
109
104
|
build :add_cybele_version
|
|
@@ -189,11 +184,6 @@ module Cybele
|
|
|
189
184
|
build :configure_haml
|
|
190
185
|
end
|
|
191
186
|
|
|
192
|
-
def add_staging_secret_key
|
|
193
|
-
say 'Add staging secret key to secret.yml file', :green
|
|
194
|
-
build :add_staging_secret_key_to_secrets_yml
|
|
195
|
-
end
|
|
196
|
-
|
|
197
187
|
def setup_bullet_config
|
|
198
188
|
say 'Setup bullet config'
|
|
199
189
|
build :configure_bullet
|
|
@@ -204,9 +194,9 @@ module Cybele
|
|
|
204
194
|
build :force_ssl_setting
|
|
205
195
|
end
|
|
206
196
|
|
|
207
|
-
def
|
|
208
|
-
say '
|
|
209
|
-
build :
|
|
197
|
+
def active_storage
|
|
198
|
+
say 'Make active_storage amazon configuration', :green
|
|
199
|
+
build :active_storage_setting
|
|
210
200
|
end
|
|
211
201
|
|
|
212
202
|
def setup_devise
|
|
@@ -260,6 +250,7 @@ module Cybele
|
|
|
260
250
|
build :generate_devise_views
|
|
261
251
|
build :configure_routes
|
|
262
252
|
build :customize_controller_files
|
|
253
|
+
build :add_devise_protect_from_forgery
|
|
263
254
|
build :add_devise_strong_parameter
|
|
264
255
|
build :add_devise_authenticate_admin
|
|
265
256
|
build :configure_basic_authentication
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cybele
|
|
4
|
+
module Helpers
|
|
5
|
+
module ActiveStorage
|
|
6
|
+
def active_storage_setting
|
|
7
|
+
%w[config/environments/production.rb config/environments/staging.rb
|
|
8
|
+
config/environments/development.rb].each do |file|
|
|
9
|
+
gsub_file file,
|
|
10
|
+
/config.active_storage.service = :local/,
|
|
11
|
+
'config.active_storage.service = :amazon'
|
|
12
|
+
end
|
|
13
|
+
handle_active_storage_change_file_content
|
|
14
|
+
%w[.env.local .env.production .env.staging .env.sample].each do |env|
|
|
15
|
+
append_file(env, template_content('active_storage/amazon_env_all.erb'))
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def handle_active_storage_change_file_content
|
|
22
|
+
replace_in_file 'config/storage.yml',
|
|
23
|
+
'Rails.application.credentials.dig(:aws, :access_key_id)',
|
|
24
|
+
"ENV['AWS_ACCESS_KEY_ID']"
|
|
25
|
+
replace_in_file 'config/storage.yml',
|
|
26
|
+
'Rails.application.credentials.dig(:aws, :secret_access_key)',
|
|
27
|
+
"ENV['AWS_SECRET_ACCESS_KEY']"
|
|
28
|
+
replace_in_file 'config/storage.yml',
|
|
29
|
+
'us-east-1',
|
|
30
|
+
"<%= ENV['AWS_REGION'] %>"
|
|
31
|
+
replace_in_file 'config/storage.yml',
|
|
32
|
+
'your_own_bucket',
|
|
33
|
+
"<%= ENV['BUCKET_NAME'] %>"
|
|
34
|
+
replace_in_file 'config/storage.yml',
|
|
35
|
+
'# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)',
|
|
36
|
+
'# AWS S3 access variable'
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -33,10 +33,16 @@ module Cybele
|
|
|
33
33
|
after: 'class Hq::ApplicationController < ApplicationController'
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def add_devise_protect_from_forgery
|
|
37
|
+
inject_into_file 'app/controllers/application_controller.rb',
|
|
38
|
+
template_content('devise/devise_protect_from_forgery.rb.erb'),
|
|
39
|
+
after: 'respond_to :html, :js, :json'
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
def add_devise_strong_parameter
|
|
37
43
|
inject_into_file 'app/controllers/application_controller.rb',
|
|
38
44
|
template_content('devise/devise_strong_parameter.rb.erb'),
|
|
39
|
-
after: 'protect_from_forgery with: :exception'
|
|
45
|
+
after: 'protect_from_forgery with: :exception, prepend: true'
|
|
40
46
|
|
|
41
47
|
inject_into_file 'app/controllers/application_controller.rb',
|
|
42
48
|
template_content('devise/devise_before_action_strong_parameter.rb.erb'),
|
|
@@ -10,7 +10,7 @@ module Cybele
|
|
|
10
10
|
|
|
11
11
|
inject_into_file 'app/controllers/application_controller.rb',
|
|
12
12
|
template_content('error_pages/error_method.erb'),
|
|
13
|
-
after: 'protect_from_forgery with: :exception'
|
|
13
|
+
after: 'protect_from_forgery with: :exception, prepend: true'
|
|
14
14
|
|
|
15
15
|
inject_into_file 'config/routes.rb',
|
|
16
16
|
template_content('error_pages/error_route.erb.rb'),
|
|
@@ -33,10 +33,6 @@ module Cybele
|
|
|
33
33
|
copy_file 'editorconfig', '.editorconfig'
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
def add_ruby_version
|
|
37
|
-
copy_file 'ruby-version', '.ruby-version'
|
|
38
|
-
end
|
|
39
|
-
|
|
40
36
|
def add_cybele_version
|
|
41
37
|
copy_file 'VERSION.txt', 'VERSION.txt'
|
|
42
38
|
run 'ln -s ../VERSION.txt public/VERSION.txt'
|
|
@@ -6,10 +6,6 @@ module Cybele
|
|
|
6
6
|
def setup_staging_environment
|
|
7
7
|
run 'cp config/environments/production.rb config/environments/staging.rb'
|
|
8
8
|
end
|
|
9
|
-
|
|
10
|
-
def add_staging_secret_key_to_secrets_yml
|
|
11
|
-
append_file 'config/secrets.yml', template_content('secrets.yml.erb')
|
|
12
|
-
end
|
|
13
9
|
end
|
|
14
10
|
end
|
|
15
11
|
end
|
data/lib/cybele/version.rb
CHANGED
|
@@ -12,7 +12,7 @@ RSpec.describe 'Create new project with default configuration' do
|
|
|
12
12
|
it 'uses default Gemfile' do
|
|
13
13
|
gemfile_file = content('Gemfile')
|
|
14
14
|
readme_file = content('README.md')
|
|
15
|
-
expect(gemfile_file).to match(/^gem 'rails', '#{Cybele::RAILS_VERSION}'/)
|
|
15
|
+
expect(gemfile_file).to match(/^gem 'rails', '#{Cybele::RAILS_VERSION.first}'/)
|
|
16
16
|
expect(readme_file).to match(/^# #{app_name.capitalize}/)
|
|
17
17
|
expect(readme_file).to match(/^# Docker development/)
|
|
18
18
|
expect(readme_file).to match(/^➜ ✗ redis-server/)
|
|
@@ -160,19 +160,10 @@ RSpec.describe 'Create new project with default configuration' do
|
|
|
160
160
|
expect(simple_form_tr_yml_file).to match('simple_form')
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
-
it 'make control secret_key_base for staging' do
|
|
164
|
-
secret_file = content('config/secrets.yml')
|
|
165
|
-
expect(secret_file).to match('staging')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
163
|
it 'control .env files' do
|
|
169
164
|
dotenv_test
|
|
170
165
|
end
|
|
171
166
|
|
|
172
|
-
it 'uses paperclip' do
|
|
173
|
-
paperclip_test
|
|
174
|
-
end
|
|
175
|
-
|
|
176
167
|
it 'uses mailer' do
|
|
177
168
|
gemfile_file = content('Gemfile')
|
|
178
169
|
expect(gemfile_file).to match("gem 'mailtrap'")
|
|
@@ -158,15 +158,6 @@ RSpec.describe 'Create new project without default configuration' do
|
|
|
158
158
|
)
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
it 'make control secret_key_base for staging' do
|
|
162
|
-
secret_file = content('config/secrets.yml')
|
|
163
|
-
expect(secret_file).to match('staging')
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
it 'uses paperclip' do
|
|
167
|
-
paperclip_test
|
|
168
|
-
end
|
|
169
|
-
|
|
170
161
|
it 'control .env files' do
|
|
171
162
|
dotenv_test
|
|
172
163
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -14,7 +14,6 @@ RSpec.configure do |config|
|
|
|
14
14
|
config.include DotenvTestHelper
|
|
15
15
|
config.include ConfigTestHelper
|
|
16
16
|
config.include DeviseTestHelper
|
|
17
|
-
config.include PaperclipTestHelper
|
|
18
17
|
config.include LocaleLanguageTestHelper
|
|
19
18
|
config.include ResponderTestHelper
|
|
20
19
|
config.include ErrorPagesTestHelper
|
data/templates/Gemfile.erb
CHANGED
|
@@ -6,10 +6,10 @@ gem 'thor', '~> 0.19.4'
|
|
|
6
6
|
gem 'recipient_interceptor', '~> 0.1.2'
|
|
7
7
|
|
|
8
8
|
# RailsConfig helps you easily manage environment specific Rails settings in an easy and usable manner
|
|
9
|
-
gem 'config', '~> 1.
|
|
9
|
+
gem 'config', '~> 1.7'
|
|
10
10
|
|
|
11
11
|
# Rollbar is an error tracking service.
|
|
12
|
-
gem 'rollbar', '~> 2.
|
|
12
|
+
gem 'rollbar', '~> 2.16', '>= 2.16.2'
|
|
13
13
|
|
|
14
14
|
# Ransack is the successor to the MetaSearch gem.
|
|
15
15
|
gem 'ransack', '~> 1.8', '>= 1.8.4'
|
|
@@ -53,7 +53,10 @@ end
|
|
|
53
53
|
gem 'rails-i18n', '~> 5.0', '>= 5.0.4'
|
|
54
54
|
|
|
55
55
|
# Flexible authentication solution for Rails with Warden
|
|
56
|
-
gem 'devise', '~> 4.3'
|
|
56
|
+
gem 'devise', '~> 4.4', '>= 4.4.3'
|
|
57
57
|
|
|
58
58
|
# Audited is an ORM extension that logs all changes to your models
|
|
59
59
|
gem 'audited', '~> 4.5'
|
|
60
|
+
|
|
61
|
+
# Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
|
|
62
|
+
gem 'aws-sdk-s3', '~> 1.15'
|
data/templates/README.md.erb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# TODOs
|
|
4
4
|
- Change email sender domain address and basic_auth info in `config/settings.yml`
|
|
5
5
|
- Change email sender domain address in `config/initializers/devise.rb`
|
|
6
|
-
- Add your
|
|
6
|
+
- Add your master key variable to `.env` files like in `.env.sample` file.
|
|
7
7
|
|
|
8
8
|
<% unless @options[:skip_docker] %>
|
|
9
9
|
# Docker development
|
|
@@ -48,14 +48,7 @@ var ready = function(){
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
ready();
|
|
53
|
-
var script = document.createElement("script");
|
|
54
|
-
script.src = "https://use.fontawesome.com/releases/v5.0.1/js/all.js";
|
|
55
|
-
document.head.appendChild(script);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
document.addEventListener("turbolinks:load", ready)
|
|
51
|
+
document.addEventListener("turbolinks:load", ready);
|
|
59
52
|
|
|
60
53
|
$(window).on('page:load', ready);
|
|
61
54
|
|
|
@@ -49,13 +49,6 @@ var ready = function(){
|
|
|
49
49
|
|
|
50
50
|
document.addEventListener("turbolinks:load", ready);
|
|
51
51
|
|
|
52
|
-
$(document).on('turbolinks:load', function () {
|
|
53
|
-
ready();
|
|
54
|
-
var script = document.createElement("script");
|
|
55
|
-
script.src = "https://use.fontawesome.com/releases/v5.0.1/js/all.js";
|
|
56
|
-
document.head.appendChild(script);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
52
|
$(window).on('page:load', ready);
|
|
60
53
|
|
|
61
54
|
$(document).on('page:fetch', function() {
|
|
@@ -12,10 +12,8 @@
|
|
|
12
12
|
%meta{ name: 'author', content: '<%= app_name.capitalize %>' }
|
|
13
13
|
%link{ rel: 'shortcut icon', href: '/images/favicon.png' }
|
|
14
14
|
|
|
15
|
-
= stylesheet_link_tag '
|
|
16
|
-
'
|
|
17
|
-
media: 'all',
|
|
18
|
-
'data-turbolinks-track': 'reload'
|
|
15
|
+
= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.0.8/css/all.css',
|
|
16
|
+
'application', media: 'all', 'data-turbolinks-track': 'reload'
|
|
19
17
|
= javascript_include_tag 'application',
|
|
20
18
|
'data-turbolinks-track': 'reload'
|
|
21
19
|
= csrf_meta_tags
|
|
@@ -25,9 +25,8 @@
|
|
|
25
25
|
= csrf_meta_tags
|
|
26
26
|
|
|
27
27
|
/ Stylesheets (Don't change include order)
|
|
28
|
-
= stylesheet_link_tag '
|
|
29
|
-
media: 'all',
|
|
30
|
-
'data-turbolinks-track': 'reload'
|
|
28
|
+
= stylesheet_link_tag 'https://use.fontawesome.com/releases/v5.0.8/css/all.css',
|
|
29
|
+
'hq/application', media: 'all', 'data-turbolinks-track': 'reload'
|
|
31
30
|
|
|
32
31
|
/ Javascripts
|
|
33
32
|
= javascript_include_tag '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js',
|
data/templates/cybele_gitignore
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
require 'sidekiq'
|
|
2
2
|
require 'sidekiq/web'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
labels = "<%= app_name.parameterize %>_#{Rails.env}"
|
|
5
5
|
settings = {
|
|
6
|
-
url: ENV['REDISTOGO_URL'] || 'redis://localhost:6379/0'
|
|
7
|
-
namespace: namespace
|
|
6
|
+
url: ENV['REDISTOGO_URL'] || 'redis://localhost:6379/0'
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
Sidekiq.configure_server { |config| config.redis = settings }
|
|
11
10
|
Sidekiq.configure_client { |config| config.redis = settings }
|
|
12
|
-
Sidekiq.options[:labels] <<
|
|
11
|
+
Sidekiq.options[:labels] << labels
|
|
13
12
|
|
|
14
13
|
# Open this if you have scheduled jobs
|
|
15
14
|
# schedule_file = 'config/sidekiq_schedule.yml'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# Use Sidekiq as a background job processor through Active Job
|
|
3
|
-
gem 'sidekiq', '~>
|
|
4
|
-
gem 'sidekiq-cron', '~> 0.
|
|
3
|
+
gem 'sidekiq', '~> 5.1', '>= 5.1.3'
|
|
4
|
+
gem 'sidekiq-cron', '~> 0.6.3'
|
|
5
5
|
# Cocaine run bash commands with ruby. Required for sidekiq start commands
|
|
6
6
|
gem 'cocaine', '~> 0.5.8'
|
|
7
7
|
# Devise Async provides an easy way to configure Devise to send its emails asynchronously using ActiveJob.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cybele
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lab2023
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-07-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,20 +30,20 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
34
|
-
- - "
|
|
33
|
+
version: 5.2.0
|
|
34
|
+
- - ">="
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: 5.
|
|
36
|
+
version: 5.2.0
|
|
37
37
|
type: :runtime
|
|
38
38
|
prerelease: false
|
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
|
41
41
|
- - "~>"
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version:
|
|
44
|
-
- - "
|
|
43
|
+
version: 5.2.0
|
|
44
|
+
- - ">="
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: 5.
|
|
46
|
+
version: 5.2.0
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: pronto
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -176,6 +176,7 @@ files:
|
|
|
176
176
|
- lib/cybele/app_builder.rb
|
|
177
177
|
- lib/cybele/generators/app_generator.rb
|
|
178
178
|
- lib/cybele/helpers.rb
|
|
179
|
+
- lib/cybele/helpers/active_storage.rb
|
|
179
180
|
- lib/cybele/helpers/app_files/assets_files.rb
|
|
180
181
|
- lib/cybele/helpers/app_files/controller_files.rb
|
|
181
182
|
- lib/cybele/helpers/app_files/helper_files.rb
|
|
@@ -194,7 +195,6 @@ files:
|
|
|
194
195
|
- lib/cybele/helpers/haml.rb
|
|
195
196
|
- lib/cybele/helpers/locale_language.rb
|
|
196
197
|
- lib/cybele/helpers/mailer.rb
|
|
197
|
-
- lib/cybele/helpers/paperclip.rb
|
|
198
198
|
- lib/cybele/helpers/pronto.rb
|
|
199
199
|
- lib/cybele/helpers/recipient_interceptor.rb
|
|
200
200
|
- lib/cybele/helpers/responders.rb
|
|
@@ -218,12 +218,12 @@ files:
|
|
|
218
218
|
- spec/support/git_ignore_test_helper.rb
|
|
219
219
|
- spec/support/locale_language_test_helper.rb
|
|
220
220
|
- spec/support/mail_test_helpers.rb
|
|
221
|
-
- spec/support/paperclip_test_helper.rb
|
|
222
221
|
- spec/support/pronto_test_helpers.rb
|
|
223
222
|
- spec/support/responder_test_helper.rb
|
|
224
223
|
- templates/Gemfile.erb
|
|
225
224
|
- templates/README.md.erb
|
|
226
225
|
- templates/VERSION.txt
|
|
226
|
+
- templates/active_storage/amazon_env_all.erb
|
|
227
227
|
- templates/app_files/app/assets/javascripts/application.js
|
|
228
228
|
- templates/app_files/app/assets/javascripts/hq/application.js
|
|
229
229
|
- templates/app_files/app/assets/stylesheets/application.sass
|
|
@@ -347,6 +347,7 @@ files:
|
|
|
347
347
|
- templates/devise/devise_authenticate_admin.rb.erb
|
|
348
348
|
- templates/devise/devise_before_action_strong_parameter.rb.erb
|
|
349
349
|
- templates/devise/devise_mailer.rb.erb
|
|
350
|
+
- templates/devise/devise_protect_from_forgery.rb.erb
|
|
350
351
|
- templates/devise/devise_strong_parameter.rb.erb
|
|
351
352
|
- templates/devise/devise_views/confirmations/new.html.haml
|
|
352
353
|
- templates/devise/devise_views/mailer/confirmation_instructions.html.haml
|
|
@@ -385,13 +386,6 @@ files:
|
|
|
385
386
|
- templates/mailer/host.rb.erb
|
|
386
387
|
- templates/mailer/mailer_settings.yml.erb
|
|
387
388
|
- templates/mailer/smtp.rb.erb
|
|
388
|
-
- templates/paperclip/paperclip.rb.erb
|
|
389
|
-
- templates/paperclip/paperclip_Gemfile.erb
|
|
390
|
-
- templates/paperclip/paperclip_env_local.erb
|
|
391
|
-
- templates/paperclip/paperclip_env_production.erb
|
|
392
|
-
- templates/paperclip/paperclip_env_sample.erb
|
|
393
|
-
- templates/paperclip/paperclip_env_staging.erb
|
|
394
|
-
- templates/paperclip/paperclip_settings.yml.erb
|
|
395
389
|
- templates/postgresql_database.yml.erb
|
|
396
390
|
- templates/pronto/.flayignore.erb
|
|
397
391
|
- templates/pronto/.haml-lint.yml.erb
|
|
@@ -403,7 +397,6 @@ files:
|
|
|
403
397
|
- templates/recipient_interceptor/recipient_interceptor_staging.rb.erb
|
|
404
398
|
- templates/responders/responders_Gemfile.erb
|
|
405
399
|
- templates/ruby-version
|
|
406
|
-
- templates/secrets.yml.erb
|
|
407
400
|
- templates/settings.yml.erb
|
|
408
401
|
- templates/show_for/show_for_Gemfile.erb
|
|
409
402
|
- templates/sidekiq/sidekiq.rake.erb
|
|
@@ -429,7 +422,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
429
422
|
requirements:
|
|
430
423
|
- - ">="
|
|
431
424
|
- !ruby/object:Gem::Version
|
|
432
|
-
version: 2.
|
|
425
|
+
version: 2.5.1
|
|
433
426
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
434
427
|
requirements:
|
|
435
428
|
- - ">="
|
|
@@ -437,7 +430,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
437
430
|
version: '0'
|
|
438
431
|
requirements: []
|
|
439
432
|
rubyforge_project:
|
|
440
|
-
rubygems_version: 2.
|
|
433
|
+
rubygems_version: 2.7.6
|
|
441
434
|
signing_key:
|
|
442
435
|
specification_version: 4
|
|
443
436
|
summary: Rails 5.x template with responder, simple form, haml, exception notification,
|
|
@@ -457,6 +450,5 @@ test_files:
|
|
|
457
450
|
- spec/support/git_ignore_test_helper.rb
|
|
458
451
|
- spec/support/locale_language_test_helper.rb
|
|
459
452
|
- spec/support/mail_test_helpers.rb
|
|
460
|
-
- spec/support/paperclip_test_helper.rb
|
|
461
453
|
- spec/support/pronto_test_helpers.rb
|
|
462
454
|
- spec/support/responder_test_helper.rb
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Cybele
|
|
4
|
-
module Helpers
|
|
5
|
-
module Paperclip
|
|
6
|
-
def configure_paperclip
|
|
7
|
-
# Add gems
|
|
8
|
-
append_file('Gemfile', template_content('paperclip/paperclip_Gemfile.erb'))
|
|
9
|
-
run_bundle
|
|
10
|
-
|
|
11
|
-
create_paperclip_files
|
|
12
|
-
configure_app_name(%w[.env.sample .env.local .env.staging .env.production])
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
def create_paperclip_files
|
|
18
|
-
# Initialize file
|
|
19
|
-
template 'paperclip/paperclip.rb.erb',
|
|
20
|
-
'config/initializers/paperclip.rb',
|
|
21
|
-
force: true
|
|
22
|
-
# Add paperclip settings to the config/settings.yml file
|
|
23
|
-
append_template_to_files(
|
|
24
|
-
'config/settings.yml' => 'paperclip/paperclip_settings.yml.erb',
|
|
25
|
-
'.env.sample' => 'paperclip/paperclip_env_sample.erb',
|
|
26
|
-
'.env.local' => 'paperclip/paperclip_env_local.erb',
|
|
27
|
-
'.env.staging' => 'paperclip/paperclip_env_staging.erb',
|
|
28
|
-
'.env.production' => 'paperclip/paperclip_env_production.erb'
|
|
29
|
-
)
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module PaperclipTestHelper
|
|
4
|
-
def paperclip_test
|
|
5
|
-
gemfile_file = content('Gemfile')
|
|
6
|
-
expect(gemfile_file).to match(/^gem 'paperclip'/)
|
|
7
|
-
expect(gemfile_file).to match(/^gem 'aws-sdk'/)
|
|
8
|
-
|
|
9
|
-
paperclip_env_file_test
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def paperclip_env_file_test
|
|
15
|
-
paperclip_aws_key_test('.env.sample')
|
|
16
|
-
paperclip_aws_key_test('.env.local',
|
|
17
|
-
bucket: 'dummy_app-development',
|
|
18
|
-
url: 'dummy_app-development.s3.amazonaws.com')
|
|
19
|
-
paperclip_aws_key_test('.environments/.env.local',
|
|
20
|
-
bucket: 'dummy_app-development',
|
|
21
|
-
url: 'dummy_app-development.s3.amazonaws.com')
|
|
22
|
-
paperclip_aws_key_test('.environments/.env.production',
|
|
23
|
-
bucket: 'dummy_app',
|
|
24
|
-
url: 'dummy_app.s3.amazonaws.com')
|
|
25
|
-
paperclip_aws_key_test('.environments/.env.staging',
|
|
26
|
-
bucket: 'dummy_app-staging',
|
|
27
|
-
url: 'dummy_app-staging.s3.amazonaws.com')
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def paperclip_aws_key_test(env, bucket: '', url: '')
|
|
31
|
-
expect(File).to exist(file_project_path(env))
|
|
32
|
-
file = content(env)
|
|
33
|
-
expect(file).to match("S3_BUCKET_NAME=#{bucket}")
|
|
34
|
-
expect(file).to match("AWS_RAW_URL=#{url}")
|
|
35
|
-
expect(file).to match('AWS_ACCESS_KEY_ID=')
|
|
36
|
-
expect(file).to match('AWS_SECRET_ACCESS_KEY=')
|
|
37
|
-
end
|
|
38
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#Remove command lines
|
|
2
|
-
|
|
3
|
-
# Paperclip::Attachment.default_options[:storage] = :s3
|
|
4
|
-
# Paperclip::Attachment.default_options[:s3_host_name] = Settings.AWS.S3.end_point
|
|
5
|
-
# Paperclip::Attachment.default_options[:s3_host_alias] = Settings.AWS.S3.aws_raw_url
|
|
6
|
-
# Paperclip::Attachment.default_options[:bucket] = Settings.AWS.S3.bucket
|
|
7
|
-
# Paperclip::Attachment.default_options[:s3_protocol] = 'https'
|
|
8
|
-
# Paperclip::Attachment.default_options[:s3_credentials] = {
|
|
9
|
-
# access_key_id: Settings.AWS.S3.access_key_id,
|
|
10
|
-
# secret_access_key: Settings.AWS.S3.secret_access_key
|
|
11
|
-
# }
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
AWS:
|
|
3
|
-
S3:
|
|
4
|
-
bucket: <%= ENV['S3_BUCKET_NAME'] %>
|
|
5
|
-
access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
|
|
6
|
-
secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
|
|
7
|
-
aws_url: http://<%= ENV['AWS_RAW_URL'] %>
|
|
8
|
-
aws_raw_url: <%= ENV['AWS_RAW_URL'] %>
|
|
9
|
-
# Bucket region should be ireland for this setting
|
|
10
|
-
end_point: s3-eu-west-1.amazonaws.com
|
data/templates/secrets.yml.erb
DELETED