[Ruby] remove auto-generated Gemfile.lock (#3541)

* remove auto-generated gemlock file

* update test file to conform to rubocop format
This commit is contained in:
William Cheng
2019-08-03 16:36:22 +08:00
committed by GitHub
parent 480d6baf3b
commit 86228e9964
4 changed files with 1 additions and 83 deletions

View File

@@ -237,7 +237,6 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
if (TYPHOEUS.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("api_client.mustache", gemFolder, "api_client.rb"));
supportingFiles.add(new SupportingFile("Gemfile.lock.mustache", "", "Gemfile.lock"));
} else if (FARADAY.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("faraday_api_client.mustache", gemFolder, "api_client.rb"));
additionalProperties.put("isFaraday", Boolean.TRUE);

View File

@@ -1,79 +0,0 @@
PATH
remote: .
specs:
{{gemName}}{{^gemName}}{{{appName}}}{{/gemName}} ({{gemVersion}})
json (~> 2.1, >= 2.1.0)
typhoeus (~> 1.0, >= 1.0.1)
GEM
remote: https://rubygems.org/
specs:
ZenTest (4.11.2)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.14)
sys-uname
autotest-growl (0.2.16)
autotest-rails-pure (4.1.2)
byebug (10.0.2)
coderay (1.1.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
ethon (0.11.0)
ffi (>= 1.3.0)
ffi (1.9.25)
hashdiff (0.3.7)
json (2.1.0)
method_source (0.9.0)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-byebug (3.6.0)
byebug (~> 10.0)
pry (~> 0.10)
public_suffix (3.0.3)
rake (12.0.0)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
safe_yaml (1.0.4)
sys-uname (1.0.3)
ffi (>= 1.0.0)
typhoeus (1.3.0)
ethon (>= 0.9.0)
vcr (3.0.3)
webmock (1.24.6)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
PLATFORMS
ruby
DEPENDENCIES
autotest (~> 4.4, >= 4.4.6)
autotest-fsevent (~> 0.2, >= 0.2.12)
autotest-growl (~> 0.2, >= 0.2.16)
autotest-rails-pure (~> 4.1, >= 4.1.2)
{{gemName}}{{^gemName}}{{{appName}}}{{/gemName}}!
pry-byebug
rake (~> 12.0.0)
rspec (~> 3.6, >= 3.6.0)
vcr (~> 3.0, >= 3.0.1)
webmock (~> 1.24, >= 1.24.3)
BUNDLED WITH
1.16.1

View File

@@ -79,7 +79,7 @@ describe "Pet" do
rescue Petstore::ApiError => e
expect(e.code).to eq(404)
# skip the check as the response contains a timestamp that changes on every reponse
#expect(e.message).to eq("Error message: the server returns an error\nHTTP status code: 404\nResponse headers: {\"Date\"=>\"Tue, 26 Feb 2019 04:35:40 GMT\", \"Access-Control-Allow-Origin\"=>\"*\", \"Access-Control-Allow-Methods\"=>\"GET, POST, DELETE, PUT\", \"Access-Control-Allow-Headers\"=>\"Content-Type, api_key, Authorization\", \"Content-Type\"=>\"application/json\", \"Connection\"=>\"close\", \"Server\"=>\"Jetty(9.2.9.v20150224)\"}\nResponse body: {\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}")
# expect(e.message).to eq("Error message: the server returns an error\nHTTP status code: 404\nResponse headers: {\"Date\"=>\"Tue, 26 Feb 2019 04:35:40 GMT\", \"Access-Control-Allow-Origin\"=>\"*\", \"Access-Control-Allow-Methods\"=>\"GET, POST, DELETE, PUT\", \"Access-Control-Allow-Headers\"=>\"Content-Type, api_key, Authorization\", \"Content-Type\"=>\"application/json\", \"Connection\"=>\"close\", \"Server\"=>\"Jetty(9.2.9.v20150224)\"}\nResponse body: {\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}")
expect(e.response_body).to eq('{"code":1,"type":"error","message":"Pet not found"}')
expect(e.response_headers).to include('Content-Type')
expect(e.response_headers['Content-Type']).to eq('application/json')

View File

@@ -48,5 +48,3 @@ def deserialize_json(s, type)
response = double('response', headers: headers, body: s)
API_CLIENT.deserialize(response, type)
end