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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f94d8f48ae91b7937a633d20fab6968db7b686cb1b90653bf74c967eea157964
4
- data.tar.gz: bead666e76b4b45a1f0ae8dec096ff86018ceea5a98833dbd3876ec8a99a5c7b
3
+ metadata.gz: a9ec7e0c919c2a46c0cde2cfd8b9793219c001adb7695fa011a5e0572b432cc4
4
+ data.tar.gz: d414c76247628822ea99cbd5c04b218e4a0cf5d31d2f8a08e6ac6cc3eb2065a9
5
5
  SHA512:
6
- metadata.gz: a55e09370bede1affe678f7e2cfaff02656e73c738951a22808c408f2221e71ba1420a551a8eb81971c9c9bb5c5895b61a5486866a99260295ec5c35f3a123b5
7
- data.tar.gz: 25daa7deba0dbb96cf700efa5fa07f2e8311b345a96e17f0affa6dd67b564d4eb023f8eece0231e83a4f2992fd04fc0cca777542ac4e8f0330001cfe2269516e
6
+ metadata.gz: 47108edad3512d51de889063e52198e2b8fb722a58f0e47ae033e7cd01bb397c4cc5a57f7355cff7a61d79228b34dd86f710a643559b6e97cbdd6efe9bfa6358
7
+ data.tar.gz: b21ced879eec1ceaf02afb242dc60d5d2516ce24dfa5f7050107df2005897d285c909b5ff3bc343fd4fcc48785817ba3133f38ac682c8463ecd3f245682413c5
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ *.gem
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Meetup
3
- VERSION = "0.1.0"
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  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.0
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