weekly_snippets 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weekly_snippets/publisher.rb +5 -2
- data/lib/weekly_snippets/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2b35000e787dfa0bf8c5e7cf2229f488908137
|
4
|
+
data.tar.gz: 7086a85a88391050488c874f1bb9c22dd2a345d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4766bf6b54049feda0cfc76769e2d4f709770317bff018895b7e5c3baa798a7b532cbaa0c65665c0803f968d232a315dea3331545a3af0c9ea57685c36cd49
|
7
|
+
data.tar.gz: a6be29931b1b878f40b43a9f5e1d33c021debdbf28aa597ade5b8cf523cf206cb1fac0567fb8e4436579153fb680f1bd466be46e450115f8ea9966978ec1a661
|
@@ -32,7 +32,10 @@ module WeeklySnippets
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Processes +snippets+ entries for publication. Any snippets that should
|
35
|
-
# not appear when in +public_mode+ are removed from +snippets
|
35
|
+
# not appear when in +public_mode+ are removed from +snippets+. The keys
|
36
|
+
# of the resulting hash will be sorted in nondecreasing order.
|
37
|
+
# @param snippets [Hash<String,Hash>] timestamp => batch of snippets
|
38
|
+
# @return [Hash<String,Hash>]
|
36
39
|
def publish(snippets)
|
37
40
|
result = {}
|
38
41
|
snippets.each do |timestamp, snippet_batch|
|
@@ -44,7 +47,7 @@ module WeeklySnippets
|
|
44
47
|
end
|
45
48
|
result[timestamp] = published unless published.empty?
|
46
49
|
end
|
47
|
-
result
|
50
|
+
result.sort.to_h
|
48
51
|
end
|
49
52
|
|
50
53
|
# Parses and publishes a snippet. Filters out snippets rendered empty
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weekly_snippets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Bland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,3 +104,4 @@ signing_key:
|
|
104
104
|
specification_version: 4
|
105
105
|
summary: Standardize, munge, redact, and publish weekly snippets
|
106
106
|
test_files: []
|
107
|
+
has_rdoc:
|