Ifd_Automation 0.1.4 → 0.1.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: 9713128b531979c5e9a5b5dceba2661060cc4923
4
- data.tar.gz: b1741af05eb0cd77877f852551742c8d634d6ce5
3
+ metadata.gz: 450b7abaab5c5afe5b513edf453af297a0e8d987
4
+ data.tar.gz: a5a47b0dc93f2bd3c027658e1a73515664fac457
5
5
  SHA512:
6
- metadata.gz: fc47dc458f7de2ae66a0755a630ff700f04f4f1f72c7ee2ea656eb3e0343de3bc5540d805fb6d9bf0b652d3dfbfb2c3150054b4263f2e69479870cbb01bf343c
7
- data.tar.gz: 168fa80eceb5f21e0e7afc7f11a88b7832821b78d155ffc8db52b772820af3457aa1309134d79be48ffd1da97407e32903234418296079c9b45ac2c41bc07e4d
6
+ metadata.gz: 2a8f2fe476bd8a9c0c2ff47f3d2cb7712d2a4fa213bef840ba213833c07996405dfdc2502854a20fdc2aefbad7a16bcb004a2df2ed2ee34f01a5ba50ce4fa81e
7
+ data.tar.gz: a347f743072190ce6bc43b75d3c0abf500498f56f265147b8ebf7bf0267bc92bf52ff1c45076d461d4e86178f1b9c68d7d542d9df071cfa7d47ba8c0524c9b34
@@ -55,37 +55,37 @@ Then /^I should receive the mail from "(.*)" with subject "(.*)" and Email conte
55
55
  raise "WARNING: *** No new Email is found"
56
56
  end
57
57
  end
58
-
59
- Then /^I send the email to "(.*)" with subject is "(.*)" and email body template in "(.*)" file and following conditions:$/ do |to_address, subject, file, data_table|
60
- data_file = File.read($test_data_dir + file)
61
- filepath = ($test_data_dir + file)
62
- body_email = data_file.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace, :replace => "'").encode('UTF-8')
63
- if File.exist?(filepath)
64
- raw_data = JSON.parse(JSON.generate(data_table))
65
- header = raw_data[0]
66
- value = raw_data[1]
67
- $test = String.new
68
- $i = 0
69
- body_email.each_line do |lines|
70
- header.zip(value).each do |headers, values|
71
- group1, group2, group3= lines.match(/(^.*)(:)(.*)/i).try(:captures)
72
- if headers == group1 && group1.size > 0
73
- $new_value = lines.gsub(group3, " #{values}")
74
- $test += "#{$new_value}"
75
- $i = 1
76
- break
77
- elsif headers == "taaknummer"
78
- $new_value = lines.gsub("[TASKID]", " #{values}")
79
- $test += "#{$new_value}"
80
- $i = 1
81
- else
82
- $i = 0
83
- end
84
- end
85
- if $i == 0
86
- $test += "#{lines}"
87
- end
88
- end
89
- IFD_Email.send_email(to_address, subject, $test)
90
- end
91
- end
58
+ #
59
+ # Then /^I send the email to "(.*)" with subject is "(.*)" and email body template in "(.*)" file and following conditions:$/ do |to_address, subject, file, data_table|
60
+ # data_file = File.read($test_data_dir + file)
61
+ # filepath = ($test_data_dir + file)
62
+ # body_email = data_file.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace, :replace => "'").encode('UTF-8')
63
+ # if File.exist?(filepath)
64
+ # raw_data = JSON.parse(JSON.generate(data_table))
65
+ # header = raw_data[0]
66
+ # value = raw_data[1]
67
+ # $test = String.new
68
+ # $i = 0
69
+ # body_email.each_line do |lines|
70
+ # header.zip(value).each do |headers, values|
71
+ # group1, group2, group3= lines.match(/(^.*)(:)(.*)/i).try(:captures)
72
+ # if headers == group1 && group1.size > 0
73
+ # $new_value = lines.gsub(group3, " #{values}")
74
+ # $test += "#{$new_value}"
75
+ # $i = 1
76
+ # break
77
+ # elsif headers == "taaknummer"
78
+ # $new_value = lines.gsub("[TASKID]", " #{values}")
79
+ # $test += "#{$new_value}"
80
+ # $i = 1
81
+ # else
82
+ # $i = 0
83
+ # end
84
+ # end
85
+ # if $i == 0
86
+ # $test += "#{lines}"
87
+ # end
88
+ # end
89
+ # IFD_Email.send_email(to_address, subject, $test)
90
+ # end
91
+ # end
@@ -58,8 +58,8 @@ Then /^I should ( not)? see data in table "([^\"]*)" on "([^\"]*)" schema in dat
58
58
  end
59
59
  # Step used to check if data exists in database or not with condition in file
60
60
  Then /^I should ( not)? see data in schema "(.*)" database with SQL query in file "(.*)"$/ do |negative, schema, file|
61
- sql = File.read($test_data_dir + file)
62
- filepath = ($test_data_dir + file)
61
+ sql = File.read($sql_dir + file)
62
+ filepath = ($sql_dir + file)
63
63
  if File.exist?(filepath)
64
64
  begin
65
65
  rs = DatabaseMethods.execute_select(schema, sql)
@@ -1,5 +1,5 @@
1
1
  module Ifd
2
2
  module Automation
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber