lambdatest-sdk-utils 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 83f844c49aec7396b7f9db2a58be818a5ecfecc631674e5a13c86ff79a8b6faa
4
- data.tar.gz: adcd3321b3553ae56cbe598cc43e9b2f38670043c98021a808124f0e65ebb4c7
3
+ metadata.gz: daab72437486b5023946f0f56146ac0ecf0c7acdaed71ee0545f94817923295b
4
+ data.tar.gz: 53e62246eb8308e2ec7b4e6fe673d8564ce3146f4ed7e8d9eb126db95b2a7c6f
5
5
  SHA512:
6
- metadata.gz: 5450821a1f82fc6718b31064a5b937b53128fa27accec043acd5917739b455c3785e794b3908ad17f32998cb756a9ffa730723cbd8b708ff7c994c9e60b7c029
7
- data.tar.gz: 037dd7938be760b2e3cfdd909a69b01af3c40b4c4a59b1f0d9c274d009a8e30cb6205fc7f5922b8096e012cec96d33381d9c67c92ccaf1826b315b23bf3ee78a
6
+ metadata.gz: 8fc3ee803b8d70568a309a8980d87025e443d71331ee67b744ccdfae73e414cfaeb504f0afdb07438b3a57ec3476d1baf7bd31a2eb9e53ac92c7a9bddfe8cb91
7
+ data.tar.gz: 0cf05c7de58f96a958fd65f07f9811eee739b9ddc147cce9ddbac982162dcafec9f1628e9cc1445f088e56be0855b36d842b98c10c4c27e366ce3d2b258d5f07
data/README.md CHANGED
@@ -1,25 +1,5 @@
1
1
  # Lambdatest::Sdk::Utils
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- 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/lambdatest/sdk/utils`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- ## Installation
8
-
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
- Install the gem and add to the application's Gemfile by executing:
12
-
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
14
-
15
- If bundler is not being used to manage dependencies, install the gem by executing:
16
-
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
18
-
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
3
  ## Development
24
4
 
25
5
  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.
@@ -16,14 +16,14 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/LambdaTest/lambdatest-ruby-sdk"
19
- spec.metadata["changelog_uri"] = "https://github.com/LambdaTest/lambdatest-ruby-sdk/lambdatest-selenium-driver/CHANGELOG.md"
19
+ spec.metadata["changelog_uri"] = "https://github.com/LambdaTest/lambdatest-ruby-sdk/lambdatest-sdk-utils/CHANGELOG.md"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
23
  spec.files = Dir.chdir(__dir__) do
24
24
  `git ls-files -z`.split("\x0").reject do |f|
25
25
  (File.expand_path(f) == __FILE__) ||
26
- f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor])
26
+ f.start_with?(*%w[sig/ bin/ test/ spec/ features/ .git .github appveyor])
27
27
  end
28
28
  end
29
29
  spec.bindir = "exe"
@@ -3,11 +3,14 @@ module Lambdatest
3
3
  module Sdk
4
4
  module Utils
5
5
  def self.get_pkg_name
6
- "@lambdatest/ruby-selenium-driver".freeze
6
+ "@lambdatest/lambdatest-sdk-utils".freeze
7
7
  end
8
8
 
9
9
  def self.get_smart_ui_server_address
10
- ENV.fetch('SMARTUI_SERVER_ADDRESS', 'http://localhost:8080')
10
+ unless ENV.fetch('SMARTUI_SERVER_ADDRESS')
11
+ raise 'SmartUI server address not found'
12
+ end
13
+ ENV.fetch('SMARTUI_SERVER_ADDRESS')
11
14
  end
12
15
  end
13
16
  end
@@ -24,10 +24,10 @@ module Lambdatest
24
24
  end
25
25
  end
26
26
 
27
- def self.get_logger
27
+ def self.get_logger(pkgName)
28
28
  logger = Logger.new(STDOUT)
29
29
  logger.level = log_level
30
- logger.progname = get_pkg_name
30
+ logger.progname = pkgName
31
31
  logger
32
32
  end
33
33
  end
@@ -3,7 +3,7 @@
3
3
  module Lambdatest
4
4
  module Sdk
5
5
  module Utils
6
- VERSION = "1.0.1".freeze
6
+ VERSION = "1.0.2".freeze
7
7
  end
8
8
  end
9
9
  end
@@ -10,8 +10,7 @@ require_relative "utils/logger.rb"
10
10
  module Lambdatest
11
11
  module Sdk
12
12
  module Utils
13
- SMART_UI_API = get_smart_ui_server_address
14
- @logger = Lambdatest::Sdk::Utils.get_logger
13
+ @logger = Lambdatest::Sdk::Utils.get_logger(get_pkg_name)
15
14
 
16
15
  def self.is_smartui_enabled?
17
16
  begin
@@ -27,20 +26,20 @@ module Lambdatest
27
26
  make_api_call('/domserializer', method: :get,data: nil)
28
27
  end
29
28
 
30
- def self.post_snapshot(dom,snapshot_name)
31
- uri = URI("#{SMART_UI_API}/snapshot")
29
+ def self.post_snapshot(snapshot,pkg_name,options={})
30
+ uri = URI("#{get_smart_ui_server_address}/snapshot")
32
31
  data = JSON.generate({
33
32
  snapshot: {
34
- dom: dom["dom"]["html"],
35
- name: snapshot_name,
33
+ **snapshot,
34
+ options: options
36
35
  },
37
- testType: get_pkg_name
36
+ testType: pkg_name
38
37
  })
39
38
  make_api_call('/snapshot', method: :post, data: data)
40
39
  end
41
40
 
42
41
  def self.make_api_call(endpoint, method: :get, data: nil)
43
- uri = URI("#{SMART_UI_API}#{endpoint}")
42
+ uri = URI("#{get_smart_ui_server_address}#{endpoint}")
44
43
 
45
44
  response = case method
46
45
  when :get
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambdatest-sdk-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LambdaTest
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-28 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby Selenium SDK for testing with Smart UI
14
14
  email:
@@ -19,7 +19,6 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - ".rubocop.yml"
21
21
  - CHANGELOG.md
22
- - CODE_OF_CONDUCT.md
23
22
  - Gemfile
24
23
  - LICENSE.txt
25
24
  - README.md
@@ -29,14 +28,13 @@ files:
29
28
  - lib/lambdatest/sdk/utils/constants.rb
30
29
  - lib/lambdatest/sdk/utils/logger.rb
31
30
  - lib/lambdatest/sdk/utils/version.rb
32
- - sig/lambdatest/sdk/utils.rbs
33
31
  homepage: https://www.lambdatest.com
34
32
  licenses:
35
33
  - MIT
36
34
  metadata:
37
35
  homepage_uri: https://www.lambdatest.com
38
36
  source_code_uri: https://github.com/LambdaTest/lambdatest-ruby-sdk
39
- changelog_uri: https://github.com/LambdaTest/lambdatest-ruby-sdk/lambdatest-selenium-driver/CHANGELOG.md
37
+ changelog_uri: https://github.com/LambdaTest/lambdatest-ruby-sdk/lambdatest-sdk-utils/CHANGELOG.md
40
38
  post_install_message:
41
39
  rdoc_options: []
42
40
  require_paths:
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at TODO: Write your email address. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
@@ -1,8 +0,0 @@
1
- module Lambdatest
2
- module Sdk
3
- module Utils
4
- VERSION: String
5
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
6
- end
7
- end
8
- end