jekyll-crosspost-to-medium 0.1.4 → 0.1.5

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: 570514fa8e54b6d3d3fcc984c47470ebf1cd07cd
4
- data.tar.gz: 9dcf08999f3ee70b1df7aa555c05be64298c8968
3
+ metadata.gz: c6d2f61458ec30f8d4b319a6317f32bbb52148f3
4
+ data.tar.gz: dfbc251efda81506fded117e18c3c8c660705f22
5
5
  SHA512:
6
- metadata.gz: a351e003c1a8ce7fa619d784b67df824b8e2600e68c59b1249a19d85da2792dd624768178358796123f05c85eda0ab756a67dad779f19fe42c7e39c7f625df7b
7
- data.tar.gz: 9d2a29d0775b86ac534faaa243e16e223ea1448af149d9012a6fd407a36c8d958feae44081078e679b9cfaa2a95a115e4453b6a3112263f83e4444dc192d44b7
6
+ metadata.gz: 8e93af0605f0a9356b70791a45fd787b3a55605de50892b8e2a451dbfc82e7122821b73fbeaa15bd941867b69cfbc1a1218b1fe32c8b7572a888392d89da16ab
7
+ data.tar.gz: 47ab0d3dacf5eaacf7d981987308a207d5fff90e3bf11b53e2bef973ed191eb7661a2df78791e0cd712c59db9521a18f92bee356f19e171e640a5d13a641b426
@@ -128,23 +128,29 @@ module Jekyll
128
128
  # Strip domain name from the URL we check against
129
129
  url = url.sub(/^#{@site.config['url']}?/,'')
130
130
 
131
+ # coerce tage to an array
132
+ tags = post.data['tags']
133
+ if tags.kindOf?(String)
134
+ tags = tags.split(',')
135
+ end
136
+
131
137
  # Only cross-post if content has not already been cross-posted
132
138
  if url and ! crossposted.include? url
133
139
  payload = {
134
140
  'title' => title,
135
141
  'contentFormat' => "html",
136
142
  'content' => content,
137
- 'tags' => post.data['tags'],
143
+ 'tags' => tags,
138
144
  'publishStatus' => @settings['status'] || "public",
139
145
  'license' => @settings['license'] || "all-rights-reserved",
140
146
  'canonicalUrl' => canonical_url
141
147
  }
142
148
 
143
- crosspost_to_medium(payload)
144
- crossposted << url
145
-
146
- # Update cache
147
- File.open(@crossposted_file, 'w') { |f| YAML.dump(crossposted, f) }
149
+ if crosspost_to_medium(payload)
150
+ crossposted << url
151
+ # Update cache
152
+ File.open(@crossposted_file, 'w') { |f| YAML.dump(crossposted, f) }
153
+ end
148
154
  end
149
155
  end
150
156
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-crosspost-to-medium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Gustafson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-30 00:00:00.000000000 Z
11
+ date: 2016-01-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " This generator cross-posts entries to Medium. To work, this script
14
14
  requires\n a MEDIUM_USER_ID environment variable and a MEDIUM_INTEGRATION_TOKEN.\n\n