Sha256: 06aceb28e52ad62094a69a51066dec41fd0df4424d39f14e89b0998504fe1297

Contents?: true

Size: 1.47 KB

Versions: 1

Compression:

Stored size: 1.47 KB

Contents

module GGem
  module NameSet

    class Base
      attr_reader :variations, :name, :module_name, :ruby_name

      def expected_folders
        [ "",
          ".circleci",
          "lib",
          "lib/#{@ruby_name}",
          "test",
          "test/support",
          "test/system",
          "test/unit",
          "log",
          "tmp"
        ]
      end

      def expected_files
        [ ".circleci/config.yml",

          ".ruby-version",
          ".gitignore",
          "Gemfile",
          "#{@name}.gemspec",
          "README.md",
          "LICENSE",

          "lib/#{@ruby_name}.rb",
          "lib/#{@ruby_name}/version.rb",

          "test/helper.rb",
          "test/support/factory.rb",

          "log/.gitkeep",
          "test/system/.gitkeep",
          "test/unit/.gitkeep",
          "tmp/.gitkeep",
        ]
      end
    end

    class Simple < Base
      def initialize
        @variations = ["simple"]
        @name        = "simple"
        @module_name = "Simple"
        @ruby_name   = "simple"
      end
    end

    class Underscored < Base
      def initialize
        @variations = ["my_gem", "my__gem", "MyGem", "myGem", "My_Gem"]
        @name        = "my_gem"
        @module_name = "MyGem"
        @ruby_name   = "my_gem"
      end
    end

    class HyphenatedOther < Base
      def initialize
        @variations = ["my-gem"]
        @name        = "my-gem"
        @module_name = "MyGem"
        @ruby_name   = "my-gem"
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ggem-1.9.1 test/support/name_set.rb