gnarails 3.0.0 → 3.0.1
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 +4 -4
- data/.github/actions/test-rails/action.yml +27 -0
- data/.github/workflows/bundler-audit.yml +19 -0
- data/.github/workflows/pronto.yml +30 -0
- data/.github/workflows/rails-test-app.yml +87 -0
- data/.github/workflows/run-unit-tests.yml +17 -0
- data/.railsrc +3 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +1 -1
- data/README.md +6 -1
- data/RELEASE_PROCESS.md +7 -8
- data/Rakefile +1 -1
- data/bin/bundle +120 -0
- data/bin/pronto +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/gnarails.gemspec +15 -4
- data/gnarly.rb +68 -50
- data/lib/gnarails/cli/application.rb +25 -153
- data/lib/gnarails/version.rb +3 -1
- data/templates/.github/workflows/brakeman.yml +22 -0
- data/templates/.github/workflows/run-tests.yml +26 -0
- data/templates/README.md +4 -5
- data/templates/bin/pronto +29 -0
- data/templates/bin/rspec +29 -0
- data/templates/bin/rubocop +29 -0
- data/templates/bin/setup +30 -0
- data/templates/docker-compose.yml/docker-compose-standard.yml +1 -1
- data/templates/esbuild.config.js +11 -0
- data/test-app/app/views/layouts/application.html.erb +2 -2
- data/test-app/spec/system/viewing_all_job_postings_spec.rb +5 -9
- metadata +30 -18
- data/.circleci/config.yml +0 -146
- data/bin/ci_pronto +0 -6
- data/bin/generate-test-app.sh +0 -22
- data/templates/.circleci/config.yml +0 -71
- data/templates/.gitignore +0 -20
- data/templates/.scss-lint.yml +0 -33
- data/templates/bin/brakeman +0 -15
- data/templates/bin/ci_pronto +0 -6
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnarails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Gnar Company
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 7.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 7.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: thor
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '13.0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '13.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rspec
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,7 +136,11 @@ executables:
|
|
136
136
|
extensions: []
|
137
137
|
extra_rdoc_files: []
|
138
138
|
files:
|
139
|
-
- ".
|
139
|
+
- ".github/actions/test-rails/action.yml"
|
140
|
+
- ".github/workflows/bundler-audit.yml"
|
141
|
+
- ".github/workflows/pronto.yml"
|
142
|
+
- ".github/workflows/rails-test-app.yml"
|
143
|
+
- ".github/workflows/run-unit-tests.yml"
|
140
144
|
- ".gitignore"
|
141
145
|
- ".pronto.yml"
|
142
146
|
- ".railsrc"
|
@@ -152,9 +156,11 @@ files:
|
|
152
156
|
- README.md
|
153
157
|
- RELEASE_PROCESS.md
|
154
158
|
- Rakefile
|
155
|
-
- bin/
|
159
|
+
- bin/bundle
|
156
160
|
- bin/console
|
157
|
-
- bin/
|
161
|
+
- bin/pronto
|
162
|
+
- bin/rspec
|
163
|
+
- bin/rubocop
|
158
164
|
- bin/setup
|
159
165
|
- bin/test-setup.sh
|
160
166
|
- exe/gnarails
|
@@ -163,24 +169,26 @@ files:
|
|
163
169
|
- lib/gnarails.rb
|
164
170
|
- lib/gnarails/cli/application.rb
|
165
171
|
- lib/gnarails/version.rb
|
166
|
-
- templates/.circleci/config.yml
|
167
172
|
- templates/.env.development
|
168
173
|
- templates/.env.docker-assets
|
169
174
|
- templates/.env.docker/.env.docker-standard
|
170
175
|
- templates/.env.docker/.env.docker-webpack
|
171
176
|
- templates/.env.test
|
172
|
-
- templates/.
|
177
|
+
- templates/.github/workflows/brakeman.yml
|
178
|
+
- templates/.github/workflows/run-tests.yml
|
173
179
|
- templates/.pronto.yml
|
174
180
|
- templates/.rspec
|
175
181
|
- templates/.rubocop.yml
|
176
|
-
- templates/.scss-lint.yml
|
177
182
|
- templates/Dockerfile
|
178
183
|
- templates/Procfile
|
179
184
|
- templates/README.md
|
180
|
-
- templates/bin/
|
181
|
-
- templates/bin/
|
185
|
+
- templates/bin/pronto
|
186
|
+
- templates/bin/rspec
|
187
|
+
- templates/bin/rubocop
|
188
|
+
- templates/bin/setup
|
182
189
|
- templates/database.yml
|
183
190
|
- templates/docker-compose.yml/docker-compose-standard.yml
|
191
|
+
- templates/esbuild.config.js
|
184
192
|
- templates/spec/support/factory_bot.rb
|
185
193
|
- templates/spec/support/system_test_configuration.rb
|
186
194
|
- test-app/app/controllers/job_postings_controller.rb
|
@@ -198,8 +206,12 @@ files:
|
|
198
206
|
homepage: https://github.com/TheGnarCo/gnarails
|
199
207
|
licenses:
|
200
208
|
- MIT
|
201
|
-
metadata:
|
202
|
-
|
209
|
+
metadata:
|
210
|
+
rubygems_mfa_required: 'true'
|
211
|
+
post_install_message: "\n ==============================\n THIS GEM HAS BEEN
|
212
|
+
DEPRECATED!\n ==============================\n If you are looking to initialize\n
|
213
|
+
\ Rails apps with Gnarly Opinions,\n check out Gnar-CLI:\n\n https://www.github.com/theGnarCo/gnar-cli\n
|
214
|
+
\ "
|
203
215
|
rdoc_options: []
|
204
216
|
require_paths:
|
205
217
|
- lib
|
@@ -207,14 +219,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
219
|
requirements:
|
208
220
|
- - ">="
|
209
221
|
- !ruby/object:Gem::Version
|
210
|
-
version: 2.
|
222
|
+
version: 2.7.4
|
211
223
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
224
|
requirements:
|
213
225
|
- - ">="
|
214
226
|
- !ruby/object:Gem::Version
|
215
227
|
version: '0'
|
216
228
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
229
|
+
rubygems_version: 3.1.6
|
218
230
|
signing_key:
|
219
231
|
specification_version: 4
|
220
232
|
summary: Easily create a gnarly rails app.
|
data/.circleci/config.yml
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
# Ruby CircleCI 2.0 configuration file
|
2
|
-
#
|
3
|
-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
4
|
-
#
|
5
|
-
version: 2
|
6
|
-
jobs:
|
7
|
-
unit_test:
|
8
|
-
docker:
|
9
|
-
- image: circleci/ruby:2.6.3-stretch-node-browsers
|
10
|
-
environment:
|
11
|
-
RAILS_ENV: test
|
12
|
-
steps:
|
13
|
-
- checkout
|
14
|
-
|
15
|
-
# cmake is required by Rugged, a dependency of Pronto
|
16
|
-
- run:
|
17
|
-
name: Install cmake
|
18
|
-
command: sudo apt-get -y -qq update && sudo apt-get -y -qq install cmake
|
19
|
-
|
20
|
-
# Bundle install dependencies
|
21
|
-
- run:
|
22
|
-
name: install dependencies
|
23
|
-
command: bundle install
|
24
|
-
|
25
|
-
# Tests
|
26
|
-
- run:
|
27
|
-
name: RSpec
|
28
|
-
command: bundle exec rspec
|
29
|
-
|
30
|
-
# Pronto
|
31
|
-
- run:
|
32
|
-
name: Pronto
|
33
|
-
command: ./bin/ci_pronto
|
34
|
-
|
35
|
-
build-rails:
|
36
|
-
docker:
|
37
|
-
- image: circleci/ruby:2.6.3-stretch-node-browsers
|
38
|
-
|
39
|
-
steps:
|
40
|
-
- checkout
|
41
|
-
|
42
|
-
# cmake is required by Rugged, a dependency of Pronto
|
43
|
-
- run:
|
44
|
-
name: Install cmake
|
45
|
-
command: sudo apt-get -y -qq update && sudo apt-get -y -qq install cmake
|
46
|
-
|
47
|
-
# Install rake after installing specific version of bundler
|
48
|
-
- run:
|
49
|
-
name: Install rake
|
50
|
-
command: gem install rake
|
51
|
-
|
52
|
-
# Bundle install dependencies
|
53
|
-
- run:
|
54
|
-
name: Install Dependencies
|
55
|
-
command: bundle install
|
56
|
-
|
57
|
-
# Generate test app
|
58
|
-
- run:
|
59
|
-
name: Generate Test App
|
60
|
-
command: sh ./bin/generate-test-app.sh
|
61
|
-
|
62
|
-
# Move test app
|
63
|
-
- run:
|
64
|
-
name: Move Test App
|
65
|
-
command: mkdir rails-app && cp -r ~/project/rails-test-app ~/project/rails-app/
|
66
|
-
|
67
|
-
# Save to shared workspace
|
68
|
-
- persist_to_workspace:
|
69
|
-
root: rails-app
|
70
|
-
paths:
|
71
|
-
- rails-test-app
|
72
|
-
|
73
|
-
test-rails-app:
|
74
|
-
docker:
|
75
|
-
- image: circleci/ruby:2.6.3-stretch-node-browsers
|
76
|
-
environment:
|
77
|
-
RAILS_ENV: test
|
78
|
-
PG_HOST: localhost
|
79
|
-
PG_USER: ubuntu
|
80
|
-
DATABASE_URL: "postgres://ubuntu@localhost:5432/rails-test-app-test"
|
81
|
-
- image: circleci/postgres:9.6.5
|
82
|
-
environment:
|
83
|
-
POSTGRES_USER: ubuntu
|
84
|
-
POSTGRES_DB: rails-test-app-test
|
85
|
-
|
86
|
-
steps:
|
87
|
-
- attach_workspace:
|
88
|
-
at: /tmp/rails-test-app
|
89
|
-
|
90
|
-
# Pull rails app from shared workspace
|
91
|
-
- run:
|
92
|
-
name: Copy Test App
|
93
|
-
command: cp -r /tmp/rails-test-app/rails-test-app/* ~/project
|
94
|
-
|
95
|
-
# cmake is required by Rugged, a dependency of Pronto
|
96
|
-
- run:
|
97
|
-
name: Install cmake
|
98
|
-
command: sudo apt-get -y -qq update && sudo apt-get -y -qq install cmake
|
99
|
-
|
100
|
-
# Bundle install dependencies
|
101
|
-
- run:
|
102
|
-
name: Install dependencies
|
103
|
-
command: bundle install
|
104
|
-
|
105
|
-
# Database setup
|
106
|
-
- run:
|
107
|
-
name: Create database
|
108
|
-
command: bundle exec rake db:create && bundle exec rake db:migrate
|
109
|
-
|
110
|
-
# Tests
|
111
|
-
- run:
|
112
|
-
name: RSpec
|
113
|
-
command: bundle exec rspec
|
114
|
-
|
115
|
-
# Security analysis
|
116
|
-
- run:
|
117
|
-
name: Bundler Audit
|
118
|
-
command: bundle exec bundle-audit update && bundle exec bundle-audit check
|
119
|
-
- run:
|
120
|
-
name: Brakeman
|
121
|
-
command: ./bin/brakeman
|
122
|
-
|
123
|
-
# Pronto
|
124
|
-
- run:
|
125
|
-
name: Pronto
|
126
|
-
command: ./bin/ci_pronto
|
127
|
-
|
128
|
-
# Save Brakeman
|
129
|
-
- store_artifacts:
|
130
|
-
path: tmp/brakeman.html
|
131
|
-
destination: security/brakeman.html
|
132
|
-
|
133
|
-
# Save Coverage Analysis
|
134
|
-
- store_artifacts:
|
135
|
-
path: coverage
|
136
|
-
destination: coverage
|
137
|
-
|
138
|
-
workflows:
|
139
|
-
version: 2
|
140
|
-
build_and_test:
|
141
|
-
jobs:
|
142
|
-
- unit_test
|
143
|
-
- build-rails
|
144
|
-
- test-rails-app:
|
145
|
-
requires:
|
146
|
-
- build-rails
|
data/bin/ci_pronto
DELETED
data/bin/generate-test-app.sh
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
bundle exec exe/gnarails new rails-test-app
|
3
|
-
|
4
|
-
mkdir rails-test-app/app/views/job_postings
|
5
|
-
mkdir rails-test-app/db/migrate
|
6
|
-
mkdir rails-test-app/spec/factories
|
7
|
-
mkdir rails-test-app/spec/models
|
8
|
-
mkdir rails-test-app/spec/system
|
9
|
-
mkdir rails-test-app/spec/requests
|
10
|
-
|
11
|
-
cp test-app/app/controllers/job_postings_controller.rb rails-test-app/app/controllers/job_postings_controller.rb
|
12
|
-
cp test-app/app/models/job_posting.rb rails-test-app/app/models/job_posting.rb
|
13
|
-
cp test-app/app/models/comment.rb rails-test-app/app/models/comment.rb
|
14
|
-
cp test-app/app/views/job_postings/index.html.erb rails-test-app/app/views/job_postings/index.html.erb
|
15
|
-
yes | cp test-app/app/views/layouts/application.html.erb rails-test-app/app/views/layouts/application.html.erb
|
16
|
-
yes | cp test-app/config/routes.rb rails-test-app/config/routes.rb
|
17
|
-
cp test-app/db/migrate/20170918002433_create_job_postings.rb rails-test-app/db/migrate/20170918002433_create_job_postings.rb
|
18
|
-
cp test-app/db/migrate/20170918002455_create_comments.rb rails-test-app/db/migrate/20170918002455_create_comments.rb
|
19
|
-
cp test-app/spec/factories/job_postings.rb rails-test-app/spec/factories/job_postings.rb
|
20
|
-
cp test-app/spec/models/job_posting_spec.rb rails-test-app/spec/models/job_posting_spec.rb
|
21
|
-
cp test-app/spec/system/viewing_all_job_postings_spec.rb rails-test-app/spec/system/viewing_all_job_postings_spec.rb
|
22
|
-
cp test-app/spec/requests/status_spec.rb rails-test-app/spec/requests/status_spec.rb
|
@@ -1,71 +0,0 @@
|
|
1
|
-
version: 2.0
|
2
|
-
jobs:
|
3
|
-
build:
|
4
|
-
docker:
|
5
|
-
- image: circleci/ruby:__ruby_version__-stretch-node-browsers
|
6
|
-
environment:
|
7
|
-
RAILS_ENV: test
|
8
|
-
- image: circleci/postgres:9.6.5
|
9
|
-
steps:
|
10
|
-
- checkout
|
11
|
-
|
12
|
-
# Restore bundle cache
|
13
|
-
- restore_cache:
|
14
|
-
key: __application_name__-{{ checksum "Gemfile.lock" }}
|
15
|
-
|
16
|
-
# cmake is required by Rugged, a dependency of Pronto
|
17
|
-
- run:
|
18
|
-
name: Install cmake
|
19
|
-
command: sudo apt-get -y -qq update && sudo apt-get -y -qq install cmake
|
20
|
-
|
21
|
-
# Bundle install dependencies
|
22
|
-
- run:
|
23
|
-
name: Install dependencies
|
24
|
-
command: bundle install --path vendor/bundle
|
25
|
-
|
26
|
-
# Store bundle cache
|
27
|
-
- save_cache:
|
28
|
-
key: __application_name__-{{ checksum "Gemfile.lock" }}
|
29
|
-
paths:
|
30
|
-
- vendor/bundle
|
31
|
-
|
32
|
-
# Database setup
|
33
|
-
- run:
|
34
|
-
name: Create database
|
35
|
-
command: bundle exec rake db:create
|
36
|
-
- run:
|
37
|
-
name: Load database schema
|
38
|
-
command: bundle exec rake db:schema:load
|
39
|
-
|
40
|
-
# Tests
|
41
|
-
- run:
|
42
|
-
name: RSpec
|
43
|
-
command: bundle exec rspec
|
44
|
-
|
45
|
-
# Security analysis
|
46
|
-
- run:
|
47
|
-
name: Bundler Audit
|
48
|
-
command: bundle exec bundle-audit update && bundle exec bundle-audit check
|
49
|
-
- run:
|
50
|
-
name: Brakeman
|
51
|
-
command: ./bin/brakeman
|
52
|
-
|
53
|
-
# Pronto
|
54
|
-
- run:
|
55
|
-
name: Pronto
|
56
|
-
command: ./bin/ci_pronto
|
57
|
-
|
58
|
-
# Save Brakeman
|
59
|
-
- store_artifacts:
|
60
|
-
path: tmp/brakeman.html
|
61
|
-
destination: security/brakeman.html
|
62
|
-
|
63
|
-
# Save Coverage Analysis
|
64
|
-
- store_artifacts:
|
65
|
-
path: coverage
|
66
|
-
destination: coverage
|
67
|
-
|
68
|
-
# Save Capybara Screenshots
|
69
|
-
- store_artifacts:
|
70
|
-
path: tmp/screenshots
|
71
|
-
destination: capybara/screenshots
|
data/templates/.gitignore
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
-
#
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
-
|
7
|
-
# Ignore bundler config.
|
8
|
-
/.bundle
|
9
|
-
|
10
|
-
# Ignore all logfiles and tempfiles.
|
11
|
-
/log/*
|
12
|
-
/tmp/*
|
13
|
-
!/log/.keep
|
14
|
-
!/tmp/.keep
|
15
|
-
|
16
|
-
# Ignore Byebug command history file.
|
17
|
-
.byebug_history
|
18
|
-
|
19
|
-
# Ignore output of simplecov
|
20
|
-
coverage
|
data/templates/.scss-lint.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
scss_files: 'app/assets/stylesheets/**/*.scss'
|
2
|
-
exclude: 'app/assets/stylesheets/plugins/**'
|
3
|
-
|
4
|
-
linters:
|
5
|
-
StringQuotes:
|
6
|
-
enabled: false
|
7
|
-
|
8
|
-
LeadingZero:
|
9
|
-
enabled: false
|
10
|
-
|
11
|
-
BorderZero:
|
12
|
-
enabled: false
|
13
|
-
|
14
|
-
ColorVariable:
|
15
|
-
enabled: false
|
16
|
-
|
17
|
-
Comment:
|
18
|
-
enabled: false
|
19
|
-
|
20
|
-
FinalNewline:
|
21
|
-
enabled: false
|
22
|
-
|
23
|
-
IdSelector:
|
24
|
-
enabled: false
|
25
|
-
|
26
|
-
NestingDepth:
|
27
|
-
enabled: true
|
28
|
-
max_depth: 6
|
29
|
-
ignore_parent_selectors: false
|
30
|
-
|
31
|
-
SelectorDepth:
|
32
|
-
enabled: true
|
33
|
-
max_depth: 6
|
data/templates/bin/brakeman
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
#
|
3
|
-
# Script for running Brakeman tests
|
4
|
-
# Brakeman is a security scanner https://github.com/presidentbeef/brakeman.
|
5
|
-
gem install brakeman --no-document
|
6
|
-
|
7
|
-
brakeman --exit-on-warn --separate-models -o tmp/brakeman.html -o tmp/brakeman.text .
|
8
|
-
brakeman_exit_code=$?
|
9
|
-
cat tmp/brakeman.text
|
10
|
-
|
11
|
-
if [ $CIRCLE_ARTIFACTS ]; then
|
12
|
-
mv tmp/brakeman.html $CIRCLE_ARTIFACTS
|
13
|
-
fi
|
14
|
-
|
15
|
-
exit $brakeman_exit_code
|