Skip to content

Commit

Permalink
Move ocran.rb from bin to exe directory and update file settings
Browse files Browse the repository at this point in the history
This commit relocates the ocran.rb command script from the bin directory to the exe directory, aligning with the standard structure for Ruby gems. Additionally, the encoding comment has been removed as UTF-8 is the default setting. Also, `# frozen_string_literal: true` was added to adopt a standard practice in Ruby implementation.
  • Loading branch information
shinokaro committed Aug 11, 2024
1 parent 201f51a commit e9ce634
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/ocran → exe/ocran
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# encoding: UTF-8
# frozen_string_literal: true

load File.expand_path("../lib/ocran/runner.rb", __dir__)
load Ocran::Runner.new.run
4 changes: 2 additions & 2 deletions ocran.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Gem::Specification.new do |spec|
# (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
# end
# end
spec.files = Dir.glob("bin/ocran") + Dir.glob("lib/**/**") + Dir.glob("share/ocran/**")
spec.bindir = "bin"
spec.files = Dir.glob("exe/ocran") + Dir.glob("lib/**/**") + Dir.glob("share/ocran/**")
spec.bindir = "exe"
spec.executables = %w[ocran]
spec.require_paths = ["lib"]

Expand Down
2 changes: 1 addition & 1 deletion test/test_ocra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def system(*args)

def initialize(*args)
super(*args)
@ocran = File.expand_path(File.join(File.dirname(__FILE__), '..', 'bin', TESTED_OCRAN))
@ocran = File.expand_path(File.join(File.dirname(__FILE__), '..', 'exe', TESTED_OCRAN))
ENV['RUBYOPT'] = ""
end

Expand Down

0 comments on commit e9ce634

Please sign in to comment.