class Spark::Shard::ShardFile

Defined in:

spark/shard/shard_file.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : String) #

Creates a new ShardFile that parses the given path for shard.yml content.


[View source]

Instance Method Detail

def contains_shard?(name : String) #

Determine whether or not the ShardFile already has an entry for the given shard.

Example:

  name: test_shard_yml

  version: x.x.x

  dependencies:
    spark:
      github: stephendolan/spark
Spark::Shard::ShardFile.new("shard.yml").contains_shard?("spark") # => true
Spark::Shard::ShardFile.new("shard.yml").contains_shard?("lucky") # => false

[View source]
def content : String #

The content of the shard file in its entirety.


[View source]
def has_development_dependencies_section? : Bool #

Whether or not the development_dependencies: header exists in the shard file.


[View source]
def has_production_dependencies_section? : Bool #

Whether or not the dependencies: header exists in the shard file.


[View source]