testingbot 0.2.2 → 0.2.3
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 +4 -4
- data/.github/workflows/test.yml +4 -5
- data/README.md +64 -0
- data/bin/testingbot +1 -1
- data/lib/testingbot/api.rb +38 -15
- data/lib/testingbot/version.rb +1 -1
- metadata +8 -10
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 104c19c8464d4b3a2da5ca401c9435206893b9abcc9d633f8e06962573458ce3
|
4
|
+
data.tar.gz: 48f5415943bdbf9c89f4c386a5e74f1cefcba46f460108a9b9b9dbfc0be91c32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af4c1c842c83a7321dfdf4278776f075d4241c810f73d99aff3368fa79c1b1ef58a07ac94b95cfdacafa62c273496262f545e2f7242f171077295d5cb966bf60
|
7
|
+
data.tar.gz: c1057b5b46786c4d4ba466e3324f9ba232d754811d813cbb6c3f61d511c3c3769c11b0cd81858565103b0436f6a8e114c5a6647bd3cbd64868228c8f9ef29429
|
data/.github/workflows/test.yml
CHANGED
@@ -7,18 +7,17 @@ jobs:
|
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
|
-
ruby: [ '2.5', '2.6' ]
|
10
|
+
ruby: ['2.2', '2.5', '2.6', '2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
11
11
|
name: Ruby ${{ matrix.ruby }} test
|
12
12
|
steps:
|
13
|
-
- uses: actions/checkout@
|
14
|
-
- uses:
|
13
|
+
- uses: actions/checkout@v3
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
16
|
ruby-version: ${{ matrix.ruby }}
|
17
|
+
bundler-cache: true
|
17
18
|
- name: Build and test
|
18
19
|
run: |
|
19
20
|
sudo apt-get -yqq install libpq-dev
|
20
|
-
gem install bundler
|
21
|
-
bundle install --jobs 3 --retry 3
|
22
21
|
bundle exec rake spec
|
23
22
|
env:
|
24
23
|
TB_KEY: ${{ secrets.TB_KEY }}
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
[](https://badge.fury.io/rb/testingbot)
|
2
|
+
[](https://github.com/testingbot/testingbot_ruby/actions/workflows/test.yml)
|
2
3
|
|
3
4
|
# Testingbot-Ruby
|
4
5
|
|
@@ -63,6 +64,69 @@ Gets a list of available (physical) devices you can test on
|
|
63
64
|
@api.get_available_devices
|
64
65
|
```
|
65
66
|
|
67
|
+
### get_team
|
68
|
+
Gets info about the current team you belong to
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
@api.get_team
|
72
|
+
```
|
73
|
+
|
74
|
+
### get_users_in_team
|
75
|
+
Gets all users in your team
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
@api.get_users_in_team(offset = 0, count = 10)
|
79
|
+
```
|
80
|
+
|
81
|
+
### get_user_in_team
|
82
|
+
Get info about a specific user in your team
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
@api.get_user_in_team(user_id)
|
86
|
+
```
|
87
|
+
|
88
|
+
### create_user_in_team
|
89
|
+
Add a user to your current team. You need to have ADMIN rights to do this.
|
90
|
+
|
91
|
+
```ruby
|
92
|
+
@api.create_user_in_team(user = {})
|
93
|
+
```
|
94
|
+
|
95
|
+
### update_user_in_team
|
96
|
+
Updates a specific user in your team.
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
@api.update_user_in_team(user_id, user = {})
|
100
|
+
```
|
101
|
+
|
102
|
+
### reset_credentials
|
103
|
+
Resets the credentials for a specific user
|
104
|
+
|
105
|
+
```ruby
|
106
|
+
@api.reset_credentials(user_id)
|
107
|
+
```
|
108
|
+
|
109
|
+
### take_screenshots
|
110
|
+
Take screenshots for a specific URL on specific browsers
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
@api.take_screenshots(configuration)
|
114
|
+
```
|
115
|
+
|
116
|
+
### get_screenshots_history
|
117
|
+
Retrieve screenshots that were previously generated
|
118
|
+
|
119
|
+
```ruby
|
120
|
+
@api.get_screenshots_history(offset = 0, count = 10)
|
121
|
+
```
|
122
|
+
|
123
|
+
### get_screenshots
|
124
|
+
Get screenshots from a specific id
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
@api.get_screenshots(screenshots_id)
|
128
|
+
```
|
129
|
+
|
66
130
|
### get_user_info
|
67
131
|
Gets your user information
|
68
132
|
|
data/bin/testingbot
CHANGED
@@ -14,6 +14,6 @@ else
|
|
14
14
|
api_secret = gets.chomp
|
15
15
|
end
|
16
16
|
|
17
|
-
File.open(File.
|
17
|
+
File.open(File.join(Dir.home, ".testingbot"), 'w') {|f| f.write("#{api_key}:#{api_secret}") }
|
18
18
|
|
19
19
|
p "Your system is now ready to use TestingBot's grid infrastructure."
|
data/lib/testingbot/api.rb
CHANGED
@@ -51,6 +51,30 @@ module TestingBot
|
|
51
51
|
get("/devices/available")
|
52
52
|
end
|
53
53
|
|
54
|
+
def get_team
|
55
|
+
get("/team-management")
|
56
|
+
end
|
57
|
+
|
58
|
+
def get_users_in_team(offset = 0, count = 10)
|
59
|
+
get("/team-management/users?offset=#{offset}&count=#{count}")
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_user_in_team(user_id)
|
63
|
+
get("/team-management/users/#{user_id}")
|
64
|
+
end
|
65
|
+
|
66
|
+
def create_user_in_team(user = {})
|
67
|
+
post("/team-management/users/", user)
|
68
|
+
end
|
69
|
+
|
70
|
+
def update_user_in_team(user_id, user = {})
|
71
|
+
put("/team-management/users/#{user_id}", user)
|
72
|
+
end
|
73
|
+
|
74
|
+
def reset_credentials(user_id)
|
75
|
+
post("/team-management/users/#{user_id}/reset-keys")
|
76
|
+
end
|
77
|
+
|
54
78
|
def update_user_info(params = {})
|
55
79
|
new_params = {}
|
56
80
|
params.keys.each do |key|
|
@@ -99,6 +123,18 @@ module TestingBot
|
|
99
123
|
delete("/builds/#{build_identifier}")
|
100
124
|
end
|
101
125
|
|
126
|
+
def take_screenshots(configuration)
|
127
|
+
post("/screenshots", configuration)
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_screenshots_history(offset = 0, count = 10)
|
131
|
+
get("/screenshots?offset=#{offset}&count=#{count}")
|
132
|
+
end
|
133
|
+
|
134
|
+
def get_screenshots(screenshots_id)
|
135
|
+
get("/screenshots/#{screenshots_id}")
|
136
|
+
end
|
137
|
+
|
102
138
|
def get_tunnels
|
103
139
|
get("/tunnel/list")
|
104
140
|
end
|
@@ -149,22 +185,9 @@ module TestingBot
|
|
149
185
|
private
|
150
186
|
|
151
187
|
def load_config_file
|
152
|
-
|
153
|
-
|
154
|
-
begin
|
155
|
-
require 'rbconfig'
|
156
|
-
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
|
157
|
-
rescue
|
158
|
-
is_windows = (RUBY_PLATFORM =~ /w.*32/) || (ENV["OS"] && ENV["OS"] == "Windows_NT")
|
159
|
-
end
|
160
|
-
|
161
|
-
if is_windows
|
162
|
-
config_file = "#{ENV['HOMEDRIVE']}\\.testingbot"
|
163
|
-
else
|
164
|
-
config_file = File.expand_path("#{Dir.home}/.testingbot")
|
165
|
-
end
|
188
|
+
config_file = File.join(Dir.home, ".testingbot")
|
166
189
|
|
167
|
-
if File.
|
190
|
+
if File.exist?(config_file)
|
168
191
|
str = File.open(config_file) { |f| f.readline }.chomp
|
169
192
|
return str.split(':')
|
170
193
|
end
|
data/lib/testingbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testingbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jochen Delabie
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -76,7 +76,6 @@ extra_rdoc_files: []
|
|
76
76
|
files:
|
77
77
|
- ".github/workflows/test.yml"
|
78
78
|
- ".gitignore"
|
79
|
-
- ".travis.yml"
|
80
79
|
- Gemfile
|
81
80
|
- LICENSE
|
82
81
|
- README.md
|
@@ -96,24 +95,23 @@ metadata:
|
|
96
95
|
documentation_uri: https://github.com/testingbot/testingbot_ruby
|
97
96
|
homepage_uri: https://github.com/testingbot/testingbot_ruby
|
98
97
|
source_code_uri: https://github.com/testingbot/testingbot_ruby
|
99
|
-
post_install_message:
|
98
|
+
post_install_message:
|
100
99
|
rdoc_options: []
|
101
100
|
require_paths:
|
102
101
|
- lib
|
103
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
104
103
|
requirements:
|
105
|
-
- - "
|
104
|
+
- - ">="
|
106
105
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
106
|
+
version: '0'
|
108
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
108
|
requirements:
|
110
109
|
- - ">="
|
111
110
|
- !ruby/object:Gem::Version
|
112
111
|
version: '0'
|
113
112
|
requirements: []
|
114
|
-
|
115
|
-
|
116
|
-
signing_key:
|
113
|
+
rubygems_version: 3.0.3.1
|
114
|
+
signing_key:
|
117
115
|
specification_version: 4
|
118
116
|
summary: Ruby API Gem to be used with testingbot.com
|
119
117
|
test_files:
|