pad_gem 1.1.1 → 1.2.0

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: ae5fd562debe4188baa36603468b25d78471591d
4
- data.tar.gz: af280dff0643daf4b576ac881447a55b5c5f15ed
3
+ metadata.gz: 7095c321d3274019a9e42500412c06779ecd49c7
4
+ data.tar.gz: 8617453cc2779761a9291452d2c97ecb2369e0b9
5
5
  SHA512:
6
- metadata.gz: aa89761e41e22eca2386c79835a05fa87e772fba09cc8c1a9868360c85938f5924ac8ae8e62e3a6937a2a399ebd1f6d3c347ecbfae413d6b7acb91adb1b5602b
7
- data.tar.gz: ca0aa796633e44e38e15948d707f7ea39759f9a180feda3cb1472e792935b114d2ee3e12d85aff5bf4776bd50eb9feff10f27c47fce692092873700c61f5110f
6
+ metadata.gz: 2889f81c65adeafb839be0e4e00a65b221d8b033d44a6fc7bf72a9b091fbfb90ee00c26197e1ac8617122b2b330a653022b332ee7faa8ef7c5ce35244a8109eb
7
+ data.tar.gz: 1ab3cd69273cc45c67eeabcf0bb9eb47fa778d246449aa51ab5c86b0784cd32559a4b72d6fd9917846577cb465cf04d497a7fee06a3e09bdc0432f35258db4cc
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gem "pad_utils", ">= 1.5"
2
+ gem "pad_utils", ">= 1.6"
3
3
 
4
4
  gem 'PADGEM_GEM_RUBY_NAME', path: "../"
@@ -3,7 +3,6 @@ require 'rubygems'
3
3
  require 'bundler/setup'
4
4
  require 'pad_utils'
5
5
  require 'PADGEM_GEM_RUBY_NAME'
6
- require_relative 'helper'
7
6
 
8
7
  start_time = Time.now
9
8
  number_of_tests = 0
@@ -16,9 +15,9 @@ PadUtils.puts_c "Running tests...", :blue
16
15
  Dir["units/*_test.rb"].each do |file|
17
16
  require_relative file
18
17
 
19
- class_name = get_class_name(file)
18
+ class_name = PadUtils.filename_to_classname(file)
20
19
 
21
- clazz = Object.const_get(class_name)
20
+ clazz = PadUtils.filename_to_class(file)
22
21
  c = clazz.new(class_name)
23
22
  errors = c.run
24
23
 
@@ -30,8 +29,9 @@ Dir["units/*_test.rb"].each do |file|
30
29
  end
31
30
 
32
31
  end_time = Time.now
32
+ interval = PadUtils.interval start_time, end_time, :seconds
33
33
 
34
- PadUtils.puts_c "Finished running #{number_of_tests} tests in #{time_diff_sec start_time, end_time} seconds", :blue
34
+ PadUtils.puts_c "Finished running #{number_of_tests} tests in #{interval} seconds", :blue
35
35
  if errors_list.length > 0
36
36
  PadUtils.puts_c "--> Failed (#{errors_list.length}): ", :error
37
37
  errors_list.each do |err|
@@ -1,3 +1,3 @@
1
1
  module PadGem
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pad_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Schuele
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.6'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '1.2'
29
+ version: '1.6'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -54,7 +54,6 @@ files:
54
54
  - lib/foundation/test/Gemfile
55
55
  - lib/foundation/test/add_test.rb
56
56
  - lib/foundation/test/fixtures/.keep
57
- - lib/foundation/test/helper.rb
58
57
  - lib/foundation/test/how_to_test.txt
59
58
  - lib/foundation/test/results/.keep
60
59
  - lib/foundation/test/template/template.rb
@@ -1,15 +0,0 @@
1
- require 'pad_utils'
2
-
3
- # TODO: Use a function from PadUtils
4
- def time_diff_sec(start, finish)
5
- result = ((finish - start)).to_i
6
- result == 0 ? 1 : result
7
- end
8
-
9
- # TODO: Add this method to PadUtils
10
- def get_class_name(file)
11
- filename = File.basename file
12
- filename_no_ext = filename.gsub(".rb", "")
13
- class_name = PadUtils.camel_case(filename_no_ext)
14
- class_name
15
- end