template-ruby 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.prettierignore +2 -0
- data/.rubocop.yml +121 -5
- data/Gemfile +11 -1
- data/Gemfile.lock +29 -17
- data/VERSION +1 -1
- data/bin/bundle +123 -0
- data/bin/bundle-audit +31 -0
- data/bin/bundler-audit +31 -0
- data/bin/rubocop +31 -0
- data/bin/template +7 -7
- data/lib/template/parser/template.rb +1 -1
- data/lib/template/version.rb +1 -1
- data/package-lock.json +14 -0
- data/package.json +0 -1
- data/spec/template_spec.rb +2 -2
- data/template-ruby.gemspec +3 -1
- metadata +15 -9
- data/yarn.lock +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f150542cc0de3c2bc1d201355a605c95edd9b3c4c715951e81e77b11218c1d9
|
|
4
|
+
data.tar.gz: 41334f085dde737ed4e4cd827dc60e6ad0f6823c51f2a5243f77696b406b98dc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a847d9866df2dd5aa9be44fef4bfc244d1828678f76264f6e4b48fb32753705970e279d8967106f7635419aa59d7580be42dee210f88ed3936ea9ed9e6e3af1c
|
|
7
|
+
data.tar.gz: 77a69956a521966f0ac4130f7a32eef88e0b6da989982d9f1a683b066d7233f0d1ec92e991c6fe510c02cfb5d7198a0cd2c4eecb694f4174e255ee7ff68c8f2a
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -28,10 +28,10 @@ jobs:
|
|
|
28
28
|
with:
|
|
29
29
|
bundler-cache: true
|
|
30
30
|
- run: bin/rubocop
|
|
31
|
-
|
|
32
|
-
name:
|
|
31
|
+
npm-audit:
|
|
32
|
+
name: npm Audit
|
|
33
33
|
runs-on: ubuntu-latest
|
|
34
34
|
steps:
|
|
35
35
|
- uses: actions/checkout@v4
|
|
36
36
|
- uses: actions/setup-node@v4
|
|
37
|
-
- run:
|
|
37
|
+
- run: npm audit
|
data/.prettierignore
ADDED
data/.rubocop.yml
CHANGED
|
@@ -1,8 +1,124 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
---
|
|
2
|
+
AllCops:
|
|
3
|
+
Exclude:
|
|
4
|
+
- "*/node_modules/**/*"
|
|
5
|
+
- "*/vendor/**/*"
|
|
6
|
+
- node_modules/**/*
|
|
7
|
+
- vendor/**/*
|
|
8
|
+
NewCops: enable
|
|
9
|
+
Layout/ClosingHeredocIndentation:
|
|
10
|
+
Enabled: false
|
|
11
|
+
Layout/FirstArgumentIndentation:
|
|
12
|
+
Enabled: false
|
|
13
|
+
Layout/HashAlignment:
|
|
14
|
+
Enabled: false
|
|
15
|
+
Layout/HeredocIndentation:
|
|
16
|
+
Enabled: false
|
|
17
|
+
Layout/LineEndStringConcatenationIndentation:
|
|
18
|
+
Enabled: false
|
|
19
|
+
Layout/LineLength:
|
|
20
|
+
Enabled: false
|
|
21
|
+
Layout/MultilineMethodCallIndentation:
|
|
22
|
+
Enabled: false
|
|
23
|
+
Layout/MultilineOperationIndentation:
|
|
24
|
+
Enabled: false
|
|
25
|
+
Lint/EmptyClass:
|
|
26
|
+
Enabled: false
|
|
27
|
+
Lint/MissingSuper:
|
|
28
|
+
Enabled: false
|
|
29
|
+
Lint/PercentStringArray:
|
|
30
|
+
Enabled: false
|
|
31
|
+
Lint/ShadowingOuterLocalVariable:
|
|
32
|
+
Enabled: false
|
|
33
|
+
Lint/SuppressedException:
|
|
34
|
+
Enabled: false
|
|
35
|
+
Lint/UnusedBlockArgument:
|
|
36
|
+
Enabled: false
|
|
37
|
+
Lint/UselessAssignment:
|
|
38
|
+
Enabled: false
|
|
39
|
+
Metrics/AbcSize:
|
|
40
|
+
Enabled: false
|
|
41
|
+
Metrics/BlockLength:
|
|
42
|
+
Enabled: false
|
|
43
|
+
Metrics/ClassLength:
|
|
44
|
+
Enabled: false
|
|
45
|
+
Metrics/CyclomaticComplexity:
|
|
46
|
+
Enabled: false
|
|
47
|
+
Metrics/MethodLength:
|
|
48
|
+
Enabled: false
|
|
49
|
+
Metrics/ModuleLength:
|
|
50
|
+
Enabled: false
|
|
51
|
+
Metrics/ParameterLists:
|
|
52
|
+
Enabled: false
|
|
53
|
+
Metrics/PerceivedComplexity:
|
|
54
|
+
Enabled: false
|
|
55
|
+
Naming/FileName:
|
|
56
|
+
Enabled: false
|
|
57
|
+
Naming/MethodParameterName:
|
|
58
|
+
Enabled: false
|
|
59
|
+
Naming/VariableNumber:
|
|
5
60
|
Enabled: false
|
|
6
|
-
|
|
7
61
|
Performance/UnfreezeString:
|
|
8
62
|
Enabled: false
|
|
63
|
+
RSpec/AnyInstance:
|
|
64
|
+
Enabled: false
|
|
65
|
+
RSpec/ContextWording:
|
|
66
|
+
Enabled: false
|
|
67
|
+
RSpec/DescribeClass:
|
|
68
|
+
Enabled: false
|
|
69
|
+
RSpec/ExampleLength:
|
|
70
|
+
Enabled: false
|
|
71
|
+
RSpec/ExampleWording:
|
|
72
|
+
Enabled: false
|
|
73
|
+
RSpec/MultipleExpectations:
|
|
74
|
+
Enabled: false
|
|
75
|
+
RSpec/NoExpectationExample:
|
|
76
|
+
Enabled: false
|
|
77
|
+
RSpec/PendingWithoutReason:
|
|
78
|
+
Enabled: false
|
|
79
|
+
Rails/Delegate:
|
|
80
|
+
Enabled: false
|
|
81
|
+
Rails/DynamicFindBy:
|
|
82
|
+
Enabled: false
|
|
83
|
+
Rails/HelperInstanceVariable:
|
|
84
|
+
Enabled: false
|
|
85
|
+
Rails/NegateInclude:
|
|
86
|
+
Enabled: false
|
|
87
|
+
Rails/Output:
|
|
88
|
+
Enabled: false
|
|
89
|
+
Rails/Presence:
|
|
90
|
+
Enabled: false
|
|
91
|
+
Rails/Present:
|
|
92
|
+
Enabled: false
|
|
93
|
+
Rails/ThreeStateBooleanColumn:
|
|
94
|
+
Enabled: false
|
|
95
|
+
Rails/TimeZone:
|
|
96
|
+
Enabled: false
|
|
97
|
+
Security/Eval:
|
|
98
|
+
Enabled: false
|
|
99
|
+
Style/CaseEquality:
|
|
100
|
+
Enabled: false
|
|
101
|
+
Style/Documentation:
|
|
102
|
+
Enabled: false
|
|
103
|
+
Style/DoubleNegation:
|
|
104
|
+
Enabled: false
|
|
105
|
+
Style/EmptyMethod:
|
|
106
|
+
Enabled: false
|
|
107
|
+
Style/IfUnlessModifier:
|
|
108
|
+
Enabled: false
|
|
109
|
+
Style/MultilineBlockChain:
|
|
110
|
+
Enabled: false
|
|
111
|
+
Style/QuotedSymbols:
|
|
112
|
+
Enabled: false
|
|
113
|
+
Style/StringLiterals:
|
|
114
|
+
Enabled: false
|
|
115
|
+
Style/StringLiteralsInInterpolation:
|
|
116
|
+
Enabled: false
|
|
117
|
+
require:
|
|
118
|
+
- rubocop-factory_bot
|
|
119
|
+
- rubocop-performance
|
|
120
|
+
- rubocop-rails
|
|
121
|
+
- rubocop-rake
|
|
122
|
+
- rubocop-rspec
|
|
123
|
+
- rubocop-rspec_rails
|
|
124
|
+
- rubocop-capybara
|
data/Gemfile
CHANGED
|
@@ -8,4 +8,14 @@ ruby "3.3.4"
|
|
|
8
8
|
|
|
9
9
|
gem "rspec"
|
|
10
10
|
gem "ruby-prof"
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
gem "bundler-audit"
|
|
13
|
+
|
|
14
|
+
gem "rubocop-factory_bot"
|
|
15
|
+
gem "rubocop-performance"
|
|
16
|
+
gem "rubocop-rails"
|
|
17
|
+
gem "rubocop-rake"
|
|
18
|
+
gem "rubocop-rspec"
|
|
19
|
+
gem "rubocop-rspec_rails"
|
|
20
|
+
|
|
21
|
+
gem "rubocop-capybara"
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
template-ruby (1.
|
|
4
|
+
template-ruby (1.1.0)
|
|
5
5
|
code-ruby
|
|
6
6
|
dorian-arguments
|
|
7
7
|
language-ruby
|
|
@@ -24,7 +24,10 @@ GEM
|
|
|
24
24
|
ast (2.4.2)
|
|
25
25
|
base64 (0.2.0)
|
|
26
26
|
bigdecimal (3.1.8)
|
|
27
|
-
|
|
27
|
+
bundler-audit (0.9.2)
|
|
28
|
+
bundler (>= 1.2.0, < 3)
|
|
29
|
+
thor (~> 1.0)
|
|
30
|
+
code-ruby (1.0.0)
|
|
28
31
|
activesupport
|
|
29
32
|
bigdecimal
|
|
30
33
|
did-you-mean
|
|
@@ -37,16 +40,13 @@ GEM
|
|
|
37
40
|
did-you-mean (0.1.1)
|
|
38
41
|
levenshtein (>= 0.2.0)
|
|
39
42
|
diff-lcs (1.5.1)
|
|
40
|
-
dorian-arguments (
|
|
41
|
-
activesupport
|
|
43
|
+
dorian-arguments (1.1.1)
|
|
42
44
|
bigdecimal
|
|
43
|
-
dorian-to_struct
|
|
44
|
-
dorian-to_struct (0.6.0)
|
|
45
45
|
drb (2.2.1)
|
|
46
46
|
i18n (1.14.5)
|
|
47
47
|
concurrent-ruby (~> 1.0)
|
|
48
48
|
json (2.7.2)
|
|
49
|
-
language-ruby (0.
|
|
49
|
+
language-ruby (1.0.1)
|
|
50
50
|
dorian-arguments
|
|
51
51
|
zeitwerk
|
|
52
52
|
language_server-protocol (3.17.0.3)
|
|
@@ -89,9 +89,10 @@ GEM
|
|
|
89
89
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
90
90
|
rubocop-ast (1.32.1)
|
|
91
91
|
parser (>= 3.3.1.0)
|
|
92
|
-
rubocop-
|
|
93
|
-
rubocop (
|
|
94
|
-
|
|
92
|
+
rubocop-capybara (2.21.0)
|
|
93
|
+
rubocop (~> 1.41)
|
|
94
|
+
rubocop-factory_bot (2.26.1)
|
|
95
|
+
rubocop (~> 1.61)
|
|
95
96
|
rubocop-performance (1.21.1)
|
|
96
97
|
rubocop (>= 1.48.1, < 2.0)
|
|
97
98
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
@@ -100,15 +101,18 @@ GEM
|
|
|
100
101
|
rack (>= 1.1)
|
|
101
102
|
rubocop (>= 1.52.0, < 2.0)
|
|
102
103
|
rubocop-ast (>= 1.31.1, < 2.0)
|
|
103
|
-
rubocop-
|
|
104
|
-
rubocop
|
|
105
|
-
|
|
106
|
-
rubocop
|
|
107
|
-
|
|
104
|
+
rubocop-rake (0.6.0)
|
|
105
|
+
rubocop (~> 1.0)
|
|
106
|
+
rubocop-rspec (3.0.4)
|
|
107
|
+
rubocop (~> 1.61)
|
|
108
|
+
rubocop-rspec_rails (2.30.0)
|
|
109
|
+
rubocop (~> 1.61)
|
|
110
|
+
rubocop-rspec (~> 3, >= 3.0.1)
|
|
108
111
|
ruby-prof (1.7.0)
|
|
109
112
|
ruby-progressbar (1.13.0)
|
|
110
113
|
securerandom (0.3.1)
|
|
111
114
|
strscan (3.1.0)
|
|
115
|
+
thor (1.3.2)
|
|
112
116
|
tzinfo (2.0.6)
|
|
113
117
|
concurrent-ruby (~> 1.0)
|
|
114
118
|
unicode-display_width (2.5.0)
|
|
@@ -117,10 +121,18 @@ GEM
|
|
|
117
121
|
PLATFORMS
|
|
118
122
|
arm64-darwin-22
|
|
119
123
|
arm64-darwin-23
|
|
124
|
+
x86_64-linux
|
|
120
125
|
|
|
121
126
|
DEPENDENCIES
|
|
127
|
+
bundler-audit
|
|
122
128
|
rspec
|
|
123
|
-
rubocop-
|
|
129
|
+
rubocop-capybara
|
|
130
|
+
rubocop-factory_bot
|
|
131
|
+
rubocop-performance
|
|
132
|
+
rubocop-rails
|
|
133
|
+
rubocop-rake
|
|
134
|
+
rubocop-rspec
|
|
135
|
+
rubocop-rspec_rails
|
|
124
136
|
ruby-prof
|
|
125
137
|
template-ruby!
|
|
126
138
|
|
|
@@ -128,4 +140,4 @@ RUBY VERSION
|
|
|
128
140
|
ruby 3.3.4p94
|
|
129
141
|
|
|
130
142
|
BUNDLED WITH
|
|
131
|
-
2.5.
|
|
143
|
+
2.5.18
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.1.0
|
data/bin/bundle
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "rubygems"
|
|
12
|
+
|
|
13
|
+
m =
|
|
14
|
+
Module.new do
|
|
15
|
+
module_function
|
|
16
|
+
|
|
17
|
+
def invoked_as_script?
|
|
18
|
+
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def env_var_version
|
|
22
|
+
ENV.fetch("BUNDLER_VERSION", nil)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def cli_arg_version
|
|
26
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
27
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
28
|
+
|
|
29
|
+
bundler_version = nil
|
|
30
|
+
update_index = nil
|
|
31
|
+
ARGV.each_with_index do |a, i|
|
|
32
|
+
if update_index && update_index.succ == i &&
|
|
33
|
+
a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
|
|
34
|
+
bundler_version = a
|
|
35
|
+
end
|
|
36
|
+
unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
|
|
37
|
+
next
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
bundler_version = Regexp.last_match(1)
|
|
41
|
+
update_index = i
|
|
42
|
+
end
|
|
43
|
+
bundler_version
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def gemfile
|
|
47
|
+
gemfile = ENV.fetch("BUNDLE_GEMFILE", nil)
|
|
48
|
+
return gemfile if gemfile && !gemfile.empty?
|
|
49
|
+
|
|
50
|
+
File.expand_path("../Gemfile", __dir__)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def lockfile
|
|
54
|
+
lockfile =
|
|
55
|
+
case File.basename(gemfile)
|
|
56
|
+
when "gems.rb"
|
|
57
|
+
gemfile.sub(/\.rb$/, ".locked")
|
|
58
|
+
else
|
|
59
|
+
"#{gemfile}.lock"
|
|
60
|
+
end
|
|
61
|
+
File.expand_path(lockfile)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def lockfile_version
|
|
65
|
+
return unless File.file?(lockfile)
|
|
66
|
+
|
|
67
|
+
lockfile_contents = File.read(lockfile)
|
|
68
|
+
unless lockfile_contents =~
|
|
69
|
+
/\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
|
|
70
|
+
return
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
Regexp.last_match(1)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def bundler_requirement
|
|
77
|
+
@bundler_requirement ||=
|
|
78
|
+
env_var_version || cli_arg_version ||
|
|
79
|
+
bundler_requirement_for(lockfile_version)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def bundler_requirement_for(version)
|
|
83
|
+
return "#{Gem::Requirement.default}.a" unless version
|
|
84
|
+
|
|
85
|
+
bundler_gem_version = Gem::Version.new(version)
|
|
86
|
+
|
|
87
|
+
bundler_gem_version.approximate_recommendation
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def load_bundler!
|
|
91
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
92
|
+
|
|
93
|
+
activate_bundler
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def activate_bundler
|
|
97
|
+
gem_error =
|
|
98
|
+
activation_error_handling { gem "bundler", bundler_requirement }
|
|
99
|
+
return if gem_error.nil?
|
|
100
|
+
|
|
101
|
+
require_error = activation_error_handling { require "bundler/version" }
|
|
102
|
+
if require_error.nil? &&
|
|
103
|
+
Gem::Requirement.new(bundler_requirement).satisfied_by?(
|
|
104
|
+
Gem::Version.new(Bundler::VERSION)
|
|
105
|
+
)
|
|
106
|
+
return
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
|
110
|
+
exit 42
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def activation_error_handling
|
|
114
|
+
yield
|
|
115
|
+
nil
|
|
116
|
+
rescue StandardError, LoadError => e
|
|
117
|
+
e
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
m.load_bundler!
|
|
122
|
+
|
|
123
|
+
load Gem.bin_path("bundler", "bundle") if m.invoked_as_script?
|
data/bin/bundle-audit
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle-audit' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?(
|
|
17
|
+
"This file was generated by Bundler"
|
|
18
|
+
)
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort(
|
|
22
|
+
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
require "rubygems"
|
|
29
|
+
require "bundler/setup"
|
|
30
|
+
|
|
31
|
+
load Gem.bin_path("bundler-audit", "bundle-audit")
|
data/bin/bundler-audit
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundler-audit' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?(
|
|
17
|
+
"This file was generated by Bundler"
|
|
18
|
+
)
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort(
|
|
22
|
+
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
require "rubygems"
|
|
29
|
+
require "bundler/setup"
|
|
30
|
+
|
|
31
|
+
load Gem.bin_path("bundler-audit", "bundler-audit")
|
data/bin/rubocop
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'rubocop' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
+
|
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
|
14
|
+
|
|
15
|
+
if File.file?(bundle_binstub)
|
|
16
|
+
if File.read(bundle_binstub, 300).include?(
|
|
17
|
+
"This file was generated by Bundler"
|
|
18
|
+
)
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort(
|
|
22
|
+
"Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
23
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again."
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
require "rubygems"
|
|
29
|
+
require "bundler/setup"
|
|
30
|
+
|
|
31
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/template
CHANGED
|
@@ -61,11 +61,11 @@ end
|
|
|
61
61
|
if profile
|
|
62
62
|
result = RubyProf.stop
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
printer =
|
|
65
|
+
if parsed.options.profiler == "html"
|
|
66
|
+
RubyProf::GraphHtmlPrinter.new(result)
|
|
67
|
+
else
|
|
68
|
+
RubyProf::FlatPrinter.new(result)
|
|
69
|
+
end
|
|
70
|
+
printer.print($stdout)
|
|
71
71
|
end
|
data/lib/template/version.rb
CHANGED
data/package-lock.json
ADDED
data/package.json
CHANGED
data/spec/template_spec.rb
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
require "spec_helper"
|
|
4
4
|
|
|
5
|
-
RSpec.describe
|
|
5
|
+
RSpec.describe Template do
|
|
6
6
|
[
|
|
7
7
|
["{name = :Dorian nothing}Hello {name}", "Hello Dorian"]
|
|
8
8
|
].each do |input, expected|
|
|
9
9
|
it "#{input} == #{expected}" do
|
|
10
|
-
expect(
|
|
10
|
+
expect(described_class.evaluate(input)).to eq(expected)
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
data/template-ruby.gemspec
CHANGED
|
@@ -13,7 +13,9 @@ Gem::Specification.new do |s|
|
|
|
13
13
|
s.license = "MIT"
|
|
14
14
|
s.executables = "template"
|
|
15
15
|
s.add_dependency "code-ruby"
|
|
16
|
+
s.add_dependency "dorian-arguments"
|
|
16
17
|
s.add_dependency "language-ruby"
|
|
17
18
|
s.add_dependency "zeitwerk"
|
|
18
|
-
s.
|
|
19
|
+
s.metadata["rubygems_mfa_required"] = "true"
|
|
20
|
+
s.required_ruby_version = "3.3.4"
|
|
19
21
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: template-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dorian Marié
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: code-ruby
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: dorian-arguments
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: language-ruby
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: zeitwerk
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
@@ -77,6 +77,7 @@ files:
|
|
|
77
77
|
- ".github/workflows/ci.yml"
|
|
78
78
|
- ".gitignore"
|
|
79
79
|
- ".node-version"
|
|
80
|
+
- ".prettierignore"
|
|
80
81
|
- ".rspec"
|
|
81
82
|
- ".rubocop.yml"
|
|
82
83
|
- ".ruby-version"
|
|
@@ -86,7 +87,11 @@ files:
|
|
|
86
87
|
- LICENSE
|
|
87
88
|
- README.md
|
|
88
89
|
- VERSION
|
|
90
|
+
- bin/bundle
|
|
91
|
+
- bin/bundle-audit
|
|
92
|
+
- bin/bundler-audit
|
|
89
93
|
- bin/rspec
|
|
94
|
+
- bin/rubocop
|
|
90
95
|
- bin/template
|
|
91
96
|
- bin/test
|
|
92
97
|
- lib/template-ruby.rb
|
|
@@ -99,24 +104,25 @@ files:
|
|
|
99
104
|
- lib/template/parser.rb
|
|
100
105
|
- lib/template/parser/template.rb
|
|
101
106
|
- lib/template/version.rb
|
|
107
|
+
- package-lock.json
|
|
102
108
|
- package.json
|
|
103
109
|
- spec/spec_helper.rb
|
|
104
110
|
- spec/template_spec.rb
|
|
105
111
|
- template-ruby.gemspec
|
|
106
|
-
- yarn.lock
|
|
107
112
|
homepage: https://github.com/dorianmariecom/template-ruby
|
|
108
113
|
licenses:
|
|
109
114
|
- MIT
|
|
110
|
-
metadata:
|
|
115
|
+
metadata:
|
|
116
|
+
rubygems_mfa_required: 'true'
|
|
111
117
|
post_install_message:
|
|
112
118
|
rdoc_options: []
|
|
113
119
|
require_paths:
|
|
114
120
|
- lib
|
|
115
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
122
|
requirements:
|
|
117
|
-
- -
|
|
123
|
+
- - '='
|
|
118
124
|
- !ruby/object:Gem::Version
|
|
119
|
-
version:
|
|
125
|
+
version: 3.3.4
|
|
120
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
127
|
requirements:
|
|
122
128
|
- - ">="
|
data/yarn.lock
DELETED