Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
uvlad7 committed Oct 11, 2023
1 parent 2e683d5 commit b456db8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
26 changes: 13 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

# Specify your gem's dependencies in xml2json.gemspec
gemspec

gem 'rake', '~> 13.0'
gem "rake", "~> 13.0"

gem 'rake-compiler'
gem 'rb_sys', '~> 0.9.63'
gem "rake-compiler"
gem "rb_sys", "~> 0.9.63"

gem 'rspec', '~> 3.0'
gem "rspec", "~> 3.0"

gem 'rubocop', '~> 1.21'
gem "rubocop", "~> 1.21"

gem 'yard-rustdoc'
gem "yard-rustdoc"

gem 'pry'
gem 'pry-byebug'
gem 'yard'
gem "pry"
gem "pry-byebug"
gem "yard"
# # Cause I want to use rack adapter
gem 'rack'
gem 'rackup'
gem "rack"
gem "rackup"
# # Cause I want to use rack adapter with puma server
gem 'puma'
gem "puma"
20 changes: 10 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# frozen_string_literal: true

require 'bundler/setup'
require "bundler/setup"

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require "bundler/gem_tasks"
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new(:spec)

require 'rubocop/rake_task'
require "rubocop/rake_task"

RuboCop::RakeTask.new

require 'rb_sys/extensiontask'
require "rb_sys/extensiontask"

task build: :compile

gemspec = Gem::Specification.load("xml2json.gemspec")

RbSys::ExtensionTask.new('xml2json', gemspec) do |ext|
ext.lib_dir = 'lib/xml2json'
RbSys::ExtensionTask.new("xml2json", gemspec) do |ext|
ext.lib_dir = "lib/xml2json"
end

require 'yard'
require "yard"

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

task default: %i[compile spec rubocop yard]
3 changes: 2 additions & 1 deletion xml2json.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Gem::Specification.new do |spec|
# end
# end
spec.files = [
*Dir["ext/**/*"], *Dir["lib/**/*"], *Dir["sig/**/*"],
# .rb - to exclude lib/xml2json/xml2json.so
*Dir["ext/**/*"], *Dir["lib/**/*.rb"], *Dir["sig/**/*"],
"Cargo.lock", "Cargo.toml"
].reject { |f| File.directory?(f) }
spec.bindir = "exe"
Expand Down

0 comments on commit b456db8

Please sign in to comment.