foobara-empty-ruby-project-generator 1.0.3 → 1.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4ba87a2fbc645f6a18478e87585ad474185a2b40be186acecaa270b1dba1f6e
4
- data.tar.gz: 5991a707a46614dfeeb66af5a5290c9ab26c500c98f49685b42d431a446f44cf
3
+ metadata.gz: cdd94a071a7ea95a1a265d7b4b21ebf47def1bec403a37006a9532ad7c2d31d9
4
+ data.tar.gz: c2edf8c142844d267030c10acf2c28e0f1538c072aed8b81d7dfa33a2fe847ee
5
5
  SHA512:
6
- metadata.gz: 0c73dcd19a502da49bb02b9724ccce18993da551d19514d97fcd93a860399c99a55c24267691a31a2dd346fe78d1ea267be3b9c2f4cad7303cce739a6520c87a
7
- data.tar.gz: cf9b3c9cf931837f4ca0ab94ef68223efb51ed140754943b40faea4e8807f95d04499def1d1f1b63ea9ff1936ac79f2b984cc2b8781688ac4c6e91d0f2b980fa
6
+ metadata.gz: 796b690590459387a46f7711125d5f63713eb4bcfa135954b6bef8e6bbdf0203fd4e9851a455b147e3bdaf582c6e5815a1df6f19256c53ea6b9ad3c21f2ca0fe
7
+ data.tar.gz: 58a03f74330318ac08d3d2c85ab7dcce3fab243dc0513c5b59eb8c8e4efba3a6000a19d8edd5d8648bd856d954074eb7b7be5156ffc6106d4ea467bee032f064
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [1.0.5] - 2026-09-15
2
+
3
+ - Adds ./local_data to generated .gitignore
4
+ - Fixes various deprecation warnings that pop up in newly generated projects
5
+ - Defaults to branch coverage (should probably be optional!)
6
+ - Make sure all deprecation warnings are shown by default in newly generated projects
7
+
8
+ ## [1.0.4] - 2025-08-24
9
+
10
+ - Scrub cookies in vcr.rb instead of deleting them
11
+
1
12
  ## [1.0.3] - 2025-08-24
2
13
 
3
14
  - By default, strip Set-Cookie headers out of VCR cassettes
@@ -27,9 +27,9 @@ module Foobara
27
27
  when "MPL-2.0"
28
28
  Mpl2LicenseGenerator
29
29
  else
30
- # :nocov:
30
+ # simplecov:disable
31
31
  raise "Unknown license string #{license_string}"
32
- # :nocov:
32
+ # simplecov:enable
33
33
  end
34
34
  end.map do |klass|
35
35
  klass.new(relevant_manifest)
@@ -54,9 +54,9 @@ module Foobara
54
54
  "This project is dual licensed under your choice of the " \
55
55
  "#{licenses.first} license and the #{licenses.last} license."
56
56
  else
57
- # :nocov:
57
+ # simplecov:disable
58
58
  raise "Not sure what to do with #{licenses.size} licenses"
59
- # :nocov:
59
+ # simplecov:enable
60
60
  end
61
61
  end
62
62
  end
@@ -24,9 +24,9 @@ module Foobara
24
24
  Generators::VersionGenerator
25
25
  ]
26
26
  else
27
- # :nocov:
27
+ # simplecov:disable
28
28
  raise "Not sure how build a generator for a #{manifest}"
29
- # :nocov:
29
+ # simplecov:enable
30
30
  end
31
31
  end
32
32
  end
@@ -99,7 +99,7 @@ module Foobara
99
99
  # TODO: implement #[] or move it up to Model from Entity if it exists there.
100
100
  @author_names ||= read_attribute(:author_names) || begin
101
101
  # TODO: dump a git config file in CI so we don't have to skip this
102
- # :nocov:
102
+ # simplecov:disable
103
103
  name = `git config --get user.name`
104
104
 
105
105
  if $CHILD_STATUS.exitstatus == 0
@@ -107,13 +107,13 @@ module Foobara
107
107
  else
108
108
  raise "Must set author_names because we can't get it from git for some reason"
109
109
  end
110
- # :nocov:
110
+ # simplecov:enable
111
111
  end
112
112
  end
113
113
 
114
114
  def author_emails
115
115
  @author_emails ||= read_attribute(:author_emails) || begin
116
- # :nocov:
116
+ # simplecov:disable
117
117
  email = `git config --get user.email`
118
118
 
119
119
  if $CHILD_STATUS.exitstatus == 0
@@ -121,7 +121,7 @@ module Foobara
121
121
  else
122
122
  raise "Must set author_emails because we can't get it from git for some reason"
123
123
  end
124
- # :nocov:
124
+ # simplecov:enable
125
125
  end
126
126
  end
127
127
 
@@ -115,9 +115,9 @@ module Foobara
115
115
  run_cmd_and_return_output(cmd)
116
116
  end
117
117
  else
118
- # :nocov:
118
+ # simplecov:disable
119
119
  run_cmd_and_return_output(cmd)
120
- # :nocov:
120
+ # simplecov:enable
121
121
  end
122
122
  end
123
123
 
@@ -131,14 +131,14 @@ module Foobara
131
131
  run_cmd_and_return_output(cmd)
132
132
  end
133
133
  else
134
- # :nocov:
134
+ # simplecov:disable
135
135
  run_cmd_and_return_output(cmd)
136
- # :nocov:
136
+ # simplecov:enable
137
137
  end
138
138
  rescue CouldNotExecuteError => e
139
- # :nocov:
139
+ # simplecov:disable
140
140
  warn e.message
141
- # :nocov:
141
+ # simplecov:enable
142
142
  end
143
143
 
144
144
  def make_bin_files_executable
@@ -148,9 +148,9 @@ module Foobara
148
148
  begin
149
149
  run_cmd_and_return_output(cmd)
150
150
  rescue CouldNotExecuteError => e
151
- # :nocov:
151
+ # simplecov:disable
152
152
  warn e.message
153
- # :nocov:
153
+ # simplecov:enable
154
154
  end
155
155
  end
156
156
  end
@@ -162,10 +162,10 @@ module Foobara
162
162
  cmd = "git init"
163
163
  run_cmd_and_return_output(cmd)
164
164
  rescue CouldNotExecuteError => e
165
- # :nocov:
165
+ # simplecov:disable
166
166
  self.use_git_failed = true
167
167
  warn e.message
168
- # :nocov:
168
+ # simplecov:enable
169
169
  end
170
170
 
171
171
  def git_add_all
@@ -174,10 +174,10 @@ module Foobara
174
174
  cmd = "git add ."
175
175
  run_cmd_and_return_output(cmd)
176
176
  rescue CouldNotExecuteError => e
177
- # :nocov:
177
+ # simplecov:disable
178
178
  self.use_git_failed = true
179
179
  warn e.message
180
- # :nocov:
180
+ # simplecov:enable
181
181
  end
182
182
 
183
183
  def git_commit
@@ -186,10 +186,10 @@ module Foobara
186
186
  cmd = "git commit -m 'Create ruby project files'"
187
187
  run_cmd_and_return_output(cmd)
188
188
  rescue CouldNotExecuteError => e
189
- # :nocov:
189
+ # simplecov:disable
190
190
  self.use_git_failed = true
191
191
  warn e.message
192
- # :nocov:
192
+ # simplecov:enable
193
193
  end
194
194
 
195
195
  def github_create_repo
@@ -212,9 +212,9 @@ module Foobara
212
212
  exit_status = run_cmd_and_write_output(cmd, raise_if_fails: false)
213
213
 
214
214
  unless exit_status&.success?
215
- # :nocov:
215
+ # simplecov:disable
216
216
  self.push_to_github_failed = true
217
- # :nocov:
217
+ # simplecov:enable
218
218
  end
219
219
  end
220
220
 
@@ -225,9 +225,9 @@ module Foobara
225
225
  exit_status = run_cmd_and_write_output(cmd, raise_if_fails: false)
226
226
 
227
227
  unless exit_status&.success?
228
- # :nocov:
228
+ # simplecov:disable
229
229
  self.use_git_failed = true
230
- # :nocov:
230
+ # simplecov:enable
231
231
  end
232
232
  end
233
233
 
@@ -13,3 +13,5 @@
13
13
  /.idea/
14
14
  /.env.*.local
15
15
  /.env.local
16
+
17
+ /local_data
@@ -1,9 +1,3 @@
1
- require "dotenv"
2
-
3
1
  require "foobara/load_dotenv"
4
2
 
5
- Dotenv.require_keys("FOOBARA_ENV")
6
-
7
- env = ENV.fetch("FOOBARA_ENV", nil)
8
-
9
- Foobara::LoadDotenv.run!(env:)
3
+ Foobara::LoadDotenv.run!(env: ENV.fetch("FOOBARA_ENV"))
@@ -9,16 +9,22 @@ last = %w[
9
9
 
10
10
  skip = ["start.rb", "finish.rb", *first, *last]
11
11
 
12
+ # simplecov:disable
12
13
  first.each { |f| require_relative f if File.exist?("#{__dir__}/#{f}") }
14
+ # simplecov:enable
13
15
 
14
16
  require "<%= project_lib_file_path %>"
15
17
 
16
18
  Dir.entries(__dir__).each do |boot_file|
17
19
  next unless boot_file.end_with?(".rb")
18
20
  next if skip.include?(boot_file)
21
+ # simplecov:disable
19
22
  next unless File.exist?("#{__dir__}/#{boot_file}")
23
+ # simplecov:enable
20
24
 
21
25
  require_relative boot_file
22
26
  end
23
27
 
28
+ # simplecov:disable
24
29
  last.each { |f| require_relative f if File.exist?("#{__dir__}/#{f}") }
30
+ # simplecov:enable
@@ -3,8 +3,18 @@ ENV["FOOBARA_ENV"] ||= "development"
3
3
  require "bundler/setup"
4
4
 
5
5
  if ["development", "test"].include?(ENV["FOOBARA_ENV"])
6
- require "pry"
7
- require "pry-byebug"
6
+ # simplecov:disable
7
+ if ENV["CI"] != "true"
8
+ if ENV["RUBY_DEBUG"] == "true"
9
+ require "debug"
10
+ elsif ENV["USE_PRY"] == "true"
11
+ require "pry"
12
+ elsif ENV["USE_PRY_BYEBUG"] == "true"
13
+ require "pry"
14
+ require "pry-byebug"
15
+ end
16
+ end
17
+ # simplecov:enable
8
18
  end
9
19
 
10
20
  require_relative "config"
@@ -6,6 +6,8 @@ require "pry"
6
6
  require "pry-byebug"
7
7
  require "rspec/its"
8
8
 
9
+ Warning[:deprecated] = true
10
+
9
11
  require_relative "support/simplecov"
10
12
  require_relative "../boot/start"
11
13
 
@@ -1,9 +1,8 @@
1
1
  require "simplecov"
2
2
 
3
3
  SimpleCov.start do
4
- add_filter "spec/support"
5
- # enable_coverage :branch
6
- minimum_coverage line: 100
7
- # TODO: enable this? worth it to get to 100% branch coverage?
8
- # minimum_coverage line: 100, branch: 100
4
+ skip "spec/support"
5
+
6
+ enable_coverage :branch
7
+ minimum_coverage line: 100, branch: 100
9
8
  end
@@ -2,9 +2,14 @@ require "vcr"
2
2
 
3
3
  VCR.configure do |config|
4
4
  # config.filter_sensitive_data("<SCRUBBED_SOME_API_KEY>") { ENV.fetch("SOME_API_KEY", nil) }
5
+ # Scrubbing these by default just in-case they contain any sensitive data
5
6
  config.before_record do |interaction|
6
- # Stripping these out just in-case they contain some kind of auth token
7
- interaction.response.headers.delete("Set-Cookie")
7
+ if interaction.request.headers["Cookie"]
8
+ interaction.request.headers["Cookie"] = ["<SCRUBBED>"]
9
+ end
10
+ if interaction.response.headers["Set-Cookie"]
11
+ interaction.response.headers["Set-Cookie"] = ["<SCRUBBED>"]
12
+ end
8
13
  end
9
14
 
10
15
  config.cassette_library_dir = "spec/vcr_cassettes"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-empty-ruby-project-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.6.9
146
+ rubygems_version: 4.0.20
147
147
  specification_version: 4
148
148
  summary: Generates empty ruby project boilerplate code from a template
149
149
  test_files: []