Skip to content

Commit

Permalink
Change to use the latest released/unreleased tty gems and update bund…
Browse files Browse the repository at this point in the history
…ler to 2.0 (ref #50 & closes #60)
  • Loading branch information
piotrmurach committed Jul 25, 2020
1 parent d35df21 commit 5dd8f85
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 64 deletions.
38 changes: 28 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
source 'https://rubygems.org'
source "https://rubygems.org"

gemspec

gem 'timers', '~> 4.1.2'

group :development do
gem 'yard', '~> 0.9.12'
gem 'timecop', '~> 0.9.1'
end
gem "pastel", "~> 0.8"
gem "tty-box", git: "https://github.com/piotrmurach/tty-box"
gem "tty-color", "~> 0.5"
gem "tty-command", git: "https://github.com/piotrmurach/tty-command"
gem "tty-config", "~> 0.4"
gem "tty-cursor", "~> 0.7"
gem "tty-editor", git: "https://github.com/piotrmurach/tty-editor"
gem "tty-exit", "~> 0.1"
gem "tty-file", git: "https://github.com/piotrmurach/tty-file"
gem "tty-font", "~> 0.5"
gem "tty-link", "~> 0.1"
gem "tty-logger", git: "https://github.com/piotrmurach/tty-logger"
gem "tty-markdown", git: "https://github.com/piotrmurach/tty-markdown"
gem "tty-option", "~> 0.1"
gem "tty-pager", "~> 0.13"
gem "tty-pie", "~> 0.4"
gem "tty-platform", "~> 0.3"
gem "tty-progressbar", git: "https://github.com/piotrmurach/tty-progressbar"
gem "tty-prompt","~> 0.22"
gem "tty-screen", "~> 0.8"
gem "tty-spinner", "~> 0.9"
gem "tty-table", git: "https://github.com/piotrmurach/tty-table"
gem "tty-tree", "~> 0.4"
gem "tty-which", "~> 0.4"

group :metrics do
gem 'simplecov', '~> 0.16.1'
gem 'yardstick', '~> 0.9.9'
gem "simplecov", "~> 0.16.1"
gem "yardstick", "~> 0.9.9"
end

group :benchmarks do
gem 'benchmark-ips', '~> 2.7.2'
gem "benchmark-ips", "~> 2.7.2"
end
6 changes: 3 additions & 3 deletions lib/tty/commands/add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def execute(input: $stdin, output: $stdout)
match = cmd_matches.find { |m| cli_content =~ m }
generator.inject_into_file(
cli_file, "\n#{cmd_template}",
{after: match}.merge(file_options))
**{after: match}.merge(file_options))
end
else
subcmd_file = "lib/#{namespaced_path}/commands/#{cmd_name_path}/#{subcmd_name_path}.rb"
Expand Down Expand Up @@ -121,15 +121,15 @@ def execute(input: $stdin, output: $stdout)
match = register_subcmd_matches.find { |m| cli_content =~ m }
generator.inject_into_file(
cli_file, "\n#{register_subcmd_template}",
{after: match}.merge(file_options))
**{after: match}.merge(file_options))
end

content = ::File.read(cmd_file)
if !subcmd_exists?(content)
match = subcmd_matches.find {|m| content =~ m }
generator.inject_into_file(
cmd_file, "\n#{subcmd_template}",
{after: match}.merge(file_options))
**{after: match}.merge(file_options))
end
end
end
Expand Down
48 changes: 24 additions & 24 deletions spec/integration/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,30 @@

expect(gemspec).to match(/spec.license\s+= \"MIT\"/)

expect(gemspec).to match(%r{
spec.add_dependency "tty-box", "~> (\d+.?){2,3}"
spec.add_dependency "tty-color", "~> (\d+.?){2,3}"
spec.add_dependency "tty-command", "~> (\d+.?){2,3}"
spec.add_dependency "tty-config", "~> (\d+.?){2,3}"
spec.add_dependency "tty-cursor", "~> (\d+.?){2,3}"
spec.add_dependency "tty-editor", "~> (\d+.?){2,3}"
spec.add_dependency "tty-file", "~> (\d+.?){2,3}"
spec.add_dependency "tty-font", "~> (\d+.?){2,3}"
spec.add_dependency "tty-logger", "~> (\d+.?){2,3}"
spec.add_dependency "tty-markdown", "~> (\d+.?){2,3}"
spec.add_dependency "tty-pager", "~> (\d+.?){2,3}"
spec.add_dependency "tty-pie", "~> (\d+.?){2,3}"
spec.add_dependency "tty-platform", "~> (\d+.?){2,3}"
spec.add_dependency "tty-progressbar", "~> (\d+.?){2,3}"
spec.add_dependency "tty-prompt", "~> (\d+.?){2,3}"
spec.add_dependency "tty-screen", "~> (\d+.?){2,3}"
spec.add_dependency "tty-spinner", "~> (\d+.?){2,3}"
spec.add_dependency "tty-table", "~> (\d+.?){2,3}"
spec.add_dependency "tty-tree", "~> (\d+.?){2,3}"
spec.add_dependency "tty-which", "~> (\d+.?){2,3}"
spec.add_dependency "pastel", "~> (\d+.?){2,3}"
spec.add_dependency "thor", "~> (\d+.?){2,3}"
})
# expect(gemspec).to match(%r{
# spec.add_dependency "tty-box", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-color", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-command", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-config", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-cursor", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-editor", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-file", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-font", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-logger", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-markdown", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-pager", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-pie", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-platform", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-progressbar", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-prompt", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-screen", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-spinner", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-table", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-tree", "~> (\d+.?){2,3}"
# spec.add_dependency "tty-which", "~> (\d+.?){2,3}"
# spec.add_dependency "pastel", "~> (\d+.?){2,3}"
# spec.add_dependency "thor", "~> (\d+.?){2,3}"
# })

# exe/newcli
#
Expand Down
52 changes: 25 additions & 27 deletions tty.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,32 @@ Gem::Specification.new do |spec|
spec.executables = ["teletype"]
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.0.0"
# spec.add_dependency "tty-box", "~> 0.5.0"
# spec.add_dependency "tty-color", "~> 0.5"
# spec.add_dependency "tty-command", "~> 0.9.0"
# spec.add_dependency "tty-config", "~> 0.3.2"
# spec.add_dependency "tty-cursor", "~> 0.7"
# spec.add_dependency "tty-editor", "~> 0.5"
# spec.add_dependency "tty-file", "~> 0.8.0"
# spec.add_dependency "tty-font", "~> 0.4.0"
# spec.add_dependency "tty-logger", "~> 0.2.0"
# spec.add_dependency "tty-markdown", "~> 0.6.0"
# spec.add_dependency "tty-pager", "~> 0.12"
# spec.add_dependency "tty-pie", "~> 0.3.0"
# spec.add_dependency "tty-platform", "~> 0.2"
# spec.add_dependency "tty-progressbar", "~> 0.17"
# spec.add_dependency "tty-prompt", "~> 0.20"
# spec.add_dependency "tty-screen", "~> 0.7"
# spec.add_dependency "tty-spinner", "~> 0.9"
# spec.add_dependency "tty-table", "~> 0.11.0"
# spec.add_dependency "tty-tree", "~> 0.3"
# spec.add_dependency "tty-which", "~> 0.4"
# spec.add_dependency "pastel", "~> 0.7.2"

spec.add_dependency "tty-box", "~> 0.5.0"
spec.add_dependency "tty-color", "~> 0.5"
spec.add_dependency "tty-command", "~> 0.9.0"
spec.add_dependency "tty-config", "~> 0.3.2"
spec.add_dependency "tty-cursor", "~> 0.7"
spec.add_dependency "tty-editor", "~> 0.5"
spec.add_dependency "tty-file", "~> 0.8.0"
spec.add_dependency "tty-font", "~> 0.4.0"
spec.add_dependency "tty-logger", "~> 0.2.0"
spec.add_dependency "tty-markdown", "~> 0.6.0"
spec.add_dependency "tty-pager", "~> 0.12"
spec.add_dependency "tty-pie", "~> 0.3.0"
spec.add_dependency "tty-platform", "~> 0.2"
spec.add_dependency "tty-progressbar", "~> 0.17"
spec.add_dependency "tty-prompt", "~> 0.19"
spec.add_dependency "tty-screen", "~> 0.7"
spec.add_dependency "tty-spinner", "~> 0.9"
spec.add_dependency "tty-table", "~> 0.11.0"
spec.add_dependency "tty-tree", "~> 0.3"
spec.add_dependency "tty-which", "~> 0.4"
spec.add_dependency "equatable", "~> 0.5"
spec.add_dependency "pastel", "~> 0.7.2"
spec.add_dependency "thor", "~> 0.20.0"
spec.add_dependency "bundler", "~> 2.0"

spec.add_dependency "thor", "~> 0.20.0"
spec.add_dependency "bundler", "~> 1.16", "< 2.0"

spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", ">= 3.0"
spec.add_development_dependency "timecop", "~> 0.9"
end

0 comments on commit 5dd8f85

Please sign in to comment.