jekyll_remote_assets 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll_remote_assets.rb +6 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f68758084318ca0826f198ad193561eaadc6ed0
4
- data.tar.gz: 3509c3789e3ba1336da8493fd0826b577ff06813
3
+ metadata.gz: 384462552ce67d2b99c6fb9da0f08c63d00ca70b
4
+ data.tar.gz: a6316b7f7b99f28eaf41069afcfbf7007c1a4599
5
5
  SHA512:
6
- metadata.gz: 5fce80ddeb49d69f0533c406d9ae78607c810af9fd9be45c0eb7bd27c92d1bc2f61982498299e5a17c7d3812babf7d39afbf7da76d5a358e2040719538522679
7
- data.tar.gz: d7bbff9c56a4e6b8bc926f508b57fb8ed3e8846583b36659d01ce4db8a00707554f6e137c9dc1335fd88fe7a4b153fa1d68c1ca493e6339b4924860a2f25f94c
6
+ metadata.gz: 0ceee12f657f8db8f84b7bdef89b8249288abd6086f86aedade4fca0f6439867d6e2b28922101b80b92dd047cc42131a2f6a0956123e6f6416c16d00a80bb0c9
7
+ data.tar.gz: 1d90a8676a1d824362b3957c8e4f07863954d0dd0145be374d607861e2c024c80f32f773c2e032efba1278a200cdd00e7375e04b078506a3985caccb8010c3b8
@@ -35,7 +35,7 @@ module Jekyll
35
35
 
36
36
  def config_oauth(plugin_config)
37
37
  @oauth_config = {}
38
- config_file = plugin_config["config"] || __dir__ + "/.remote_assets_config"
38
+ config_file = plugin_config["config"]
39
39
  if not File.exist?(config_file)
40
40
  puts "1. Create a new application on the Dropbox App Console, if you haven't already: https://www.dropbox.com/developers/apps"
41
41
  $stdin.gets
@@ -74,7 +74,7 @@ module Jekyll
74
74
 
75
75
  def init_cache(plugin_config)
76
76
  @cache = {}
77
- cache_file = plugin_config["cache"] || __dir__ + "/.remote_assets_cache"
77
+ cache_file = plugin_config["cache"]
78
78
 
79
79
  # TODO: fix first-time set up of cache
80
80
  if not File.exist?(cache_file)
@@ -110,6 +110,9 @@ module Jekyll
110
110
 
111
111
  def generate(site)
112
112
  plugin_config = site.config["remote_assets"] || {}
113
+ plugin_config["config"] ||= site.source + "/.remote_assets_config"
114
+ plugin_config["cache"] ||= site.source + "/.remote_assets_cache"
115
+
113
116
  config_oauth(plugin_config)
114
117
  init_cache(plugin_config)
115
118
 
@@ -160,8 +163,7 @@ module Jekyll
160
163
  end
161
164
  @cache.delete_if { |key, value| not file_set.include? key }
162
165
 
163
- # TODO: clean up file saving
164
- File.open(plugin_config["cache"] || __dir__ + "/.remote_assets_cache", 'w+') do |f|
166
+ File.open(plugin_config["cache"], 'w+') do |f|
165
167
  YAML.dump(@cache, f)
166
168
  end
167
169
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_remote_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Broder