Skip to content

Commit

Permalink
Get rid of yard-rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
uvlad7 committed Oct 14, 2023
1 parent 468e56c commit d0ec5d4
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 28 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,14 @@ jobs:
matrix:
ruby:
- "2.7.8"
rust:
- "nightly"

steps:
- uses: actions/checkout@v3
- name: Set up Ruby & Rust
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rustup-toolchain: ${{ matrix.rust }}
bundler-cache: true
cargo-cache: true
rubygems: "3.4.14"
- name: Build yard docs
run: YARD_OUTPUT_DIR="${{ runner.temp }}/doc/" bundle exec rake yard
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
ruby:
- '2.7.8'
rust:
- "nightly"
- "1.72.1"

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ target/
.rspec_status
.idea/
.rake_tasks~
xml2json.json
1 change: 0 additions & 1 deletion .yardopts

This file was deleted.

7 changes: 0 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ PATH
rspec (~> 3.0)
rubocop (~> 1.21)
yard
yard-rustdoc

GEM
remote: https://rubygems.org/
Expand All @@ -30,7 +29,6 @@ GEM
parser (3.2.2.3)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -78,14 +76,9 @@ GEM
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
syntax_tree (5.3.0)
prettier_print (>= 1.2.0)
unicode-display_width (2.4.2)
webrick (1.8.1)
yard (0.9.34)
yard-rustdoc (0.3.2)
syntax_tree (~> 5.0)
yard (~> 0.9)

PLATFORMS
x86_64-linux
Expand Down
10 changes: 0 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,9 @@ end

require "yard"

file "xml2json.json" do
sh <<~SH
cargo +nightly rustdoc --manifest-path ext/xml2json/Cargo.toml -- \
-Z unstable-options --output-format json --document-private-items && \
cp target/doc/xml2json.json .
SH
end

YARD::Rake::YardocTask.new do |t|
# t.files = gemspec.files.select { |f| %w[.rb .json].include? File.extname(f) }
t.options += ["--output-dir", ENV["YARD_OUTPUT_DIR"]] if ENV["YARD_OUTPUT_DIR"]
end

task yard: "xml2json.json"

task default: %i[compile spec clippy rubocop yard]
4 changes: 1 addition & 3 deletions xml2json.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.files = [
# .rb - to exclude lib/xml2json/xml2json.so
*Dir["ext/**/*"], *Dir["lib/**/*.rb"], *Dir["sig/**/*"],
"Cargo.lock", "Cargo.toml", "xml2json.json"
"Cargo.lock", "Cargo.toml"
].reject { |f| File.directory?(f) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
Expand All @@ -50,8 +50,6 @@ Gem::Specification.new do |spec|

spec.add_dependency "rubocop", "~> 1.21"

spec.add_dependency "yard-rustdoc"

spec.add_dependency "pry"
spec.add_dependency "pry-byebug"
spec.add_dependency "yard"
Expand Down

0 comments on commit d0ec5d4

Please sign in to comment.