Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Ruby 3.2 #507

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rvm:
- 2.4.9
- 2.5.8
- 2.6.6
- 3.2.0
gemfile:
- Gemfile
script:
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/writers/append_json_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Writers
class AppendJsonWriter < JsonWriter
def write
index_file = docs_dir.join("index.json")
if File.exists?(index_file) && (output = File.read(index_file)).length >= 2
if File.exist?(index_file) && (output = File.read(index_file)).length >= 2
existing_index_hash = JSON.parse(output)
end
File.open(index_file, "w+") do |f|
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/writers/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.write(index, configuration)
end

def self.clear_docs(docs_dir)
if File.exists?(docs_dir)
if File.exist?(docs_dir)
FileUtils.rm_rf(docs_dir, :secure => true)
end
FileUtils.mkdir_p(docs_dir)
Expand Down
2 changes: 1 addition & 1 deletion spec/api_documentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
subject.clear_docs

expect(File.directory?(configuration.docs_dir)).to be_truthy
expect(File.exists?(test_file)).to be_falsey
expect(File.exist?(test_file)).to be_falsey
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/writers/html_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.html")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/json_iodocs_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it "should write the index" do
writer.write
index_file = File.join(configuration.docs_dir, "apiconfig.json")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
2 changes: 1 addition & 1 deletion spec/writers/json_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it "should write the index" do
writer.write
index_file = File.join(configuration.docs_dir, "index.json")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
2 changes: 1 addition & 1 deletion spec/writers/markdown_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.md")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/slate_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.html.md")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/textile_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.textile")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down