Class: Physique::SolutionConfig

Inherits:
Object
  • Object
show all
Extended by:
Albacore::ConfigDSL
Includes:
Albacore::Logging
Defined in:
lib/physique/solution.rb

Instance Method Summary collapse

Constructor Details

#initializeSolutionConfig

Returns a new instance of SolutionConfig.



13
14
15
16
17
18
# File 'lib/physique/solution.rb', line 13

def initialize
  @file = nil
  @compilation = CompileConfig.new
  @nuget = NugetConfig.new
  @tests = TestConfig.new
end

Instance Method Details

#compile {|@compilation| ... } ⇒ Object

Yields:

  • (@compilation)


24
25
26
# File 'lib/physique/solution.rb', line 24

def compile
  yield @compilation
end

#fluently_migrate {|migrator| ... } ⇒ Object Also known as: database

Yields:

  • (migrator)


32
33
34
35
36
37
38
39
# File 'lib/physique/solution.rb', line 32

def fluently_migrate
  @dbs_to_migrate = @dbs_to_migrate || []

  migrator = FluentMigratorConfig.new
  yield migrator

  @dbs_to_migrate << migrator
end

#octopus_deploy {|@octopus| ... } ⇒ Object

Yields:

  • (@octopus)


43
44
45
46
# File 'lib/physique/solution.rb', line 43

def octopus_deploy
  @octopus = OctopusDeployConfig.new
  yield @octopus
end

#optsObject



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/physique/solution.rb', line 53

def opts
  Map.new({
    file: @file,
    nuget: @nuget && @nuget.opts,
    compile: @compilation && @compilation.opts,
    test: @tests && @tests.opts,
    fluent_migrator_dbs: @dbs_to_migrate && @dbs_to_migrate.map {|db| db.opts },
    octopus: @octopus && @octopus.opts,
    publish_nugets: @publish_nugets && @publish_nugets.opts
  })
end

#publish_nugets {|@publish_nugets| ... } ⇒ Object

Yields:



48
49
50
51
# File 'lib/physique/solution.rb', line 48

def publish_nugets
  @publish_nugets = PublishNugetsConfig.new
  yield @publish_nugets
end

#run_tests {|@tests| ... } ⇒ Object

Yields:

  • (@tests)


28
29
30
# File 'lib/physique/solution.rb', line 28

def run_tests
  yield @tests
end

#use_nuget {|@nuget| ... } ⇒ Object

Yields:

  • (@nuget)


20
21
22
# File 'lib/physique/solution.rb', line 20

def use_nuget
  yield @nuget
end