vcloud-tools-tester 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## 0.0.2 (2014-05-09)
2
+
3
+ Features:
4
+
5
+ - Raise a useful error if config file is missing
6
+
7
+ ## 0.0.1 (2014-05-06)
8
+
9
+ - First release of gem
data/README.md CHANGED
@@ -18,9 +18,13 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install vcloud-tools-tester
20
20
 
21
- ## Usage
21
+ ## Testing
22
22
 
23
- TODO
23
+ Run the default suite of tests (e.g. lint, unit, features):
24
+
25
+ bundle exec rake
26
+
27
+ There are no integration tests for this project.
24
28
 
25
29
  ## Contributing
26
30
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
- task :default => [:spec]
3
+ task :default => [:rubocop, :spec]
4
4
 
5
5
  RSpec::Core::RakeTask.new(:spec) do |task|
6
6
  task.pattern = FileList['spec/vcloud/**/*_spec.rb']
@@ -11,3 +11,9 @@ task :publish_gem do
11
11
  gem = GemPublisher.publish_if_updated("vcloud-tools-tester.gemspec", :rubygems)
12
12
  puts "Published #{gem}" if gem
13
13
  end
14
+
15
+ require 'rubocop/rake_task'
16
+
17
+ Rubocop::RakeTask.new(:rubocop) do |task|
18
+ task.options = ['--lint']
19
+ end
@@ -10,6 +10,9 @@ module Vcloud
10
10
  end
11
11
 
12
12
  def load_config(config_file)
13
+ unless File.exist?(config_file)
14
+ raise ArgumentError.new("Missing required file: #{config_file}")
15
+ end
13
16
  organization = ENV['FOG_CREDENTIAL']
14
17
  all_config = YAML::load(File.open(config_file))
15
18
  @input_config = all_config[organization]
@@ -1,7 +1,7 @@
1
1
  module Vcloud
2
2
  module Tools
3
3
  module Tester
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -31,6 +31,13 @@ module Vcloud::Tools::Tester
31
31
  expect(test_vdc).to eq("minimal-vdc-name")
32
32
  end
33
33
 
34
+ it "gives a useful error when there is no config file" do
35
+ ENV['FOG_CREDENTIAL'] = 'minimal-organisation'
36
+ expect {
37
+ TestParameters.new("#{@data_dir}/non_existent_testing_config.yaml")
38
+ }.to raise_error(ArgumentError, /Missing required file/)
39
+ end
40
+
34
41
  end
35
42
 
36
43
  context "parameters required for integration tests" do
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
+ spec.add_development_dependency 'rubocop'
20
21
  spec.add_development_dependency 'gem_publisher', '1.2.0'
21
22
  spec.add_development_dependency 'rake'
22
23
  spec.add_development_dependency 'rspec', '~> 2.14.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcloud-tools-tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-06 00:00:00.000000000 Z
12
+ date: 2014-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rubocop
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: gem_publisher
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -67,6 +83,7 @@ extensions: []
67
83
  extra_rdoc_files: []
68
84
  files:
69
85
  - .gitignore
86
+ - CHANGELOG.md
70
87
  - Gemfile
71
88
  - LICENSE.txt
72
89
  - README.md
@@ -95,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
112
  version: '0'
96
113
  segments:
97
114
  - 0
98
- hash: 2485846201161240817
115
+ hash: -483193480955598996
99
116
  required_rubygems_version: !ruby/object:Gem::Requirement
100
117
  none: false
101
118
  requirements:
@@ -104,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
121
  version: '0'
105
122
  segments:
106
123
  - 0
107
- hash: 2485846201161240817
124
+ hash: -483193480955598996
108
125
  requirements: []
109
126
  rubyforge_project:
110
127
  rubygems_version: 1.8.23