jekyll-crosspost-to-medium 0.1.6 → 0.1.7

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: 4ce942114fe2ebc473547d233c2b48981ed9b41a
4
- data.tar.gz: 053ccbb8a771ce48c89dd529e23e8a6132ad2783
3
+ metadata.gz: d5ad5f27b1543d457921137c6e09b86812171246
4
+ data.tar.gz: ca15aea25a07a481732568c7e2bad990fc23a091
5
5
  SHA512:
6
- metadata.gz: 4f57928f5b4d7685aefe93495bb236e184bbf91504f0b356f54e296ed6970587a46bce74632fa3a553460556f37377130452e05215709b1a5c5c2d597b01c2eb
7
- data.tar.gz: cc37fff7192dd74f33b7ee0e6367f06851ab7ad0eda0f22184aeef924d683ffacec13b1317f92c14e94d118ce5202d0d869a6ffcae82efaaa515d064ab0ecb0e
6
+ metadata.gz: fbc7150a88df2446090c1722b16fd409bc94fe93aeec41627c1b97634de89248ae36d7320a2d7c08d6ca0026176bce83c1773a9cc69093215e4fd21a903de899
7
+ data.tar.gz: b19049bcf0b88abc1a9268875d28073f42a8eaa05a1bf4c1f86cbf6aa76a854f2af8ad2e9f5842fb9f250f66bea162db5ed9f583dc0235cd3dc0348a8bb00049
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # `crosspost_to_medium: true`
12
12
  #
13
- # You can control crossposting globally by setting `enabled: true` under the
13
+ # You can control crossposting globally by setting `enabled: true` under the
14
14
  # `jekyll-crosspost_to_medium` variable in your Jekyll configuration file.
15
15
  # Setting it to false will skip the processing loop entirely which can be
16
16
  # useful for local preview builds.
@@ -114,13 +114,13 @@ module Jekyll
114
114
  content.prepend("<h1>#{title}</h1>")
115
115
  # Append a canonical link and text
116
116
  # TODO Accept a position option, e.g., top, bottom.
117
- #
117
+ #
118
118
  # User the user's config if it exists
119
119
  if @settings['text']
120
120
  canonical_text = "#{@settings['text']}"
121
121
  canonical_text = canonical_text.gsub /{{ url }}/, canonical_url
122
122
  # Otherwise, use boilerplate
123
- else
123
+ else
124
124
  canonical_text = "<p><i>This article was originally posted <a href=\"#{url}\" rel=\"canonical\">on my own site</a>.</i></p>"
125
125
  end
126
126
  content << canonical_text
@@ -179,10 +179,12 @@ module Jekyll
179
179
 
180
180
  if response.code == '201'
181
181
  puts "Posted '#{payload['title']}' to Medium (#{payload['publishStatus']})"
182
+ return true
182
183
  else
183
184
  puts "Attempted to post '#{payload['title']}' to Medium. They responded #{response.body}"
185
+ return false
184
186
  end
185
187
  end
186
188
 
187
189
  end
188
- end
190
+ end
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.6
4
+ version: 0.1.7
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-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-11 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