template-ruby 1.0.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.prettierignore +2 -0
- data/.rubocop.yml +123 -5
- data/.ruby-version +1 -1
- data/.tool-versions +1 -1
- data/Gemfile +12 -2
- data/Gemfile.lock +37 -29
- 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: c0da0a2d800fe1644ebdd96c1efba802f8d144bcc25c86feec00ad6c2af8cccc
|
4
|
+
data.tar.gz: 907c5556b45b39649b0b11902ba1acecc1ea6d9990bc0b5502bd7f482f1cb21f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb785a3c3228ef2ad261c40ffdfafcbc94f77d1a3ce31b97487e8c99b75132335f24eed8e90fd2b8019185b8ecc8e5c8ba76a851ecb17db4d703001f970f87f1
|
7
|
+
data.tar.gz: 565fbfee90bf052bbc7bb3aaead5d73c70e7aee417f5b3a35690faff4559491c1c3ed1d2aa8e69e842e90e578be1c239753d8ae63850af25d87112be02734af2
|
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,126 @@
|
|
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/NestedTernaryOperator:
|
112
|
+
Enabled: false
|
113
|
+
Style/QuotedSymbols:
|
114
|
+
Enabled: false
|
115
|
+
Style/StringLiterals:
|
116
|
+
Enabled: false
|
117
|
+
Style/StringLiteralsInInterpolation:
|
118
|
+
Enabled: false
|
119
|
+
require:
|
120
|
+
- rubocop-factory_bot
|
121
|
+
- rubocop-performance
|
122
|
+
- rubocop-rails
|
123
|
+
- rubocop-rake
|
124
|
+
- rubocop-rspec
|
125
|
+
- rubocop-rspec_rails
|
126
|
+
- rubocop-capybara
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.5
|
data/.tool-versions
CHANGED
data/Gemfile
CHANGED
@@ -4,8 +4,18 @@ source "https://rubygems.org"
|
|
4
4
|
|
5
5
|
gemspec
|
6
6
|
|
7
|
-
ruby "3.3.
|
7
|
+
ruby "3.3.5"
|
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.2)
|
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.1.1)
|
28
31
|
activesupport
|
29
32
|
bigdecimal
|
30
33
|
did-you-mean
|
@@ -37,37 +40,32 @@ 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.2.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)
|
53
53
|
levenshtein (0.2.2)
|
54
|
-
logger (1.6.
|
54
|
+
logger (1.6.1)
|
55
55
|
minitest (5.25.1)
|
56
56
|
parallel (1.26.3)
|
57
|
-
parser (3.3.
|
57
|
+
parser (3.3.5.0)
|
58
58
|
ast (~> 2.4.1)
|
59
59
|
racc
|
60
60
|
racc (1.8.1)
|
61
61
|
rack (3.1.7)
|
62
62
|
rainbow (3.1.1)
|
63
63
|
regexp_parser (2.9.2)
|
64
|
-
rexml (3.3.6)
|
65
|
-
strscan
|
66
64
|
rspec (3.13.0)
|
67
65
|
rspec-core (~> 3.13.0)
|
68
66
|
rspec-expectations (~> 3.13.0)
|
69
67
|
rspec-mocks (~> 3.13.0)
|
70
|
-
rspec-core (3.13.
|
68
|
+
rspec-core (3.13.1)
|
71
69
|
rspec-support (~> 3.13.0)
|
72
70
|
rspec-expectations (3.13.2)
|
73
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -76,22 +74,22 @@ GEM
|
|
76
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
75
|
rspec-support (~> 3.13.0)
|
78
76
|
rspec-support (3.13.1)
|
79
|
-
rubocop (1.
|
77
|
+
rubocop (1.66.1)
|
80
78
|
json (~> 2.3)
|
81
79
|
language_server-protocol (>= 3.17.0)
|
82
80
|
parallel (~> 1.10)
|
83
81
|
parser (>= 3.3.0.2)
|
84
82
|
rainbow (>= 2.2.2, < 4.0)
|
85
83
|
regexp_parser (>= 2.4, < 3.0)
|
86
|
-
|
87
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
84
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
88
85
|
ruby-progressbar (~> 1.7)
|
89
86
|
unicode-display_width (>= 2.4.0, < 3.0)
|
90
|
-
rubocop-ast (1.32.
|
87
|
+
rubocop-ast (1.32.3)
|
91
88
|
parser (>= 3.3.1.0)
|
92
|
-
rubocop-
|
93
|
-
rubocop (
|
94
|
-
|
89
|
+
rubocop-capybara (2.21.0)
|
90
|
+
rubocop (~> 1.41)
|
91
|
+
rubocop-factory_bot (2.26.1)
|
92
|
+
rubocop (~> 1.61)
|
95
93
|
rubocop-performance (1.21.1)
|
96
94
|
rubocop (>= 1.48.1, < 2.0)
|
97
95
|
rubocop-ast (>= 1.31.1, < 2.0)
|
@@ -100,32 +98,42 @@ GEM
|
|
100
98
|
rack (>= 1.1)
|
101
99
|
rubocop (>= 1.52.0, < 2.0)
|
102
100
|
rubocop-ast (>= 1.31.1, < 2.0)
|
103
|
-
rubocop-
|
104
|
-
rubocop
|
105
|
-
|
106
|
-
rubocop
|
107
|
-
|
101
|
+
rubocop-rake (0.6.0)
|
102
|
+
rubocop (~> 1.0)
|
103
|
+
rubocop-rspec (3.0.4)
|
104
|
+
rubocop (~> 1.61)
|
105
|
+
rubocop-rspec_rails (2.30.0)
|
106
|
+
rubocop (~> 1.61)
|
107
|
+
rubocop-rspec (~> 3, >= 3.0.1)
|
108
108
|
ruby-prof (1.7.0)
|
109
109
|
ruby-progressbar (1.13.0)
|
110
110
|
securerandom (0.3.1)
|
111
|
-
|
111
|
+
thor (1.3.2)
|
112
112
|
tzinfo (2.0.6)
|
113
113
|
concurrent-ruby (~> 1.0)
|
114
114
|
unicode-display_width (2.5.0)
|
115
|
-
zeitwerk (2.6.
|
115
|
+
zeitwerk (2.6.18)
|
116
116
|
|
117
117
|
PLATFORMS
|
118
118
|
arm64-darwin-22
|
119
119
|
arm64-darwin-23
|
120
|
+
x86_64-linux
|
120
121
|
|
121
122
|
DEPENDENCIES
|
123
|
+
bundler-audit
|
122
124
|
rspec
|
123
|
-
rubocop-
|
125
|
+
rubocop-capybara
|
126
|
+
rubocop-factory_bot
|
127
|
+
rubocop-performance
|
128
|
+
rubocop-rails
|
129
|
+
rubocop-rake
|
130
|
+
rubocop-rspec
|
131
|
+
rubocop-rspec_rails
|
124
132
|
ruby-prof
|
125
133
|
template-ruby!
|
126
134
|
|
127
135
|
RUBY VERSION
|
128
|
-
ruby 3.3.
|
136
|
+
ruby 3.3.5p100
|
129
137
|
|
130
138
|
BUNDLED WITH
|
131
|
-
2.5.
|
139
|
+
2.5.18
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.2
|
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.0"
|
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.2
|
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-
|
11
|
+
date: 2024-09-05 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,15 +104,16 @@ 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:
|
@@ -116,14 +122,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
122
|
requirements:
|
117
123
|
- - ">="
|
118
124
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
125
|
+
version: 3.3.0
|
120
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
128
|
- - ">="
|
123
129
|
- !ruby/object:Gem::Version
|
124
130
|
version: '0'
|
125
131
|
requirements: []
|
126
|
-
rubygems_version: 3.5.
|
132
|
+
rubygems_version: 3.5.16
|
127
133
|
signing_key:
|
128
134
|
specification_version: 4
|
129
135
|
summary: templating language
|
data/yarn.lock
DELETED