Sha256: 9a02e2c2b9430e2a683f9895d7185d106d5519575a2b56fab676c584dfe9ddf1

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

module GGem
  module NameSet

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

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

      def expected_files
        [ ".gitignore",
          "Gemfile",
          "#{@name}.gemspec",
          "Rakefile",
          "README.md",
          "LICENSE.txt",

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

          "test/helper.rb",

          "log/.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

6 entries across 6 versions & 1 rubygems

Version Path
ggem-1.5.1 test/support/name_set.rb
ggem-1.5.0 test/support/name_set.rb
ggem-1.4.3 test/support/name_set.rb
ggem-1.4.2 test/support/name_set.rb
ggem-1.4.1 test/support/name_set.rb
ggem-1.4.0 test/support/name_set.rb