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 +4 -4
- checksums.yaml.gz.sig +4 -2
- data/lib/rubysmith/builders/core.rb +14 -2
- data/lib/rubysmith/extensions/bundler.rb +7 -1
- data/lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb +4 -4
- data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +3 -3
- data/lib/rubysmith/templates/%project_name%/spec/lib/%project_path%_spec.rb.erb +14 -0
- data/rubysmith.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d18353c1dce13dfdc3f143b94e12dcc800ad74a790a64a3afb218b7e79710e1
|
4
|
+
data.tar.gz: 8a96b5eae4af1d8ba2ce38a9c1140b8088e50b84de7942ce958e895174d6292b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bcccf6876cc8fb44785288892a9dcf2136061823400fb2e6cd72d61e6a18a58a002ca027aa2d9f19ce38c1e02e591bb3e7b6960d07d7b24003779c304eab80d
|
7
|
+
data.tar.gz: 98f760e9ed26dcb232daaa4ac0fe89793fd7a809848d237ffe283bfa9fec811ee56138272a4ff8206dc5e7707e9440bb9874d1fc75c5b1dbae690578378a092e
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
�
|
1
|
+
U��
|
2
|
+
9Sv��ĺC�7(���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
|
-
|
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
|
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:
|
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:
|
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:
|
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
|
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
|
14
|
+
- name: Ruby Setup
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
17
|
bundler-cache: true
|
18
18
|
|
19
|
-
- name:
|
19
|
+
- name: Build
|
20
20
|
run: bundle exec rake
|
21
21
|
|
22
22
|
<% if configuration.build_simple_cov %>
|
23
|
-
- name:
|
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
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.
|
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-
|
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
|