playgroundbook 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -6
  3. data/lib/renderer/chapter_collator.rb +3 -2
  4. data/lib/renderer/contents_manifest_generator.rb +1 -1
  5. data/lib/renderer/page_writer.rb +3 -3
  6. data/lib/renderer/playgroundbook_renderer.rb +1 -1
  7. data/lib/version.rb +1 -1
  8. data/lib/wrapper/markdown_wrapper.rb +31 -3
  9. metadata +3 -45
  10. data/.gitignore +0 -50
  11. data/.rspec +0 -2
  12. data/.rubocop.yml +0 -112
  13. data/.ruby-version +0 -1
  14. data/Changelog.md +0 -30
  15. data/Gemfile +0 -13
  16. data/Gemfile.lock +0 -105
  17. data/Guardfile +0 -14
  18. data/Rakefile +0 -8
  19. data/playground_book_lint.gemspec +0 -21
  20. data/spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Manifest.plist +0 -15
  21. data/spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page1.playgroundpage/Contents.swift +0 -8
  22. data/spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page1.playgroundpage/Manifest.plist +0 -12
  23. data/spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page2.playgroundpage/Contents.swift +0 -8
  24. data/spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page2.playgroundpage/Manifest.plist +0 -12
  25. data/spec/fixtures/Starter.playgroundbook/Contents/Manifest.plist +0 -20
  26. data/spec/fixtures/assets/file.jpeg +0 -0
  27. data/spec/fixtures/book.yml +0 -6
  28. data/spec/fixtures/test_chapter.playground/Contents.swift +0 -17
  29. data/spec/fixtures/test_chapter.playground/contents.xcplayground +0 -4
  30. data/spec/fixtures/wrapper/destination/swift_at_artsy_1.swift +0 -199
  31. data/spec/fixtures/wrapper/source/Swift-at-Artsy.playground/Contents.swift +0 -199
  32. data/spec/fixtures/wrapper/source/Swift-at-Artsy.playground/contents.xcplayground +0 -4
  33. data/spec/fixtures/wrapper/source/swift_at_artsy_1.md +0 -183
  34. data/spec/linter/chapter_linter_spec.rb +0 -30
  35. data/spec/linter/chapter_manifest_linter_spec.rb +0 -40
  36. data/spec/linter/contents_linter_spec.rb +0 -18
  37. data/spec/linter/cutscene_page_linter_spec.rb +0 -14
  38. data/spec/linter/cutscene_page_manifest_linter_spec.rb +0 -63
  39. data/spec/linter/manfiest_linter_spec.rb +0 -71
  40. data/spec/linter/page_linter_spec.rb +0 -19
  41. data/spec/linter/page_manifest_linter_spec.rb +0 -43
  42. data/spec/linter/playgroundbook_lint_spec.rb +0 -38
  43. data/spec/linter/root_manifest_linter_spec.rb +0 -35
  44. data/spec/renderer/chapter_collator_spec.rb +0 -70
  45. data/spec/renderer/contents_manfiest_generator_spec.rb +0 -41
  46. data/spec/renderer/glossary_generator_spec.rb +0 -54
  47. data/spec/renderer/page_processor_spec.rb +0 -86
  48. data/spec/renderer/page_writer_spec.rb +0 -70
  49. data/spec/renderer/playgroundbook_renderer_spec.rb +0 -122
  50. data/spec/spec_helper.rb +0 -84
  51. data/spec/wrapper/markdown_wrapper_spec.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74ed5b6506eab19b59be7917fe5314620e1dc893
4
- data.tar.gz: 71c9d12ab78353b3b877e6a6379b14eeb8119c92
3
+ metadata.gz: 321a3cb7bdb3aedef9688a88e1bb10d64b1fd0df
4
+ data.tar.gz: a0a0c402f21c7283eda8407c14c0369de15e5225
5
5
  SHA512:
6
- metadata.gz: 344b95c2eaeda147d21643d537d0c1e5d4e1bee09a277f6f493dac399e8e85fd94d082ee904c7d0420f9c8648378553068b2c9ca1a443eb2aa31bc55b9788eb4
7
- data.tar.gz: 1d40b036c24852da1bcbbc992d0ad35e4240d07eec6d394f4e5961973d880d26d039edcde4617c5e170609239888939ecdf0589f3a05f0b4040006405029d6e0
6
+ metadata.gz: 73e51b06d3e88a1789b53306d58a3ee37aaddf425bca97a08670233da7a72b03a95221e78dec93302b3fd6f02246eba6e7ad57bff7b82cb96fe8b1dfbc9d8066
7
+ data.tar.gz: ceaf0214a08f6bea1c63f1599593f66792a8b9fc86877c122db66290e74a60f4531eca266de2cd2f2b857c3ea9f53e4c0520ba8983b2cbab56476c70b5636daa
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- [![CircleCI](https://circleci.com/gh/ashfurrow/playgroundbook.svg?style=svg)](https://circleci.com/gh/ashfurrow/playgroundbook)
1
+ [![CircleCI](https://circleci.com/gh/playgroundbooks/playgroundbook.svg?style=svg)](https://circleci.com/gh/playgroundbooks/playgroundbook)
2
2
 
3
3
  # playgroundbook
4
4
 
5
- Linter for Swift Playground books based on [Apple's documentation](https://developer.apple.com/library/prerelease/content/documentation/Xcode/Conceptual/swift_playgrounds_doc_format/index.html#//apple_ref/doc/uid/TP40017343-CH47-SW4). It's a work in progress (see [issues](https://github.com/ashfurrow/playground-book-lint/issues)) but you can use it now.
5
+ A series of tools for Swift Playground and Playground books based on [Apple's documentation](https://developer.apple.com/library/prerelease/content/documentation/Xcode/Conceptual/swift_playgrounds_doc_format/index.html#//apple_ref/doc/uid/TP40017343-CH47-SW4).
6
+
7
+ It's a work in progress (see [issues](https://github.com/ashfurrow/playground-book-lint/issues)) but you can use it now.
6
8
 
7
9
  ## Installation
8
10
 
@@ -32,12 +34,14 @@ identifier: com.ashfurrow.example
32
34
  resources: assets # Optional
33
35
  cover: cover.jpeg # Optional
34
36
  deployment_target: ios10.0 # Optional
35
- imports: # Optional, defaults to UIKit
37
+ imports: # Optional, defaults to UIKit
36
38
  - UIKit
37
39
  - CoreGraphics
38
40
  chapters:
39
- - Chapter 1
40
- - Chapter 2
41
+ - name: Chapter 1
42
+ edge_to_edge_live_view: false # defaults to true
43
+ live_view_mode: "VisibleByDefault" # defaults to "HiddenByDefault"
44
+ - name: Chapter 2
41
45
  - etc...
42
46
  glossary:
43
47
  term: definition
@@ -94,12 +98,82 @@ public var layout: UICollectionViewFlowLayout = {
94
98
  }()
95
99
  ```
96
100
 
97
- It's awkward; if you have suggestions, open an issue :+1:
101
+ It's awkward; if you have suggestions, open an issue :+1:
98
102
 
99
103
  Sharing resources is only available book-wide and not specific to chapters. Sharing code outside the preamble isn't supported yet.
100
104
 
101
105
  Playground books support a rich set of awesome features to make learning how to code really easy, and this tool uses almost none of them. It sacrifices this experience for the sake of being able to easily write the books on your Mac.
102
106
 
107
+ ### Creating a Playground from markdown
108
+
109
+ Maybe you want to do something for a website, or a git repo first, and then generate your Playground? Well in those cases your source of truth is the markdown document. For that case, we have `playgroundbook wrapper`.
110
+
111
+ For example, you might have a folder that looks like:
112
+
113
+ ``` sh
114
+ > tree Beginners/Lesson\ One
115
+
116
+ Beginners/Lesson\ One
117
+ ├── README.md
118
+ ├── README_ZH.md
119
+ └── img
120
+ ├── emptyplayground.png
121
+ ├── multipleresults.png
122
+ ├── newplayground.png
123
+ ├── results.png
124
+ ├── tentimes.png
125
+ └── welcome.png
126
+ ```
127
+
128
+ You can run:
129
+ ```sh
130
+ playgroundbook wrapper "Beginners/Lesson\ One/README.md" "Lesson One"
131
+ ```
132
+
133
+ And it will switch out swift codeblocks into the playground. You _have_ to use triple backticks with swift <code>```swift</code>. No space between them. You should avoid using backtick blocks for anything other than Swift code, if you need to show examples, [use Markdown's indentation rules](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) with four spaces.
134
+
135
+ ```sh
136
+ > tree Beginners/Lesson\ One
137
+
138
+ Beginners/Lesson\ One
139
+ ├── Lesson\ One.playground
140
+ │   ├── Contents.swift
141
+ │   ├── Resources
142
+ │   │   └── img
143
+ │   │   ├── emptyplayground.png
144
+ │   │   ├── newplayground.png
145
+ │   │   ├── results.png
146
+ │   │   └── welcome.png
147
+ │   ├── contents.xcplayground
148
+ │   └── timeline.xctimeline
149
+ ├── README.md
150
+ ...
151
+ ```
152
+
153
+ You might notice that a subset of images, have moved well, they're the only one being used in the `README.md`. Slick huh?
154
+
155
+
156
+ Contributing
157
+ ------------
158
+
159
+ Hey! Like this tool? Awesome! We could actually really use your help!
160
+
161
+ Open source isn't just writing code. We could use your help with any of the
162
+ following:
163
+
164
+ - Finding (and reporting!) bugs.
165
+ - New feature suggestions.
166
+ - Answering questions on issues.
167
+ - Reviewing pull requests.
168
+ - Helping to manage issue priorities.
169
+ - Fixing bugs/new features.
170
+
171
+ If any of that sounds cool to you, send a pull request! After a few
172
+ contributions, we'll add you as an admin to the repo so you can merge pull
173
+ requests and help steer the ship :ship: You can read more details about that [in our contributor guidelines](https://github.com/playgroundbooks/playgroundbook/blob/master/Community.md).
174
+
175
+ Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by [its terms](https://github.com/playgroundbooks/playgroundbook/blob/master/Code of Conduct.md).
176
+
103
177
  ## License
104
178
 
105
179
  MIT, except for the `starter.playgroundbook` in the unit tests, which is licensed by Apple.
@@ -11,7 +11,8 @@ module Playgroundbook
11
11
  @ui = ui
12
12
  end
13
13
 
14
- def collate(chapter_name, parsed_chapter, imports)
14
+ def collate(chapter, parsed_chapter, imports)
15
+ chapter_name = chapter['name']
15
16
  @ui.puts "Processing #{chapter_name.green}."
16
17
 
17
18
  chapter_directory_name = "#{chapter_name}.playgroundchapter"
@@ -25,7 +26,7 @@ module Playgroundbook
25
26
  page_contents = parsed_chapter[:page_contents][index]
26
27
  page_dir_name = parsed_chapter[:page_dir_names][index]
27
28
 
28
- @page_writer.write_page(page_name, page_dir_name, imports, page_contents)
29
+ @page_writer.write_page(page_name, page_dir_name, imports, page_contents, chapter)
29
30
  end
30
31
  end
31
32
 
@@ -19,7 +19,7 @@ module Playgroundbook
19
19
  end
20
20
 
21
21
  def manifest_contents(book_metadata)
22
- chapters = book_metadata["chapters"].map { |c| "#{c}.playgroundchapter" }
22
+ chapters = book_metadata["chapters"].map { |c| "#{c["name"]}.playgroundchapter" }
23
23
  manifest_contents = {
24
24
  "Name" => book_metadata["name"],
25
25
  "ContentIdentifier" => book_metadata["identifier"],
@@ -8,9 +8,8 @@ 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, chapter_info={})
12
12
  Dir.mkdir(page_dir_name) unless Dir.exist?(page_dir_name)
13
-
14
13
  contents_with_import = "//#-hidden-code\n"
15
14
  contents_with_import += imports.map { |i| "import #{i}" }.join("\n") + "\n"
16
15
  contents_with_import += "//#-end-hidden-code\n"
@@ -24,7 +23,8 @@ module Playgroundbook
24
23
  File.open(MANIFEST_FILE_NAME, "w") do |file|
25
24
  file.write({
26
25
  "Name" => page_name,
27
- "LiveViewMode" => "HiddenByDefault",
26
+ "LiveViewMode" => chapter_info.has_key?("live_view_mode") ? chapter_info["live_view_mode"] : "HiddenByDefault",
27
+ "LiveViewEdgeToEdge" => chapter_info.has_key?("edge_to_edge_live_view") ? chapter_info["edge_to_edge_live_view"] : true,
28
28
  "Version" => "1.0",
29
29
  "ContentVersion" => "1.0"
30
30
  }.to_plist)
@@ -43,7 +43,7 @@ module Playgroundbook
43
43
  # TODO: Validate YAML contents?
44
44
  begin
45
45
  book_chapter_contents = book["chapters"].map do |chapter|
46
- File.read("#{chapter}.playground/Contents.swift")
46
+ File.read("#{chapter['name']}.playground/Contents.swift")
47
47
  end
48
48
  rescue => e
49
49
  ui.puts "Failed to open playground Contents.swift file."
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Playgroundbook
2
- VERSION = "0.4.0".freeze
2
+ VERSION = "0.5.0".freeze
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "fileutils"
2
+ require "open-uri"
2
3
 
3
4
  module Playgroundbook
4
5
  # Converts a Markdown file into a Swift Playground
@@ -18,17 +19,22 @@ module Playgroundbook
18
19
 
19
20
  def generate
20
21
  contents = swap_code_context(playground_contents)
21
- create_a_playground_wrapper(contents)
22
+ images = get_list_of_images(contents)
23
+ create_a_playground_wrapper(contents, images)
22
24
  end
23
25
 
24
26
  def swap_code_context(file_content)
25
- prefix = "/*:\n"
27
+ prefix = "import Foundation\n/*:\n"
26
28
  suffix = "*/"
27
29
  content = file_content.gsub("```swift", "*/\n").gsub("```", "/*:")
28
30
  prefix + content + suffix
29
31
  end
30
32
 
31
- def create_a_playground_wrapper(file_content)
33
+ def get_list_of_images(file_content)
34
+ file_content.scan(/\!\[.*\]\((.*?)\)/).flatten
35
+ end
36
+
37
+ def create_a_playground_wrapper(file_content, images)
32
38
  folder = File.dirname(source)
33
39
  playground = File.join(folder, name + ".playground")
34
40
 
@@ -52,6 +58,28 @@ XML
52
58
  XML
53
59
  File.write(File.join(playground, "contents.xcplayground"), xcplayground)
54
60
  File.write(File.join(playground, "timeline.xctimeline"), timeline)
61
+
62
+ resources = File.join(playground, "Resources")
63
+ Dir.mkdir(resources)
64
+
65
+ images.each do |image|
66
+ outer_image_path = File.join(folder, image)
67
+ local = File.exist? outer_image_path
68
+ remote = image.include? "http"
69
+
70
+ if local
71
+ basedir = File.dirname(image)
72
+ inner_basedir = File.join(resources, basedir)
73
+ Dir.mkdir(inner_basedir) unless Dir.exist?(inner_basedir)
74
+ FileUtils.cp(outer_image_path, inner_basedir)
75
+
76
+ elsif remote
77
+ file = File.open(File.join(resources, File.basename(image)), "wb")
78
+ file.write(open(image, "rb").read)
79
+ file_content.gsub!(image, File.basename(image))
80
+ end
81
+ end
82
+
55
83
  File.write(File.join(playground, "Contents.swift"), file_content)
56
84
  end
57
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playgroundbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash Furrow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-10 00:00:00.000000000 Z
11
+ date: 2016-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: plist
@@ -59,17 +59,8 @@ executables:
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".gitignore"
63
- - ".rspec"
64
- - ".rubocop.yml"
65
- - ".ruby-version"
66
- - Changelog.md
67
- - Gemfile
68
- - Gemfile.lock
69
- - Guardfile
70
62
  - LICENSE
71
63
  - README.md
72
- - Rakefile
73
64
  - bin/playgroundbook
74
65
  - lib/linter/abstract_linter.rb
75
66
  - lib/linter/chapter_linter.rb
@@ -92,39 +83,6 @@ files:
92
83
  - lib/renderer/playgroundbook_renderer.rb
93
84
  - lib/version.rb
94
85
  - lib/wrapper/markdown_wrapper.rb
95
- - playground_book_lint.gemspec
96
- - spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Manifest.plist
97
- - spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page1.playgroundpage/Contents.swift
98
- - spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page1.playgroundpage/Manifest.plist
99
- - spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page2.playgroundpage/Contents.swift
100
- - spec/fixtures/Starter.playgroundbook/Contents/Chapters/Chapter1.playgroundchapter/Pages/Page2.playgroundpage/Manifest.plist
101
- - spec/fixtures/Starter.playgroundbook/Contents/Manifest.plist
102
- - spec/fixtures/assets/file.jpeg
103
- - spec/fixtures/book.yml
104
- - spec/fixtures/test_chapter.playground/Contents.swift
105
- - spec/fixtures/test_chapter.playground/contents.xcplayground
106
- - spec/fixtures/wrapper/destination/swift_at_artsy_1.swift
107
- - spec/fixtures/wrapper/source/Swift-at-Artsy.playground/Contents.swift
108
- - spec/fixtures/wrapper/source/Swift-at-Artsy.playground/contents.xcplayground
109
- - spec/fixtures/wrapper/source/swift_at_artsy_1.md
110
- - spec/linter/chapter_linter_spec.rb
111
- - spec/linter/chapter_manifest_linter_spec.rb
112
- - spec/linter/contents_linter_spec.rb
113
- - spec/linter/cutscene_page_linter_spec.rb
114
- - spec/linter/cutscene_page_manifest_linter_spec.rb
115
- - spec/linter/manfiest_linter_spec.rb
116
- - spec/linter/page_linter_spec.rb
117
- - spec/linter/page_manifest_linter_spec.rb
118
- - spec/linter/playgroundbook_lint_spec.rb
119
- - spec/linter/root_manifest_linter_spec.rb
120
- - spec/renderer/chapter_collator_spec.rb
121
- - spec/renderer/contents_manfiest_generator_spec.rb
122
- - spec/renderer/glossary_generator_spec.rb
123
- - spec/renderer/page_processor_spec.rb
124
- - spec/renderer/page_writer_spec.rb
125
- - spec/renderer/playgroundbook_renderer_spec.rb
126
- - spec/spec_helper.rb
127
- - spec/wrapper/markdown_wrapper_spec.rb
128
86
  homepage: https://github.com/ashfurrow/playground-book-lint
129
87
  licenses:
130
88
  - MIT
@@ -145,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
103
  version: '0'
146
104
  requirements: []
147
105
  rubyforge_project:
148
- rubygems_version: 2.4.8
106
+ rubygems_version: 2.2.2
149
107
  signing_key:
150
108
  specification_version: 4
151
109
  summary: Lints/renders Swift Playground books.
data/.gitignore DELETED
@@ -1,50 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- # Used by dotenv library to load environment variables.
14
- # .env
15
-
16
- ## Specific to RubyMotion:
17
- .dat*
18
- .repl_history
19
- build/
20
- *.bridgesupport
21
- build-iPhoneOS/
22
- build-iPhoneSimulator/
23
-
24
- ## Specific to RubyMotion (use of CocoaPods):
25
- #
26
- # We recommend against adding the Pods directory to your .gitignore. However
27
- # you should judge for yourself, the pros and cons are mentioned at:
28
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
- #
30
- # vendor/Pods/
31
-
32
- ## Documentation cache and generated files:
33
- /.yardoc/
34
- /_yardoc/
35
- /doc/
36
- /rdoc/
37
-
38
- ## Environment normalization:
39
- /.bundle/
40
- /vendor/bundle
41
- /lib/bundler/man/
42
-
43
- # for a library or gem, you might want to ignore these files since the code is
44
- # intended to run in multiple environments; otherwise, check them in:
45
- # Gemfile.lock
46
- # .ruby-version
47
- # .ruby-gemset
48
-
49
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
- .rvmrc
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,112 +0,0 @@
1
- Metrics/LineLength:
2
- Enabled: false
3
-
4
- Style/StringLiterals:
5
- EnforcedStyle: double_quotes
6
- Enabled: true
7
-
8
- # kind_of? is a good way to check a type
9
- Style/ClassCheck:
10
- EnforcedStyle: kind_of?
11
-
12
- # It's better to be more explicit about the type
13
- Style/BracesAroundHashParameters:
14
- Enabled: false
15
-
16
- # specs sometimes have useless assignments, which is fine
17
- Lint/UselessAssignment:
18
- Exclude:
19
- - '**/spec/**/*'
20
-
21
- # We could potentially enable the 2 below:
22
- Style/IndentHash:
23
- Enabled: false
24
-
25
- Style/AlignHash:
26
- Enabled: false
27
-
28
- # HoundCI doesn't like this rule
29
- Style/DotPosition:
30
- Enabled: false
31
-
32
- # We allow !! as it's an easy way to convert ot boolean
33
- Style/DoubleNegation:
34
- Enabled: false
35
-
36
- # Cop supports --auto-correct.
37
- Lint/UnusedBlockArgument:
38
- Enabled: false
39
-
40
- # We want to allow class Fastlane::Class
41
- Style/ClassAndModuleChildren:
42
- Enabled: false
43
-
44
- Metrics/AbcSize:
45
- Max: 60
46
-
47
- # The %w might be confusing for new users
48
- Style/WordArray:
49
- MinSize: 19
50
-
51
- # raise and fail are both okay
52
- Style/SignalException:
53
- Enabled: false
54
-
55
- # Better too much 'return' than one missing
56
- Style/RedundantReturn:
57
- Enabled: false
58
-
59
- # Having if in the same line might not always be good
60
- Style/IfUnlessModifier:
61
- Enabled: false
62
-
63
- # and and or is okay
64
- Style/AndOr:
65
- Enabled: false
66
-
67
- # Configuration parameters: CountComments.
68
- Metrics/ClassLength:
69
- Max: 320
70
-
71
- Metrics/CyclomaticComplexity:
72
- Max: 17
73
-
74
- # Configuration parameters: AllowURI, URISchemes.
75
- Metrics/LineLength:
76
- Max: 370
77
-
78
- # Configuration parameters: CountKeywordArgs.
79
- Metrics/ParameterLists:
80
- Max: 10
81
-
82
- Metrics/PerceivedComplexity:
83
- Max: 18
84
-
85
- # Sometimes it's easier to read without guards
86
- Style/GuardClause:
87
- Enabled: false
88
-
89
- # something = if something_else
90
- # that's confusing
91
- Style/ConditionalAssignment:
92
- Enabled: false
93
-
94
- # Better to have too much self than missing a self
95
- Style/RedundantSelf:
96
- Enabled: false
97
-
98
- Metrics/MethodLength:
99
- Max: 60
100
-
101
- # We're not there yet
102
- Style/Documentation:
103
- Enabled: false
104
-
105
- # Adds complexity
106
- Style/IfInsideElse:
107
- Enabled: false
108
-
109
- # danger specific
110
-
111
- Style/BlockComments:
112
- Enabled: false
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-2.1.1
data/Changelog.md DELETED
@@ -1,30 +0,0 @@
1
- # Current Master
2
-
3
- - Nothing yet.
4
-
5
- # 0.4.0
6
-
7
- - Support converting a random Markdown file into a playground. See [#29](https://github.com/ashfurrow/playgroundbook/pull/29).
8
-
9
- # 0.3.0
10
-
11
- - Glossary support. See [#18](https://github.com/ashfurrow/playgroundbook/issues/18).
12
- - Removes newlines surrounding markdown blocks. See [#20](https://github.com/ashfurrow/playgroundbook/issues/20).
13
-
14
- # 0.2.1
15
-
16
- - Support for cover images. See [#16](https://github.com/ashfurrow/playgroundbook/issues/16).
17
-
18
- # 0.2.0
19
-
20
- - Book rendering.
21
- - Book linting moved to subcommand.
22
-
23
- # 0.1.0
24
-
25
- - Adds support for linting manifest file optional values. See [#3](https://github.com/ashfurrow/playground-book-lint/issues/3). - @rpowelll
26
- - Adds support for playground cutscene linting. See [#9](https://github.com/ashfurrow/playground-book-lint/issues/9). - @rpowelll
27
-
28
- # 0.0.1
29
-
30
- - Initial release.
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake"
4
- gem "guard-rspec"
5
- gem "mocha"
6
- gem "bacon"
7
- gem "mocha-on-bacon"
8
- gem "prettybacon"
9
- gem "fakefs"
10
- gem "rubocop", "~> 0.41.2", require: false
11
-
12
- require "pp" # https://github.com/defunkt/fakefs/issues/99
13
- gemspec
data/Gemfile.lock DELETED
@@ -1,105 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- playgroundbook (0.3.0)
5
- colored (~> 1.2)
6
- cork (~> 0.1)
7
- plist (~> 3.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- ast (2.3.0)
13
- bacon (1.2.0)
14
- coderay (1.1.1)
15
- colored (1.2)
16
- cork (0.2.0)
17
- colored (~> 1.2)
18
- diff-lcs (1.2.5)
19
- fakefs (0.9.0)
20
- ffi (1.9.10)
21
- formatador (0.2.5)
22
- guard (2.14.0)
23
- formatador (>= 0.2.4)
24
- listen (>= 2.7, < 4.0)
25
- lumberjack (~> 1.0)
26
- nenv (~> 0.1)
27
- notiffany (~> 0.0)
28
- pry (>= 0.9.12)
29
- shellany (~> 0.0)
30
- thor (>= 0.18.1)
31
- guard-compat (1.2.1)
32
- guard-rspec (4.7.2)
33
- guard (~> 2.1)
34
- guard-compat (~> 1.1)
35
- rspec (>= 2.99.0, < 4.0)
36
- listen (3.0.7)
37
- rb-fsevent (>= 0.9.3)
38
- rb-inotify (>= 0.9.7)
39
- lumberjack (1.0.10)
40
- metaclass (0.0.4)
41
- method_source (0.8.2)
42
- mocha (1.1.0)
43
- metaclass (~> 0.0.1)
44
- mocha-on-bacon (0.2.2)
45
- mocha (>= 0.13.0)
46
- nenv (0.3.0)
47
- notiffany (0.1.0)
48
- nenv (~> 0.1)
49
- shellany (~> 0.0)
50
- parser (2.3.1.2)
51
- ast (~> 2.2)
52
- plist (3.2.0)
53
- powerpack (0.1.1)
54
- prettybacon (0.0.2)
55
- bacon (~> 1.2)
56
- pry (0.10.3)
57
- coderay (~> 1.1.0)
58
- method_source (~> 0.8.1)
59
- slop (~> 3.4)
60
- rainbow (2.1.0)
61
- rake (11.2.2)
62
- rb-fsevent (0.9.7)
63
- rb-inotify (0.9.7)
64
- ffi (>= 0.5.0)
65
- rspec (3.5.0)
66
- rspec-core (~> 3.5.0)
67
- rspec-expectations (~> 3.5.0)
68
- rspec-mocks (~> 3.5.0)
69
- rspec-core (3.5.1)
70
- rspec-support (~> 3.5.0)
71
- rspec-expectations (3.5.0)
72
- diff-lcs (>= 1.2.0, < 2.0)
73
- rspec-support (~> 3.5.0)
74
- rspec-mocks (3.5.0)
75
- diff-lcs (>= 1.2.0, < 2.0)
76
- rspec-support (~> 3.5.0)
77
- rspec-support (3.5.0)
78
- rubocop (0.41.2)
79
- parser (>= 2.3.1.1, < 3.0)
80
- powerpack (~> 0.1)
81
- rainbow (>= 1.99.1, < 3.0)
82
- ruby-progressbar (~> 1.7)
83
- unicode-display_width (~> 1.0, >= 1.0.1)
84
- ruby-progressbar (1.8.1)
85
- shellany (0.0.1)
86
- slop (3.6.0)
87
- thor (0.19.1)
88
- unicode-display_width (1.1.0)
89
-
90
- PLATFORMS
91
- ruby
92
-
93
- DEPENDENCIES
94
- bacon
95
- fakefs
96
- guard-rspec
97
- mocha
98
- mocha-on-bacon
99
- playgroundbook!
100
- prettybacon
101
- rake
102
- rubocop (~> 0.41.2)
103
-
104
- BUNDLED WITH
105
- 1.12.5
data/Guardfile DELETED
@@ -1,14 +0,0 @@
1
- guard :rspec, cmd: "bundle exec rspec" do
2
- require "guard/rspec/dsl"
3
- dsl = Guard::RSpec::Dsl.new(self)
4
-
5
- # RSpec files
6
- rspec = dsl.rspec
7
- watch(rspec.spec_helper) { rspec.spec_dir }
8
- watch(rspec.spec_support) { rspec.spec_dir }
9
- watch(rspec.spec_files)
10
-
11
- # Ruby files
12
- ruby = dsl.ruby
13
- dsl.watch_spec_files_for(ruby.lib_files)
14
- end
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
-
5
- RSpec::Core::RakeTask.new(:spec)
6
- RuboCop::RakeTask.new
7
-
8
- task default: :spec