capybara_error_intel 1.1.0 → 1.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dd3ed928524f6ff13429a6e96f7981d05c2d158c0f6ab5e87e5af8aac66c6a4
4
- data.tar.gz: 3a9a9653e48ba39119e434b03d020393b040b92be15b5e0b6a553ecc729074ea
3
+ metadata.gz: 9acc4da6a1c2fd22a603bdc16a80956ae92df1a0b7e38f1518fc6f79a913b3fc
4
+ data.tar.gz: 4635c229c82d48c47f7018dc7f7efc60da5cc452276068537eeedbddf1643690
5
5
  SHA512:
6
- metadata.gz: 3a5733d4daa7833b7af20c2a2083d83e060bbad7b85f73aaebcfb188284ba354ff417ed79bf097c6fe0093b988c3f68350f10655cf7fd6923d9d45378c44f75b
7
- data.tar.gz: 47d4470bbe114454303886da0e06aced64537dc3507eb92c875cd6b0823a9da16025de8fad507ace662e0d19b1661e4831370df087972e9b2e8a85c273745e66
6
+ metadata.gz: 8ce00c1d62424f3a98ab34b7ae03e4bd2e5ed9ddf2302425a49ad421e2f13e476136225d67cf4a69a2b4be26b03f87658159c7b66b9064174111b0fa1e932643
7
+ data.tar.gz: 3881fc23deba4ec0da2e9306b00d3ec14c2d3dc54f7c14622827d1bf34998311003fff05d23afa0d01fbe02a5ef8f474ca9c58931d26bfe451bff68907c2d6c6
@@ -1,9 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
+ - 2.6.3
4
5
  - 2.3.1
5
- - 2.2.0
6
- - 2.1.0
7
6
  before_install: gem install bundler -v 1.12.5
8
7
  addons:
9
8
  code_climate:
@@ -1,3 +1,7 @@
1
+ # v1.1.1
2
+
3
+ - Support capybara 3.14 module rename (thanks @tmock12) [Read More](https://github.com/dkarter/capybara_error_intel/pull/6)
4
+
1
5
  # v1.1.0
2
6
 
3
7
  - Allow Capybara 3.x, update spec for proper error text (thanks @geoffharcourt)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in CapybaraErrorIntel.gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![CapybaraErrorIntel](img/CapybaraErrorIntel.png)
2
2
 
3
- [![Build Status](https://travis-ci.org/dkarter/capybara_error_intel.svg?branch=master)](https://travis-ci.org/dkarter/capybara_error_intel) [![CircleCI](https://circleci.com/gh/dkarter/capybara_error_intel.svg?style=svg)](https://circleci.com/gh/dkarter/capybara_error_intel) [![Code Climate](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/gpa.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel) [![Test Coverage](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/coverage.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel/coverage) [![Issue Count](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/issue_count.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel) [![Gem Version](https://badge.fury.io/rb/capybara_error_intel.svg)](https://badge.fury.io/rb/capybara_error_intel) ![downloads counter](http://ruby-gem-downloads-badge.herokuapp.com/capybara_error_intel)
3
+ [![Build Status](https://travis-ci.org/dkarter/capybara_error_intel.svg?branch=master)](https://travis-ci.org/dkarter/capybara_error_intel) [![Code Climate](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/gpa.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel) [![Test Coverage](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/coverage.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel/coverage) [![Issue Count](https://codeclimate.com/github/dkarter/capybara_error_intel/badges/issue_count.svg)](https://codeclimate.com/github/dkarter/capybara_error_intel) [![Gem Version](https://badge.fury.io/rb/capybara_error_intel.svg)](https://badge.fury.io/rb/capybara_error_intel) ![downloads counter](http://ruby-gem-downloads-badge.herokuapp.com/capybara_error_intel)
4
4
 
5
5
  Capybara provides excellent error messages for its built in predicate methods: `has_selector?`, `has_text?`, `has_title?` etc., but when those are used from Page Objects while exposing predicate methods from the PageObjects themselves the error messages are lost and all we get is `expected true, got false`. Including this module into your PageObject by adding `include CapybaraErrorIntel::DSL` after `include Capybara::DSL` will return the heuristic error messages.
6
6
 
@@ -118,6 +118,13 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
118
118
 
119
119
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
120
120
 
121
+ ## Releasing a New Version
122
+ 0. Add a version header to the top of CHANGELOG.md and list all changes as
123
+ bullets below the new version number
124
+ 1. Change the version number in `lib/capybara_error_intel/version.rb`
125
+ 2. In the project's directory run `gem build capybara_error_intel.gemspec`
126
+ 3. Push the gem to RubyGems `gem push capybara_error_intel-##VERSION##.gem`
127
+
121
128
  ## Contributing
122
129
 
123
130
  Bug reports and pull requests are welcome on GitHub at
@@ -126,8 +133,6 @@ https://github.com/dkarter/capybara_error_intel
126
133
  Please make sure the test suite passes and that you added tests for any new
127
134
  method implemented.
128
135
 
129
-
130
-
131
136
  ## License
132
137
 
133
138
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
  require 'rubocop/rake_task'
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ # frozen_string_literal: true
4
+
3
5
  require 'bundler/setup'
4
6
  require 'capybara_error_intel'
5
7
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'capybara_error_intel/version'
2
4
  require 'capybara_error_intel/dsl'
3
5
  require 'capybara'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module CapybaraErrorIntel
2
4
  # Wraps Capybara::DSL
3
5
  module DSL
@@ -52,15 +54,23 @@ module CapybaraErrorIntel
52
54
  private
53
55
 
54
56
  def has_selector(*args)
55
- Capybara::RSpecMatchers::HaveSelector.new(*args)
57
+ capybara_matcher_module::HaveSelector.new(*args)
56
58
  end
57
59
 
58
60
  def has_text(*args)
59
- Capybara::RSpecMatchers::HaveText.new(*args)
61
+ capybara_matcher_module::HaveText.new(*args)
60
62
  end
61
63
 
62
64
  def has_title(title, options)
63
- Capybara::RSpecMatchers::HaveTitle.new(title, options)
65
+ capybara_matcher_module::HaveTitle.new(title, options)
66
+ end
67
+
68
+ def capybara_matcher_module
69
+ if Capybara::VERSION.to_f >= 3.14
70
+ Capybara::RSpecMatchers::Matchers
71
+ else
72
+ Capybara::RSpecMatchers
73
+ end
64
74
  end
65
75
 
66
76
  def match_or_error(matcher)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module CapybaraErrorIntel
2
- VERSION = '1.1.0'.freeze
4
+ VERSION = '1.1.1'
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_error_intel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Karter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-14 00:00:00.000000000 Z
11
+ date: 2019-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -291,8 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  - !ruby/object:Gem::Version
292
292
  version: '0'
293
293
  requirements: []
294
- rubyforge_project:
295
- rubygems_version: 2.7.3
294
+ rubygems_version: 3.0.3
296
295
  signing_key:
297
296
  specification_version: 4
298
297
  summary: Provides Capybara's heuristic error messages for Page Objects