playgroundbook 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +110 -0
  3. data/Changelog.md +4 -0
  4. data/Gemfile +10 -9
  5. data/Gemfile.lock +4 -2
  6. data/Guardfile +2 -2
  7. data/Rakefile +3 -3
  8. data/bin/playgroundbook +9 -7
  9. data/lib/{playgroundbook_lint → linter}/abstract_linter.rb +2 -2
  10. data/lib/{playgroundbook_lint → linter}/chapter_linter.rb +4 -4
  11. data/lib/{playgroundbook_lint → linter}/chapter_manifest_linter.rb +5 -5
  12. data/lib/{playgroundbook_lint → linter}/contents_linter.rb +3 -3
  13. data/lib/{playgroundbook_lint → linter}/cutscene_page_linter.rb +2 -2
  14. data/lib/{playgroundbook_lint → linter}/cutscene_page_manifest_linter.rb +2 -2
  15. data/lib/{playgroundbook_lint → linter}/manifest_linter.rb +5 -5
  16. data/lib/{playgroundbook_lint → linter}/page_linter.rb +2 -2
  17. data/lib/{playgroundbook_lint → linter}/page_manifest_linter.rb +3 -3
  18. data/lib/{playgroundbook_lint → linter}/playgroundbook_lint.rb +6 -6
  19. data/lib/{playgroundbook_lint → linter}/root_manifest_linter.rb +9 -9
  20. data/lib/playgroundbook.rb +8 -7
  21. data/lib/{playgroundbook_renderer → renderer}/chapter_collator.rb +18 -18
  22. data/lib/renderer/contents_manifest_generator.rb +35 -0
  23. data/lib/{playgroundbook_renderer → renderer}/glossary_generator.rb +13 -16
  24. data/lib/{playgroundbook_renderer → renderer}/page_parser.rb +4 -3
  25. data/lib/{playgroundbook_renderer → renderer}/page_processor.rb +0 -0
  26. data/lib/{playgroundbook_renderer → renderer}/page_writer.rb +11 -11
  27. data/lib/{playgroundbook_renderer → renderer}/playgroundbook_renderer.rb +29 -29
  28. data/lib/version.rb +1 -1
  29. data/lib/wrapper/markdown_wrapper.rb +58 -0
  30. data/playground_book_lint.gemspec +14 -14
  31. data/spec/fixtures/wrapper/destination/swift_at_artsy_1.swift +199 -0
  32. data/spec/fixtures/wrapper/source/Swift-at-Artsy.playground/Contents.swift +199 -0
  33. data/spec/fixtures/wrapper/source/Swift-at-Artsy.playground/contents.xcplayground +4 -0
  34. data/spec/fixtures/wrapper/source/swift_at_artsy_1.md +183 -0
  35. data/spec/{playground_book_lint → linter}/chapter_linter_spec.rb +5 -5
  36. data/spec/{playground_book_lint → linter}/chapter_manifest_linter_spec.rb +12 -12
  37. data/spec/{playground_book_lint → linter}/contents_linter_spec.rb +3 -3
  38. data/spec/{playground_book_lint → linter}/cutscene_page_linter_spec.rb +2 -2
  39. data/spec/linter/cutscene_page_manifest_linter_spec.rb +63 -0
  40. data/spec/linter/manfiest_linter_spec.rb +71 -0
  41. data/spec/{playground_book_lint → linter}/page_linter_spec.rb +4 -4
  42. data/spec/{playground_book_lint → linter}/page_manifest_linter_spec.rb +13 -13
  43. data/spec/{playground_book_lint → linter}/playgroundbook_lint_spec.rb +6 -6
  44. data/spec/linter/root_manifest_linter_spec.rb +35 -0
  45. data/spec/renderer/chapter_collator_spec.rb +70 -0
  46. data/spec/renderer/contents_manfiest_generator_spec.rb +41 -0
  47. data/spec/renderer/glossary_generator_spec.rb +54 -0
  48. data/spec/{playgroundbook_renderer_spec → renderer}/page_processor_spec.rb +12 -12
  49. data/spec/{playgroundbook_renderer_spec → renderer}/page_writer_spec.rb +19 -19
  50. data/spec/renderer/playgroundbook_renderer_spec.rb +122 -0
  51. data/spec/spec_helper.rb +38 -38
  52. data/spec/wrapper/markdown_wrapper_spec.rb +33 -0
  53. metadata +43 -37
  54. data/lib/playgroundbook_renderer/contents_manifest_generator.rb +0 -35
  55. data/spec/playground_book_lint/cutscene_page_manifest_linter_spec.rb +0 -63
  56. data/spec/playground_book_lint/manfiest_linter_spec.rb +0 -71
  57. data/spec/playground_book_lint/root_manifest_linter_spec.rb +0 -35
  58. data/spec/playgroundbook_renderer_spec/chapter_collator_spec.rb +0 -70
  59. data/spec/playgroundbook_renderer_spec/contents_manfiest_generator_spec.rb +0 -41
  60. data/spec/playgroundbook_renderer_spec/glossary_generator_spec.rb +0 -52
  61. data/spec/playgroundbook_renderer_spec/playgroundbook_renderer_spec.rb +0 -122
@@ -1,9 +1,10 @@
1
- require 'playgroundbook_lint/playgroundbook_lint'
2
- require 'playgroundbook_renderer/playgroundbook_renderer'
1
+ require "linter/playgroundbook_lint"
2
+ require "renderer/playgroundbook_renderer"
3
+ require "wrapper/markdown_wrapper"
3
4
 
4
5
  module Playgroundbook
5
- ManifestFileName = 'Manifest.plist'.freeze
6
- ContentsSwiftFileName = 'Contents.swift'.freeze
7
- ResourcesDirectoryName = 'Resources'.freeze
8
- PagesDirectoryName = 'Pages'.freeze
9
- end
6
+ ManifestFileName = "Manifest.plist".freeze
7
+ ContentsSwiftFileName = "Contents.swift".freeze
8
+ ResourcesDirectoryName = "Resources".freeze
9
+ PagesDirectoryName = "Pages".freeze
10
+ end
@@ -1,9 +1,9 @@
1
- require 'plist'
2
- require 'playgroundbook_renderer/page_writer'
1
+ require "plist"
2
+ require "renderer/page_writer"
3
3
 
4
4
  module Playgroundbook
5
- SharedSourcesDirectoryName = 'Sources'
6
- PreambleFileName = 'Preamble.swift'
5
+ SharedSourcesDirectoryName = "Sources".freeze
6
+ PreambleFileName = "Preamble.swift".freeze
7
7
 
8
8
  class ChapterCollator
9
9
  def initialize(page_writer = PageWriter.new, ui = Cork::Board.new)
@@ -11,12 +11,12 @@ module Playgroundbook
11
11
  @ui = ui
12
12
  end
13
13
 
14
- def collate!(chapter_name, parsed_chapter, imports)
14
+ def collate(chapter_name, parsed_chapter, imports)
15
15
  @ui.puts "Processing #{chapter_name.green}."
16
16
 
17
17
  chapter_directory_name = "#{chapter_name}.playgroundchapter"
18
18
  Dir.mkdir(chapter_directory_name) unless Dir.exist?(chapter_directory_name)
19
- Dir.chdir(chapter_directory_name) do
19
+ Dir.chdir(chapter_directory_name) do
20
20
  Dir.mkdir(PagesDirectoryName) unless Dir.exist?(PagesDirectoryName)
21
21
  Dir.chdir(PagesDirectoryName) do
22
22
  parsed_chapter[:page_names].each_with_index do |page_name, index|
@@ -25,35 +25,35 @@ module Playgroundbook
25
25
  page_contents = parsed_chapter[:page_contents][index]
26
26
  page_dir_name = parsed_chapter[:page_dir_names][index]
27
27
 
28
- @page_writer.write_page!(page_name, page_dir_name, imports, page_contents)
28
+ @page_writer.write_page(page_name, page_dir_name, imports, page_contents)
29
29
  end
30
30
  end
31
31
 
32
- write_chapter_manifest!(chapter_name, parsed_chapter[:page_dir_names])
33
- write_preamble!(parsed_chapter[:preamble])
32
+ write_chapter_manifest(chapter_name, parsed_chapter[:page_dir_names])
33
+ write_preamble(parsed_chapter[:preamble])
34
34
  end
35
35
  end
36
36
 
37
- def write_chapter_manifest!(chapter_name, page_dir_names)
37
+ def write_chapter_manifest(chapter_name, page_dir_names)
38
38
  manifest_contents = {
39
- 'Name' => chapter_name,
40
- 'Pages' => page_dir_names,
41
- 'Version' => '1.0',
42
- 'ContentVersion' => '1.0',
39
+ "Name" => chapter_name,
40
+ "Pages" => page_dir_names,
41
+ "Version" => "1.0",
42
+ "ContentVersion" => "1.0"
43
43
  }
44
- File.open(ManifestFileName, 'w') do |file|
44
+ File.open(ManifestFileName, "w") do |file|
45
45
  file.write(manifest_contents.to_plist)
46
46
  end
47
47
  end
48
48
 
49
- def write_preamble!(preamble)
49
+ def write_preamble(preamble)
50
50
  Dir.mkdir(SharedSourcesDirectoryName) unless Dir.exist?(SharedSourcesDirectoryName)
51
51
 
52
52
  Dir.chdir(SharedSourcesDirectoryName) do
53
- File.open(PreambleFileName, 'w') do |file|
53
+ File.open(PreambleFileName, "w") do |file|
54
54
  file.write(preamble)
55
55
  end
56
56
  end
57
57
  end
58
58
  end
59
- end
59
+ end
@@ -0,0 +1,35 @@
1
+ require "plist"
2
+
3
+ module Playgroundbook
4
+ class ContentsManifestGenerator
5
+ def initialize(ui = Cork::Board.new)
6
+ @ui = ui
7
+ end
8
+
9
+ def generate(book_metadata)
10
+ @ui.puts "Generating main manifest file."
11
+ write_manifest_file(book_metadata)
12
+ @ui.puts "Manifest file generated."
13
+ end
14
+
15
+ def write_manifest_file(book_metadata)
16
+ File.open(ManifestFileName, "w") do |file|
17
+ file.write(manifest_contents(book_metadata).to_plist)
18
+ end
19
+ end
20
+
21
+ def manifest_contents(book_metadata)
22
+ chapters = book_metadata["chapters"].map { |c| "#{c}.playgroundchapter" }
23
+ manifest_contents = {
24
+ "Name" => book_metadata["name"],
25
+ "ContentIdentifier" => book_metadata["identifier"],
26
+ "DeploymentTarget" => book_metadata["deployment_target"] || "ios10.0",
27
+ "Chapters" => chapters,
28
+ "Version" => "1.0",
29
+ "ContentVersion" => "1.0"
30
+ }
31
+ manifest_contents["ImageReference"] = book_metadata["cover"] unless book_metadata["cover"].nil?
32
+ manifest_contents
33
+ end
34
+ end
35
+ end
@@ -1,16 +1,16 @@
1
- require 'uri'
1
+ require "uri"
2
2
 
3
3
  module Playgroundbook
4
- GlossaryFileName = 'Glossary.plist'.freeze
4
+ GlossaryFileName = "Glossary.plist".freeze
5
5
 
6
6
  class GlossaryGenerator
7
- def generate!(parsed_chapters, chapter_names, glossary)
7
+ def generate(parsed_chapters, chapter_names, glossary)
8
8
  glossary_plist = {
9
- 'Terms' => {}
9
+ "Terms" => {}
10
10
  }
11
11
 
12
12
  glossary.each do |term, definition|
13
- glossary_plist['Terms'][term] = { 'Definition' => definition }
13
+ glossary_plist["Terms"][term] = { "Definition" => definition }
14
14
  escaped_term = URI.escape(term)
15
15
  parsed_chapters.each_with_index do |chapter, i|
16
16
  pages = chapter[:page_contents]
@@ -19,23 +19,20 @@ module Playgroundbook
19
19
 
20
20
  pages.each_with_index do |page, j|
21
21
  page_name = URI.escape(page_names[j])
22
- unless page.scan("](glossary://#{escaped_term})").empty?
23
- glossary_plist['Terms'][term].merge!({
24
- 'FirstUse' => {
25
- 'Title' => page_names[j],
26
- 'PageReference' => "#{chapter_name}/#{page_name}",
27
- }
28
- })
29
- break
30
- end
22
+ next if page.scan("](glossary://#{escaped_term})").empty?
23
+ glossary_plist["Terms"][term]["FirstUse"] = {
24
+ "Title" => page_names[j],
25
+ "PageReference" => "#{chapter_name}/#{page_name}"
26
+ }
27
+ break
31
28
  end
32
29
 
33
30
  # Break if we found the first user.
34
- break unless glossary_plist['Terms'][term]['FirstUse'].empty?
31
+ break unless glossary_plist["Terms"][term]["FirstUse"].empty?
35
32
  end
36
33
  end
37
34
 
38
- File.open(glossary_file_name, 'w') do |file|
35
+ File.open(glossary_file_name, "w") do |file|
39
36
  file.write(glossary_plist.to_plist)
40
37
  end
41
38
  end
@@ -1,18 +1,19 @@
1
1
  module Playgroundbook
2
2
  class PageParser
3
3
  def parse_chapter_pages(chapter_contents)
4
- page_names = chapter_contents.scan(/\/\/\/\/.*$/).map { |p| p.gsub('////', '').strip }
4
+ # Looks for //// PageName separators.
5
+ page_names = chapter_contents.scan(/\/\/\/\/.*$/).map { |p| p.gsub("////", "").strip }
5
6
  page_dir_names = page_names.map { |p| "#{p}.playgroundpage" }
6
7
 
7
8
  split_file = chapter_contents.split(/\/\/\/\/.*$/)
8
- page_contents = split_file.drop(1).map { |p| p.strip }
9
+ page_contents = split_file.drop(1).map(&:strip)
9
10
  preamble = split_file.first.strip
10
11
 
11
12
  {
12
13
  page_dir_names: page_dir_names,
13
14
  page_names: page_names,
14
15
  page_contents: page_contents,
15
- preamble: preamble,
16
+ preamble: preamble
16
17
  }
17
18
  end
18
19
  end
@@ -1,5 +1,5 @@
1
- require 'plist'
2
- require 'playgroundbook_renderer/page_processor'
1
+ require "plist"
2
+ require "renderer/page_processor"
3
3
 
4
4
  module Playgroundbook
5
5
  class PageWriter
@@ -8,7 +8,7 @@ module Playgroundbook
8
8
  @ui = ui
9
9
  end
10
10
 
11
- def write_page!(page_name, page_dir_name, imports, page_contents)
11
+ def write_page(page_name, page_dir_name, imports, page_contents)
12
12
  Dir.mkdir(page_dir_name) unless Dir.exist?(page_dir_name)
13
13
 
14
14
  contents_with_import = "//#-hidden-code\n"
@@ -17,19 +17,19 @@ module Playgroundbook
17
17
  contents_with_import += @page_processor.strip_extraneous_newlines(page_contents)
18
18
 
19
19
  Dir.chdir(page_dir_name) do
20
- File.open(ContentsSwiftFileName, 'w') do |file|
20
+ File.open(ContentsSwiftFileName, "w") do |file|
21
21
  file.write(contents_with_import)
22
22
  end
23
23
 
24
- File.open(MANIFEST_FILE_NAME, 'w') do |file|
25
- file.write ({
26
- 'Name' => page_name,
27
- 'LiveViewMode' => 'HiddenByDefault',
28
- 'Version' => '1.0',
29
- 'ContentVersion' => '1.0',
24
+ File.open(MANIFEST_FILE_NAME, "w") do |file|
25
+ file.write({
26
+ "Name" => page_name,
27
+ "LiveViewMode" => "HiddenByDefault",
28
+ "Version" => "1.0",
29
+ "ContentVersion" => "1.0"
30
30
  }.to_plist)
31
31
  end
32
32
  end
33
33
  end
34
34
  end
35
- end
35
+ end
@@ -1,15 +1,15 @@
1
- require 'colored'
2
- require 'pathname'
3
- require 'yaml'
4
- require 'fileutils'
5
- require 'playgroundbook_renderer/contents_manifest_generator'
6
- require 'playgroundbook_renderer/chapter_collator'
7
- require 'playgroundbook_renderer/page_parser'
8
- require 'playgroundbook_renderer/glossary_generator'
1
+ require "colored"
2
+ require "pathname"
3
+ require "yaml"
4
+ require "fileutils"
5
+ require "renderer/contents_manifest_generator"
6
+ require "renderer/chapter_collator"
7
+ require "renderer/page_parser"
8
+ require "renderer/glossary_generator"
9
9
 
10
10
  module Playgroundbook
11
- ContentsDirectoryName = 'Contents'
12
- ChaptersDirName = 'Chapters'
11
+ ContentsDirectoryName = "Contents".freeze
12
+ ChaptersDirName = "Chapters".freeze
13
13
 
14
14
  # A renderer for playground books.
15
15
  class Renderer < AbstractLinter
@@ -20,12 +20,12 @@ module Playgroundbook
20
20
  attr_accessor :glossary_generator
21
21
  attr_accessor :ui
22
22
 
23
- def initialize(yaml_file_name,
24
- contents_manifest_generator = ContentsManifestGenerator.new,
25
- page_parser = PageParser.new,
26
- chapter_collator = ChapterCollator.new,
27
- glossary_generator = GlossaryGenerator.new,
28
- ui = Cork::Board.new)
23
+ def initialize(yaml_file_name,
24
+ contents_manifest_generator = ContentsManifestGenerator.new,
25
+ page_parser = PageParser.new,
26
+ chapter_collator = ChapterCollator.new,
27
+ glossary_generator = GlossaryGenerator.new,
28
+ ui = Cork::Board.new)
29
29
  @yaml_file_name = yaml_file_name
30
30
  @contents_manifest_generator = contents_manifest_generator
31
31
  @page_parser = page_parser
@@ -34,19 +34,19 @@ module Playgroundbook
34
34
  @ui = ui
35
35
  end
36
36
 
37
- def render!
37
+ def render
38
38
  ui.puts "Rendering #{yaml_file_name.green}..."
39
-
39
+
40
40
  book = yaml_contents
41
41
  book_dir_name = "#{book['name']}.playgroundbook"
42
42
  book_chapter_contents = []
43
43
  # TODO: Validate YAML contents?
44
44
  begin
45
- book_chapter_contents = book['chapters'].map do |chapter|
45
+ book_chapter_contents = book["chapters"].map do |chapter|
46
46
  File.read("#{chapter}.playground/Contents.swift")
47
47
  end
48
48
  rescue => e
49
- ui.puts 'Failed to open playground Contents.swift file.'
49
+ ui.puts "Failed to open playground Contents.swift file."
50
50
  raise e
51
51
  end
52
52
  parsed_chapters = book_chapter_contents.map { |c| page_parser.parse_chapter_pages(c) }
@@ -56,29 +56,29 @@ module Playgroundbook
56
56
  Dir.mkdir(ContentsDirectoryName) unless Dir.exist?(ContentsDirectoryName)
57
57
  Dir.chdir(ContentsDirectoryName) do
58
58
  Dir.mkdir(ResourcesDirectoryName) unless Dir.exist?(ResourcesDirectoryName) # Always create a Resources dir, even if empty.
59
- resources_dir = book['resources']
60
- if !(resources_dir.nil? || resources_dir.empty?)
59
+ resources_dir = book["resources"]
60
+ unless resources_dir.nil? || resources_dir.empty?
61
61
  @ui.puts "Copying resource directory (#{resources_dir.green}) contents."
62
62
  Dir.glob("../../#{resources_dir}/*").each do |file|
63
63
  FileUtils.cp(file, ResourcesDirectoryName)
64
64
  end
65
65
  end
66
- @contents_manifest_generator.generate!(book)
66
+ @contents_manifest_generator.generate(book)
67
67
 
68
68
  Dir.mkdir(ChaptersDirName) unless Dir.exist?(ChaptersDirName)
69
69
  Dir.chdir(ChaptersDirName) do
70
70
  # Chapter file name becomes chapter name in playground book.
71
- book['chapters'].each_with_index do |chapter_file_name, index|
71
+ book["chapters"].each_with_index do |chapter_file_name, index|
72
72
  parsed_chapter = parsed_chapters[index]
73
- @chapter_collator.collate!(chapter_file_name, parsed_chapter, book['imports'] || ['UIKit'])
73
+ @chapter_collator.collate(chapter_file_name, parsed_chapter, book["imports"] || ["UIKit"])
74
74
  end
75
75
  end
76
76
  end
77
77
 
78
- unless book['glossary'].nil?
79
- @ui.puts 'Generating glossary.'
80
- @glossary_generator.generate!(parsed_chapters, book['chapters'], book['glossary'])
81
- end
78
+ unless book["glossary"].nil?
79
+ @ui.puts "Generating glossary."
80
+ @glossary_generator.generate(parsed_chapters, book["chapters"], book["glossary"])
81
+ end
82
82
  end
83
83
  end
84
84
 
@@ -1,3 +1,3 @@
1
1
  module Playgroundbook
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = "0.4.0".freeze
3
3
  end
@@ -0,0 +1,58 @@
1
+ require "fileutils"
2
+
3
+ module Playgroundbook
4
+ # Converts a Markdown file into a Swift Playground
5
+ # Needs to:
6
+ # - Switch out code from being in a block to being a root element
7
+ # - Comment out non-code comments
8
+ # - Embed images inside the Resources Dir
9
+ #
10
+ class MarkdownWrapper
11
+ attr_accessor :source, :name, :playground_contents
12
+
13
+ def initialize(source, name)
14
+ self.source = source
15
+ self.name = name
16
+ self.playground_contents = File.read(source)
17
+ end
18
+
19
+ def generate
20
+ contents = swap_code_context(playground_contents)
21
+ create_a_playground_wrapper(contents)
22
+ end
23
+
24
+ def swap_code_context(file_content)
25
+ prefix = "/*:\n"
26
+ suffix = "*/"
27
+ content = file_content.gsub("```swift", "*/\n").gsub("```", "/*:")
28
+ prefix + content + suffix
29
+ end
30
+
31
+ def create_a_playground_wrapper(file_content)
32
+ folder = File.dirname(source)
33
+ playground = File.join(folder, name + ".playground")
34
+
35
+ FileUtils.rm_r(playground) if Dir.exist?(playground)
36
+ Dir.mkdir(playground)
37
+
38
+ xcplayground = <<-XML
39
+ <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
40
+ <playground version='5.0' target-platform='osx' display-mode='rendered'>
41
+ <timeline fileName='timeline.xctimeline'/>
42
+ </playground>
43
+ XML
44
+
45
+ timeline = <<-XML
46
+ <?xml version="1.0" encoding="UTF-8"?>
47
+ <Timeline
48
+ version = "3.0">
49
+ <TimelineItems>
50
+ </TimelineItems>
51
+ </Timeline>
52
+ XML
53
+ File.write(File.join(playground, "contents.xcplayground"), xcplayground)
54
+ File.write(File.join(playground, "timeline.xctimeline"), timeline)
55
+ File.write(File.join(playground, "Contents.swift"), file_content)
56
+ end
57
+ end
58
+ end
@@ -1,21 +1,21 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'version'
4
+ require "version"
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = 'playgroundbook'
7
+ s.name = "playgroundbook"
8
8
  s.version = Playgroundbook::VERSION
9
- s.licenses = ['MIT']
10
- s.summary = 'Lints/renders Swift Playground books.'
11
- s.description = 'Tooks for Swift Playground books on iOS, a renderer and a linter.'
12
- s.authors = ['Ash Furrow']
13
- s.homepage = 'https://github.com/ashfurrow/playground-book-lint'
14
- s.email = 'ash@ashfurrow.com'
9
+ s.licenses = ["MIT"]
10
+ s.summary = "Lints/renders Swift Playground books."
11
+ s.description = "Tooks for Swift Playground books on iOS, a renderer and a linter."
12
+ s.authors = ["Ash Furrow"]
13
+ s.homepage = "https://github.com/ashfurrow/playground-book-lint"
14
+ s.email = "ash@ashfurrow.com"
15
15
  s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
- s.require_paths = ['lib']
17
- s.executables = ['playgroundbook']
18
- s.add_runtime_dependency 'plist', '~> 3.2'
19
- s.add_runtime_dependency 'colored', '~> 1.2'
20
- s.add_runtime_dependency 'cork', '~> 0.1'
16
+ s.require_paths = ["lib"]
17
+ s.executables = ["playgroundbook"]
18
+ s.add_runtime_dependency "plist", "~> 3.2"
19
+ s.add_runtime_dependency "colored", "~> 1.2"
20
+ s.add_runtime_dependency "cork", "~> 0.1"
21
21
  end