tty 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -2
- data/.travis.yml +15 -4
- data/CHANGELOG.md +22 -0
- data/Gemfile +4 -7
- data/README.md +648 -58
- data/appveyor.yml +3 -4
- data/exe/teletype +18 -0
- data/lib/tty.rb +7 -4
- data/lib/tty/cli.rb +140 -0
- data/lib/tty/cmd.rb +132 -0
- data/lib/tty/commands/add.rb +321 -0
- data/lib/tty/commands/new.rb +256 -0
- data/lib/tty/gemspec.rb +30 -0
- data/lib/tty/licenses.rb +34 -0
- data/lib/tty/path_helpers.rb +38 -0
- data/lib/tty/plugins.rb +20 -12
- data/lib/tty/templater.rb +54 -0
- data/lib/tty/templates/add/command.rb.tt +31 -0
- data/lib/tty/templates/add/gitkeep.tt +1 -0
- data/lib/tty/templates/add/namespace.rb.tt +17 -0
- data/lib/tty/templates/add/spec/integration/command_spec.rb.tt +20 -0
- data/lib/tty/templates/add/spec/integration/sub_command_spec.rb.tt +16 -0
- data/lib/tty/templates/add/spec/unit/command_spec.rb.tt +15 -0
- data/lib/tty/templates/add/spec/unit/sub_command_spec.rb.tt +15 -0
- data/lib/tty/templates/add/test/integration/command_test.rb.tt +23 -0
- data/lib/tty/templates/add/test/integration/sub_command_test.rb.tt +19 -0
- data/lib/tty/templates/add/test/unit/command_test.rb.tt +16 -0
- data/lib/tty/templates/add/test/unit/sub_command_test.rb.tt +16 -0
- data/lib/tty/templates/new/agplv3_LICENSE.txt.tt +555 -0
- data/lib/tty/templates/new/apache_LICENSE.txt.tt +157 -0
- data/lib/tty/templates/new/bsd2_LICENSE.txt.tt +22 -0
- data/lib/tty/templates/new/bsd3_LICENSE.txt.tt +26 -0
- data/lib/tty/templates/new/exe/newcli.tt +18 -0
- data/lib/tty/templates/new/gitkeep.tt +1 -0
- data/lib/tty/templates/new/gplv2_LICENSE.txt.tt +255 -0
- data/lib/tty/templates/new/gplv3_LICENSE.txt.tt +543 -0
- data/lib/tty/templates/new/lgplv3_LICENSE.txt.tt +143 -0
- data/lib/tty/templates/new/lib/newcli/cli.rb.tt +24 -0
- data/lib/tty/templates/new/lib/newcli/command.rb.tt +124 -0
- data/lib/tty/templates/new/mit_LICENSE.txt.tt +20 -0
- data/lib/tty/templates/new/mplv2_LICENSE.txt.tt +277 -0
- data/lib/tty/version.rb +1 -1
- data/spec/fixtures/foo-0.0.1.gemspec +4 -4
- data/spec/integration/add_desc_args_spec.rb +341 -0
- data/spec/integration/add_force_spec.rb +98 -0
- data/spec/integration/add_namespaced_spec.rb +291 -0
- data/spec/integration/add_spec.rb +535 -0
- data/spec/integration/add_subcommand_spec.rb +259 -0
- data/spec/integration/new_author_spec.rb +19 -0
- data/spec/integration/new_license_spec.rb +39 -0
- data/spec/integration/new_namespaced_spec.rb +228 -0
- data/spec/integration/new_spec.rb +354 -0
- data/spec/integration/new_test_spec.rb +21 -0
- data/spec/integration/start_spec.rb +21 -0
- data/spec/spec_helper.rb +47 -16
- data/spec/unit/gemspec_spec.rb +17 -0
- data/spec/{tty/plugins/load_spec.rb → unit/plugins/activate_spec.rb} +2 -4
- data/spec/unit/plugins/load_from_spec.rb +28 -0
- data/spec/{tty → unit}/plugins/plugin/load_spec.rb +1 -3
- data/spec/{tty → unit}/plugins/plugin/new_spec.rb +1 -3
- data/spec/{tty → unit}/tty_spec.rb +1 -3
- data/tty.gemspec +25 -15
- metadata +186 -49
- data/spec/tty/plugins/find_spec.rb +0 -20
- data/tasks/metrics/cane.rake +0 -14
- data/tasks/metrics/flog.rake +0 -17
- data/tasks/metrics/heckle.rake +0 -15
- data/tasks/metrics/reek.rake +0 -13
@@ -1,20 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe TTY::Plugins, '#find' do
|
6
|
-
it "finds gems with a specific prefix" do
|
7
|
-
plugins = TTY::Plugins.new
|
8
|
-
spec = Gem::Specification.load fixtures_path('foo-0.0.1.gemspec')
|
9
|
-
allow(Gem::Specification).to receive(:find_by_name).with('tty').
|
10
|
-
and_return(spec)
|
11
|
-
|
12
|
-
plugins.find('tty')
|
13
|
-
|
14
|
-
expect(plugins.to_a.map(&:name)).to eq([
|
15
|
-
'tty-command',
|
16
|
-
'tty-prompt',
|
17
|
-
'tty-spinner'
|
18
|
-
])
|
19
|
-
end
|
20
|
-
end
|
data/tasks/metrics/cane.rake
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'cane/rake_task'
|
5
|
-
|
6
|
-
namespace :metrics do
|
7
|
-
Cane::RakeTask.new do |cane|
|
8
|
-
cane.abc_max = 10
|
9
|
-
cane.no_style = true
|
10
|
-
end
|
11
|
-
end
|
12
|
-
rescue LoadError
|
13
|
-
warn "Cane is not available. In order to run cane, you must: gem install cane"
|
14
|
-
end
|
data/tasks/metrics/flog.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'flog'
|
5
|
-
|
6
|
-
namespace :metrics do
|
7
|
-
desc 'Analyze for code complexity'
|
8
|
-
task :flog do
|
9
|
-
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
rescue LoadError
|
14
|
-
task :flog do
|
15
|
-
warn "Flog is not available. In order to run reek, you must: gem install flog"
|
16
|
-
end
|
17
|
-
end
|
data/tasks/metrics/heckle.rake
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
|
4
|
-
begin
|
5
|
-
require 'heckle'
|
6
|
-
|
7
|
-
namespace :metrics do
|
8
|
-
desc 'Heckle each module and class'
|
9
|
-
task :heckle do
|
10
|
-
require 'tty'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
rescue LoadError
|
14
|
-
warn "Heckle is not available."
|
15
|
-
end
|
data/tasks/metrics/reek.rake
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'reek/rake/task'
|
5
|
-
|
6
|
-
namespace :metrics do
|
7
|
-
Reek::Rake::Task.new do |t|
|
8
|
-
t.fail_on_error = false
|
9
|
-
end
|
10
|
-
end
|
11
|
-
rescue LoadError
|
12
|
-
warn "Reek is not available. In order to run reek, you must: gem install reek"
|
13
|
-
end
|