Skip to content

Commit 71dc795

Browse files
authored
Update stimpack dependency to packs-rails (#6)
1 parent 0838b6f commit 71dc795

File tree

7 files changed

+27
-19
lines changed

7 files changed

+27
-19
lines changed

Gemfile.lock

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PATH
22
remote: .
33
specs:
4-
automatic_namespaces (0.1.2)
4+
automatic_namespaces (0.2.0)
55
activesupport
6-
stimpack
6+
packs-rails
77

88
GEM
99
remote: https://rubygems.org/
@@ -112,6 +112,12 @@ GEM
112112
racc (~> 1.4)
113113
nokogiri (1.13.9-x86_64-linux)
114114
racc (~> 1.4)
115+
packs (0.0.6)
116+
sorbet-runtime
117+
packs-rails (0.0.1)
118+
activesupport
119+
packs
120+
railties
115121
parallel (1.22.1)
116122
parser (3.1.2.1)
117123
ast (~> 2.4.1)
@@ -177,9 +183,7 @@ GEM
177183
rubocop-ast (1.23.0)
178184
parser (>= 3.1.1.0)
179185
ruby-progressbar (1.11.0)
180-
stimpack (0.7.1)
181-
activesupport
182-
railties
186+
sorbet-runtime (0.5.10626)
183187
thor (1.2.1)
184188
timeout (0.3.0)
185189
tzinfo (2.0.5)

automatic_namespaces.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
# guide at: https://bundler.io/guides/creating_gem.html
3030

3131
spec.add_dependency "activesupport"
32-
spec.add_dependency "stimpack"
32+
spec.add_dependency "packs-rails"
3333

3434
spec.add_development_dependency "rake"
3535
spec.add_development_dependency "rspec"

lib/automatic_namespaces/autoloader.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ def non_namspaced_directory(dir)
3333
end
3434

3535
def define_namespace(pack, metadata)
36-
namespace = metadata['namespace_override'] || pack.name.camelize
36+
namespace = metadata['namespace_override'] || pack.last_name.camelize
3737
Object.const_set(namespace, Module.new)
3838
namespace.constantize
3939
end
4040

4141
def namespaced_packages
42-
Stimpack::Packs.all
43-
.map {|pack| [pack, package_metadata(pack)] }
44-
.select {|pack, metadata| metadata && metadata["automatic_pack_namespace"] }
42+
Packs.all
43+
.map {|pack| [pack, package_metadata(pack)] }
44+
.select {|_pack, metadata| metadata && metadata["automatic_pack_namespace"] }
4545
end
4646

4747
def package_metadata(pack)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module AutomaticNamespaces
4-
VERSION = "0.1.2"
4+
VERSION = "0.2.0"
55
end

spec/fixtures/rails-7.0/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ruby "3.0.1"
66
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
77
gem "rails", "~> 7.0.4", ">= 7.0.3.1"
88

9-
gem "stimpack"
9+
gem "packs-rails"
1010

1111
gem "automatic_namespaces", path: File.expand_path("../../..", __dir__)
1212

spec/fixtures/rails-7.0/Gemfile.lock

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PATH
22
remote: /Users/gap/Projects/flytedesk/automatic_namespaces
33
specs:
4-
automatic_namespaces (0.1.0)
4+
automatic_namespaces (0.1.3)
55
activesupport
6-
stimpack
6+
packs-rails
77

88
GEM
99
remote: https://rubygems.org/
@@ -107,6 +107,12 @@ GEM
107107
nio4r (2.5.8)
108108
nokogiri (1.13.9-arm64-darwin)
109109
racc (~> 1.4)
110+
packs (0.0.6)
111+
sorbet-runtime
112+
packs-rails (0.0.1)
113+
activesupport
114+
packs
115+
railties
110116
puma (5.6.5)
111117
nio4r (~> 2.0)
112118
racc (1.6.0)
@@ -142,6 +148,7 @@ GEM
142148
rake (13.0.6)
143149
reline (0.3.1)
144150
io-console (~> 0.5)
151+
sorbet-runtime (0.5.10626)
145152
sprockets (4.1.1)
146153
concurrent-ruby (~> 1.0)
147154
rack (> 1, < 3)
@@ -150,9 +157,6 @@ GEM
150157
activesupport (>= 5.2)
151158
sprockets (>= 3.0.0)
152159
sqlite3 (1.5.3-arm64-darwin)
153-
stimpack (0.7.1)
154-
activesupport
155-
railties
156160
thor (1.2.1)
157161
timeout (0.3.0)
158162
tzinfo (2.0.5)
@@ -168,11 +172,11 @@ PLATFORMS
168172
DEPENDENCIES
169173
automatic_namespaces!
170174
debug
175+
packs-rails
171176
puma (~> 5.0)
172177
rails (~> 7.0.4, >= 7.0.3.1)
173178
sprockets-rails
174179
sqlite3 (~> 1.4)
175-
stimpack
176180
tzinfo-data
177181

178182
RUBY VERSION

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require "bundler/setup"
2-
require "stimpack"
2+
require "packs-rails"
33

44
RSpec.configure do |config|
55
# Enable flags like --only-failures and --next-failure

0 commit comments

Comments
 (0)