puppet7 0.2.0.beta2 → 0.2.0.beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ module Puppet7
73
73
  end
74
74
 
75
75
  def add_js_errors page_url, js_errors
76
- js_errors.select! {|err| err[:url] and err[:line]}
76
+ js_errors.select! {|err| err["line"] != 0 or err["url"] != ""}
77
77
  return if js_errors.empty?
78
78
  @js_errors[page_url.to_sym] ||= []
79
79
  @js_errors[page_url.to_sym].concat(js_errors)
@@ -252,7 +252,7 @@ module Puppet7
252
252
  src_file = @example.metadata[:file_path]
253
253
  line = @example.metadata[:line_number]
254
254
  if File.file?(src_file)
255
- lines = File.open(src_file).read.split("\n")
255
+ lines = File.open(src_file).read.force_encoding("UTF-8").split("\n")
256
256
  min = [0, line-1].max
257
257
  unless lines[min].chomp.end_with?("do")
258
258
  return "#{min+1}:#{lines[min]}"
@@ -180,7 +180,8 @@ module Puppet7
180
180
  selenium {|s| s.is_element_present @xpath}
181
181
  end
182
182
 
183
- alias_method :element?, :is_element_present
183
+ alias_method :present?, :is_element_present
184
+ alias_method :exist?, :is_element_present
184
185
 
185
186
  def is_ordered otherLocator
186
187
  selenium {|s| s.is_ordered @xpath, get_locator(otherLocator)}
@@ -40,6 +40,7 @@ module Puppet7
40
40
  sql_id = nil
41
41
  type = nil
42
42
  File.open(file).each_line do |line|
43
+ line.force_encoding("UTF-8")
43
44
  if sql_id
44
45
  if line.strip =~ /^\// # end of sql
45
46
  @sqllist[sql_id].sql = @sqllist[sql_id].sql.join("\n")
data/lib/puppet7/utils.rb CHANGED
@@ -58,7 +58,7 @@ module Puppet7
58
58
  end
59
59
 
60
60
  def by_link link_text
61
- "//a[text()='#{link_text}']"
61
+ "//a[.//text()='#{link_text}']"
62
62
  end
63
63
 
64
64
  def by_input input_name
data/lib/puppet7.rb CHANGED
@@ -17,12 +17,15 @@ require "puppet7/puppet_report"
17
17
  require "puppet7/exceptions"
18
18
  require "puppet7/configuration"
19
19
 
20
+
21
+ require "rubygems"
22
+
20
23
  begin
21
24
  # optional loading...
22
25
  gem "dbi"
23
26
  require "puppet7/sql_exec"
24
27
  require "puppet7/sql_agent"
25
- rescue GEM::LoadError
28
+ rescue Gem::LoadError
26
29
  end
27
30
 
28
31
 
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 2
8
8
  - 0
9
- - beta2
10
- version: 0.2.0.beta2
9
+ - beta4
10
+ version: 0.2.0.beta4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yunsang Choi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-02 00:00:00 +09:00
18
+ date: 2010-12-06 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency