locution-sdk 0.1.0 → 0.1.1

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: daf978e5d08a0e9b16b6ad8ceacceaa59b04cc33
4
- data.tar.gz: d96796664091584803b099e31194575256f1a96f
3
+ metadata.gz: 06840405aeef0508666e777619ca3cc8bd79b6b7
4
+ data.tar.gz: b0facd57a104ed7b79029622330c78fbe6788ed6
5
5
  SHA512:
6
- metadata.gz: ede25c8ae83372bd1ef4b04863672daec7a57eb0755a84db2178f3a8bedc1ebc0c181aa80f25d2f7e84420e71769c6f9bfce036de6f24295a8703d2db04d3b51
7
- data.tar.gz: d2ac9f2e845da997e9ef7efb3fb8394173d6e3f86be5b1b3123c041ffed86b5c5260e4ba174063654d9da8548aba53cac18da001f79a221cde1df04a4e22d4c3
6
+ metadata.gz: 07902190ed72416874804827facf02d71c057596b87c77fa1eaa6fd4008d302e5156711bc6b9c764c512db9049235604d06e654a5eca6bfe958ddeadfd53e64d
7
+ data.tar.gz: e1b2b251e2708bac4b309f10ce92188642ff05036ab960e1f8f5704aa3c7cc0c5cfb7ffe81f7643f749e9211ba5be4eabf953a90d3a679e9cd7a850575f632ec
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Locution::Sdk
2
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/locution/sdk`. 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
3
+ Find out how reliable your existing Selenium tests are by automatically grading your locators against a battle-tested and curated set of heuristics.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,13 +20,44 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Locution works by using Selenium's Abstract Event Listener. You just need to create a new instance of our listener and pass it as an argument to Selenium when creating a browser instance.
24
+
25
+ You just need to provide your API Access Token (which is listed on your Account page) and the test name (which should be available dynamically through your test runner).
26
+
27
+ ### A Simple Example
28
+
29
+ ```ruby
30
+ require 'locution-sdk'
31
+
32
+ listener = Locution::Sdk::Listener.new('your-access-token', 'your-test-name')
33
+ @driver = Selenium::WebDriver.for :firefox, listener: listener)
34
+ ```
26
35
 
27
- ## Development
36
+ ### An RSpec Example
28
37
 
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.
38
+ ```ruby
39
+ require 'locution-sdk'
30
40
 
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).
41
+ RSpec.configure do |config|
42
+
43
+ config.before(:each) do |example|
44
+ listener = Locution::Sdk::Listener.new('your-access-token', example.metadata[:full_description])
45
+ @driver = Selenium::WebDriver.for :firefox, listener: listener)
46
+ end
47
+ end
48
+ ```
49
+
50
+ ### A Cucumber Example
51
+
52
+ ```ruby
53
+ require 'locution-sdk'
54
+
55
+ Before do |scenario|
56
+ test_name = "#{scenario.feature.name} - #{scenario.name}"
57
+ listener = Locution::Sdk::Listener.new('your-access-token', test_name)
58
+ @driver = Selenium::WebDriver.for :firefox, listener: listener)
59
+ end
60
+ ```
32
61
 
33
62
  ## Contributing
34
63
 
@@ -1,5 +1,5 @@
1
1
  module Locution
2
2
  module Sdk
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
data/locution-sdk.gemspec CHANGED
@@ -9,19 +9,10 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Dave Haeffner"]
10
10
  spec.email = ["dhaeffner@gmail.com"]
11
11
 
12
- spec.summary = %q{An SDK to connect your Selenium tests to Locution to get your tests graded}
13
- spec.description = %q{Find out how reliable your existing Selenium tests are by automatically grading your locators against a battle-tested and curated set of best-practices}
12
+ spec.summary = %q{An SDK to connect your Selenium tests to Locution to get your tests graded.}
13
+ spec.description = %q{Find out how reliable your existing Selenium tests are by automatically grading your locators against a battle-tested and curated set of heuristics.}
14
14
  spec.homepage = "https://rubygems.org/gems/locution-sdk"
15
15
  spec.license = "MIT"
16
-
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- #if spec.respond_to?(:metadata)
20
- # spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
- #else
22
- # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
- #end
24
-
25
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
17
  spec.require_paths = ["lib"]
27
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locution-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Haeffner
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.0.0
69
69
  description: Find out how reliable your existing Selenium tests are by automatically
70
- grading your locators against a battle-tested and curated set of best-practices
70
+ grading your locators against a battle-tested and curated set of heuristics.
71
71
  email:
72
72
  - dhaeffner@gmail.com
73
73
  executables: []
@@ -106,5 +106,5 @@ rubyforge_project:
106
106
  rubygems_version: 2.4.5.1
107
107
  signing_key:
108
108
  specification_version: 4
109
- summary: An SDK to connect your Selenium tests to Locution to get your tests graded
109
+ summary: An SDK to connect your Selenium tests to Locution to get your tests graded.
110
110
  test_files: []