Skip to content

Commit 1e3fcd7

Browse files
committed
Rename a ton of "organization" stuff to "empty typescript react project"
1 parent b773851 commit 1e3fcd7

13 files changed

+97
-73
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
env:
3737
cache-name: cache-foobara
3838
with:
39-
path: ~/work/organization-generator/foobara
39+
path: ~/work/empty-typescript-react-project-generator/foobara
4040
key: ${{ env.cache-name }}-${{ env.foobara_branch }}-${{ env.foobara_sha1 }}
4141
restore-keys: |
4242
${{ env.cache-name }}-${{ env.foobara_branch }}-
@@ -67,9 +67,9 @@ jobs:
6767
run: |
6868
set -e
6969
mkdir -p .bundle
70-
echo -e "---\nBUNDLE_LOCAL__FOOBARA: '/home/runner/work/organization-generator/foobara'" > .bundle/config
70+
echo -e "---\nBUNDLE_LOCAL__FOOBARA: '/home/runner/work/empty-typescript-react-project-generator/foobara'" > .bundle/config
7171
mkdir ../../foobara
72-
ln -s ../../organization-generator/foobara ../../foobara/foobara
72+
ln -s ../../empty-typescript-react-project-generator/foobara ../../foobara/foobara
7373
- name: Set up Ruby
7474
uses: ruby/setup-ruby@v1
7575
with:

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: foobara
3-
revision: f97443e06569b022bae15c2b8c1b0c136fc3edf0
3+
revision: 9d507ed411aca4dcc747c0f61501c9b14cde3b13
44
branch: main
55
specs:
66
foobara (0.0.1)
@@ -34,7 +34,7 @@ GIT
3434
PATH
3535
remote: .
3636
specs:
37-
foobara-organization-generator (0.0.1)
37+
foobara-empty-typescript-react-project-generator (0.0.1)
3838

3939
GEM
4040
remote: https://rubygems.org/
@@ -144,8 +144,8 @@ PLATFORMS
144144

145145
DEPENDENCIES
146146
foobara!
147+
foobara-empty-typescript-react-project-generator!
147148
foobara-files-generator!
148-
foobara-organization-generator!
149149
foobara-rubocop-rules!
150150
foobara-spec-helpers!
151151
foobara-util!

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
TODO: Delete this and the text below, and describe your gem
44

55
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library
6-
into a gem. Put your Ruby code in the file `lib/foobara/organization_generator`. To experiment with that code,
6+
into a gem. Put your Ruby code in the file `lib/foobara/empty_typescript_react_project_generator`. To experiment with
7+
that code,
78
run `bin/console` for an interactive prompt.
89

910
## Installation
@@ -43,7 +44,7 @@ push git commits and the created tag, and push the `.gem` file to [rubygems.org]
4344
## Contributing
4445

4546
Bug reports and pull requests are welcome on GitHub
46-
at https://github.com/[USERNAME]/foobara-organization-generator.
47+
at https://github.com/[USERNAME]/foobara-empty-typescript-react-project-generator.
4748

4849
## License
4950

bin/console

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

33
require "bundler/setup"
4-
require "foobara/organization_generator"
4+
require "foobara/empty_typescript_react_project_generator"
55

66
# You can add fixtures and/or initialization code here to make experimenting
77
# with your gem easier. You can also use a different console, if you like.

foobara-empty-typescript-react-project-generator.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
require_relative "src/version"
22

33
Gem::Specification.new do |spec|
4-
spec.name = "foobara-organization-generator"
5-
spec.version = Foobara::Generators::OrganizationGenerator::VERSION
4+
spec.name = "foobara-empty-typescript-react-project-generator"
5+
spec.version = Foobara::Generators::EmptyTypescriptReactProjectGenerator::VERSION
66
spec.authors = ["Miles Georgi"]
77
spec.email = ["[email protected]"]
88

9-
spec.summary = "Generates Foobara organizations"
10-
spec.homepage = "https://github.com/foobara/generators-organization-generator"
9+
spec.summary = "Generates empty typescript react projects"
10+
spec.homepage = "https://github.com/foobara/generators-empty-typescript-react-project-generator"
1111
spec.license = "MIT"
1212
spec.required_ruby_version = ">= 3.2.2"
1313

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
RSpec.describe Foobara::Generators::OrganizationGenerator::GenerateOrganization do
2-
let(:organization_name) { "SomePrefix::SomeOrg" }
1+
RSpec.describe Foobara::Generators::EmptyTypescriptReactProjectGenerator::GenerateEmptyTypescriptReactProject do
2+
let(:project_dir) { "SomePrefix::SomeOrg" }
33

44
let(:inputs) do
55
{
6-
organization_name:,
6+
project_dir:,
77
description: "whatever"
88
}
99
end
10-
let(:organization) { described_class.new(inputs) }
11-
let(:outcome) { organization.run }
10+
let(:empty_typescript_react_project) { described_class.new(inputs) }
11+
let(:outcome) { empty_typescript_react_project.run }
1212
let(:result) { outcome.result }
1313

14-
it "generates a organization" do
14+
it "generates a empty_typescript_react_project" do
1515
expect(outcome).to be_success
1616

17-
organization_file = result["src/some_prefix/some_org.rb"]
18-
expect(organization_file).to include("module SomeOrg")
19-
expect(organization_file).to include("module SomePrefix")
17+
empty_typescript_react_project_file = result["src/some_prefix/some_org.rb"]
18+
expect(empty_typescript_react_project_file).to include("module SomeOrg")
19+
expect(empty_typescript_react_project_file).to include("module SomePrefix")
2020
end
2121
end

spec/foobara/generators/write_empty_typescript_react_project_to_disk_spec.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
RSpec.describe Foobara::Generators::OrganizationGenerator::WriteOrganizationToDisk do
2-
let(:organization) { described_class.new(inputs) }
3-
let(:outcome) { organization.run }
1+
RSpec.describe Foobara::Generators::EmptyTypescriptReactProjectGenerator::WriteEmptyTypescriptReactProjectToDisk do
2+
let(:command) { described_class.new(inputs) }
3+
let(:outcome) { empty_typescript_react_project.run }
44
let(:result) { outcome.result }
55
let(:errors) { outcome.errors }
66
let(:inputs) do
77
{
8-
organization_config:,
8+
empty_typescript_react_project_config:,
99
output_directory:
1010
}
1111
end
12-
let(:organization_config) do
12+
let(:empty_typescript_react_project_config) do
1313
{
14-
organization_name:,
14+
project_dir:,
1515
description: "whatever"
1616
}
1717
end
18-
let(:organization_name) { "SomeOrg" }
19-
let(:output_directory) { "#{__dir__}/../../../tmp/organization_test_suite_output" }
18+
let(:project_dir) { "SomeOrg" }
19+
let(:output_directory) { "#{__dir__}/../../../tmp/empty_typescript_react_project_test_suite_output" }
2020

2121
before do
2222
# rubocop:disable RSpec/AnyInstance
@@ -30,21 +30,21 @@
3030
it "contains base files" do
3131
expect(outcome).to be_success
3232

33-
expect(organization.paths_to_source_code.keys).to include("src/some_org.rb")
33+
expect(command.paths_to_source_code.keys).to include("src/some_org.rb")
3434
end
3535
end
3636

3737
describe "#output_directory" do
3838
context "with no output directory" do
3939
let(:inputs) do
4040
{
41-
organization_config:
41+
empty_typescript_react_project_config:
4242
}
4343
end
4444

4545
it "writes files to the current directory" do
46-
organization.cast_and_validate_inputs
47-
expect(organization.output_directory).to eq(".")
46+
command.cast_and_validate_inputs
47+
expect(command.output_directory).to eq(".")
4848
end
4949
end
5050
end

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
end
3434

3535
require "foobara/spec_helpers/all"
36-
require "foobara/organization_generator"
36+
require "foobara/empty_typescript_react_project_generator"

src/empty_typescript_react_project_config.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
module Foobara
44
module Generators
5-
module OrganizationGenerator
6-
class OrganizationConfig < Foobara::Model
5+
module EmptyTypescriptReactProjectGenerator
6+
class EmptyTypescriptReactProjectConfig < Foobara::Model
77
attributes do
8-
organization_name :string, :required
8+
project_dir :string, :required
99
description :string, :allow_nil
1010
end
1111

1212
attr_accessor :module_path
1313

1414
def initialize(attributes = nil, options = {})
15-
organization_name = attributes[:organization_name]
15+
project_dir = attributes[:project_dir]
1616
description = attributes[:description]
1717

18-
module_path = organization_name.split("::")
18+
module_path = project_dir.split("::")
1919

2020
super(
2121
{
22-
organization_name:,
22+
project_dir:,
2323
description:
2424
},
2525
options

src/empty_typescript_react_project_generator.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module Foobara
22
module Generators
3-
module OrganizationGenerator
3+
module EmptyTypescriptReactProjectGenerator
44
module Generators
5-
class OrganizationGenerator < Foobara::FilesGenerator
5+
class EmptyTypescriptReactProjectGenerator < Foobara::FilesGenerator
66
class << self
77
def manifest_to_generator_classes(manifest)
88
case manifest
9-
when OrganizationConfig
9+
when EmptyTypescriptReactProjectConfig
1010
[
11-
Generators::OrganizationGenerator
11+
Generators::EmptyTypescriptReactProjectGenerator
1212
]
1313
else
1414
# :nocov:
@@ -30,7 +30,7 @@ def target_path
3030
["src", *path, file]
3131
end
3232

33-
alias organization_config relevant_manifest
33+
alias empty_typescript_react_project_config relevant_manifest
3434

3535
def templates_dir
3636
"#{__dir__}/../templates"

0 commit comments

Comments
 (0)