From 0785c9839b7020e52ca34a371c7e89e1103539da Mon Sep 17 00:00:00 2001 From: Vitor Oliveira Date: Mon, 8 Jul 2019 23:08:09 -0700 Subject: [PATCH] Renaming --- Guardfile | 10 ++++++---- bin/console | 2 +- bin/faker | 8 ++++---- faker-cli.gemspec => faker-bot.gemspec | 4 ++-- faker-cli-0.4.5.gem | Bin 0 -> 14336 bytes lib/faker-bot.rb | 2 +- lib/faker/{cli.rb => bot.rb} | 16 ++++++++-------- lib/faker/{cli => bot}/command.rb | 2 +- lib/faker/{cli => bot}/commands/list.rb | 2 +- lib/faker/{cli => bot}/commands/search.rb | 2 +- lib/faker/{cli => bot}/reflector.rb | 2 +- lib/faker/{cli => bot}/reflectors/list.rb | 2 +- lib/faker/{cli => bot}/reflectors/search.rb | 2 +- lib/faker/{cli => bot}/renderer.rb | 4 ++-- lib/faker/{cli => bot}/version.rb | 2 +- lib/faker/renderer.rb | 4 ++-- spec/faker/{cli => bot}/commands/list_spec.rb | 6 +++--- spec/faker/{cli => bot}/commands/search_spec.rb | 4 ++-- spec/faker/{cli => bot}/reflectors/list_spec.rb | 2 +- .../{cli => bot}/reflectors/search_spec.rb | 2 +- spec/faker/{cli => bot}/renderer_spec.rb | 2 +- 21 files changed, 41 insertions(+), 39 deletions(-) rename faker-cli.gemspec => faker-bot.gemspec (94%) create mode 100644 faker-cli-0.4.5.gem rename lib/faker/{cli.rb => bot.rb} (81%) rename lib/faker/{cli => bot}/command.rb (96%) rename lib/faker/{cli => bot}/commands/list.rb (96%) rename lib/faker/{cli => bot}/commands/search.rb (97%) rename lib/faker/{cli => bot}/reflector.rb (98%) rename lib/faker/{cli => bot}/reflectors/list.rb (98%) rename lib/faker/{cli => bot}/reflectors/search.rb (98%) rename lib/faker/{cli => bot}/renderer.rb (97%) rename lib/faker/{cli => bot}/version.rb (85%) rename spec/faker/{cli => bot}/commands/list_spec.rb (80%) rename spec/faker/{cli => bot}/commands/search_spec.rb (89%) rename spec/faker/{cli => bot}/reflectors/list_spec.rb (95%) rename spec/faker/{cli => bot}/reflectors/search_spec.rb (93%) rename spec/faker/{cli => bot}/renderer_spec.rb (99%) diff --git a/Guardfile b/Guardfile index 23074cd..d03ab8f 100644 --- a/Guardfile +++ b/Guardfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A sample Guardfile # More info at https://github.com/guard/guard#readme @@ -24,8 +26,8 @@ # * zeus: 'zeus rspec' (requires the server to be started separately) # * 'just' rspec: 'rspec' -guard :rspec, cmd: "bundle exec rspec" do - require "guard/rspec/dsl" +guard :rspec, cmd: 'bundle exec rspec' do + require 'guard/rspec/dsl' dsl = Guard::RSpec::Dsl.new(self) # Feel free to open issues for suggestions and improvements @@ -41,7 +43,7 @@ guard :rspec, cmd: "bundle exec rspec" do dsl.watch_spec_files_for(ruby.lib_files) # Rails files - rails = dsl.rails(view_extensions: %w(erb haml slim)) + rails = dsl.rails(view_extensions: %w[erb haml slim]) dsl.watch_spec_files_for(rails.app_files) dsl.watch_spec_files_for(rails.views) @@ -65,6 +67,6 @@ guard :rspec, cmd: "bundle exec rspec" do # Turnip features and steps watch(%r{^spec/acceptance/(.+)\.feature$}) watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m| - Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance" + Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' end end diff --git a/bin/console b/bin/console index 0af82b0..dbb7f12 100755 --- a/bin/console +++ b/bin/console @@ -2,7 +2,7 @@ # frozen_string_literal: true require 'bundler/setup' -require 'faker/cli' +require 'faker/bot' # 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. diff --git a/bin/faker b/bin/faker index 866e59f..776757e 100755 --- a/bin/faker +++ b/bin/faker @@ -3,7 +3,7 @@ lib_path = File.expand_path('../lib', __dir__) $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path) -require 'faker/cli' +require 'faker/bot' Signal.trap('INT') do warn("\n#{caller.join("\n")}: interrupted") @@ -11,8 +11,8 @@ Signal.trap('INT') do end begin - Faker::CLI::Base.start -rescue Faker::CLI::Base::Error => err - puts "ERROR: #{err.message}" + Faker::Bot::Base.start +rescue Faker::Bot::Base::Error => e + puts "ERROR: #{e.message}" exit 1 end diff --git a/faker-cli.gemspec b/faker-bot.gemspec similarity index 94% rename from faker-cli.gemspec rename to faker-bot.gemspec index 6295c8f..3abe065 100644 --- a/faker-cli.gemspec +++ b/faker-bot.gemspec @@ -1,11 +1,11 @@ lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "faker/cli/version" +require "faker/bot/version" Gem::Specification.new do |spec| spec.name = "faker-bot" - spec.version = Faker::CLI::VERSION + spec.version = Faker::Bot::VERSION spec.authors = ["Austin Kabiru"] spec.email = ["makabby@gmail.com"] diff --git a/faker-cli-0.4.5.gem b/faker-cli-0.4.5.gem new file mode 100644 index 0000000000000000000000000000000000000000..e0130c5de0040fe57cee5fda73b3675ac9392486 GIT binary patch literal 14336 zcmeIYRaBkLwk?Xgy99TiIKf>4!67&VcXxLW?(XjH?(Xg+NN}GMoA+P$KJ3%h!#z)X zpYyQBOI5W|+N-L6->BB@%v^t({&fAxYT*s>-(`S*jEjp4;$P`M_U|b>4>u14J0~|g zfQyrzm+K!tJLkWulLP*{CiK7d>*nJ6)A^q%d03j6+5WGNf6M>x{QuwD{%djn*8Kn0 zB3TRq!~rLzJ{0to*1p3w4~GA#;ou34QjuA^t}-MG9`&`dtzARQ#c;S-K}GXyrU+Nk zH%gT4{k~%AarX-^1KnXnqwTKc3| zS$5CLD*|xgLQUz}1+N4KPX$54?zHozM$oK+hyp_(_7V@G-yr^0v%kMg&qL)jaq{qE zj2psu$)uTtljI#^(*8D~>KyH1nl6-M6c)mZ^}~ymZNf(z_@ceXHVr8!?A#*~7qgY} z7ZN9ig4n-%$QhBhz;@NgXF$QD!-HB^D`z709-Xm>40XL*=BeeRP9bM}J)COQM_8cy zME1^~!5#S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H{E_32S84^FhYuntiQ-iyAc^H9(4T`qJ&0#r3%}-8u~EldLzLSUJdY& zefF&ejxs1=ztA6Zt4{iSoyXE<&0`>wMgItzcukyMRoD>&`OAGP{*$|y>!pp6c{I2( z@HUiZKE0xy@z1kNekg>265$AT8nc(wW{YWR^0yzSraCptXL9Bj{d??k;Qa35 z;f*Mq9S0>{epq@GGmEBvTWiDAt|P&|T8I#pT;g^F!a41@Y>4 zSwXUvIM%>~jd-kawW`|bt?6fM7k;8{S@_~V$64ZwBs1x_nLVz>2Fg&6Iz=#xuKVoO zDRlh3V+Xq76SErc2KYeI;y>QXPv11)h6&GDRog0@>833#=J2-v!SBoA$~|a}IVM@;5qb zufv-q0^b84OSmhNntz}WLo|^2N1m=W>3?`bRh6j+y6tv|Api~X{|Wm*>&U2nX95W6 zUCAqs+t1Heo;h+^Nff_=AP}m|JE0CFVfx}Ynr$)rXJh6i1eEsS;(3QIVNARQ3tfKpOe%|MyGm9|(xzFFX?qewO`p@90 zXwCiJ%~dzug0ugdYQ4~;l);~-WI=fa5><&;N-N@?ZK-vqYve98nZ0zxpEHg`9Vh zV@FTT1ocv70!1cGC3bgHN`vceuU>=re38E7t?^^fyU@+nQ=LQqr@vrfk|#out{j%z zEMHLORRwk*3E|!Io`Y{YU-r1UpW>g0zQ?+Fy9c>S?#n~fq?s;_0{|6QIH(K|G zwoMA#)9D$st3`oc5Y*I~9SZ7p45aVmS7Jr0(OV?lJ*U1$6j}EH1FXC|7=!YC1R2CxDs^ f|95DjlAkv#kpB}~@t-mNgTQ|f_zwdAqX_&zCiC(| literal 0 HcmV?d00001 diff --git a/lib/faker-bot.rb b/lib/faker-bot.rb index 46e859c..84607fa 100644 --- a/lib/faker-bot.rb +++ b/lib/faker-bot.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -require_relative 'faker/cli' +require_relative 'faker/bot' diff --git a/lib/faker/cli.rb b/lib/faker/bot.rb similarity index 81% rename from lib/faker/cli.rb rename to lib/faker/bot.rb index 0f513e8..015b876 100644 --- a/lib/faker/cli.rb +++ b/lib/faker/bot.rb @@ -2,19 +2,19 @@ require 'thor' -require 'faker/cli/commands/list' -require 'faker/cli/commands/search' -require 'faker/cli/version' +require 'faker/bot/commands/list' +require 'faker/bot/commands/search' +require 'faker/bot/version' module Faker - module CLI + module Bot class Base < Thor Error = Class.new(StandardError) - # Skip default deprecation warning output; the CLI will display that. + # Skip default deprecation warning output; the Bot will display that. Gem::Deprecate.skip_during do desc 'version', 'Faker version' def version - puts "v#{Faker::CLI::VERSION}" + puts "v#{Faker::Bot::VERSION}" end map %w[--version -v] => :version @@ -29,7 +29,7 @@ def list(*) if options[:help] invoke :help, ['list'] else - Faker::CLI::Commands::List.new(options).execute + Faker::Bot::Commands::List.new(options).execute end end @@ -44,7 +44,7 @@ def search(query) if options[:help] invoke :help, ['search'] else - Faker::CLI::Commands::Search.new(options).execute(query) + Faker::Bot::Commands::Search.new(options).execute(query) end end end diff --git a/lib/faker/cli/command.rb b/lib/faker/bot/command.rb similarity index 96% rename from lib/faker/cli/command.rb rename to lib/faker/bot/command.rb index 277e7a1..4693c5f 100644 --- a/lib/faker/cli/command.rb +++ b/lib/faker/bot/command.rb @@ -5,7 +5,7 @@ require_relative 'renderer' module Faker - module CLI + module Bot class Command extend Forwardable diff --git a/lib/faker/cli/commands/list.rb b/lib/faker/bot/commands/list.rb similarity index 96% rename from lib/faker/cli/commands/list.rb rename to lib/faker/bot/commands/list.rb index 060c88d..8a1e8b4 100644 --- a/lib/faker/cli/commands/list.rb +++ b/lib/faker/bot/commands/list.rb @@ -4,7 +4,7 @@ require_relative '../reflectors/list' module Faker - module CLI + module Bot module Commands class List < Command def execute(output: $stdout) diff --git a/lib/faker/cli/commands/search.rb b/lib/faker/bot/commands/search.rb similarity index 97% rename from lib/faker/cli/commands/search.rb rename to lib/faker/bot/commands/search.rb index ec04ecc..80c522b 100644 --- a/lib/faker/cli/commands/search.rb +++ b/lib/faker/bot/commands/search.rb @@ -4,7 +4,7 @@ require_relative '../reflectors/search' module Faker - module CLI + module Bot module Commands class Search < Command def execute(input, output: $stdout) diff --git a/lib/faker/cli/reflector.rb b/lib/faker/bot/reflector.rb similarity index 98% rename from lib/faker/cli/reflector.rb rename to lib/faker/bot/reflector.rb index 7ff45b3..442d282 100644 --- a/lib/faker/cli/reflector.rb +++ b/lib/faker/bot/reflector.rb @@ -3,7 +3,7 @@ require 'faker' module Faker - module CLI + module Bot # Abstract `Faker` Reflector - introspects the `Faker` module # # @api private diff --git a/lib/faker/cli/reflectors/list.rb b/lib/faker/bot/reflectors/list.rb similarity index 98% rename from lib/faker/cli/reflectors/list.rb rename to lib/faker/bot/reflectors/list.rb index 719188b..0cd5382 100644 --- a/lib/faker/cli/reflectors/list.rb +++ b/lib/faker/bot/reflectors/list.rb @@ -3,7 +3,7 @@ require_relative '../reflector' module Faker - module CLI + module Bot module Reflectors # List command reflector # @api private diff --git a/lib/faker/cli/reflectors/search.rb b/lib/faker/bot/reflectors/search.rb similarity index 98% rename from lib/faker/cli/reflectors/search.rb rename to lib/faker/bot/reflectors/search.rb index 48e88a0..a0aaab2 100644 --- a/lib/faker/cli/reflectors/search.rb +++ b/lib/faker/bot/reflectors/search.rb @@ -3,7 +3,7 @@ require_relative '../reflector' module Faker - module CLI + module Bot module Reflectors # Find command reflector # @api private diff --git a/lib/faker/cli/renderer.rb b/lib/faker/bot/renderer.rb similarity index 97% rename from lib/faker/cli/renderer.rb rename to lib/faker/bot/renderer.rb index 0e3f635..b17ade8 100644 --- a/lib/faker/cli/renderer.rb +++ b/lib/faker/bot/renderer.rb @@ -6,7 +6,7 @@ require 'tty/tree' module Faker - module CLI + module Bot class Renderer attr_reader :crayon, :hash, :options, :output, :pager @@ -81,7 +81,7 @@ def verbose_output(method, const, arr) def faker_method(method, const) [const.public_send(method), ensure_method_is_supported(method, const)] - rescue ArgumentError => _exception + rescue ArgumentError => _e ['N/A', ''] end diff --git a/lib/faker/cli/version.rb b/lib/faker/bot/version.rb similarity index 85% rename from lib/faker/cli/version.rb rename to lib/faker/bot/version.rb index 4181eb9..4dbf409 100644 --- a/lib/faker/cli/version.rb +++ b/lib/faker/bot/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Faker - module CLI + module Bot VERSION = '0.4.5' end end diff --git a/lib/faker/renderer.rb b/lib/faker/renderer.rb index a59fa03..a43ae4e 100644 --- a/lib/faker/renderer.rb +++ b/lib/faker/renderer.rb @@ -5,7 +5,7 @@ require 'tty/screen' require 'tty/tree' -module Faker::CLI +module Faker::Bot class Renderer attr_reader :crayon, :hash, :options, :output, :pager @@ -80,7 +80,7 @@ def verbose_output(method, const, arr) def faker_method(method, const) [const.public_send(method), ensure_method_is_supported(method, const)] - rescue ArgumentError => _exception + rescue ArgumentError => _e ['N/A', ''] end diff --git a/spec/faker/cli/commands/list_spec.rb b/spec/faker/bot/commands/list_spec.rb similarity index 80% rename from spec/faker/cli/commands/list_spec.rb rename to spec/faker/bot/commands/list_spec.rb index e8144d9..cfd7fa0 100644 --- a/spec/faker/cli/commands/list_spec.rb +++ b/spec/faker/bot/commands/list_spec.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true -require 'faker/cli/commands/list' +require 'faker/bot/commands/list' -RSpec.describe Faker::CLI::Commands::List do +RSpec.describe Faker::Bot::Commands::List do let(:output) { StringIO.new } let(:options) { {} } - let(:command) { Faker::CLI::Commands::List.new(options) } + let(:command) { Faker::Bot::Commands::List.new(options) } before do command.execute(output: output) diff --git a/spec/faker/cli/commands/search_spec.rb b/spec/faker/bot/commands/search_spec.rb similarity index 89% rename from spec/faker/cli/commands/search_spec.rb rename to spec/faker/bot/commands/search_spec.rb index 0d76d90..08383cc 100644 --- a/spec/faker/cli/commands/search_spec.rb +++ b/spec/faker/bot/commands/search_spec.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require 'faker/cli/commands/search' +require 'faker/bot/commands/search' -RSpec.describe Faker::CLI::Commands::Search do +RSpec.describe Faker::Bot::Commands::Search do context 'when query object exists' do it 'returns results' do output = StringIO.new diff --git a/spec/faker/cli/reflectors/list_spec.rb b/spec/faker/bot/reflectors/list_spec.rb similarity index 95% rename from spec/faker/cli/reflectors/list_spec.rb rename to spec/faker/bot/reflectors/list_spec.rb index 90005ab..56af3f3 100644 --- a/spec/faker/cli/reflectors/list_spec.rb +++ b/spec/faker/bot/reflectors/list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Faker::CLI::Reflectors::List do +RSpec.describe Faker::Bot::Reflectors::List do describe '#call' do context 'when show methods is enabled' do it 'returns all descendants and their methods' do diff --git a/spec/faker/cli/reflectors/search_spec.rb b/spec/faker/bot/reflectors/search_spec.rb similarity index 93% rename from spec/faker/cli/reflectors/search_spec.rb rename to spec/faker/bot/reflectors/search_spec.rb index f0201c8..80a8d4f 100644 --- a/spec/faker/cli/reflectors/search_spec.rb +++ b/spec/faker/bot/reflectors/search_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Faker::CLI::Reflectors::Search do +RSpec.describe Faker::Bot::Reflectors::Search do describe '#call' do context 'when a match is found' do it 'it returns the list of matches' do diff --git a/spec/faker/cli/renderer_spec.rb b/spec/faker/bot/renderer_spec.rb similarity index 99% rename from spec/faker/cli/renderer_spec.rb rename to spec/faker/bot/renderer_spec.rb index bc95058..77295b0 100644 --- a/spec/faker/cli/renderer_spec.rb +++ b/spec/faker/bot/renderer_spec.rb @@ -10,7 +10,7 @@ def self.bar end end -RSpec.describe Faker::CLI::Renderer do +RSpec.describe Faker::Bot::Renderer do describe '#call' do # FIXME: work out how to capture less xcontext 'when paginable interface' do