Sha256: 7b4d0a228f54411bfeee73690cc04b93c1af99beb5a9f73a4e2d9c525131207a

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

module Autowow
  module Commands
    module Gem
      def release
        be + ["rake", "release"]
      end

      def clean
        ["gem", "clean"]
      end

      def rubocop_parallel
        be + ["rubocop", "--parallel"]
      end

      def bump(version = nil)
        command = ["gem", "bump", "--no-commit"]
        return command unless version
        command + ["--version", version]
      end

      def rubocop_autocorrect(files)
        cmd = be + ["rubocop", "--auto-correct"]
        if files.kind_of?(Array)
          cmd + files
        else
          cmd + files.split(" ")
        end
      end

      def be
        ["bundle", "exec"]
      end

      def rake
        be + ["rake"]
      end

      def rake_db_migrate
        ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:migrate"]
      end

      def rake_db_schema
        ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:schema:load"]
      end

      def rake_db_structure
        ["DISABLE_DATABASE_ENVIRONMENT_CHECK=1"] + rake + ["db:drop", "db:create", "db:structure:load"]
      end

      include ReflectionUtils::CreateModuleFunctions
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
autowow-0.14.2 lib/autowow/commands/gem.rb
autowow-0.14.1 lib/autowow/commands/gem.rb
autowow-0.14.0 lib/autowow/commands/gem.rb
autowow-0.13.2 lib/autowow/commands/gem.rb
autowow-0.13.1 lib/autowow/commands/gem.rb
autowow-0.13.0 lib/autowow/commands/gem.rb