rakefile in purecloud-0.18.0 vs rakefile in purecloud-0.25.0
- old
+ new
@@ -28,11 +28,11 @@
task :buildgem do
Dir.mkdir(gen_dir) unless File.exists?(gen_dir)
- `gem build PureCloud.gemspec`
+ `gem build purecloud.gemspec`
FileUtils.mv "purecloud-#{GEM_VERSION}.gem", "#{gen_dir}"
end
task :generate do
codegenConfig = {
@@ -40,30 +40,18 @@
"gemName" => "purecloud",
"moduleName" => "PureCloud",
"gemLicense" => "MIT",
"gemSummary" => "PureCloud Platform API Library",
"gemDescription" => "A Ruby library to interface with the PureCloud Platform API",
- "gemHomepage" => "http://developer.mypurecloud.com",
+ "gemHomepage" => "https://developer.mypurecloud.com",
"gemAuthor" => "Kevin Glinski",
"gemAuthorEmail" => "Kevin.Glinski@inin.com"
}
File.open("config-ruby.json", 'w') { |file| file.write(codegenConfig.to_json) }
- `java -jar external/swagger-codegen-cli.jar generate -i ./swagger.json -l ruby -c config-ruby.json`
-
- Dir.glob('*.gemspec') do |filepath|
- IO.write(filepath, File.open(filepath) {|f| f.read.gsub(/s\.files.*$/, 's.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? && !f.include?("node_module") }')})
- end
-
- #HACK!!
- #PureCloud.const_get caused a runtime exception, replacing it with
- #not sure if this a ruby versioning issue or what
- #Object.const_get("PureCloud").const_get fixes it up.
- Dir.glob('lib/**/*.rb') do |filepath|
- IO.write(filepath, File.open(filepath) {|f| f.read.gsub(/PureCloud\.const_get/, "Object.const_get(\"PureCloud\").const_get")})
- end
+ `java -jar external/swagger-codegen-cli.jar generate -i ./swagger.json -l ruby -c config-ruby.json -t swagger_template`
`cat lib/purecloud.rb extensions/auth.rb > lib/purecloud.tmp`
`mv lib/purecloud.tmp lib/purecloud.rb`
end