Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zoholib
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gems
zoholib
Commits
c6cb25c4
Commit
c6cb25c4
authored
Oct 19, 2022
by
Sergio Guerrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V1.1: Added method cobertura_from_date_pager
parent
0ca695bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
adamo_client.rb
lib/zoholib/adamo_client.rb
+18
-3
version.rb
lib/zoholib/version.rb
+1
-1
No files found.
lib/zoholib/adamo_client.rb
View file @
c6cb25c4
...
...
@@ -84,10 +84,25 @@ module Wedoops
print
"(
#{
r
.
size
}
/
#{
resultado_final
.
size
}
),"
break
if
r
.
size
<
limit
end
puts
resultado_final
.
size
return
resultado_final
end
puts
resultado_final
.
size
return
resultado_final
end
def
cobertura_from_date_pager
(
date
=
"01-01-2011"
,
page
=
1
,
limit
=
50000
)
date
=
Date
.
parse
(
date
).
strftime
(
"%Y%m%d"
)
resultado_final
=
Array
.
new
url
=
"https://coverage-dump.adamo.es/v1/cobertura/
#{
page
}
?limit=
#{
limit
}
&date=
#{
date
}
"
resultado
=
HTTP
.
timeout
(
connect:
15
,
read:
30
)
.
headers
(
"cache-control"
=>
"no-cache"
,
"accept"
=>
"application/json"
,
"postman-token"
=>
"8b126eb1-0de6-4a10-d78d-1fb417fb23b0"
,
"x-apikey"
=>
"zYkWN38SYH6hr2Ixq75xvDENl6hrYOvxx0FxLvPD7BUe6"
)
.
get
(
url
)
resultado_final
=
JSON
.
parse
(
resultado
,
symbolize_names:
true
)
return
resultado_final
end
def
projects
(
date
=
nil
)
page
=
1
...
...
lib/zoholib/version.rb
View file @
c6cb25c4
# frozen_string_literal: true
module
Wedoops
module
Zoholib
VERSION
=
'1.
0
'
VERSION
=
'1.
1
'
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment