Skip to content

Commit 01a017c

Browse files
app-rails: Update template-application-rails to version 0.4.0.post7.dev0+61c5ee7
1 parent fe5cb81 commit 01a017c

File tree

5 files changed

+128
-2
lines changed

5 files changed

+128
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.4.0-6-g3d2e707
2+
_commit: v0.4.0-7-g61c5ee7
33
_src_path: https://github.com/navapbc/template-application-rails
44
app_local_port: 3100
55
app_name: app-rails

app-rails/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ gem "faraday"
7272
gem "faker", "~> 3.2"
7373

7474
group :development, :test do
75+
gem "guard-rspec", require: false
76+
7577
# Support .env files
7678
gem "dotenv"
7779

app-rails/Gemfile.lock

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ GEM
128128
logger (~> 1.5)
129129
choice (0.2.0)
130130
chunky_png (1.4.0)
131+
coderay (1.1.3)
131132
concurrent-ruby (1.3.5)
132133
connection_pool (2.5.0)
133134
crass (1.0.6)
@@ -161,8 +162,35 @@ GEM
161162
logger
162163
faraday-net_http (3.4.0)
163164
net-http (>= 0.5.0)
165+
ffi (1.17.2-aarch64-linux-gnu)
166+
ffi (1.17.2-aarch64-linux-musl)
167+
ffi (1.17.2-arm-linux-gnu)
168+
ffi (1.17.2-arm-linux-musl)
169+
ffi (1.17.2-arm64-darwin)
170+
ffi (1.17.2-x86-linux-gnu)
171+
ffi (1.17.2-x86-linux-musl)
172+
ffi (1.17.2-x86_64-darwin)
173+
ffi (1.17.2-x86_64-linux-gnu)
174+
ffi (1.17.2-x86_64-linux-musl)
175+
formatador (1.1.0)
164176
globalid (1.2.1)
165177
activesupport (>= 6.1)
178+
guard (2.19.1)
179+
formatador (>= 0.2.4)
180+
listen (>= 2.7, < 4.0)
181+
logger (~> 1.6)
182+
lumberjack (>= 1.0.12, < 2.0)
183+
nenv (~> 0.1)
184+
notiffany (~> 0.0)
185+
ostruct (~> 0.6)
186+
pry (>= 0.13.0)
187+
shellany (~> 0.0)
188+
thor (>= 0.18.1)
189+
guard-compat (1.2.1)
190+
guard-rspec (4.7.3)
191+
guard (~> 2.1)
192+
guard-compat (~> 1.1)
193+
rspec (>= 2.99.0, < 4.0)
166194
i18n (1.14.7)
167195
concurrent-ruby (~> 1.0)
168196
importmap-rails (2.1.0)
@@ -189,21 +217,27 @@ GEM
189217
letter_opener (1.10.0)
190218
launchy (>= 2.2, < 4)
191219
lint_roller (1.1.0)
220+
listen (3.9.0)
221+
rb-fsevent (~> 0.10, >= 0.10.3)
222+
rb-inotify (~> 0.9, >= 0.9.10)
192223
logger (1.6.6)
193224
loofah (2.24.0)
194225
crass (~> 1.0.2)
195226
nokogiri (>= 1.12.0)
227+
lumberjack (1.2.10)
196228
mail (2.8.1)
197229
mini_mime (>= 0.1.1)
198230
net-imap
199231
net-pop
200232
net-smtp
201233
marcel (1.0.4)
202234
matrix (0.4.2)
235+
method_source (1.1.0)
203236
mini_mime (1.1.5)
204237
mini_portile2 (2.8.8)
205238
minitest (5.25.4)
206239
msgpack (1.7.5)
240+
nenv (0.3.0)
207241
net-http (0.6.0)
208242
uri
209243
net-imap (0.5.6)
@@ -235,7 +269,11 @@ GEM
235269
racc (~> 1.4)
236270
nokogiri (1.18.8-x86_64-linux-musl)
237271
racc (~> 1.4)
272+
notiffany (0.1.3)
273+
nenv (~> 0.1)
274+
shellany (~> 0.0)
238275
orm_adapter (0.5.0)
276+
ostruct (0.6.1)
239277
parallel (1.26.3)
240278
parser (3.3.7.1)
241279
ast (~> 2.4.1)
@@ -247,6 +285,9 @@ GEM
247285
pp (0.6.2)
248286
prettyprint
249287
prettyprint (0.2.0)
288+
pry (0.15.2)
289+
coderay (~> 1.1)
290+
method_source (~> 1.0)
250291
psych (5.2.3)
251292
date
252293
stringio
@@ -305,6 +346,9 @@ GEM
305346
zeitwerk (~> 2.6)
306347
rainbow (3.1.1)
307348
rake (13.2.1)
349+
rb-fsevent (0.11.2)
350+
rb-inotify (0.11.1)
351+
ffi (~> 1.0)
308352
rdoc (6.12.0)
309353
psych (>= 4.0.0)
310354
regexp_parser (2.10.0)
@@ -321,6 +365,10 @@ GEM
321365
chunky_png (~> 1.0)
322366
rqrcode_core (~> 1.0)
323367
rqrcode_core (1.2.0)
368+
rspec (3.13.0)
369+
rspec-core (~> 3.13.0)
370+
rspec-expectations (~> 3.13.0)
371+
rspec-mocks (~> 3.13.0)
324372
rspec-core (3.13.2)
325373
rspec-support (~> 3.13.0)
326374
rspec-expectations (3.13.3)
@@ -379,6 +427,7 @@ GEM
379427
rexml (~> 3.2, >= 3.2.5)
380428
rubyzip (>= 1.2.2, < 3.0)
381429
websocket (~> 1.0)
430+
shellany (0.0.1)
382431
simplecov (0.22.0)
383432
docile (~> 1.1)
384433
simplecov-html (~> 0.11)
@@ -453,6 +502,7 @@ DEPENDENCIES
453502
factory_bot_rails
454503
faker (~> 3.2)
455504
faraday
505+
guard-rspec
456506
importmap-rails
457507
jbuilder
458508
jwt

app-rails/Guardfile

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# A sample Guardfile
2+
# More info at https://github.com/guard/guard#readme
3+
4+
## Uncomment and set this to only include directories you want to watch
5+
# directories %w(app lib config test spec features) \
6+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
7+
8+
## Note: if you are using the `directories` clause above and you are not
9+
## watching the project directory ('.'), then you will want to move
10+
## the Guardfile to a watched dir and symlink it back, e.g.
11+
#
12+
# $ mkdir config
13+
# $ mv Guardfile config/
14+
# $ ln -s config/Guardfile .
15+
#
16+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17+
18+
# Note: The cmd option is now required due to the increasing number of ways
19+
# rspec may be run, below are examples of the most common uses.
20+
# * bundler: 'bundle exec rspec'
21+
# * bundler binstubs: 'bin/rspec'
22+
# * spring: 'bin/rspec' (This will use spring if running and you have
23+
# installed the spring binstubs per the docs)
24+
# * zeus: 'zeus rspec' (requires the server to be started separately)
25+
# * 'just' rspec: 'rspec'
26+
27+
guard :rspec, cmd: "bundle exec rspec" do
28+
require "guard/rspec/dsl"
29+
dsl = Guard::RSpec::Dsl.new(self)
30+
31+
# Feel free to open issues for suggestions and improvements
32+
33+
# RSpec files
34+
rspec = dsl.rspec
35+
watch(rspec.spec_helper) { rspec.spec_dir }
36+
watch(rspec.spec_support) { rspec.spec_dir }
37+
watch(rspec.spec_files)
38+
39+
# Ruby files
40+
ruby = dsl.ruby
41+
dsl.watch_spec_files_for(ruby.lib_files)
42+
43+
# Rails files
44+
rails = dsl.rails(view_extensions: %w[erb haml slim])
45+
dsl.watch_spec_files_for(rails.app_files)
46+
dsl.watch_spec_files_for(rails.views)
47+
48+
watch(rails.controllers) do |m|
49+
[
50+
rspec.spec.call("routing/#{m[1]}_routing"),
51+
rspec.spec.call("controllers/#{m[1]}_controller"),
52+
rspec.spec.call("acceptance/#{m[1]}")
53+
]
54+
end
55+
56+
# Rails config changes
57+
watch(rails.spec_helper) { rspec.spec_dir }
58+
watch(rails.routes) { "#{rspec.spec_dir}/routing" }
59+
watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
60+
61+
# Capybara features specs
62+
watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
63+
watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
64+
65+
# Turnip features and steps
66+
watch(%r{^spec/acceptance/(.+)\.feature$})
67+
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
68+
Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
69+
end
70+
end

app-rails/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.PHONY: \
22
release-build \
3-
test
3+
test \
4+
test-watch
45

56
.DEFAULT_GOAL := help
67

@@ -170,6 +171,9 @@ wait-on-db:
170171
test: ## Run the test suite
171172
$(RUBY_RUN_CMD) ./bin/rspec
172173

174+
test-watch: ## Watch for file changes and run the test suite
175+
$(RUBY_RUN_CMD) ./bin/bundle exec guard
176+
173177
##################################################
174178
# Lint & Formatting
175179
##################################################

0 commit comments

Comments
 (0)