gprimola / jenkiexs Goto Github PK
View Code? Open in Web Editor NEWJenkiexs is a [Jenkins](https://www.jenkins.io/) client written in Elixir.
Jenkiexs is a [Jenkins](https://www.jenkins.io/) client written in Elixir.
I noticed something in Jenkiexs.Buids.details/2
but didn't want to change in the abovementioned PR because it's not its purpose.
Jenkiexs.Builds.details/2
uses Client.get!/3
as follows:
def details(job_name, build_number) do
case Client.get!("/job/#{job_name}/#{build_number}/api/json") do
%{status_code: 200, body: body} ->
build = new(job_name, body)
{:ok, build}
%{status_code: status, body: body} ->
{:error, "Got status #{status} with body #{inspect(body)}."}
end
end
What do you think about changing that request to Client.get/3
and then creating a Jenkiexs.Builds.details!/2
just to keep the API consistent?
Originally posted by @dflima in #18 (comment)
Please, follow this guidelines
Please, follow this guidelines
The lib is in version 0.9 only due to lack of unit tests.
After fixing #21, there's a compilation error in test/support/mock_server/jenkins.ex
== Compilation error in file test/support/mock_server/jenkins.ex ==
** (SyntaxError) test/support/mock_server/jenkins.ex:8: syntax error before: '->'
(elixir) lib/kernel/parallel_compiler.ex:229: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
The code is as follows:
get "/api/json" do
cond do
is_nil(conn.params["tree"]) ->
String.match?(conn.params["tree"], ~r/\Ajobs/) ->
"jobs[name,description,fullName,displayName,fullDisplayName,inQueue,buildable,disabled,nextBuildNumber,property[parameterDefinitions[name,defaultParameterValue[value]]]]"
end
end
There's no code block after is_nil(conn.params["tree"]) ->
Please, follow this guidelines
Please, follow this guidelines
Please, if you may, follow this recommendations!
Thank you!!
The mock server is Jenkiexs.MockServer.Jenkins
.
The idea is to mock calls to a real jenkins server.
Feel free to propose a different approach ๐
There are some modules on test/support
that are not being compiled when running mix test
.
โ jenkiexs git:(master) โ mix test
Compiling 7 files (.ex)
Generated jenkiexs app
** (UndefinedFunctionError) function Jenkiexs.MockServer.start/0 is undefined (module Jenkiexs.MockServer is not available)
Jenkiexs.MockServer.start()
test/test_helper.exs:1: (file)
(elixir) lib/code.ex:813: Code.require_file/2
We should add the elixirc_paths
attribute on the Jenkiexs.MixProject.project/0
function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.