cider_ci-support 1.1.0.pre.beta.2 → 1.1.0.pre.beta.3
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.
- checksums.yaml +4 -4
- data/bin/cider-ci_flay +74 -0
- data/bin/cider-ci_flog +2 -0
- data/lib/cider_ci/support/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c94b7ba2d01d2f961e4274eff46fccb1d3f99822
|
4
|
+
data.tar.gz: adff9c26e7cd234ce1a6b8c7c65f59e21349a5a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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
|