class Spark::Shard::ShardFile
- Spark::Shard::ShardFile
- Reference
- Object
Defined in:
spark/shard/shard_file.crConstructors
-
.new(path : String)
Creates a new
ShardFile
that parses the given path forshard.yml
content.
Instance Method Summary
-
#contains_shard?(name : String)
Determine whether or not the
ShardFile
already has an entry for the given shard. -
#content : String
The content of the shard file in its entirety.
-
#has_development_dependencies_section? : Bool
Whether or not the
development_dependencies:
header exists in the shard file. -
#has_production_dependencies_section? : Bool
Whether or not the
dependencies:
header exists in the shard file.
Constructor Detail
def self.new(path : String)
#
Creates a new ShardFile
that parses the given path for shard.yml
content.
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
def has_development_dependencies_section? : Bool
#
Whether or not the development_dependencies:
header exists in the shard file.
def has_production_dependencies_section? : Bool
#
Whether or not the dependencies:
header exists in the shard file.