Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spring watch #82

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/packs/rails/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ class Railtie < ::Rails::Railtie
# This is not used within packs-rails. Rather, this allows OTHER tools to
# hook into packs-rails via ActiveSupport hooks.
ActiveSupport.run_load_hooks(:packs_rails, Packs)

if defined?(Spring)
Packs::Specification::Configuration.fetch.pack_paths.each do |dir|
Dir["#{dir}/package.yml"].each do |package_yml|
Spring.watch(package_yml)
end
end
end
end

end
end
end
2 changes: 1 addition & 1 deletion lib/packs/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Packs
module Rails
VERSION = "0.0.5".freeze
VERSION = '0.0.6'.freeze
end
end
8 changes: 8 additions & 0 deletions sorbet/rbi/shims/gems/packs-specification.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# typed: strong

module Packs
module Specification
class Configuration < T::Struct
end
end
end
4 changes: 4 additions & 0 deletions sorbet/rbi/shims/gems/spring.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# typed: strong

module Spring
end