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

remove deprecated #152

Merged
merged 7 commits into from
Feb 4, 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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0
3.3.0
15 changes: 15 additions & 0 deletions .semaphore/ensure-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
bundle config set --local deployment true
bundle config set --local path vendor/bundle
gem update --no-doc bundler

gemfile_checksum=$(checksum Gemfile.lock)
cache_key="${SEMAPHORE_AGENT_MACHINE_OS_IMAGE}-${RUBY_VERSION}-${gemfile_checksum}"

if cache has_key "${cache_key}"; then
echo "Bundle for ${RUBY_VERSION} and Gemfile.lock found in cache"
cache restore "${cache_key}"
else
echo "Caching Bundle for ${RUBY_VERSION} and Gemfile.lock"
bundle install
cache store "${cache_key}" vendor/bundle
fi
12 changes: 12 additions & 0 deletions .semaphore/ensure-ruby-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cache_key="${SEMAPHORE_AGENT_MACHINE_OS_IMAGE}-${RUBY_VERSION}"

if cache has_key "${cache_key}"; then
echo "Ruby ${RUBY_VERSION} found in cache"
cache restore "${cache_key}"
sem-version ruby "${RUBY_VERSION}" -f
else
echo "Installing Ruby $RUBY_VERSION"
sem-version ruby "${RUBY_VERSION}" -f
cache store "${cache_key}" "${HOME}/.rbenv/versions/${RUBY_VERSION}"
fi

44 changes: 20 additions & 24 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: v1.0
name: Ruby
name: CI Pipeline
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004

auto_cancel:
running:
when: "branch != 'main'"

blocks:
- name: Run tests in Linux environment
dependencies: []
Expand All @@ -23,24 +28,18 @@ blocks:
matrix:
- env_var: RUBY_VERSION
values:
- 2.6.10
- 2.7.7
- 3.0.5
- 3.1.3
- 3.2.0
- jruby-9.3.9.0
- jruby-9.4.0.0
- truffleruby-22.3.0
- 3.0.6
- 3.1.4
- 3.2.2
- 3.3.0
- jruby-9.4.5.0
- truffleruby-23.1.2
commands:
- sem-version ruby ${RUBY_VERSION} -f
- bundle config set --local deployment true
- bundle config set --local path vendor/bundle
- gem update --no-doc bundler
- bundle install
- source .semaphore/ensure-ruby-version.sh
- source .semaphore/ensure-bundle.sh
- mkdir -p tmp/test-results/
- export TEST_RESULTS_FILE=tmp/test-results/${RUBY_VERSION}.xml
- TESTOPTS="--junit --junit-filename=${TEST_RESULTS_FILE}" bundle exec rake test

- name: Run tests in macOS environment
dependencies: []
task:
Expand All @@ -62,16 +61,13 @@ blocks:
matrix:
- env_var: RUBY_VERSION
values:
- 2.7.7
- 3.0.5
- 3.1.3
- 3.2.0
- 3.0.6
- 3.1.4
- 3.2.2
- 3.3.0
commands:
- sem-version ruby ${RUBY_VERSION} -f
- bundle config set --local deployment true
- bundle config set --local path vendor/bundle
- gem update --no-doc bundler
- bundle install
- source .semaphore/ensure-ruby-version.sh
- source .semaphore/ensure-bundle.sh
- mkdir -p tmp/test-results/
- export TEST_RESULTS_FILE=tmp/test-results/${RUBY_VERSION}.xml
- TESTOPTS="--junit --junit-filename=${TEST_RESULTS_FILE}" bundle exec rake test
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@ GEM
builder (3.2.4)
docile (1.4.0)
jar-dependencies (0.4.1)
minitest (5.15.0)
minitest (5.21.2)
minitest-junit (1.1.0)
builder (~> 3.2)
minitest (~> 5.11)
psych (4.0.3)
psych (5.1.2)
stringio
psych (4.0.3-java)
psych (5.1.2-java)
jar-dependencies (>= 0.1.7)
public_suffix (5.0.1)
rake (13.0.1)
rdoc (6.4.0)
rdoc (6.6.2)
psych (>= 4.0.0)
simplecov (0.21.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
stringio (3.0.1)
stringio (3.1.0)

PLATFORMS
java
ruby

DEPENDENCIES
launchy!
minitest (~> 5.15)
minitest (~> 5.21)
minitest-junit (~> 1.0)
rake (~> 13.0)
rdoc (~> 6.4)
simplecov (~> 0.21)
rdoc (~> 6.6)
simplecov (~> 0.22)

BUNDLED WITH
2.4.6
2.5.5
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Launchy Changelog
## Version 2.6.0 - 2024-02-03
* Remove unused `deprecated.rb` file - <https://github.com/copiousfreetime/launchy/issues/148>
* Update supported ruby versin to be 3.x

## Version 2.5.2 - 2022-12-27
* Update Addressable - <https://github.com/copiousfreetime/launchy/pull/145> - JamieKDonnelly
* Fix deprecated usage of `Object#=~` - <https://github.com/copiousfreetime/launchy/pull/138> - marcrohloff
Expand Down
1 change: 0 additions & 1 deletion Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ lib/launchy/application.rb
lib/launchy/applications/browser.rb
lib/launchy/argv.rb
lib/launchy/cli.rb
lib/launchy/deprecated.rb
lib/launchy/descendant_tracker.rb
lib/launchy/detect.rb
lib/launchy/detect/host_os.rb
Expand Down
35 changes: 0 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,41 +110,6 @@ exception that was raised.
puts "Attempted to open #{uri} and failed because #{exception}"
end

## UPGRADING from versions before 2.0.0

The previously published version of Launchy before the 2.0.0 series was 0.4.0.
There have been so many changes, and a mistaken tag at 1.0.0, that I have
decided to bump all the way to 2.x.y.

I have attempted to keep backward compatibility with the previous examples. The
previous API examples of:

Launchy::Browser.run("https://www.ruby-lang.org/")

and

Launchy::Browser.new.visit("https://www.ruby-lang.org/")

will still work, and you will get a deprecation notice, along with the line
of code you should probably update. For example, this is what would print out
in the github gem if it was updated to use 2.0.x but not use the supported API.

% gh home
WARNING: You made a call to a deprecated Launchy API. This call should be changed to 'Launchy.open( uri )'
WARNING: I think I was able to find the location that needs to be fixed. Please go look at:
WARNING:
WARNING: /Users/jeremy/.rvm/gems/ruby-1.8.7-p334/gems/github-0.6.2/lib/commands/helpers.rb:275:in `open'
WARNING: helper :open do |url|
WARNING: has_launchy? proc {
WARNING: Launchy::Browser.new.visit url
WARNING: }
WARNING: end
WARNING:
WARNING: If this is not the case, please file a bug. Please file a bug at https://github.com/copiousfreetime/launchy/issues/new

These deprecation notices will go away with version 3.0 and the only available
API will be the documented one.

## ISC LICENSE

https://opensource.org/licenses/isc-license.txt
Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ This.ruby_gemspec do |spec|
spec.add_dependency( 'addressable', '~> 2.8')

spec.add_development_dependency( 'rake' , '~> 13.0')
spec.add_development_dependency( 'minitest' , '~> 5.15' )
spec.add_development_dependency( 'minitest' , '~> 5.21' )
spec.add_development_dependency( 'minitest-junit' , '~> 1.0' )
spec.add_development_dependency( 'rdoc' , '~> 6.4' )
spec.add_development_dependency( 'simplecov', '~> 0.21' )
spec.add_development_dependency( 'rdoc' , '~> 6.6' )
spec.add_development_dependency( 'simplecov', '~> 0.22' )

spec.licenses = ['ISC']

Expand Down
20 changes: 10 additions & 10 deletions launchy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@

Gem::Specification.new do |s|
s.name = "launchy".freeze
s.version = "2.5.2"
s.version = "2.5.2".freeze

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.metadata = { "bug_tracker_uri" => "https://github.com/copiousfreetime/launchy/issues", "changelog_uri" => "https://github.com/copiousfreetime/launchy/blob/master/README.md", "homepage_uri" => "https://github.com/copiousfreetime/launchy", "source_code_uri" => "https://github.com/copiousfreetime/launchy" } if s.respond_to? :metadata=
s.require_paths = ["lib".freeze]
s.authors = ["Jeremy Hinegardner".freeze]
s.date = "2023-02-07"
s.date = "2024-02-04"
s.description = "Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently on each platform. Launchy is here to make a common approach to launching external applications from within ruby programs.".freeze
s.email = "[email protected]".freeze
s.executables = ["launchy".freeze]
s.extra_rdoc_files = ["CONTRIBUTING.md".freeze, "HISTORY.md".freeze, "Manifest.txt".freeze, "README.md".freeze]
s.files = ["CONTRIBUTING.md".freeze, "HISTORY.md".freeze, "LICENSE".freeze, "Manifest.txt".freeze, "README.md".freeze, "Rakefile".freeze, "bin/launchy".freeze, "lib/launchy.rb".freeze, "lib/launchy/application.rb".freeze, "lib/launchy/applications/browser.rb".freeze, "lib/launchy/argv.rb".freeze, "lib/launchy/cli.rb".freeze, "lib/launchy/deprecated.rb".freeze, "lib/launchy/descendant_tracker.rb".freeze, "lib/launchy/detect.rb".freeze, "lib/launchy/detect/host_os.rb".freeze, "lib/launchy/detect/host_os_family.rb".freeze, "lib/launchy/detect/nix_desktop_environment.rb".freeze, "lib/launchy/detect/ruby_engine.rb".freeze, "lib/launchy/detect/runner.rb".freeze, "lib/launchy/error.rb".freeze, "lib/launchy/os_family.rb".freeze, "lib/launchy/version.rb".freeze, "spec/application_spec.rb".freeze, "spec/applications/browser_spec.rb".freeze, "spec/cli_spec.rb".freeze, "spec/detect/host_os_family_spec.rb".freeze, "spec/detect/host_os_spec.rb".freeze, "spec/detect/nix_desktop_environment_spec.rb".freeze, "spec/detect/ruby_engine_spec.rb".freeze, "spec/detect/runner_spec.rb".freeze, "spec/launchy_spec.rb".freeze, "spec/mock_application.rb".freeze, "spec/spec_helper.rb".freeze, "spec/tattle-host-os.yaml".freeze, "spec/version_spec.rb".freeze, "tasks/default.rake".freeze, "tasks/this.rb".freeze]
s.files = ["CONTRIBUTING.md".freeze, "HISTORY.md".freeze, "LICENSE".freeze, "Manifest.txt".freeze, "README.md".freeze, "Rakefile".freeze, "bin/launchy".freeze, "lib/launchy.rb".freeze, "lib/launchy/application.rb".freeze, "lib/launchy/applications/browser.rb".freeze, "lib/launchy/argv.rb".freeze, "lib/launchy/cli.rb".freeze, "lib/launchy/descendant_tracker.rb".freeze, "lib/launchy/detect.rb".freeze, "lib/launchy/detect/host_os.rb".freeze, "lib/launchy/detect/host_os_family.rb".freeze, "lib/launchy/detect/nix_desktop_environment.rb".freeze, "lib/launchy/detect/ruby_engine.rb".freeze, "lib/launchy/detect/runner.rb".freeze, "lib/launchy/error.rb".freeze, "lib/launchy/os_family.rb".freeze, "lib/launchy/version.rb".freeze, "spec/application_spec.rb".freeze, "spec/applications/browser_spec.rb".freeze, "spec/cli_spec.rb".freeze, "spec/detect/host_os_family_spec.rb".freeze, "spec/detect/host_os_spec.rb".freeze, "spec/detect/nix_desktop_environment_spec.rb".freeze, "spec/detect/ruby_engine_spec.rb".freeze, "spec/detect/runner_spec.rb".freeze, "spec/launchy_spec.rb".freeze, "spec/mock_application.rb".freeze, "spec/spec_helper.rb".freeze, "spec/tattle-host-os.yaml".freeze, "spec/version_spec.rb".freeze, "tasks/default.rake".freeze, "tasks/this.rb".freeze]
s.homepage = "https://github.com/copiousfreetime/launchy".freeze
s.licenses = ["ISC".freeze]
s.rdoc_options = ["--main".freeze, "README.md".freeze, "--markup".freeze, "tomdoc".freeze]
s.required_ruby_version = Gem::Requirement.new(">= 2.3.0".freeze)
s.rubygems_version = "3.4.6".freeze
s.rubygems_version = "3.5.3".freeze
s.summary = "Launchy is helper class for launching cross-platform applications in a fire and forget manner.".freeze
s.test_files = ["spec/application_spec.rb".freeze, "spec/applications/browser_spec.rb".freeze, "spec/cli_spec.rb".freeze, "spec/detect/host_os_family_spec.rb".freeze, "spec/detect/host_os_spec.rb".freeze, "spec/detect/nix_desktop_environment_spec.rb".freeze, "spec/detect/ruby_engine_spec.rb".freeze, "spec/detect/runner_spec.rb".freeze, "spec/launchy_spec.rb".freeze, "spec/mock_application.rb".freeze, "spec/spec_helper.rb".freeze, "spec/tattle-host-os.yaml".freeze, "spec/version_spec.rb".freeze]

s.specification_version = 4

s.add_runtime_dependency(%q<addressable>.freeze, ["~> 2.8"])
s.add_development_dependency(%q<rake>.freeze, ["~> 13.0"])
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.15"])
s.add_development_dependency(%q<minitest-junit>.freeze, ["~> 1.0"])
s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.4"])
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.21"])
s.add_runtime_dependency(%q<addressable>.freeze, ["~> 2.8".freeze])
s.add_development_dependency(%q<rake>.freeze, ["~> 13.0".freeze])
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.21".freeze])
s.add_development_dependency(%q<minitest-junit>.freeze, ["~> 1.0".freeze])
s.add_development_dependency(%q<rdoc>.freeze, ["~> 6.6".freeze])
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.22".freeze])
end
1 change: 0 additions & 1 deletion lib/launchy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,3 @@ def to_bool( arg )
require 'launchy/error'
require 'launchy/application'
require 'launchy/detect'
require 'launchy/deprecated'
52 changes: 0 additions & 52 deletions lib/launchy/deprecated.rb

This file was deleted.

21 changes: 14 additions & 7 deletions tasks/default.rake
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ task :develop => "develop:default"
# Minitest - standard TestTask
#------------------------------------------------------------------------------
begin
require 'rake/testtask'
Rake::TestTask.new( :test ) do |t|
t.ruby_opts = %w[ -w ]
t.libs = %w[ lib spec test ]
t.pattern = "{test,spec}/**/{test_*,*_spec}.rb"
require 'minitest/test_task'
Minitest::TestTask.create( :test) do |t|
t.libs << "lib"
t.libs << "spec"
t.libs << "test"
t.warning = true
t.test_globs = "{test,spec}/**/{test_*,*_spec}.rb"
end

task :test_requirements
Expand Down Expand Up @@ -150,8 +152,13 @@ namespace :fixme do
def outdated_fixme_files
local_fixme_files.select do |local|
upstream = fixme_project_path( local )
upstream.exist? &&
( Digest::SHA256.file( local ) != Digest::SHA256.file( upstream ) )
if upstream.exist? then
if File.exist?( local ) then
( Digest::SHA256.file( local ) != Digest::SHA256.file( upstream ) )
else
true
end
end
end
end

Expand Down