cirneco 0.6 → 0.6.1
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/Gemfile.lock +2 -2
- data/lib/cirneco/doi.rb +3 -3
- data/lib/cirneco/utils.rb +2 -2
- data/lib/cirneco/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6a761311be0485a9712ca2f2dc30c3dec2c44ca0
|
|
4
|
+
data.tar.gz: ba477ef68eeffa7bf27e014131407714de8f3c1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c19efc867ab3112914ea0af11c2d5fc693d25b4e630c1300318df8988b260451185a65ecf23161b2cfc39f4b9d3111e926af89e2b80f9ffd3a9704037db060c2
|
|
7
|
+
data.tar.gz: 3d7d4d63127f7600c5fa50244235be60ce4a0b311913ce985de141a7a932b06e7bc461e32df814ff1ebf15a00bbc281a30f44da4bd0fab82ff1cf7edfff7d5dd
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cirneco (0.6)
|
|
4
|
+
cirneco (0.6.1)
|
|
5
5
|
activesupport (~> 4.2, >= 4.2.5)
|
|
6
6
|
base32-crockford-checksum (~> 0.2.2)
|
|
7
7
|
bergamasco (~> 0.2)
|
|
@@ -127,4 +127,4 @@ DEPENDENCIES
|
|
|
127
127
|
webmock (~> 1.22, >= 1.22.3)
|
|
128
128
|
|
|
129
129
|
BUNDLED WITH
|
|
130
|
-
1.
|
|
130
|
+
1.13.6
|
data/lib/cirneco/doi.rb
CHANGED
|
@@ -28,7 +28,7 @@ module Cirneco
|
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
desc "generate
|
|
31
|
+
desc "generate DOI", "generate a DOI name"
|
|
32
32
|
method_option :prefix, :default => ENV['PREFIX']
|
|
33
33
|
method_option :number, :type => :numeric, :aliases => '-n'
|
|
34
34
|
def generate
|
|
@@ -71,9 +71,9 @@ module Cirneco
|
|
|
71
71
|
def unregister(filepath)
|
|
72
72
|
|
|
73
73
|
if File.directory?(filepath)
|
|
74
|
-
response =
|
|
74
|
+
response = unregister_all_files(filepath, options)
|
|
75
75
|
else
|
|
76
|
-
response =
|
|
76
|
+
response = unregister_file(filepath, options)
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
puts response
|
data/lib/cirneco/utils.rb
CHANGED
|
@@ -72,13 +72,13 @@ module Cirneco
|
|
|
72
72
|
def register_all_files(folderpath, options={})
|
|
73
73
|
Dir.glob("#{folderpath}/*.md").map do |filepath|
|
|
74
74
|
register_file(filepath, options)
|
|
75
|
-
end.join("\n")
|
|
75
|
+
end.compact.join("\n")
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def unregister_all_files(folderpath, options={})
|
|
79
79
|
Dir.glob("#{folderpath}/*.md").map do |filepath|
|
|
80
80
|
unregister_file(filepath, options)
|
|
81
|
-
end.join("\n")
|
|
81
|
+
end.compact.join("\n")
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
def generate_metadata_for_work(filepath, options={})
|
data/lib/cirneco/version.rb
CHANGED