jekyll-meetup 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/jekyll-meetup.rb +1 -0
- data/lib/jekyll/meetup/data_collection.rb +17 -0
- data/lib/jekyll/meetup/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9ec7e0c919c2a46c0cde2cfd8b9793219c001adb7695fa011a5e0572b432cc4
|
4
|
+
data.tar.gz: d414c76247628822ea99cbd5c04b218e4a0cf5d31d2f8a08e6ac6cc3eb2065a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47108edad3512d51de889063e52198e2b8fb722a58f0e47ae033e7cd01bb397c4cc5a57f7355cff7a61d79228b34dd86f710a643559b6e97cbdd6efe9bfa6358
|
7
|
+
data.tar.gz: b21ced879eec1ceaf02afb242dc60d5d2516ce24dfa5f7050107df2005897d285c909b5ff3bc343fd4fcc48785817ba3133f38ac682c8463ecd3f245682413c5
|
data/.gitignore
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
require 'jekyll/meetup'
|
@@ -5,6 +5,7 @@ module Jekyll
|
|
5
5
|
@data_dir = data_dir
|
6
6
|
@collection_name = collection_name
|
7
7
|
@path = File.join(data_dir, collection_name)
|
8
|
+
@directories_created = false
|
8
9
|
end
|
9
10
|
|
10
11
|
def remove_existing_files!
|
@@ -12,12 +13,28 @@ module Jekyll
|
|
12
13
|
end
|
13
14
|
|
14
15
|
def create_file(filename, &block)
|
16
|
+
create_directories unless @directories_created
|
17
|
+
|
15
18
|
File.open(File.join(@path, filename), 'w', &block)
|
16
19
|
end
|
17
20
|
|
18
21
|
def create_symlink(to_file, link_name)
|
22
|
+
create_directories unless @directories_created
|
23
|
+
|
19
24
|
File.link(File.join(@path, to_file), File.join(@path, link_name))
|
20
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def create_directories
|
30
|
+
Dir.mkdir(@data_dir) unless Dir.exist?(@data_dir)
|
31
|
+
|
32
|
+
unless Dir.exist?(File.join(@data_dir, @collection_name))
|
33
|
+
Dir.mkdir(File.join(@data_dir, @collection_name))
|
34
|
+
end
|
35
|
+
|
36
|
+
@directories_created = true
|
37
|
+
end
|
21
38
|
end
|
22
39
|
end
|
23
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-meetup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Dooner
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- bin/console
|
54
54
|
- bin/setup
|
55
55
|
- jekyll-meetup.gemspec
|
56
|
+
- lib/jekyll-meetup.rb
|
56
57
|
- lib/jekyll/meetup.rb
|
57
58
|
- lib/jekyll/meetup/api_client.rb
|
58
59
|
- lib/jekyll/meetup/command.rb
|