inch_ci-worker 0.3.0.rc10 → 0.3.0.rc11

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: f72a4bd2a458223d6c2faa1b7ac7ba798e7e6831
4
- data.tar.gz: d779cbb0aae588155af3c2020c50f79088b2f426
3
+ metadata.gz: feca80786e2922278233e72402ea47f438bc3e85
4
+ data.tar.gz: 4de36a97a7ccb93c49178927f5632a3e36ab6d30
5
5
  SHA512:
6
- metadata.gz: 9042d311469257e18c7b8cee67d7f8746aa9ecbca964622d77eed9e2a47ea77841ae485413e5191a4d2fa5d9d77b982695fd72fade73f86e76477f9b61faa5c3
7
- data.tar.gz: 42b1b1afe829ec4de335830d6033704227f45db8a4c974f8b95c78f3ee948d605fc4f046fdbc7b37a90d1ff53416931d77874c9dac05d71faccb03821e06f279
6
+ metadata.gz: fff4eb32c861c9a26034a2d4dc74ee372569f89bfbd38eda8b299feeb2d3313de33ef95b394811635151f4bc6a3230cc54c6fcf33c25e2f28721a8f4610040b1
7
+ data.tar.gz: f1241a335f5ce320511eb3fabcd343ab06e2ffcf814758540b070355d73d63a774d4f17be417bdbfe558677474287d6d978fcec7b45bccd2770a4120789dc4d8
@@ -9,7 +9,7 @@ module InchCI
9
9
  attr_reader :json
10
10
 
11
11
  def initialize(filename)
12
- @json = JSON[File.read(filename)]
12
+ @json = BuildJSON.json(filename)
13
13
  @work_dir = Dir.mktmpdir
14
14
 
15
15
  started_at = Time.now
@@ -27,11 +27,11 @@ module InchCI
27
27
  end
28
28
 
29
29
  def build(filename)
30
- language = json['language']
31
- branch_name = json['branch_name'] || json['travis_branch']
32
- revision = json['revision'] || json['travis_commit']
33
- nwo = json['nwo'] || json['travis_repo_slug']
34
- @url = json['git_repo_url']
30
+ language = json.language
31
+ branch_name = json.branch_name
32
+ revision = json.revision
33
+ nwo = json.nwo
34
+ @url = json.url
35
35
  latest_revision = true # TODO: make truthful
36
36
 
37
37
  if retrieve_repo
@@ -3,6 +3,22 @@ require 'inch_ci/worker/build_json/task'
3
3
  module InchCI
4
4
  module Worker
5
5
  module BuildJSON
6
+ def self.json(filename)
7
+ JSONDump.new(filename)
8
+ end
9
+
10
+ class JSONDump
11
+ attr_reader :language, :branch_name, :revision, :nwo, :url
12
+
13
+ def initialize(filename)
14
+ json = JSON[File.read(filename)]
15
+ @language = json['language']
16
+ @branch_name = json['branch_name'] || json['travis_branch']
17
+ @revision = json['revision'] || json['travis_commit']
18
+ @nwo = json['nwo'] || json['travis_repo_slug']
19
+ @url = json['git_repo_url']
20
+ end
21
+ end
6
22
  end
7
23
  end
8
24
  end
@@ -1,5 +1,5 @@
1
1
  module InchCI
2
2
  module Worker
3
- VERSION = "0.3.0.rc10"
3
+ VERSION = "0.3.0.rc11"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch_ci-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.rc10
4
+ version: 0.3.0.rc11
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring