schienenzeppelin 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/main.yml +17 -0
  3. data/.github/workflows/outdated.yml +20 -0
  4. data/.gitignore +282 -0
  5. data/.rspec_status +3 -0
  6. data/.rubocop.yml +28 -0
  7. data/.tool-versions +1 -0
  8. data/CODE_OF_CONDUCT.md +84 -0
  9. data/GALLERY.md +29 -0
  10. data/Gemfile +13 -0
  11. data/Gemfile.lock +184 -0
  12. data/LICENSE +21 -0
  13. data/LICENSE.txt +21 -0
  14. data/README.md +174 -0
  15. data/Rakefile +12 -0
  16. data/TODO.md +32 -0
  17. data/bin/console +15 -0
  18. data/bin/setup +8 -0
  19. data/exe/sz +25 -0
  20. data/images/create.png +0 -0
  21. data/images/error.png +0 -0
  22. data/images/home.png +0 -0
  23. data/images/index.png +0 -0
  24. data/images/login.png +0 -0
  25. data/images/mobile.png +0 -0
  26. data/lib/schienenzeppelin.rb +18 -0
  27. data/lib/schienenzeppelin/app_builder.rb +88 -0
  28. data/lib/schienenzeppelin/app_generator.rb +95 -0
  29. data/lib/schienenzeppelin/helper_base.rb +28 -0
  30. data/lib/schienenzeppelin/helpers/annotate.rb +11 -0
  31. data/lib/schienenzeppelin/helpers/capistrano.rb +35 -0
  32. data/lib/schienenzeppelin/helpers/continuous_integration.rb +12 -0
  33. data/lib/schienenzeppelin/helpers/credentials.rb +49 -0
  34. data/lib/schienenzeppelin/helpers/devise.rb +45 -0
  35. data/lib/schienenzeppelin/helpers/errors.rb +67 -0
  36. data/lib/schienenzeppelin/helpers/factory_bot.rb +13 -0
  37. data/lib/schienenzeppelin/helpers/generators.rb +26 -0
  38. data/lib/schienenzeppelin/helpers/high_voltage.rb +11 -0
  39. data/lib/schienenzeppelin/helpers/home.rb +17 -0
  40. data/lib/schienenzeppelin/helpers/hotwire.rb +11 -0
  41. data/lib/schienenzeppelin/helpers/pundit.rb +12 -0
  42. data/lib/schienenzeppelin/helpers/rspec.rb +13 -0
  43. data/lib/schienenzeppelin/helpers/rubocop.rb +11 -0
  44. data/lib/schienenzeppelin/helpers/scaffold.rb +11 -0
  45. data/lib/schienenzeppelin/helpers/services.rb +11 -0
  46. data/lib/schienenzeppelin/helpers/sidekiq.rb +13 -0
  47. data/lib/schienenzeppelin/helpers/stimulus.rb +11 -0
  48. data/lib/schienenzeppelin/helpers/stimulus_components.rb +29 -0
  49. data/lib/schienenzeppelin/helpers/tailwind.rb +18 -0
  50. data/lib/schienenzeppelin/version.rb +7 -0
  51. data/schienenzeppelin.gemspec +37 -0
  52. data/schienenzeppelin.jpg +0 -0
  53. data/script.md +104 -0
  54. data/templates/.dockerignore.erb +51 -0
  55. data/templates/.entrypoint.sh.erb +16 -0
  56. data/templates/.env.development.erb +3 -0
  57. data/templates/.foreman.erb +1 -0
  58. data/templates/.github/workflows/build.yml.erb +49 -0
  59. data/templates/.gitignore.erb +285 -0
  60. data/templates/.irbrc.erb +12 -0
  61. data/templates/.rubocop.yml.erb +37 -0
  62. data/templates/.tool-versions.erb +1 -0
  63. data/templates/Capfile.erb +24 -0
  64. data/templates/Dockerfile.erb +45 -0
  65. data/templates/Gemfile.erb +122 -0
  66. data/templates/Procfile.dev.erb +6 -0
  67. data/templates/Procfile.erb +2 -0
  68. data/templates/README.md.erb +43 -0
  69. data/templates/app/controllers/authorized_controller.rb.erb +10 -0
  70. data/templates/app/controllers/errors_controller.rb.erb +24 -0
  71. data/templates/app/javascript/images/checkmark.svg +1 -0
  72. data/templates/app/javascript/images/logo.svg +1 -0
  73. data/templates/app/javascript/stylesheets/components.scss +206 -0
  74. data/templates/app/policies/application_policy.rb +55 -0
  75. data/templates/app/services/application_service.rb +14 -0
  76. data/templates/app/views/devise/confirmations/new.html.erb +24 -0
  77. data/templates/app/views/devise/passwords/edit.html.erb +34 -0
  78. data/templates/app/views/devise/passwords/new.html.erb +23 -0
  79. data/templates/app/views/devise/registrations/edit.html.erb +62 -0
  80. data/templates/app/views/devise/registrations/new.html.erb +45 -0
  81. data/templates/app/views/devise/sessions/new.html.erb +33 -0
  82. data/templates/app/views/devise/shared/_error_messages.html.erb +15 -0
  83. data/templates/app/views/devise/shared/_form_wrap.html.erb +5 -0
  84. data/templates/app/views/devise/shared/_links.html.erb +25 -0
  85. data/templates/app/views/devise/unlocks/new.html.erb +22 -0
  86. data/templates/app/views/errors/internal_error.html.erb +14 -0
  87. data/templates/app/views/errors/not_found.html.erb +14 -0
  88. data/templates/app/views/errors/unacceptable.html.erb +14 -0
  89. data/templates/app/views/layouts/application.html.erb.tt +30 -0
  90. data/templates/app/views/pages/home.html.erb.tt +20 -0
  91. data/templates/app/views/shared/_flashes.html.erb.tt +12 -0
  92. data/templates/app/views/shared/_footer.html.erb.tt +21 -0
  93. data/templates/app/views/shared/_navbar.html.erb.tt +40 -0
  94. data/templates/bin/setup.erb +146 -0
  95. data/templates/config/credentials.yml.erb +7 -0
  96. data/templates/config/initializers/high_voltage.rb +6 -0
  97. data/templates/config/initializers/lograge.rb +5 -0
  98. data/templates/config/initializers/sidekiq.rb +10 -0
  99. data/templates/config/postgresql.yml.erb +23 -0
  100. data/templates/docker-compose.yml.erb +21 -0
  101. data/templates/lib/capistrano/tasks/seeds.rake +12 -0
  102. data/templates/lib/capistrano/tasks/sidekiq.rake +36 -0
  103. data/templates/lib/generators/rails/navigation/USAGE +6 -0
  104. data/templates/lib/generators/rails/navigation/navigation_generator.rb +15 -0
  105. data/templates/lib/generators/rails/scaffold_controller_generator.rb +12 -0
  106. data/templates/lib/tasks/auto_annotate_models.rake +58 -0
  107. data/templates/lib/templates/erb/scaffold/_form.html.erb +39 -0
  108. data/templates/lib/templates/erb/scaffold/edit.html.erb +7 -0
  109. data/templates/lib/templates/erb/scaffold/index.html.erb +34 -0
  110. data/templates/lib/templates/erb/scaffold/new.html.erb +7 -0
  111. data/templates/lib/templates/erb/scaffold/show.html.erb +18 -0
  112. data/templates/public/500.html.erb +26 -0
  113. data/templates/spec/rails_helper.rb +26 -0
  114. data/templates/spec/spec_helper.rb +61 -0
  115. data/templates/spec/support/factory_bot.rb +5 -0
  116. data/templates/spec/support/shoulda_matchers.rb +8 -0
  117. metadata +179 -0
@@ -0,0 +1,51 @@
1
+ .git
2
+ .gitignore
3
+ README.md
4
+
5
+ #
6
+ # OS X
7
+ #
8
+ .DS_Store
9
+ .AppleDouble
10
+ .LSOverride
11
+ # Icon must end with two \r
12
+ Icon
13
+ # Thumbnails
14
+ ._*
15
+ # Files that might appear on external disk
16
+ .Spotlight-V100
17
+ .Trashes
18
+ # Directories potentially created on remote AFP share
19
+ .AppleDB
20
+ .AppleDesktop
21
+ Network Trash Folder
22
+ Temporary Items
23
+ .apdisk
24
+
25
+ #
26
+ # Rails
27
+ #
28
+ .env
29
+ .env.sample
30
+ *.rbc
31
+ capybara-*.html
32
+ log
33
+ tmp
34
+ db/*.sqlite3
35
+ db/*.sqlite3-journal
36
+ public/system
37
+ coverage/
38
+ spec/tmp
39
+ **.orig
40
+
41
+ .bundle
42
+
43
+ .ruby-version
44
+ .ruby-gemset
45
+
46
+ .rvmrc
47
+
48
+ # if using bower-rails ignore default bower_components path bower.json files
49
+ vendor/assets/bower_components
50
+ *.bowerrc
51
+ bower.json
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Create the Rails production DB on the first run
6
+ bundle exec rails db:create
7
+
8
+ # Make sure we are using the most up to date
9
+ # database schema
10
+ bundle exec rails db:migrate
11
+
12
+ # Remove a potentially pre-existing server.pid for Rails.
13
+ rm -f /<%= app_name %>/tmp/pids/server.pid
14
+
15
+ # Then exec the container's main process (what's set as CMD in the Dockerfile).
16
+ exec "$@"
@@ -0,0 +1,3 @@
1
+ DATABASE_HOST=localhost
2
+ DATABASE_USERNAME=<%= app_name %>
3
+ DATABASE_PASSWORD=<%= app_name %>
@@ -0,0 +1 @@
1
+ procfile: Procfile.dev
@@ -0,0 +1,49 @@
1
+ name: <%= camelized %> CI 🚀
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ tests:
13
+ runs-on: ubuntu-latest
14
+ env:
15
+ RAILS_ENV: test
16
+ DATABASE_HOST: localhost
17
+ DATABASE_USERNAME: <%= app_name %>
18
+ DATABASE_PASSWORD: <%= app_name %>
19
+ services:
20
+ postgres:
21
+ image: postgres:13
22
+ env:
23
+ POSTGRES_PASSWORD: <%= app_name %>
24
+ POSTGRES_USER: <%= app_name %>
25
+ ports:
26
+ - 5432:5432
27
+
28
+ steps:
29
+ - uses: actions/checkout@v2
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: <%= RUBY_VERSION %>
34
+ bundler-cache: true
35
+ - name: Set up Node
36
+ uses: actions/setup-node@v1
37
+ with:
38
+ node-version: 14.9
39
+ - name: Install dependencies
40
+ run: |
41
+ sudo apt-get -yqq install libpq-dev build-essential libcurl4-openssl-dev
42
+ gem install bundler
43
+ bundle install --jobs 4
44
+ yarn install
45
+ - name: Setup databases
46
+ run: |
47
+ bin/rails db:setup
48
+ - name: Run tests
49
+ run: bin/rails test
@@ -0,0 +1,285 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/ruby,rails,rubymine+all,vim,emacs
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=ruby,rails,rubymine+all,vim,emacs
3
+
4
+ ### Emacs ###
5
+ # -*- mode: gitignore; -*-
6
+ *~
7
+ \#*\#
8
+ /.emacs.desktop
9
+ /.emacs.desktop.lock
10
+ *.elc
11
+ auto-save-list
12
+ tramp
13
+ .\#*
14
+
15
+ # Org-mode
16
+ .org-id-locations
17
+ *_archive
18
+ ltximg/**
19
+
20
+ # flymake-mode
21
+ *_flymake.*
22
+
23
+ # eshell files
24
+ /eshell/history
25
+ /eshell/lastdir
26
+
27
+ # elpa packages
28
+ /elpa/
29
+
30
+ # reftex files
31
+ *.rel
32
+
33
+ # AUCTeX auto folder
34
+ /auto/
35
+
36
+ # cask packages
37
+ .cask/
38
+ dist/
39
+
40
+ # Flycheck
41
+ flycheck_*.el
42
+
43
+ # server auth directory
44
+ /server/
45
+
46
+ # projectiles files
47
+ .projectile
48
+
49
+ # directory configuration
50
+ .dir-locals.el
51
+
52
+ # network security
53
+ /network-security.data
54
+
55
+
56
+ ### Rails ###
57
+ *.rbc
58
+ capybara-*.html
59
+ .rspec
60
+ /db/*.sqlite3
61
+ /db/*.sqlite3-journal
62
+ /db/*.sqlite3-[0-9]*
63
+ /public/system
64
+ /coverage/
65
+ /spec/tmp
66
+ *.orig
67
+ rerun.txt
68
+ pickle-email-*.html
69
+
70
+ # Ignore all logfiles and tempfiles.
71
+ /log/*
72
+ /tmp/*
73
+ !/log/.keep
74
+ !/tmp/.keep
75
+
76
+ # TODO Comment out this rule if you are OK with secrets being uploaded to the repo
77
+ config/initializers/secret_token.rb
78
+ config/**/*.key
79
+
80
+ # Only include if you have production secrets in this file, which is no longer a Rails default
81
+ # config/secrets.yml
82
+
83
+ # dotenv, dotenv-rails
84
+ .env
85
+ .env.*local
86
+
87
+ ## Environment normalization:
88
+ /.bundle
89
+ /vendor/bundle
90
+
91
+ # these should all be checked in to normalize the environment:
92
+ # Gemfile.lock, .ruby-version, .ruby-gemset
93
+
94
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
95
+ .rvmrc
96
+
97
+ # if using bower-rails ignore default bower_components path bower.json files
98
+ /vendor/assets/bower_components
99
+ *.bowerrc
100
+ bower.json
101
+
102
+ # Ignore pow environment settings
103
+ .powenv
104
+
105
+ # Ignore Byebug command history file.
106
+ .byebug_history
107
+
108
+ # Ignore node_modules
109
+ node_modules/
110
+
111
+ # Ignore precompiled javascript packs
112
+ /public/packs
113
+ /public/packs-test
114
+ /public/assets
115
+
116
+ # Ignore yarn files
117
+ /yarn-error.log
118
+ yarn-debug.log*
119
+ .yarn-integrity
120
+
121
+ # Ignore uploaded files in development
122
+ /storage/*
123
+ !/storage/.keep
124
+
125
+ ### Ruby ###
126
+ *.gem
127
+ /.config
128
+ /InstalledFiles
129
+ /pkg/
130
+ /spec/reports/
131
+ /spec/examples.txt
132
+ /test/tmp/
133
+ /test/version_tmp/
134
+ /tmp/
135
+
136
+ # Used by dotenv library to load environment variables.
137
+ # .env
138
+
139
+ # Ignore Byebug command history file.
140
+
141
+ ## Specific to RubyMotion:
142
+ .dat*
143
+ .repl_history
144
+ build/
145
+ *.bridgesupport
146
+ build-iPhoneOS/
147
+ build-iPhoneSimulator/
148
+
149
+ ## Specific to RubyMotion (use of CocoaPods):
150
+ #
151
+ # We recommend against adding the Pods directory to your .gitignore. However
152
+ # you should judge for yourself, the pros and cons are mentioned at:
153
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
154
+ # vendor/Pods/
155
+
156
+ ## Documentation cache and generated files:
157
+ /.yardoc/
158
+ /_yardoc/
159
+ /doc/
160
+ /rdoc/
161
+
162
+ /.bundle/
163
+ /lib/bundler/man/
164
+
165
+ # for a library or gem, you might want to ignore these files since the code is
166
+ # intended to run in multiple environments; otherwise, check them in:
167
+ # Gemfile.lock
168
+ # .ruby-version
169
+ # .ruby-gemset
170
+
171
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
172
+
173
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
174
+ # .rubocop-https?--*
175
+
176
+ ### RubyMine+all ###
177
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
178
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
179
+
180
+ # User-specific stuff
181
+ .idea/**/workspace.xml
182
+ .idea/**/tasks.xml
183
+ .idea/**/usage.statistics.xml
184
+ .idea/**/dictionaries
185
+ .idea/**/shelf
186
+
187
+ # Generated files
188
+ .idea/**/contentModel.xml
189
+
190
+ # Sensitive or high-churn files
191
+ .idea/**/dataSources/
192
+ .idea/**/dataSources.ids
193
+ .idea/**/dataSources.local.xml
194
+ .idea/**/sqlDataSources.xml
195
+ .idea/**/dynamic.xml
196
+ .idea/**/uiDesigner.xml
197
+ .idea/**/dbnavigator.xml
198
+
199
+ # Gradle
200
+ .idea/**/gradle.xml
201
+ .idea/**/libraries
202
+
203
+ # Gradle and Maven with auto-import
204
+ # When using Gradle or Maven with auto-import, you should exclude module files,
205
+ # since they will be recreated, and may cause churn. Uncomment if using
206
+ # auto-import.
207
+ # .idea/artifacts
208
+ # .idea/compiler.xml
209
+ # .idea/jarRepositories.xml
210
+ # .idea/modules.xml
211
+ # .idea/*.iml
212
+ # .idea/modules
213
+ # *.iml
214
+ # *.ipr
215
+
216
+ # CMake
217
+ cmake-build-*/
218
+
219
+ # Mongo Explorer plugin
220
+ .idea/**/mongoSettings.xml
221
+
222
+ # File-based project format
223
+ *.iws
224
+
225
+ # IntelliJ
226
+ out/
227
+
228
+ # mpeltonen/sbt-idea plugin
229
+ .idea_modules/
230
+
231
+ # JIRA plugin
232
+ atlassian-ide-plugin.xml
233
+
234
+ # Cursive Clojure plugin
235
+ .idea/replstate.xml
236
+
237
+ # Crashlytics plugin (for Android Studio and IntelliJ)
238
+ com_crashlytics_export_strings.xml
239
+ crashlytics.properties
240
+ crashlytics-build.properties
241
+ fabric.properties
242
+
243
+ # Editor-based Rest Client
244
+ .idea/httpRequests
245
+
246
+ # Android studio 3.1+ serialized cache file
247
+ .idea/caches/build_file_checksums.ser
248
+
249
+ ### RubyMine+all Patch ###
250
+ # Ignores the whole .idea folder and all .iml files
251
+ # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
252
+
253
+ .idea/
254
+
255
+ # Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
256
+
257
+ *.iml
258
+ modules.xml
259
+ .idea/misc.xml
260
+ *.ipr
261
+
262
+ # Sonarlint plugin
263
+ .idea/sonarlint
264
+
265
+ ### Vim ###
266
+ # Swap
267
+ [._]*.s[a-v][a-z]
268
+ !*.svg # comment out if you don't need vector files
269
+ [._]*.sw[a-p]
270
+ [._]s[a-rt-v][a-z]
271
+ [._]ss[a-gi-z]
272
+ [._]sw[a-p]
273
+
274
+ # Session
275
+ Session.vim
276
+ Sessionx.vim
277
+
278
+ # Temporary
279
+ .netrwhist
280
+ # Auto-generated tag files
281
+ tags
282
+ # Persistent undo
283
+ [._]*.un~
284
+
285
+ # End of https://www.toptal.com/developers/gitignore/api/ruby,rails,rubymine+all,vim,emacs
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'irb/completion'
4
+ require 'irb/ext/save-history'
5
+
6
+ IRB.conf[:SAVE_HISTORY] = 1000
7
+ IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
8
+ IRB.conf[:PROMPT_MODE] = :SIMPLE
9
+
10
+ <% unless options[:skip_factory_bot] %>
11
+ include FactoryBot::Syntax::Methods
12
+ <% end %>
@@ -0,0 +1,37 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ Exclude:
4
+ - bin/*
5
+ - db/schema.rb
6
+ - db/migrate/*
7
+ - node_modules/**/*
8
+
9
+ Naming/AccessorMethodName:
10
+ Enabled: false
11
+
12
+ Metrics/MethodLength:
13
+ CountAsOne: ['array', 'heredoc']
14
+ IgnoredMethods: ['describe', 'context']
15
+
16
+ Metrics/BlockLength:
17
+ IgnoredMethods: ['describe', 'context']
18
+ Exclude:
19
+ - config/environments/*.rb
20
+ - '**/*.rake'
21
+
22
+ Layout/LineLength:
23
+ Max: 120
24
+
25
+ Layout/MultilineMethodCallIndentation:
26
+ EnforcedStyle: indented
27
+
28
+ Lint/EmptyBlock:
29
+ Exclude:
30
+ - spec/factories/*
31
+
32
+ Style/BlockDelimiters:
33
+ Exclude:
34
+ - spec/**/*
35
+
36
+ Style/Documentation:
37
+ Enabled: false