contur 0.0.4.1 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca922c396713143372e4984cc01ac7a9f03b70da
4
- data.tar.gz: c9de805c950ead438e00d31bfba0791636c34102
3
+ metadata.gz: 4cc15f55274e8ef8636b015778d260048a3739fb
4
+ data.tar.gz: be421ba4e37075e6487ebfcd8e3a751d8a388d87
5
5
  SHA512:
6
- metadata.gz: c87607e30bbc82f4ef3d5aa2f7f62135dd244f25d2467880dcae52629bb72565470e90e54a1136cac419ec0a0fedacfc24c29f96461bdddf4de48a5b55849d19
7
- data.tar.gz: 64bfa87966a5e7baf2c89cff3512ca67ec9b4ef1cb6cc832fb59983a86d3b70b1d13250e55dcdb214bd806460b9e4806fe238ff8ffcdf4a49fb9cb9ec1c4bcc5
6
+ metadata.gz: deae55c11f5dadd599a4a21f0c032e5ac5fc5ef474d64a23371c4e784f2971c08d2b12c6a739943455d7f80a845cc3efd09cd30afacaecad60c22a50df382bfe
7
+ data.tar.gz: 07ca765ae7b0c67252f7936d08f66af3528af0476798b15b6e912aaeac7ceb99be7157f2c18c1960a04d665ecd93c9439b5b8b1100caf5f1178050a861548783
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -13,6 +13,11 @@ Metrics/MethodLength:
13
13
  Metrics/BlockLength:
14
14
  Exclude:
15
15
  - 'contur.gemspec'
16
+ - 'spec/**/*'
17
+
18
+ Style/Documentation:
19
+ Exclude:
20
+ - 'lib/contur/version.rb'
16
21
 
17
22
  Style/GuardClause:
18
23
  Exclude:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This CHANGELOG follows [Keep a CHANGELOG](http://keepachangelog.com/).
4
4
 
5
+ ## [0.0.5] - 2016-11-21
6
+ ### Fixed
7
+ - Typo after successful image build fixed
8
+ - The before_script section was mandatory but shouldn't have been, fixed
9
+
10
+ ### Added
11
+ - Added a couple of unit tests
12
+
5
13
  ## [0.0.4.1] - 2016-11-09
6
14
  ### Fixed
7
15
  - Release notes fixed for 0.0.4
data/README.md CHANGED
@@ -5,6 +5,7 @@ Contur is an open-source command line application simplifying your local web dev
5
5
 
6
6
  [![Gem Version](https://badge.fury.io/rb/contur.svg)](https://badge.fury.io/rb/contur)
7
7
  [![Build Status](https://travis-ci.org/Cheppers/contur.svg?branch=master)](https://travis-ci.org/Cheppers/contur)
8
+ [![Coverage Status](https://coveralls.io/repos/github/Cheppers/contur/badge.svg)](https://coveralls.io/github/Cheppers/contur)
8
9
 
9
10
  ## Requirements
10
11
  * Ruby 2.3.0+ (recommended installation method [via rvm](https://rvm.io/rvm/install))
data/bin/contur CHANGED
@@ -31,7 +31,7 @@ class ConturCLI < Thor
31
31
  end
32
32
  print "\n"
33
33
  $stdout.flush
34
- puts 'Image build successfully'.green
34
+ puts 'Image built successfully'.green
35
35
  end
36
36
 
37
37
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
data/contur.gemspec CHANGED
@@ -37,4 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency 'rake', '~> 10.0'
38
38
  spec.add_development_dependency 'rubocop', '~> 0.44'
39
39
  spec.add_development_dependency 'rspec', '~> 3.0'
40
+ spec.add_development_dependency 'coveralls'
41
+ spec.add_development_dependency 'simplecov', '~> 0.12'
42
+ spec.add_development_dependency 'simplecov-console', '~> 0.3'
40
43
  end
@@ -3,17 +3,14 @@ module Contur
3
3
  class Config
4
4
  # Before section
5
5
  class Before < Array
6
- # before_commands is required so no default value
7
- def initialize(before_commands)
6
+ def initialize(before_commands = [])
8
7
  super([])
9
8
  validate!(before_commands)
10
9
  replace(before_commands) unless before_commands.nil?
11
10
  end
12
11
 
13
- def validate!(before_commands)
12
+ def validate!(_before_commands)
14
13
  @errors = []
15
- @errors << 'Required' if before_commands.nil?
16
- @errors << 'Cannot be empty' if before_commands == []
17
14
  end
18
15
 
19
16
  attr_reader :errors
data/lib/contur/config.rb CHANGED
@@ -12,6 +12,7 @@ module Contur
12
12
  class Config
13
13
  attr_reader :path, :raw, :version, :use, :env, :before
14
14
 
15
+ # @TODO refactor this to expect a string not a path, read the file in the controller
15
16
  def initialize(path_to_config)
16
17
  begin
17
18
  @path = path_to_config
@@ -22,7 +23,7 @@ module Contur
22
23
 
23
24
  @errors = []
24
25
  unless build_config
25
- @errors << 'Build file is empty'
26
+ @errors << 'File: Build file is empty'
26
27
  return
27
28
  end
28
29
 
@@ -6,6 +6,8 @@ require 'contur/bindable_hash'
6
6
  require 'contur/config'
7
7
  require 'contur/utils'
8
8
 
9
+ # @TODO: Because of the Docker calls this is not very unit-testable. Write cucumber tests.
10
+
9
11
  # rubocop:disable Metrics/ClassLength, Lint/AssignmentInCondition
10
12
 
11
13
  # Contur main module
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Contur
3
- VERSION = '0.0.4.1'
4
+ VERSION ||= '0.0.5'
4
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.1
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cheppers Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-09 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -148,6 +148,48 @@ dependencies:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '3.0'
151
+ - !ruby/object:Gem::Dependency
152
+ name: coveralls
153
+ requirement: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ type: :development
159
+ prerelease: false
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ - !ruby/object:Gem::Dependency
166
+ name: simplecov
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '0.12'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '0.12'
179
+ - !ruby/object:Gem::Dependency
180
+ name: simplecov-console
181
+ requirement: !ruby/object:Gem::Requirement
182
+ requirements:
183
+ - - "~>"
184
+ - !ruby/object:Gem::Version
185
+ version: '0.3'
186
+ type: :development
187
+ prerelease: false
188
+ version_requirements: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - "~>"
191
+ - !ruby/object:Gem::Version
192
+ version: '0.3'
151
193
  description: Contur is an open-source command line application simplifying your local
152
194
  web development environment. It hosts your site using Docker containers so you don't
153
195
  have to install Apache, MySQL, PHP and PHP extensions on your own machine. Contur