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 +4 -4
- data/lib/foundation/test/Gemfile +1 -1
- data/lib/foundation/test/test_runner.rb +4 -4
- data/lib/pad_gem/version.rb +1 -1
- metadata +3 -4
- data/lib/foundation/test/helper.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7095c321d3274019a9e42500412c06779ecd49c7
|
4
|
+
data.tar.gz: 8617453cc2779761a9291452d2c97ecb2369e0b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2889f81c65adeafb839be0e4e00a65b221d8b033d44a6fc7bf72a9b091fbfb90ee00c26197e1ac8617122b2b330a653022b332ee7faa8ef7c5ce35244a8109eb
|
7
|
+
data.tar.gz: 1ab3cd69273cc45c67eeabcf0bb9eb47fa778d246449aa51ab5c86b0784cd32559a4b72d6fd9917846577cb465cf04d497a7fee06a3e09bdc0432f35258db4cc
|
data/lib/foundation/test/Gemfile
CHANGED
@@ -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 =
|
18
|
+
class_name = PadUtils.filename_to_classname(file)
|
20
19
|
|
21
|
-
clazz =
|
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 #{
|
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|
|
data/lib/pad_gem/version.rb
CHANGED
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.
|
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.
|
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.
|
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
|