Specification module name
- Dominant language
- Ruby
- Stars
- 170
- Forks
- 376
- PR merge metrics
- No merged PRs in 30d
Description
Can someone confirm that the implementation of `Pod::Specification#module_name` is the expected one for subspecs?
The [current implementation](https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification.rb#L187) is the following:
```
def module_name
attributes_hash['module_name'] ||
c99ext_identifier(attributes_hash['header_dir']) ||
c99ext_identifier(attributes_hash['name'])
end
```
In the case of a subspec the module_name doesn't seem to be correct since it returns the name of the subspec. For example a specification of a pod PodName/SubspecName returns _SubspecName_ as module_name whether I would expect it to be _PodName_.
Should this be rewritten as
```
def module_name
attributes_hash['module_name'] ||
c99ext_identifier(attributes_hash['header_dir']) ||
c99ext_identifier(Pod::Specification::root_name(name))
end
```
?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in lib/cocoapods-core/specification.rb at Pod::Specification#module_name and compare its current name handling with Pod::Specification::root_name(name). Use the reported PodName/SubspecName case to determine the expected module name for subspecs; done means the behavior is confirmed and any required change is covered by the project’s relevant specification tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100