inch_ci-worker 0.2.11 → 0.2.12

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: 450b25afdb02565b96fef89f7b47520b7d34cf93
4
- data.tar.gz: 5d571cf2982821d07255f62eaa509057f7004735
3
+ metadata.gz: 541dd2d55313d87dd726ae9cb99d920da56f75aa
4
+ data.tar.gz: dc6ad28eb3893993fba71be1ce3544f6f347e8d9
5
5
  SHA512:
6
- metadata.gz: d8bbc1ad1f522292dd4ef6a30da0b1a916f75b7c2f015ec870bac34dcd34bc83b0ed14e36954ece211528de563b7622937ccd2e89fbc0ca59d33541f97302898
7
- data.tar.gz: 23d7d5a7334e2db3a34fe0030b59b363905de16c43fa4aca7f491ae661cce62bd39546751a91adfb66139d84131e80b7e50ebc607c89d66cc25dcd07a6d226e6
6
+ metadata.gz: 589ead8a604b5177a227761874034a04898169d7f98c704c67431be7be595ab30541ca6acea1258cbdbd473b6df1fbf6ae4701e2e33bf0b9be7b15b3009ecb17
7
+ data.tar.gz: 4c77886dac2f29b60b14f55d126c778d6f63939c7f913617cf3bb5ae4112c356c51982bef5af0b4e7354a64eaa6857b1efd3a676ea263814ceb81a04a52a3923
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.1.0
1
+ ruby-2.1.2
data/bin/inch_ci-worker CHANGED
@@ -27,16 +27,9 @@ class Command
27
27
  end
28
28
  end
29
29
 
30
- class Version
31
- def initialize(*args)
32
- puts InchCI::Worker::VERSION
33
- end
34
- end
35
-
36
30
  MAP = {
37
31
  'build' => Build,
38
- 'list-tags' => ListTags,
39
- '-v' => Version,
32
+ 'list-tags' => ListTags
40
33
  }
41
34
 
42
35
  def self.run(command_name, args)
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["rf@bamaru.de"]
11
11
  spec.summary = %q{Worker for the Inch CI project}
12
12
  spec.description = %q{}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/inch-ci/inch_ci-worker"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "simplecov"
24
24
  spec.add_development_dependency "pry"
25
25
 
26
- spec.add_dependency "inch", ">= 0.5.0.rc2"
27
- spec.add_dependency "repomen", ">= 0.2.0.rc1"
26
+ spec.add_dependency 'repomen'
27
+ spec.add_dependency "inch", "~> 0.5.0.rc3"
28
28
  end
@@ -22,7 +22,6 @@ module InchCI
22
22
  data['service_name'] = build.service_name.to_s if build.service_name
23
23
  data['user_name'] = build.user_name if build.user_name
24
24
  data['repo_name'] = build.repo_name if build.repo_name
25
- data['badge_in_readme'] = build.badge_in_readme
26
25
  if build.revision_uid
27
26
  data['revision_uid'] = build.revision_uid
28
27
  data['revision_message'] = build.revision_message
@@ -12,7 +12,6 @@ module InchCI
12
12
  def_delegators :repo, :revision_authored_at
13
13
 
14
14
  attr_accessor :started_at
15
- attr_accessor :badge_in_readme
16
15
  attr_accessor :finished_at
17
16
  attr_writer :status
18
17
 
@@ -1,6 +1,6 @@
1
- require 'tmpdir'
2
1
  require 'inch'
3
2
  require 'repomen'
3
+ require 'tmpdir'
4
4
 
5
5
  require_relative 'result'
6
6
  require_relative 'report'
@@ -21,7 +21,7 @@ module InchCI
21
21
  @result.started_at = started_at
22
22
  puts Report.new(@result).to_yaml
23
23
  ensure
24
- FileUtils.remove_entry(@work_dir) unless @work_dir.nil?
24
+ FileUtils.remove_entry @work_dir
25
25
  end
26
26
 
27
27
  private
@@ -32,9 +32,7 @@ module InchCI
32
32
  if repo.change_branch(branch_name, true)
33
33
  if repo.checkout_revision(revision)
34
34
  if @codebase = parse_codebase(repo.path)
35
- result = ResultSuccess.new(repo, branch_name, latest_revision, @codebase.objects)
36
- result.badge_in_readme = badge_in_readme?(result)
37
- result
35
+ ResultSuccess.new(repo, branch_name, latest_revision, @codebase.objects)
38
36
  else
39
37
  ResultParserFailed.new(repo, branch_name, latest_revision, nil)
40
38
  end
@@ -49,26 +47,11 @@ module InchCI
49
47
  end
50
48
  end
51
49
 
52
- # @param info [#service_name,#user_name,#repo_name]
53
- def badge_in_readme?(info)
54
- filename = Dir[File.join(repo.path, '*.*')].detect do |f|
55
- File.basename(f) =~ /\Areadme\./i
56
- end
57
- if filename
58
- contents = File.read(filename, :encoding => 'utf-8')
59
- pattern = Regexp.escape("inch-ci.org/#{info.service_name}/#{info.user_name}/#{info.repo_name}")
60
- !!( contents =~ /#{pattern}/mi )
61
- else
62
- false
63
- end
64
- end
65
-
66
50
  def parse_codebase(path)
67
51
  YARD::Config.options[:safe_mode] = true
68
52
  begin
69
53
  ::Inch::Codebase.parse(path)
70
- rescue Exception => e
71
- warn e
54
+ rescue
72
55
  nil
73
56
  end
74
57
  end
@@ -1,5 +1,5 @@
1
1
  module InchCI
2
2
  module Worker
3
- VERSION = "0.2.11"
3
+ VERSION = "0.2.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch_ci-worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-20 00:00:00.000000000 Z
11
+ date: 2014-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -67,33 +67,33 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: inch
70
+ name: repomen
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.0.rc2
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.5.0.rc2
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: repomen
84
+ name: inch
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.2.0.rc1
89
+ version: 0.5.0.rc3
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.2.0.rc1
96
+ version: 0.5.0.rc3
97
97
  description: ''
98
98
  email:
99
99
  - rf@bamaru.de
@@ -122,7 +122,7 @@ files:
122
122
  - lib/inch_ci/worker/version.rb
123
123
  - test/integration/build_test.rb
124
124
  - test/test_helper.rb
125
- homepage: ''
125
+ homepage: https://github.com/inch-ci/inch_ci-worker
126
126
  licenses:
127
127
  - MIT
128
128
  metadata: {}
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.2.0
145
+ rubygems_version: 2.2.2
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Worker for the Inch CI project