cider_ci-support 1.1.0.pre.beta.2 → 1.1.0.pre.beta.3

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: b6407cb9bd85ddfb83f9be0faf0971fd7b7e02e4
4
- data.tar.gz: 850b1053eae1fd35d260c4eb02adc73e5f98a2b1
3
+ metadata.gz: c94b7ba2d01d2f961e4274eff46fccb1d3f99822
4
+ data.tar.gz: adff9c26e7cd234ce1a6b8c7c65f59e21349a5a1
5
5
  SHA512:
6
- metadata.gz: 397322fdfe5313a70bf47871aabca2a5f7ad008d83118cba4c131c8611e42f9448b4d11b06a531b0959e1fb526a7860c1177addfc4f7797b45a2319e37a9ebd4
7
- data.tar.gz: 87ec30eef598db7aafd555ea991b3325d6a652bc162fe6850aea852551fe2c995bc6c2268afbe0887ee845f242bdffb60279096adcfa1e112bfaa7f4dc8dcc93
6
+ metadata.gz: b4400e5ff211c92b0e23039a06ca93e4c43c1a8b6a35bd4dc0c3e0df33dd32321f56cb4d27c31b4146e5ca0a9c414a3886e9d3c29b81da668ae42bd66c3d2904
7
+ data.tar.gz: 46905804cb8425f22d44128a38915ea900f246660a4abbc198981083ea430e6db1ad71105b92efc9b9eb8de65b8cfb18b7a9fcf4a564e77334b753beda53a6e4
data/bin/cider-ci_flay ADDED
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'ostruct'
5
+ require 'yaml'
6
+ require 'flay'
7
+
8
+ require 'pry'
9
+
10
+ ###############################################################################
11
+ #
12
+ # Static similarity code analysis based on flay.
13
+ #
14
+ # Author: Thomas Schank <DrTom@schank.ch>
15
+ #
16
+ ###############################################################################
17
+
18
+
19
+ ###############################################################################
20
+ # Options, main ....
21
+ ###############################################################################
22
+
23
+
24
+ def parse_options options
25
+
26
+ optparse = OptionParser.new do |opts|
27
+ opts.banner = "Usage: cider-ci_flay FILE/DIR ..."
28
+
29
+ opts.on('-d', '--print-details') do
30
+ options.print_details= true
31
+ end
32
+
33
+ opts.on('-m', '--mass MASS', Integer,
34
+ "See flay documentation, default #{options.mass}.") do |n|
35
+ options.mass= n
36
+ end
37
+
38
+ end.parse!
39
+
40
+ options
41
+ end
42
+
43
+
44
+ def main
45
+ options = OpenStruct.new
46
+ options.print_details= false
47
+ options.mass= 16
48
+ parse_options options
49
+
50
+ flay_options= Flay.default_options.merge({
51
+ mass: options.mass
52
+ })
53
+
54
+ flay = Flay.new flay_options
55
+ files = Flay.expand_dirs_to_files(*ARGV)
56
+
57
+ abort "No files are selected" if files.empty?
58
+
59
+ flay.process(*files)
60
+ offending= flay.analyze
61
+
62
+ if offending.empty?
63
+ $stdout.puts "cider-ci_flay OK"
64
+ exit
65
+ else
66
+ $stderr.puts "cider-ci_flay FAILED:"
67
+ flay.report $stderr
68
+ abort
69
+ end
70
+
71
+ end
72
+
73
+ main
74
+
data/bin/cider-ci_flog CHANGED
@@ -53,6 +53,8 @@ def main
53
53
 
54
54
  files= FlogCLI.expand_dirs_to_files ARGV
55
55
 
56
+ abort "No files are selected" if files.empty?
57
+
56
58
  flog_options = FlogCLI.parse_options []
57
59
  flogger= Flog.new flog_options
58
60
  flogger.flog *files
@@ -1,5 +1,5 @@
1
1
  module Cider_CI
2
2
  module Support
3
- VERSION = "1.1.0-beta.2"
3
+ VERSION = "1.1.0-beta.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cider_ci-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.beta.2
4
+ version: 1.1.0.pre.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Schank
@@ -127,6 +127,7 @@ email:
127
127
  - DrTom@schank.ch
128
128
  executables:
129
129
  - cider-ci_coverage
130
+ - cider-ci_flay
130
131
  - cider-ci_flog
131
132
  extensions: []
132
133
  extra_rdoc_files: []
@@ -137,6 +138,7 @@ files:
137
138
  - README.md
138
139
  - Rakefile
139
140
  - bin/cider-ci_coverage
141
+ - bin/cider-ci_flay
140
142
  - bin/cider-ci_flog
141
143
  - cider_ci-support.gemspec
142
144
  - lib/cider_ci/support.rb