capybara_helpers 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6266efd6abc13531516c8effa0d683cf193ef422a31ebdce7283f8bc0ee6508a
4
+ data.tar.gz: 35564cbde984bd05a93d22515c509a9ebe01c6cc10ac81ef32fc264a45762c88
5
+ SHA512:
6
+ metadata.gz: 13156917ce36152e1a67815099b8ae0e05d64993f1c2208fca9103fd12de4343e26a90461af9b54252396981175168daa353603881e7dd0f2981bacd90bc9ec5
7
+ data.tar.gz: d193ecfd1214f61c22d040385821458672c758113443fe3618ea8e6d8fb98eec717e44373047b6143bdbfbc735410d3f30c49e07645f292715fc7bc2597835ea
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in capybara-helpers.gemspec
4
+ gemspec
5
+
6
+ gem "rake", "~> 12.0"
@@ -0,0 +1,36 @@
1
+ # Capybara::Helpers
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capybara/helpers`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'capybara-helpers'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install capybara-helpers
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capybara-helpers.
36
+
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "capybara/helpers"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,22 @@
1
+ require_relative 'lib/capybara_helpers/version'
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "capybara_helpers"
5
+ spec.version = CapybaraHelpers::VERSION
6
+ spec.authors = ["Pavel Kalashnikov"]
7
+ spec.email = ["kalashnikovisme@gmail.com"]
8
+
9
+ spec.summary = %q{Some new helpers for capybara.}
10
+ spec.description = %q{Some new helpers for capybara.}
11
+ spec.homepage = 'https://github.com/purple-magic/capybara_helpers'
12
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+
14
+ spec.metadata["homepage_uri"] = spec.homepage
15
+
16
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
17
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+ end
@@ -0,0 +1,8 @@
1
+ require 'capybara_helpers/node'
2
+ require 'capybara'
3
+
4
+ module CapybaraHelpers
5
+ include Node
6
+ end
7
+
8
+ Capybara::Node::Element.include CapybaraHelpers::Node::Element
@@ -0,0 +1,7 @@
1
+ require 'capybara_helpers/node/element'
2
+
3
+ module CapybaraHelpers
4
+ module Node
5
+ include Element
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CapybaraHelpers
4
+ module Node
5
+ module Element
6
+ def parent_node(level: 1)
7
+ node = self
8
+ level.times do
9
+ node = node.first(:xpath, './/..')
10
+ end
11
+ node
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module CapybaraHelpers
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capybara_helpers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pavel Kalashnikov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Some new helpers for capybara.
14
+ email:
15
+ - kalashnikovisme@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".gitignore"
21
+ - Gemfile
22
+ - README.md
23
+ - Rakefile
24
+ - bin/console
25
+ - bin/setup
26
+ - capybara_helpers.gemspec
27
+ - lib/capybara_helpers.rb
28
+ - lib/capybara_helpers/node.rb
29
+ - lib/capybara_helpers/node/element.rb
30
+ - lib/capybara_helpers/version.rb
31
+ homepage: https://github.com/purple-magic/capybara_helpers
32
+ licenses: []
33
+ metadata:
34
+ homepage_uri: https://github.com/purple-magic/capybara_helpers
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.0
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubygems_version: 3.1.2
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: Some new helpers for capybara.
54
+ test_files: []