techcor 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ end
9
9
  desc "Creates bunch of test data in database"
10
10
  task :seed do
11
11
  require_relative 'db/seed'
12
- seed
12
+ Techcor::Seed.seed
13
13
  end
14
14
 
15
15
  desc "Run Cucumber & RSpec to generate aggregated coverage"
data/db/seed.rb CHANGED
@@ -1,37 +1,3 @@
1
1
  ENV['RACK_ENV'] ||= 'development'
2
2
 
3
- require_relative '../lib/techcor'
4
-
5
- def seed
6
- Project.delete_all
7
-
8
- user = 'a.shestakov'
9
-
10
- ProjectCatalog.new.
11
- add_project(
12
- Project.new(name: 'TC').
13
- add_metric(StringMetric.new(name: 'Technology').edit('Ruby', user)).
14
- add_metric(BooleanMetric.new(name: 'Active').edit(true, user)).
15
- add_metric(StringMetric.new(name: 'SCM').edit('http://github.com/maksar/techcor', user)).
16
- add_metric(StringMetric.new(name: 'CI').edit('http://travis-ci.org/#!/maksar/techcor', user)).
17
- add_metric(NumberMetric.new(name: 'Unit Tests Coverage').edit(98.55, user)).
18
- add_metric(NumberMetric.new(name: 'Unit Tests Count').edit(40, user)).
19
- add_metric(NumberMetric.new(name: 'Cucumber Tests Coverage').edit(92.68, user)).
20
- add_metric(NumberMetric.new(name: 'Cucumber Tests Count').edit(10, user)).
21
- add_metric(NumberMetric.new(name: 'Tests Coverage').edit(100, user)).
22
- edit_property('Unit Tests Count', 45, user).
23
- edit_property('Unit Tests Count', 60, user).
24
- edit_property('Unit Tests Count', 100, user).
25
- edit_property('Unit Tests Coverage', 99, user).
26
- edit_property('Unit Tests Coverage', 100, user)
27
- ).
28
- add_project(Project.new(name: 'Anagrams').
29
- add_metric(StringMetric.new(name: 'Technology').edit('Ruby', user)).
30
- add_metric(BooleanMetric.new(name: 'Active').edit(false, user)).
31
- add_metric(StringMetric.new(name: 'SCM').edit('http://github.com/maksar/anagrams', user)).
32
- add_metric(StringMetric.new(name: 'CI').edit('http://travis-ci.org/#!/maksar/anagrams', user)).
33
- add_metric(NumberMetric.new(name: 'Unit Tests Coverage').edit(100, user)).
34
- add_metric(NumberMetric.new(name: 'Unit Tests Count').edit(6, user)).
35
- add_metric(NumberMetric.new(name: 'Tests Coverage').edit(100, 'john.dow'))).
36
- save
37
- end
3
+ require_relative '../lib/techcor'
@@ -1,4 +1,4 @@
1
1
  Given /^catalog filled by seeds script$/ do
2
2
  require_relative '../../db/seed'
3
- seed
3
+ Techcor::Seed.seed
4
4
  end
@@ -0,0 +1,37 @@
1
+ module Techcor
2
+ class Seed
3
+ def self.seed
4
+ Project.delete_all
5
+
6
+ user = 'a.shestakov'
7
+
8
+ ProjectCatalog.new.
9
+ add_project(
10
+ Project.new(name: 'TC').
11
+ add_metric(StringMetric.new(name: 'Technology').edit('Ruby', user)).
12
+ add_metric(BooleanMetric.new(name: 'Active').edit(true, user)).
13
+ add_metric(StringMetric.new(name: 'SCM').edit('http://github.com/maksar/techcor', user)).
14
+ add_metric(StringMetric.new(name: 'CI').edit('http://travis-ci.org/#!/maksar/techcor', user)).
15
+ add_metric(NumberMetric.new(name: 'Unit Tests Coverage').edit(98.55, user)).
16
+ add_metric(NumberMetric.new(name: 'Unit Tests Count').edit(40, user)).
17
+ add_metric(NumberMetric.new(name: 'Cucumber Tests Coverage').edit(92.68, user)).
18
+ add_metric(NumberMetric.new(name: 'Cucumber Tests Count').edit(10, user)).
19
+ add_metric(NumberMetric.new(name: 'Tests Coverage').edit(100, user)).
20
+ edit_property('Unit Tests Count', 45, user).
21
+ edit_property('Unit Tests Count', 60, user).
22
+ edit_property('Unit Tests Count', 100, user).
23
+ edit_property('Unit Tests Coverage', 99, user).
24
+ edit_property('Unit Tests Coverage', 100, user)
25
+ ).
26
+ add_project(Project.new(name: 'Anagrams').
27
+ add_metric(StringMetric.new(name: 'Technology').edit('Ruby', user)).
28
+ add_metric(BooleanMetric.new(name: 'Active').edit(false, user)).
29
+ add_metric(StringMetric.new(name: 'SCM').edit('http://github.com/maksar/anagrams', user)).
30
+ add_metric(StringMetric.new(name: 'CI').edit('http://travis-ci.org/#!/maksar/anagrams', user)).
31
+ add_metric(NumberMetric.new(name: 'Unit Tests Coverage').edit(100, user)).
32
+ add_metric(NumberMetric.new(name: 'Unit Tests Count').edit(6, user)).
33
+ add_metric(NumberMetric.new(name: 'Tests Coverage').edit(100, 'john.dow'))).
34
+ save
35
+ end
36
+ end
37
+ end
@@ -2,7 +2,7 @@ class Techcor
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 5
5
+ PATCH = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
data/lib/techcor.rb CHANGED
@@ -24,4 +24,5 @@ require 'commands/view_history'
24
24
  require 'commands/describe_project'
25
25
  require 'storage/metric_mongo'
26
26
  require 'storage/project_mongo'
27
- require 'storage/property_value_mongo'
27
+ require 'storage/property_value_mongo'
28
+ require 'techcor/seed'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: techcor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -263,6 +263,7 @@ files:
263
263
  - lib/storage/project_mongo.rb
264
264
  - lib/storage/property_value_mongo.rb
265
265
  - lib/techcor.rb
266
+ - lib/techcor/seed.rb
266
267
  - lib/techcor/version.rb
267
268
  - spec/integration/mongo_spec.rb
268
269
  - spec/lib/commands/add_metric_spec.rb
@@ -297,7 +298,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
297
298
  version: '0'
298
299
  segments:
299
300
  - 0
300
- hash: 3110712612447781352
301
+ hash: -380971306218558946
301
302
  required_rubygems_version: !ruby/object:Gem::Requirement
302
303
  none: false
303
304
  requirements: