swagger-api / swagger-api/swagger-codegen
Properly generate a gem for Windows OS
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The gem specification gathers all necessary files to include within the gem utilizing the Unix file command. I have not been able to determine any means to indicate that the built is execute in a windows platform, hence requiring the Dir.glob command.
Swagger-codegen version
Swagger Codegen version: 3.0.24
Related issues/PRs
Issue: Properly generate a gem for Windows OS
PR: Add support for passing client key password (keypasswd). Added logic …
Swagger declaration file content or url
Gem::Specification.new do |s|
s.name = "swagger_client"
s.version = SwaggerClient::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Swagger-Codegen"]
s.email = ["joe@me.email"]
s.homepage = "https://github.com/swagger-api/swagger-codegen"
s.summary = "API summary Ruby Gem"
s.description = "API description..."
s.license = "Unlicense"
s.required_ruby_version = ">= 1.9"
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
s.test_files = `find spec/*`.split("\n")
s.executables = []
s.require_paths = ["lib"]
end
Command line used for generation
Generated the client SDK via the Swagger Editor
Steps to reproduce
Suggest a fix/enhancement
Gem::Specification.new do |s|
s.name = "swagger_client"
s.version = SwaggerClient::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Swagger-Codegen"]
s.email = ["joe@me.email"]
s.homepage = "https://github.com/swagger-api/swagger-codegen"
s.summary = "API summary Ruby Gem"
s.description = "API description..."
s.license = "Unlicense"
s.required_ruby_version = ">= 1.9"
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.files = Dir.glob('lib/**/*') + %w{Rakefile README.md}
s.executables = []
s.require_paths = ["lib"]
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the generated Ruby gem specification template that uses the Unix find command and compare it with the suggested Dir.glob approach. Check how the gem file list and test files are assembled, then verify that a generated gem includes the expected lib files, Rakefile, and README on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100