Skip to content

Commit

Permalink
Changed logger to system
Browse files Browse the repository at this point in the history
Also added more ruby environments to be tested with travis ci
And removed logger configuration from config file
  • Loading branch information
vasyl-purchel committed Apr 8, 2015
1 parent e869dfa commit 1a5969f
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 107 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
language: ruby
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1
- 2.2
- ruby-head
matrix:
allow_failures:
- rvm: ruby-head
81 changes: 75 additions & 6 deletions alpaca.todo
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,81 @@ tasks:
☐ fill readme file with how to use alpaca
☐ push gem to https://rubygems.org and add version to readme
[![Gem Version](https://badge.fury.io/rb/rubocop.svg)](http://badge.fury.io/rb/rubocop)
☐ add changelog
☐ add more specs to get green coverage
☐ add more documentation and examples

☐ Visual Studio solutions:
✔ configure @done (15-04-02 01:19)
✘ feature test @cancelled (15-04-02 01:19)
✔ global @done (15-04-02 01:19)
✔ local @done (15-04-02 01:19)
✔ compile (Nuget, MSBuild) @done (15-04-02 01:19)
✔ feature test @done (15-04-02 01:18)
✔ update dll version @done (15-04-02 01:18)
✔ restore nuget packages @done (15-04-02 01:18)
✔ compile solution @done (15-04-02 01:18)
✘ checkout AssemblyInfo.cs changes ??? @cancelled (15-04-02 01:19)
☐ test (NUnit, OpenCover)
☐ feature test
☐ find if solution have test projects for current category
☐ download test-runner if needed
☐ run tests with generation output for report generators
☐ download OpenCover if needed
☐ run test-runner inside OpenCover for coverage
☐ for service tests:
☐ generate service configuration
☐ start service
☐ run tests
☐ stop service
☐ controll that processes completed and kill zombies
☐ report (NUnit, OpenCover)
☐ feature test
☐ define categories
☐ convert output from test step into reports for OpenCover
☐ download valid nuget package with ReportGenerator
☐ convert
☐ convert output from test step into reports for NUnit
☐ download valid nuget package with ReportGenerator
☐ convert
☐ pack (Nuget)
☐ feature test
☐ generate .nuspec file per package
☐ create package
☐ push (Nuget)
☐ feature test
☐ check if contains changes from last pushed package version unless -f used
☐ push package (also for dev builds to push to local repo)
☐ release (Nuget)
☐ feature test
☐ download last package version(also for dev builds from local repo)
☐ unpack
☐ update version in .nuspec file
☐ pack again as a release version
☐ push package if needed(with push command probably)

☐ Unity 3D solutions:
✔ configure(same) @done (15-04-02 01:21)
☐ compile
☐ test
☐ report
☐ pack
☐ push
☐ release



[![Coverage Status](http://img.shields.io/coveralls/bbatsov/rubocop/master.svg)](https://coveralls.io/r/bbatsov/rubocop)
[![Code Climate](https://codeclimate.com/github/bbatsov/rubocop/badges/gpa.svg)](https://codeclimate.com/github/bbatsov/rubocop)
[![Inline docs](http://inch-ci.org/github/bbatsov/rubocop.svg)](http://inch-ci.org/github/bbatsov/rubocop)
[![Gratipay](http://img.shields.io/gratipay/bbatsov.svg)](https://www.gratipay.com/bbatsov/)
☐ Alpaca gem stack:
☐ Unity3D project stack:
☐ Visual Studio project stack:
☐ work tools:
☐ Nuget
☐ NUnit
☐ OpenCover
☐ MSBuild
☐ services:
☐ gerrit???
☐ jenkins???
☐ vagrant???
☐ review - gerrit?
☐ ci:
☐ push to review -> check(compile, test, coverage)
☐ merge -> check -> create package(pack, push)
30 changes: 15 additions & 15 deletions lib/alpaca/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module Alpaca
# Class *Application* provides methods that can
# be used by CLI and from REPL sessions
# be used by CLI
class Application
DEFAULT_SOLUTIONS_PATTERN = ['**/*.sln', '**/Assets']

Expand All @@ -14,9 +14,9 @@ class Application
# +[pattern]+:: pattern to find a solution(Array can be used)
# +[debug]+:: switch to compile solution in debug mode (false by default)
def compile(pattern = DEFAULT_SOLUTIONS_PATTERN, debug = false)
header 'Compile'
log.header 'Compile'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.compile(debug)
end
end
Expand All @@ -31,52 +31,52 @@ def test(pattern = DEFAULT_SOLUTIONS_PATTERN,
debug = false,
coverage = false,
category = 'all')
header 'Test'
log.header 'Test'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.test(debug, coverage, category)
end
end

def report(pattern = DEFAULT_SOLUTIONS_PATTERN, category = 'all')
header 'Report'
log.header 'Report'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.report(category)
end
end

def pack(pattern = DEFAULT_SOLUTIONS_PATTERN)
header 'Pack'
log.header 'Pack'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.pack
end
end

def release(pattern = DEFAULT_SOLUTIONS_PATTERN, push = true)
header 'Release'
log.header 'Release'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.release(push)
end
end

def push(pattern = DEFAULT_SOLUTIONS_PATTERN, force = false)
header 'Push'
log.header 'Push'
Solutions.each(pattern) do |solution|
log solution
log.puts solution
solution.push(force)
end
end

def configure_global(properties)
header 'Configure'
log.header 'Configure'
Configuration.set(properties)
end

def configure_local(pattern = DEFAULT_SOLUTIONS_PATTERN, properties)
header 'Configure'
log.header 'Configure'
Solutions.each(pattern) do |solution|
log solution
Configuration.new(solution).set(properties)
Expand Down
28 changes: 0 additions & 28 deletions lib/alpaca/data/.alpaca.conf
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
local_configuration: '.alpaca.conf'
no_build: ['.nobuild']
Logger:
:info:
stamp: true
prefix: ' INFO: '
color: :black
background: :green
:warn:
stamp: true
prefix: ' WARN: '
color: :black
background: :green
:error:
stamp: true
prefix: ' ERROR: '
color: :black
background: :yellow
:log:
stamp: false
prefix: ''
color: :green
bright: true
:header:
stamp: false
prefix: "\x00"
color: :green
bright: true
artify: true
font: 'doom'
MSBuild:
target: ["Clean", "Rebuild"]
verbosity: "minimal"
Expand Down
12 changes: 6 additions & 6 deletions lib/alpaca/entities/unity_solution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ def initialize(_)
end

def compile(debug)
info "Compiling in #{debug ? 'debug' : 'release'} mode"
log.info "Compiling in #{debug ? 'debug' : 'release'} mode"
end

def test(debug, _, category)
mode = debug ? 'Debug' : 'Release'
info "testing in #{mode} mode for category #{category}.."
log.info "testing in #{mode} mode for category #{category}.."
end

def report(category)
info "generating report for category #{category}.."
log.info "generating report for category #{category}.."
end

def pack
info 'creating packages :O'
log.info 'creating packages :O'
end

def release(push)
info "releasing package#{push ? ' and pushing it' : ''}"
log.info "releasing package#{push ? ' and pushing it' : ''}"
end

def push(force)
info "#{force ? 'force ' : ''}pushing package"
log.info "#{force ? 'force ' : ''}pushing package"
end
end
end
2 changes: 1 addition & 1 deletion lib/alpaca/entities/visual_studio_solution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def to_s

def compile(debug)
return if stub?
info "compiling in #{debug ? 'debug' : 'release'} mode..."
log.info "compiling in #{debug ? 'debug' : 'release'} mode..."
build_version = @semver.to_s BUILD_VERSION
@projects.each { |project| project.update_version(build_version) }
Nuget.new(@configuration['Nuget']).restore(@file) if nuget?
Expand Down

0 comments on commit 1a5969f

Please sign in to comment.