rubysmith 5.8.1 → 5.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d6463a4b66a1668979f5d825065d7fda7c49f211db2db7f5bd9a0cc317a7629
4
- data.tar.gz: a790806d30c4e8c06093717aefd934136f2b76b8efac56f80cdf5f44edf28818
3
+ metadata.gz: 9d18353c1dce13dfdc3f143b94e12dcc800ad74a790a64a3afb218b7e79710e1
4
+ data.tar.gz: 8a96b5eae4af1d8ba2ce38a9c1140b8088e50b84de7942ce958e895174d6292b
5
5
  SHA512:
6
- metadata.gz: 8664418401e1ab60e8a22fac22e773937b707b6857202b90baf802e4929cf17547d109426ba5083a259d1306f3aa65972be7589c1e050abd231307e64dff74cb
7
- data.tar.gz: ad461380ff16989af7e8fbaf1c9e1f57e85dfb8f17f5f001dcd4a2f03ecf6c23a5a46abb818c9fa0b608ec4749d84b204d03c27103a5562b1d2f02325be6c7a7
6
+ metadata.gz: 2bcccf6876cc8fb44785288892a9dcf2136061823400fb2e6cd72d61e6a18a58a002ca027aa2d9f19ce38c1e02e591bb3e7b6960d07d7b24003779c304eab80d
7
+ data.tar.gz: 98f760e9ed26dcb232daaa4ac0fe89793fd7a809848d237ffe283bfa9fec811ee56138272a4ff8206dc5e7707e9440bb9874d1fc75c5b1dbae690578378a092e
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- I֠&E�uV�U�z��iJw��?�����tIev2��%;�/S�O�� ��o�%gm]*M�{�|����r�MJ��]j�����:[+�$�%)Cr3���8p"4�YD������_z�����K���
2
- S
1
+ U��
2
+ 9Sv��ĺC7(���4�_�ߑ����{��x���#o"�W'�Ґ�>_�E?� ĒGy�׹/Oy�
3
+ �QKnQ�l�D���_�'V:��r��M�sy�xIfK�s���%-=1X=�h������j�}�F>��̘G=�Q@�т��sP3�y}�nTqA��x��:�4�B�{�c/�-��O�[dv`36����
4
+ >!E����|60D)��T������\�E��
@@ -18,16 +18,28 @@ module Rubysmith
18
18
  end
19
19
 
20
20
  def call
21
+ render_implementation
22
+ render_specification
23
+ configuration
24
+ end
25
+
26
+ private
27
+
28
+ def render_implementation
21
29
  builder.call(configuration.merge(template_path: "%project_name%/lib/%project_path%.rb.erb"))
22
30
  .render
23
31
  .replace(" require", "require")
24
32
  .replace(/ (?=(Zeit|loader|end))/, "")
25
33
  .replace("\n \n", "\n\n")
26
34
  .insert_before("module #{module_name}", "#{indentation}# Main namespace.\n")
27
- configuration
28
35
  end
29
36
 
30
- private
37
+ def render_specification
38
+ return unless configuration.build_zeitwerk
39
+
40
+ path = "%project_name%/spec/lib/%project_path%_spec.rb.erb"
41
+ builder.call(configuration.merge(template_path: path)).render
42
+ end
31
43
 
32
44
  def indentation = ::Core::EMPTY_STRING.indent configuration.project_levels
33
45
 
@@ -2,12 +2,14 @@
2
2
 
3
3
  require "bundler"
4
4
  require "bundler/cli"
5
+ require "refinements/ios"
5
6
  require "refinements/pathnames"
6
7
 
7
8
  module Rubysmith
8
9
  module Extensions
9
10
  # Ensures gem dependencies are installed.
10
11
  class Bundler
12
+ using Refinements::IOs
11
13
  using Refinements::Pathnames
12
14
 
13
15
  def self.call(...) = new(...).call
@@ -18,7 +20,11 @@ module Rubysmith
18
20
  end
19
21
 
20
22
  def call
21
- configuration.project_root.change_dir { client.start %w[install --quiet] }
23
+ configuration.project_root.change_dir do
24
+ client.start %w[install --quiet]
25
+ STDOUT.squelch { client.start %w[lock --add-platform x86_64-linux --update] }
26
+ end
27
+
22
28
  configuration
23
29
  end
24
30
 
@@ -8,20 +8,20 @@ jobs:
8
8
  - checkout
9
9
 
10
10
  - restore_cache:
11
- name: Bundler Restore
11
+ name: Gems Restore
12
12
  keys:
13
13
  - gem-cache-{{.Branch}}-{{checksum "Gemfile.lock"}}
14
14
  - gem-cache-
15
15
 
16
16
  - run:
17
- name: Bundler Install
17
+ name: Gems Install
18
18
  command: |
19
19
  gem update --system
20
20
  bundle config set path "vendor/bundle"
21
21
  bundle install
22
22
 
23
23
  - save_cache:
24
- name: Bundler Store
24
+ name: Gems Store
25
25
  key: gem-cache-{{.Branch}}-{{checksum "Gemfile.lock"}}
26
26
  paths:
27
27
  - vendor/bundle
@@ -32,7 +32,7 @@ jobs:
32
32
 
33
33
  <% if configuration.build_simple_cov %>
34
34
  - store_artifacts:
35
- name: SimpleCov Artifacts Upload
35
+ name: SimpleCov Report
36
36
  path: ~/project/coverage
37
37
  destination: coverage
38
38
  <% end %>
@@ -11,16 +11,16 @@ jobs:
11
11
  - name: Checkout
12
12
  uses: actions/checkout@v3
13
13
 
14
- - name: Setup Ruby
14
+ - name: Ruby Setup
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
17
17
  bundler-cache: true
18
18
 
19
- - name: Rake
19
+ - name: Build
20
20
  run: bundle exec rake
21
21
 
22
22
  <% if configuration.build_simple_cov %>
23
- - name: Archive SimpleCov Report
23
+ - name: SimpleCov Report
24
24
  uses: actions/upload-artifact@v3
25
25
  with:
26
26
  name: coverage
@@ -0,0 +1,14 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe <%= configuration.project_namespaced_class %> do
4
+ describe ".loader" do
5
+ it "eager loads" do
6
+ expectation = proc { described_class.loader.eager_load force: true }
7
+ expect(&expectation).not_to raise_error
8
+ end
9
+
10
+ it "answers unique tag" do
11
+ expect(described_class.loader.tag).to eq("<%= configuration.project_name %>")
12
+ end
13
+ end
14
+ end
data/rubysmith.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "rubysmith"
5
- spec.version = "5.8.1"
5
+ spec.version = "5.9.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/rubysmith"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.1
4
+ version: 5.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2023-11-17 00:00:00.000000000 Z
38
+ date: 2023-12-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -396,6 +396,7 @@ files:
396
396
  - lib/rubysmith/templates/%project_name%/bin/rubocop.erb
397
397
  - lib/rubysmith/templates/%project_name%/bin/setup.erb
398
398
  - lib/rubysmith/templates/%project_name%/lib/%project_path%.rb.erb
399
+ - lib/rubysmith/templates/%project_name%/spec/lib/%project_path%_spec.rb.erb
399
400
  - lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
400
401
  - lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
401
402
  - lib/rubysmith/text/inserter.rb
metadata.gz.sig CHANGED
Binary file