rcpm 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rcpm +12 -1
- data/lib/rcpm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70a1c4e7e3acbaff422216731c7a91fc7ec6aaf3
|
4
|
+
data.tar.gz: 0e9826aee9dba2e16d08842656a3a480f22f6cf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9441fa8879e89e9c13c341399fba73a6a24841e13f463b959ee71b5aae1dac2594fe92f242738826fec8f02c5a839f9767fcdd55e9df7d0d0b5e6102d7c1af75
|
7
|
+
data.tar.gz: 8cf2fdcdc8720babd6a0abae7b98d99541610167995238047e4197839043c036878f24e495193c17f001e95a40b11959d11b468acb2eb0363113a0bb2c530beb
|
data/bin/rcpm
CHANGED
@@ -6,7 +6,7 @@ require 'csv'
|
|
6
6
|
require 'set'
|
7
7
|
require 'optparse'
|
8
8
|
|
9
|
-
options = { k: 0, file: "" }
|
9
|
+
options = { k: 0, file: "", dump: false }
|
10
10
|
|
11
11
|
optparse = OptionParser.new do |opts|
|
12
12
|
opts.banner = "Usage: rcpm -k K -f file1"
|
@@ -18,6 +18,11 @@ optparse = OptionParser.new do |opts|
|
|
18
18
|
opts.on( "-f FILE", String, "File input" ) do |file|
|
19
19
|
options[:file] = file
|
20
20
|
end
|
21
|
+
|
22
|
+
opts.on( "-d", Boolean, "Dump output as Marshall" ) do |dump|
|
23
|
+
options[:dump] = dump
|
24
|
+
end
|
25
|
+
|
21
26
|
end
|
22
27
|
|
23
28
|
begin
|
@@ -53,6 +58,12 @@ cpms_id.each_pair do |year, cpm|
|
|
53
58
|
end
|
54
59
|
end
|
55
60
|
|
61
|
+
if options[:dump]
|
62
|
+
File.open("data","wb") do |f|
|
63
|
+
f << Marshal.dump(cpms)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
56
67
|
cpms.each_pair do |year, cliques|
|
57
68
|
puts "Period: #{year}---------------"
|
58
69
|
cliques.each do |clique|
|
data/lib/rcpm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Boaventura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|