cornucopia 0.1.52 → 0.1.53

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: a8654f76bbbd286c648846c8d32fd7c0cfbc89a0
4
- data.tar.gz: cf9866cd5994a913bacea481c27aa54867a09827
3
+ metadata.gz: 7a3dc40d384cccf40c5266473b60fe5dac6905ba
4
+ data.tar.gz: ff9bcbc57aba3e739ad91f796171339539803f2b
5
5
  SHA512:
6
- metadata.gz: 6b367e0650fa033324afab07ed7653d4cd911e7ad81cf136251be621b328d06cbcb0dc51ecdc8c5eafa12cb14c6abedbb9b0bef1f654b85749053b6ef3e14d22
7
- data.tar.gz: 04ba32dbc0f79f510fe9771c6e5f65b55773b3223fe213325440d3861c50aab90c68f2eaa1b4bee1715d83d4e9ddf8fa09519dade2ee91dbc805a87e6e8ccbac
6
+ metadata.gz: 8999360f8d8078120a7692979229dcc5d23441d7b174c0bf153f24648a04f10e79272436213a1227f72edeeb1bc11224d13504cc6699e987333d5d482bd5a806
7
+ data.tar.gz: 4c9843bca5facaf8e664046aa8c1e0bb1dda3fd25bb96e7ec838f860f19662134f17554d26b0cd7aa819d71cb4cd4f81e6ccfee6b3193e77b68cc285b9dab52b
@@ -11,8 +11,8 @@ module Cornucopia
11
11
  extend ActiveSupport::Concern
12
12
 
13
13
  included do
14
- alias_method :__cornucopia_orig_find, :find
15
- alias_method :__cornucopia_orig_all, :all
14
+ alias_method :__cornucopia_capybara_orig_find, :find
15
+ alias_method :__cornucopia_capybara_orig_all, :all
16
16
 
17
17
  define_method :find do |*args, &block|
18
18
  __cornucopia_finder_function(:find, *args, &block)
@@ -31,12 +31,12 @@ module Cornucopia
31
31
 
32
32
  begin
33
33
  retry_count += 1
34
- result = send("__cornucopia_orig_#{finder_function}", *args, &block)
34
+ result = send("__cornucopia_capybara_orig_#{finder_function}", *args, &block)
35
35
  rescue Selenium::WebDriver::Error::StaleElementReferenceError
36
36
  retry if __cornucopia__retry_finder(retry_count, support_options)
37
37
 
38
38
  result = __cornucopia__analyze_finder(finder_function, support_options, *args, &block)
39
- rescue Exception
39
+ rescue StandardError
40
40
  result = __cornucopia__analyze_finder(finder_function, support_options, *args, &block)
41
41
  end
42
42
 
@@ -11,10 +11,10 @@ module Cornucopia
11
11
  extend ActiveSupport::Concern
12
12
 
13
13
  included do
14
- alias_method :__cornucopia_orig_assert_selector, :assert_selector
15
- alias_method :__cornucopia_orig_assert_no_selector, :assert_no_selector
16
- alias_method :__cornucopia_orig_has_selector?, :has_selector?
17
- alias_method :__cornucopia_orig_has_no_selector?, :has_no_selector?
14
+ alias_method :__cornucopia_capybara_orig_assert_selector, :assert_selector
15
+ alias_method :__cornucopia_capybara_orig_assert_no_selector, :assert_no_selector
16
+ alias_method :__cornucopia_capybara_orig_has_selector?, :has_selector?
17
+ alias_method :__cornucopia_capybara_orig_has_no_selector?, :has_no_selector?
18
18
 
19
19
  define_method :assert_selector do |*args|
20
20
  __cornucopia_assert_selector_function(:assert_selector, *args)
@@ -59,7 +59,7 @@ module Cornucopia
59
59
 
60
60
  begin
61
61
  retry_count += 1
62
- result = send("__cornucopia_orig_#{assert_selector_function}", *args)
62
+ result = send("__cornucopia_capybara_orig_#{assert_selector_function}", *args)
63
63
  rescue Selenium::WebDriver::Error::StaleElementReferenceError
64
64
  retry if __cornucopia__retry_selector(retry_count, support_options)
65
65
 
@@ -9,13 +9,13 @@ module Cornucopia
9
9
 
10
10
  included do
11
11
  ::Capybara::Session::DSL_METHODS.each do |method|
12
- alias_method "__cornucopia_orig_#{method}".to_sym, method
12
+ alias_method "__cornucopia_site_prism_orig_#{method}".to_sym, method
13
13
 
14
14
  define_method method do |*args, &block|
15
15
  if @__corunucopia_base_node
16
16
  @__corunucopia_base_node.send method, *args, &block
17
17
  else
18
- send "__cornucopia_orig_#{method}", *args, &block
18
+ send "__cornucopia_site_prism_orig_#{method}", *args, &block
19
19
  end
20
20
  end
21
21
  end
@@ -9,10 +9,10 @@ module Cornucopia
9
9
 
10
10
  included do |base|
11
11
  base.class_exec do
12
- alias :__cornucopia_orig_initialize :initialize
12
+ alias :__cornucopia_site_prism_orig_initialize :initialize
13
13
 
14
14
  def initialize(*args)
15
- __cornucopia_orig_initialize(*args)
15
+ __cornucopia_site_prism_orig_initialize(*args)
16
16
 
17
17
  self.owner_node = args[0].owner_node
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Cornucopia
2
- VERSION = "0.1.52"
2
+ VERSION = "0.1.53"
3
3
  end
@@ -47,7 +47,7 @@ describe Cornucopia::Capybara::FinderExtensions, type: :feature do
47
47
  num_calls = 0
48
48
 
49
49
  allow(contents_frame.page.document).
50
- to receive(:__cornucopia_orig_all) do |*args|
50
+ to receive(:__cornucopia_capybara_orig_all) do |*args|
51
51
  num_calls += 1
52
52
 
53
53
  if time_count > 0
@@ -62,7 +62,7 @@ describe Cornucopia::Capybara::FinderExtensions, type: :feature do
62
62
  second_found = contents_frame.all("a")
63
63
 
64
64
  allow(contents_frame.page.document).
65
- to receive(:__cornucopia_orig_all).
65
+ to receive(:__cornucopia_capybara_orig_all).
66
66
  and_call_original
67
67
 
68
68
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
@@ -89,14 +89,14 @@ describe Cornucopia::Capybara::FinderExtensions, type: :feature do
89
89
  and_return(found_elements)
90
90
 
91
91
  allow(contents_frame.page.document).
92
- to receive(:__cornucopia_orig_all) do |*args|
92
+ to receive(:__cornucopia_capybara_orig_all) do |*args|
93
93
  raise Selenium::WebDriver::Error::StaleElementReferenceError.new
94
94
  end
95
95
 
96
96
  second_found = contents_frame.all("a")
97
97
 
98
98
  allow(contents_frame.page.document).
99
- to receive(:__cornucopia_orig_all).
99
+ to receive(:__cornucopia_capybara_orig_all).
100
100
  and_call_original
101
101
 
102
102
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
@@ -121,14 +121,14 @@ describe Cornucopia::Capybara::FinderExtensions, type: :feature do
121
121
  and_return(found_elements)
122
122
 
123
123
  allow(contents_frame.page.document).
124
- to receive(:__cornucopia_orig_find) do |*args|
124
+ to receive(:__cornucopia_capybara_orig_find) do |*args|
125
125
  raise "This is an error"
126
126
  end
127
127
 
128
128
  second_found = contents_frame.find(".report-block")
129
129
 
130
130
  allow(contents_frame.page.document).
131
- to receive(:__cornucopia_orig_find).
131
+ to receive(:__cornucopia_capybara_orig_find).
132
132
  and_call_original
133
133
 
134
134
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
@@ -47,7 +47,7 @@ describe Cornucopia::Capybara::MatcherExtensions, type: :feature do
47
47
  num_calls = 0
48
48
 
49
49
  allow(contents_frame.page.document).
50
- to receive(:__cornucopia_orig_assert_selector) do |*args|
50
+ to receive(:__cornucopia_capybara_orig_assert_selector) do |*args|
51
51
  num_calls += 1
52
52
 
53
53
  if time_count > 0
@@ -62,7 +62,7 @@ describe Cornucopia::Capybara::MatcherExtensions, type: :feature do
62
62
  second_found = contents_frame.assert_selector("a")
63
63
 
64
64
  allow(contents_frame.page.document).
65
- to receive(:__cornucopia_orig_assert_selector).
65
+ to receive(:__cornucopia_capybara_orig_assert_selector).
66
66
  and_call_original
67
67
 
68
68
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
@@ -89,14 +89,14 @@ describe Cornucopia::Capybara::MatcherExtensions, type: :feature do
89
89
  and_return(found_elements)
90
90
 
91
91
  allow(contents_frame.page.document).
92
- to receive(:__cornucopia_orig_assert_selector) do |*args|
92
+ to receive(:__cornucopia_capybara_orig_assert_selector) do |*args|
93
93
  raise Selenium::WebDriver::Error::StaleElementReferenceError.new
94
94
  end
95
95
 
96
96
  second_found = contents_frame.assert_selector("a")
97
97
 
98
98
  allow(contents_frame.page.document).
99
- to receive(:__cornucopia_orig_assert_selector).
99
+ to receive(:__cornucopia_capybara_orig_assert_selector).
100
100
  and_call_original
101
101
 
102
102
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
@@ -121,14 +121,14 @@ describe Cornucopia::Capybara::MatcherExtensions, type: :feature do
121
121
  and_return(found_elements)
122
122
 
123
123
  allow(contents_frame.page.document).
124
- to receive(:__cornucopia_orig_assert_no_selector) do |*args|
124
+ to receive(:__cornucopia_capybara_orig_assert_no_selector) do |*args|
125
125
  raise "This is an error"
126
126
  end
127
127
 
128
128
  second_found = contents_frame.assert_no_selector(".report-block")
129
129
 
130
130
  allow(contents_frame.page.document).
131
- to receive(:__cornucopia_orig_assert_no_selector).
131
+ to receive(:__cornucopia_capybara_orig_assert_no_selector).
132
132
  and_call_original
133
133
 
134
134
  # I realize that this is almost like testing that the stub worked, which we don't need to test.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cornucopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.52
4
+ version: 0.1.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - RealNobody
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-02 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport