objective-ci 0.0.3 → 0.0.4

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.
data/README.md CHANGED
@@ -43,15 +43,14 @@ end
43
43
 
44
44
  The CI server of choice is Jenkins -- install the plugins for the metrics you plan on using.
45
45
 
46
- * lint: https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin
47
- * lines_of_code: https://wiki.jenkins-ci.org/display/JENKINS/SLOCCount+Plugin
48
- * duplicate_code_detection: https://wiki.jenkins-ci.org/display/JENKINS/Violations (This could technically be used for lint also, but PMD has friendlier sorting on the front-end)
49
- * test_suite: JUNIT reporting is built into Jenkins.
46
+ * `lint`: https://wiki.jenkins-ci.org/display/JENKINS/PMD+Plugin
47
+ * `lines_of_code`: https://wiki.jenkins-ci.org/display/JENKINS/SLOCCount+Plugin
48
+ * `duplicate_code_detection`: https://wiki.jenkins-ci.org/display/JENKINS/DRY+Plugin
49
+ * `test_suite`: JUnit reporting is built into Jenkins.
50
50
 
51
51
  In Jenkins, call the rake task and load in the generated files
52
52
 
53
53
  ![Jenkins Screenshot](/docs/jenkins-setup.jpg)
54
- ![Jenkins Screenshot - Violations](/docs/jenkins-setup-violations.png)
55
54
 
56
55
  Triggering a build should now show the metrics in the build.
57
56
 
Binary file
@@ -72,9 +72,9 @@ module ObjectiveCi
72
72
  "| LC_CTYPE=C LANG=C sed 's/\\/\\.\\//\\//' > #{DUPLICATION_DESTINATION}",
73
73
  opts)
74
74
  pmd_exclude
75
+ pmd_patch
75
76
  end
76
77
 
77
- private
78
78
  def exclusion_options_list(option_flag)
79
79
  if exclusions.empty?
80
80
  ''
@@ -83,13 +83,13 @@ module ObjectiveCi
83
83
  "#{option_flag} #{wrapped_exclusions.join(" #{option_flag} ")}"
84
84
  end
85
85
  end
86
+ private :exclusion_options_list
86
87
 
87
- private
88
88
  def using_pods?
89
- File.exists?("Podfile")
89
+ File.exists?("Podfile") || File.exists?("podfile")
90
90
  end
91
+ private :using_pods?
91
92
 
92
- private
93
93
  def call_binary(binary, cl_options, tail, opts={})
94
94
  extra_options = opts["#{binary}_options".to_sym]
95
95
  override_options = opts["#{binary}_override".to_sym]
@@ -99,22 +99,22 @@ module ObjectiveCi
99
99
  puts command
100
100
  puts `#{command}`
101
101
  end
102
+ private :call_binary
102
103
 
103
- private
104
104
  def requires_options(opts, *keys)
105
105
  keys.each do |k|
106
106
  raise "option #{k} is required." unless opts.has_key?(k)
107
107
  end
108
108
  end
109
+ private :requires_options
109
110
 
110
- private
111
111
  def requires_at_least_one_option(opts, *keys)
112
112
  if (opts.keys && keys).empty?
113
113
  raise "at least one of the options #{keys.join(", ")} is required"
114
114
  end
115
115
  end
116
+ private :requires_at_least_one_option
116
117
 
117
- private
118
118
  def pmd_exclude
119
119
  # Unfortunately, pmd doesn't seem to provide any nice out-of-the-box way for excluding files from the results.
120
120
  absolute_exclusions = exclusions.map { |e| "#{Dir.pwd}/#{e}/" }
@@ -127,16 +127,25 @@ module ObjectiveCi
127
127
  end
128
128
  File.open(DUPLICATION_DESTINATION, 'w') { |file| file.write(output.to_s) }
129
129
  end
130
+ private :pmd_exclude
131
+
132
+ def pmd_patch
133
+ # Make sure encoding is UTF-8, or else Jenkins DRY plugin will fail to parse.
134
+ new_xml = Nokogiri::XML.parse(File.open(DUPLICATION_DESTINATION).read, nil, "UTF-8")
135
+ File.open(DUPLICATION_DESTINATION, 'w') { |file| file.write(new_xml.to_s) }
136
+ end
137
+ private :pmd_patch
130
138
 
131
- private
132
139
  def xcode_version
133
140
  matches = `xcodebuild -version`.match(/^Xcode ([0-9]+\.[0-9]+)/)
134
141
  matches ? matches[1].to_f : 0.0
135
142
  end
143
+ private :xcode_version
136
144
 
137
- private
138
145
  def puts_red(str)
139
146
  puts "\e[31m#{str}\e[0m"
140
147
  end
148
+ private :puts_red
149
+
141
150
  end
142
151
  end
@@ -1,3 +1,3 @@
1
1
  module ObjectiveCi
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: objective-ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Mark Larsen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-30 00:00:00.000000000 Z
12
+ date: 2013-11-05 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: ocunit2junit
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: nokogiri
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -170,7 +179,6 @@ files:
170
179
  - bin/sloccount
171
180
  - bin/sql_count
172
181
  - bin/tcl_count
173
- - docs/jenkins-setup-violations.png
174
182
  - docs/jenkins-setup.jpg
175
183
  - externals/oclint/LICENSE
176
184
  - externals/oclint/bin/oclint
@@ -347,25 +355,26 @@ files:
347
355
  homepage: ''
348
356
  licenses:
349
357
  - MIT
350
- metadata: {}
351
358
  post_install_message:
352
359
  rdoc_options: []
353
360
  require_paths:
354
361
  - lib
355
362
  required_ruby_version: !ruby/object:Gem::Requirement
363
+ none: false
356
364
  requirements:
357
365
  - - ! '>='
358
366
  - !ruby/object:Gem::Version
359
367
  version: '0'
360
368
  required_rubygems_version: !ruby/object:Gem::Requirement
369
+ none: false
361
370
  requirements:
362
371
  - - ! '>='
363
372
  - !ruby/object:Gem::Version
364
373
  version: '0'
365
374
  requirements: []
366
375
  rubyforge_project:
367
- rubygems_version: 2.0.7
376
+ rubygems_version: 1.8.25
368
377
  signing_key:
369
- specification_version: 4
378
+ specification_version: 3
370
379
  summary: CI tools for objective-c
371
380
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDY1MTVlN2NjYWVjNmQyYjExMDk4OThmM2JiMDM2MTZlMDQwNTUyNg==
5
- data.tar.gz: !binary |-
6
- ZDgzZTdjYTIyZmU5YTA3YzBhNzlhNzg0N2YwODRkNTJiZjNhNDk3Yw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- OTdiOTBkNGZjZGEzNzE4YWU2MWI0ZWVkZWUxZjkxN2RjMmQ4NTVhYjdjYzBk
10
- ZDliMzI3NmMzN2UyMDQ1Njg1N2MwMjhmNDI2ZTQ4NDk4YzFlNzMzZTNjNTAy
11
- NThjNTUyNTFhMjM1N2UyNWEyZDhkM2IzZmZjYTRkYzhlYmU2NzQ=
12
- data.tar.gz: !binary |-
13
- NWJkNzQxNzkxYjEzYzRmMjU3ZjdjNzA1MmI2MTRiYjM5NmRmMWY3ZmViMzA2
14
- Mjc0MDMwMGZkZThjNzQ4ZGE0NjUyMjhmYmZlNTViZTZmOTFjYjFkNWM5ZWNh
15
- NTFhOWY1NmE1OTNjMGFkYWM0MDQ5YzMyZDhiNmU5NGUyMWI4Y2U=
Binary file