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

Move ocran.rb from bin to exe directory and update file settings #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require "bundler/setup"
require "ocran"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

require "irb"
IRB.start(__FILE__)
8 changes: 8 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx

bundle install

# Do any other automated setup that you need to do here
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