Sha256: 7036fcd4b23e30fa083b0f90139d1ed0bc3d2f4b0c3dcf317a2cb24d1a34962c

Contents?: true

Size: 368 Bytes

Versions: 20

Compression:

Stored size: 368 Bytes

Contents

module Rails
  class Ruby
    include SmartProperties

    VERSION_STRING = /ruby ([\d\.]+)/

    property :ctx, accepts: ShopifyCli::Context, required: true

    class << self
      def version(ctx)
        require 'semantic/semantic'
        out, _ = ctx.capture2('ruby', '-v')
        Semantic::Version.new(VERSION_STRING.match(out)[1])
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
shopify-cli-1.6.0 lib/project_types/rails/ruby.rb
shopify-cli-1.5.0 lib/project_types/rails/ruby.rb
shopify-cli-1.4.1 lib/project_types/rails/ruby.rb
shopify-cli-1.4.0 lib/project_types/rails/ruby.rb
shopify-cli-1.3.1 lib/project_types/rails/ruby.rb
shopify-cli-1.3.0 lib/project_types/rails/ruby.rb
shopify-cli-1.2.0 lib/project_types/rails/ruby.rb
shopify-cli-1.1.2 lib/project_types/rails/ruby.rb
shopify-cli-1.1.1 lib/project_types/rails/ruby.rb
shopify-cli-1.1.0 lib/project_types/rails/ruby.rb
shopify-cli-1.0.5 lib/project_types/rails/ruby.rb
shopify-cli-1.0.4 lib/project_types/rails/ruby.rb
shopify-cli-1.0.3 lib/project_types/rails/ruby.rb
shopify-cli-1.0.2 lib/project_types/rails/ruby.rb
shopify-cli-1.0.1 lib/project_types/rails/ruby.rb
shopify-cli-1.0.0 lib/project_types/rails/ruby.rb
shopify-cli-0.9.3 lib/project_types/rails/ruby.rb
shopify-cli-0.9.2 lib/project_types/rails/ruby.rb
shopify-cli-0.9.1 lib/project_types/rails/ruby.rb
shopify-cli-0.9.0 lib/project_types/rails/ruby.rb