frontman-ssg 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +42 -0
  3. data/.github/CODE_OF_CONDUCT.md +9 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +25 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  6. data/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  7. data/.gitignore +5 -0
  8. data/.rubocop.yml +88 -0
  9. data/CHANGELOG.md +11 -0
  10. data/CONTRIBUTING.md +42 -0
  11. data/Gemfile +5 -0
  12. data/LICENSE.md +21 -0
  13. data/Rakefile +94 -0
  14. data/SECURITY.md +6 -0
  15. data/bin/frontman +6 -0
  16. data/frontman-ssg.gemspec +48 -0
  17. data/frontman.svg +2 -0
  18. data/lib/frontman.rb +15 -0
  19. data/lib/frontman/app.rb +175 -0
  20. data/lib/frontman/bootstrapper.rb +70 -0
  21. data/lib/frontman/builder/asset_pipeline.rb +55 -0
  22. data/lib/frontman/builder/builder.rb +193 -0
  23. data/lib/frontman/builder/file.rb +55 -0
  24. data/lib/frontman/builder/mapping.rb +54 -0
  25. data/lib/frontman/builder/statistics_collector.rb +37 -0
  26. data/lib/frontman/cli.rb +6 -0
  27. data/lib/frontman/commands/build.rb +76 -0
  28. data/lib/frontman/commands/init.rb +58 -0
  29. data/lib/frontman/commands/serve.rb +110 -0
  30. data/lib/frontman/concerns/dispatch_events.rb +56 -0
  31. data/lib/frontman/concerns/forward_calls_to_app.rb +28 -0
  32. data/lib/frontman/config.rb +52 -0
  33. data/lib/frontman/context.rb +125 -0
  34. data/lib/frontman/custom_struct.rb +44 -0
  35. data/lib/frontman/data_store.rb +106 -0
  36. data/lib/frontman/data_store_file.rb +60 -0
  37. data/lib/frontman/helpers/app_helper.rb +18 -0
  38. data/lib/frontman/helpers/link_helper.rb +35 -0
  39. data/lib/frontman/helpers/render_helper.rb +76 -0
  40. data/lib/frontman/helpers/url_helper.rb +11 -0
  41. data/lib/frontman/iterator.rb +48 -0
  42. data/lib/frontman/process/chain.rb +43 -0
  43. data/lib/frontman/process/processor.rb +11 -0
  44. data/lib/frontman/renderers/erb_renderer.rb +21 -0
  45. data/lib/frontman/renderers/haml_renderer.rb +22 -0
  46. data/lib/frontman/renderers/markdown_renderer.rb +26 -0
  47. data/lib/frontman/renderers/renderer.rb +26 -0
  48. data/lib/frontman/renderers/renderer_resolver.rb +26 -0
  49. data/lib/frontman/resource.rb +279 -0
  50. data/lib/frontman/sitemap_tree.rb +211 -0
  51. data/lib/frontman/toolbox/timer.rb +49 -0
  52. data/lib/frontman/version.rb +6 -0
  53. data/project-templates/default/.gitignore +2 -0
  54. data/project-templates/default/Gemfile +3 -0
  55. data/project-templates/default/config.rb +17 -0
  56. data/project-templates/default/data/site.yml +4 -0
  57. data/project-templates/default/helpers/site_helper.rb +7 -0
  58. data/project-templates/default/public/code.css +77 -0
  59. data/project-templates/default/public/frontman-logo.svg +2 -0
  60. data/project-templates/default/public/main.css +27 -0
  61. data/project-templates/default/public/main.js +1 -0
  62. data/project-templates/default/source/index.html.md.erb +7 -0
  63. data/project-templates/default/source/sitemap.xml.erb +11 -0
  64. data/project-templates/default/views/layouts/main.erb +19 -0
  65. data/project-templates/default/views/layouts/main.haml +15 -0
  66. data/project-templates/default/views/partials/menu.erb +7 -0
  67. data/project-templates/webpack/.gitignore +4 -0
  68. data/project-templates/webpack/Gemfile +3 -0
  69. data/project-templates/webpack/README.md +54 -0
  70. data/project-templates/webpack/assets/css/code.css +77 -0
  71. data/project-templates/webpack/assets/css/style.css +27 -0
  72. data/project-templates/webpack/assets/images/.gitkeep +0 -0
  73. data/project-templates/webpack/assets/images/frontman_logo.svg +2 -0
  74. data/project-templates/webpack/assets/js/index.js +1 -0
  75. data/project-templates/webpack/config.rb +24 -0
  76. data/project-templates/webpack/data/site.yml +4 -0
  77. data/project-templates/webpack/helpers/assets_helper.rb +24 -0
  78. data/project-templates/webpack/helpers/site_helper.rb +7 -0
  79. data/project-templates/webpack/package-lock.json +7603 -0
  80. data/project-templates/webpack/package.json +34 -0
  81. data/project-templates/webpack/source/index.html.md.erb +7 -0
  82. data/project-templates/webpack/source/sitemap.xml.erb +11 -0
  83. data/project-templates/webpack/views/layouts/main.erb +20 -0
  84. data/project-templates/webpack/views/layouts/main.haml +14 -0
  85. data/project-templates/webpack/views/partials/menu.erb +7 -0
  86. data/project-templates/webpack/views/partials/script_with_vendors.haml +5 -0
  87. data/project-templates/webpack/webpack/base.config.js +51 -0
  88. data/project-templates/webpack/webpack/dev.config.js +6 -0
  89. data/project-templates/webpack/webpack/prod.config.js +30 -0
  90. data/readme.md +80 -0
  91. data/sorbet/config +2 -0
  92. data/sorbet/rbi/hidden-definitions/errors.txt +27259 -0
  93. data/sorbet/rbi/hidden-definitions/hidden.rbi +45122 -0
  94. data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +276 -0
  95. data/sorbet/rbi/todo.rbi +6 -0
  96. data/spec/frontman/app_spec.rb +48 -0
  97. data/spec/frontman/bootstrapper_spec.rb +26 -0
  98. data/spec/frontman/builder/builder_spec.rb +79 -0
  99. data/spec/frontman/builder/file_spec.rb +45 -0
  100. data/spec/frontman/builder/mapping_spec.rb +8 -0
  101. data/spec/frontman/concerns/dispatch_events_spec.rb +70 -0
  102. data/spec/frontman/concerns/forward_calls_to_app_spec.rb +21 -0
  103. data/spec/frontman/config_spec.rb +54 -0
  104. data/spec/frontman/context_spec.rb +48 -0
  105. data/spec/frontman/custom_struct_spec.rb +51 -0
  106. data/spec/frontman/data_store_file_spec.rb +9 -0
  107. data/spec/frontman/data_store_spec.rb +36 -0
  108. data/spec/frontman/frontman_ssg_spec.rb +7 -0
  109. data/spec/frontman/helpers/app_helper_spec.rb +24 -0
  110. data/spec/frontman/helpers/link_helper_spec.rb +37 -0
  111. data/spec/frontman/helpers/render_helper_spec.rb +55 -0
  112. data/spec/frontman/helpers/url_helper_spec.rb +21 -0
  113. data/spec/frontman/iterator_spec.rb +47 -0
  114. data/spec/frontman/mocks/asset.css +3 -0
  115. data/spec/frontman/mocks/config.rb +0 -0
  116. data/spec/frontman/mocks/helpers/formatting_helper.rb +5 -0
  117. data/spec/frontman/mocks/helpers/language_helper.rb +5 -0
  118. data/spec/frontman/mocks/helpers/link_helper.rb +5 -0
  119. data/spec/frontman/mocks/helpers/test_command.rb +5 -0
  120. data/spec/frontman/mocks/html_file.html +8 -0
  121. data/spec/frontman/mocks/html_file.html.md.erb +9 -0
  122. data/spec/frontman/mocks/html_file.md.html +8 -0
  123. data/spec/frontman/mocks/info.yml +4 -0
  124. data/spec/frontman/mocks/layouts/raw_without_body.haml +1 -0
  125. data/spec/frontman/mocks/nested/data.yml +4 -0
  126. data/spec/frontman/mocks/nested/more_data.yml +4 -0
  127. data/spec/frontman/mocks/partials/paragraph.haml +2 -0
  128. data/spec/frontman/mocks/snippet/html_file.html +8 -0
  129. data/spec/frontman/mocks/snippet/html_file.yml +670 -0
  130. data/spec/frontman/mocks/test.html +8 -0
  131. data/spec/frontman/mocks/wrap.haml +3 -0
  132. data/spec/frontman/process/chain_spec.rb +56 -0
  133. data/spec/frontman/renderers/erb_renderer_spec.rb +22 -0
  134. data/spec/frontman/renderers/haml_renderer_spec.rb +12 -0
  135. data/spec/frontman/renderers/markdown_renderer_spec.rb +12 -0
  136. data/spec/frontman/renderers/renderer_spec.rb +16 -0
  137. data/spec/frontman/resource_spec.rb +151 -0
  138. data/spec/frontman/sitemap_tree_spec.rb +128 -0
  139. data/spec/frontman/toolbox/timer_spec.rb +34 -0
  140. data/spec/spec_setup.rb +19 -0
  141. metadata +507 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 874f589b9d149419ec7d8c8fa1b4891ecb9ab1af9a396bf50f5955d70757a6df
4
+ data.tar.gz: 1f3da03d51ae4352212258f02f91631463709b39204578b4ebc096fef1c6899e
5
+ SHA512:
6
+ metadata.gz: a8f152c9dc2f6f3bc2c949beb5f9a6daf6b2c2308ef5beac28dc735711c5715f4e5bd565d2eba86f4ff3836e0f538e82936e2b998ab69a658b59053031f51fad
7
+ data.tar.gz: a62dea5dc5054e61a171852425d5f1ee3c750f6c2ee231d41f6b6a03d63a2c35f29e5919021166650e5411725a83d2930334692d8de947c2f8b3823cc2355e35
@@ -0,0 +1,42 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ build:
5
+ parameters:
6
+ ruby_version:
7
+ type: string
8
+
9
+ working_directory: ~/repo
10
+ docker:
11
+ - image: circleci/ruby:<< parameters.ruby_version >>
12
+
13
+ steps:
14
+ - checkout
15
+ - run:
16
+ name: Install dependencies
17
+ command: |
18
+ gem install bundler
19
+ bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle
20
+
21
+ - run:
22
+ name: Lint code
23
+ command: |
24
+ bundle exec rubocop
25
+
26
+ - run:
27
+ name: Check types
28
+ command: |
29
+ bundle exec srb tc . --ignore=/vendor
30
+
31
+ - run:
32
+ name: Run tests
33
+ command: |
34
+ bundle exec rspec
35
+
36
+ workflows:
37
+ workflow:
38
+ jobs:
39
+ - build:
40
+ matrix:
41
+ parameters:
42
+ ruby_version: ["2.3", "2.4", "2.5", "2.6", "2.7"]
@@ -0,0 +1,9 @@
1
+ # Code of conduct
2
+
3
+ **All people who choose to be part of the community are required to agree with the following code of conduct.**
4
+ This code of conduct is based on [Ruby's code of conduct](https://www.ruby-lang.org/en/conduct/).
5
+
6
+ * Participants will be tolerant of opposing views.
7
+ * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
8
+ * When interpreting the words and actions of others, participants should always assume good intentions.
9
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: "bug"
6
+ ---
7
+
8
+ ## Description
9
+
10
+ <!-- A clear and concise description of what the bug is. -->
11
+
12
+ ## How to reproduce
13
+
14
+ <!-- Exact steps to reproduce the behavior, with details of your (development) environment. -->
15
+
16
+ ## Expected behavior
17
+
18
+ <!-- A clear and concise description of what you expected to happen. -->
19
+
20
+ ## Suggested solution
21
+ <!-- If you have one, you can suggest a solution. -->
22
+
23
+ ## Relevant resources
24
+
25
+ <!-- If applicable, add files, urls and/or screenshots to help explain your problem. -->
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new feature for this project
4
+ title: ''
5
+ labels: "enhancement"
6
+ ---
7
+
8
+ ## Description
9
+
10
+ <!-- A clear and concise description of what the new feature should entail. -->
11
+
12
+ ## Motivation
13
+
14
+ <!-- A clear and concise description of why this new feature is needed, e.g., "I find it frustrating that [...]" -->
15
+
16
+ ## Solution
17
+
18
+ <!-- A clear and concise description of a solution you already have in mind, if any. -->
19
+
20
+ ## Additional context
21
+
22
+ <!-- Add any other context or screenshots about the feature request here. -->
@@ -0,0 +1,22 @@
1
+ | Q | A
2
+ | ----------------- | ----------
3
+ | Bug fix? | yes/no
4
+ | New feature? | yes/no
5
+ | Related issue | fix #... <!-- remove this line if not fixing any issue -->
6
+
7
+ ## Description
8
+ <!--
9
+
10
+ Please give a clear and concise
11
+ description of what the PR does.
12
+
13
+ -->
14
+
15
+ ## Tested
16
+ <!--
17
+
18
+ Please give a clear and concise
19
+ description of how you tested your PR.
20
+
21
+ -->
22
+
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ /coverage
3
+ Gemfile.lock
4
+ spec/frontman/build
5
+
@@ -0,0 +1,88 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Exclude:
4
+ - '**/Rakefile'
5
+ - 'vendor/**/*'
6
+
7
+ Gemspec/RequiredRubyVersion:
8
+ Exclude:
9
+ - 'frontman-ssg.gemspec'
10
+
11
+ Style/Documentation:
12
+ Exclude:
13
+ - 'spec/**/*'
14
+ - 'test/**/*'
15
+ - 'lib/**/*'
16
+ - 'project-templates/**/*'
17
+
18
+ Style/MethodMissingSuper:
19
+ Exclude:
20
+ - 'lib/**/*'
21
+
22
+ Metrics/MethodLength:
23
+ Exclude:
24
+ - 'lib/frontman/sitemap_tree.rb'
25
+ - 'lib/frontman/data_store.rb'
26
+ - 'lib/frontman/builder/builder.rb'
27
+ - 'lib/frontman/commands/**/*'
28
+ - 'lib/frontman/resource.rb'
29
+
30
+ Metrics/AbcSize:
31
+ Exclude:
32
+ - 'lib/frontman/sitemap_tree.rb'
33
+ - 'lib/frontman/data_store.rb'
34
+ - 'lib/frontman/builder/statistics_collector.rb'
35
+ - 'lib/frontman/commands/**/*'
36
+ - 'lib/frontman/resource.rb'
37
+
38
+ Style/ClassVars:
39
+ Exclude:
40
+ - 'lib/frontman/sitemap_tree.rb'
41
+ - 'lib/frontman/bootstrapper.rb'
42
+ - 'lib/frontman/config.rb'
43
+ - 'lib/frontman/resource.rb'
44
+ - 'lib/frontman/data_store_file.rb'
45
+
46
+ Metrics/ClassLength:
47
+ Exclude:
48
+ - 'lib/frontman/app.rb'
49
+ - 'lib/frontman/builder/builder.rb'
50
+ - 'lib/frontman/resource.rb'
51
+ - 'lib/frontman/sitemap_tree.rb'
52
+
53
+ Style/ConditionalAssignment:
54
+ Exclude:
55
+ - 'lib/frontman/builder/builder.rb'
56
+
57
+ Metrics/PerceivedComplexity:
58
+ Exclude:
59
+ - 'lib/frontman/resource.rb'
60
+ - 'lib/frontman/commands/serve.rb'
61
+
62
+ Metrics/CyclomaticComplexity:
63
+ Exclude:
64
+ - 'lib/frontman/resource.rb'
65
+ - 'lib/frontman/commands/serve.rb'
66
+
67
+ Metrics/BlockLength:
68
+ Exclude:
69
+ - 'spec/**/*'
70
+ - '*.gemspec'
71
+
72
+ Metrics/LineLength:
73
+ Exclude:
74
+ - 'frontman-ssg.gemspec'
75
+ - 'spec/**/*'
76
+
77
+ Naming/FileName:
78
+ Exclude:
79
+ - 'spec/**/*'
80
+ - 'lib/frontman/helpers/**/*'
81
+
82
+ Metrics/ParameterLists:
83
+ Exclude:
84
+ - 'lib/frontman/app.rb'
85
+
86
+ Lint/HandleExceptions:
87
+ Exclude:
88
+ - 'lib/frontman/commands/serve.rb'
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ We document all notable changes to the project in the file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [semantic versioning](http://semver.org/).
6
+
7
+ # Release Notes
8
+ ## [Unreleased](https://github.com/algolia/frontman/compare/0.0.2...master)
9
+ ## [0.0.2](https://github.com/algolia/frontman/tree/0.0.2)
10
+ The initial alpha release.
11
+
@@ -0,0 +1,42 @@
1
+ We encourage you to contribute to Frontman if they have ideas for improvements to the project.
2
+ Your help is essential to keeping Frontman fast and easy to use.
3
+
4
+ ## Opening an issue
5
+
6
+ When you open an issue, please provide as many details as possible to replicate the issue.
7
+ It would be even better to have a link to a (forked) repository so that we can see the behavior right away.
8
+
9
+ ## Security issues
10
+
11
+ If you find a security issue in Frontman, please open an issue an add the `Security` label.
12
+
13
+ ## Submitting a pull request
14
+
15
+ Keep your changes as focused as possible. If there are multiple changes you'd like to make, consider submitting them as separate pull requests unless they are related to each other.
16
+
17
+ Here are a few tips to increase the likelihood of us merging your pull request:
18
+
19
+ - [ ] Write tests.
20
+ - [ ] Write [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
21
+ - [ ] Allow [edits from maintainers](https://blog.github.com/2016-09-07-improving-collaboration-with-forks/).
22
+
23
+ ## Code style
24
+ All Ruby code must follow the [Ruby community style guide](https://rubystyle.guide/). The `bundle exec rubocop` command runs [Rubocop](https://docs.rubocop.org/en/stable/) to ensure the code follows these conventions.
25
+
26
+ ## Tests
27
+ If you create a PR that fixes a bug, we expect you to create a test demonstrating the buggy behavior. The test should pass after your PR.
28
+
29
+ For any code you introduce, you must add tests that confirm that the **public API** of your code works as expected.
30
+
31
+ ## Breaking changes
32
+ Ideally, Frontman should remain backward compatible so that updating Frontman is easy for everyone.
33
+ However, we're ready to break backward compatibility if needed.
34
+
35
+ If you want to make a change that breaks backward compatibility, please describe them in your pull request and explain why you had to make these changes.
36
+
37
+ ## Resources
38
+
39
+ - [Code of conduct](.github/CODE_OF_CONDUCT.md)
40
+ - [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
41
+ - [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
42
+ - [GitHub Help](https://help.github.com)
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-present Algolia, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'frontman/version'
5
+ require 'rake'
6
+ require 'rspec/core/rake_task'
7
+
8
+ begin
9
+ Bundler.setup(:default, :development)
10
+ rescue Bundler::BundlerError => e
11
+ $stderr.puts e.message
12
+ $stderr.puts 'Run `bundle install` to install missing gems'
13
+ exit e.status_code
14
+ end
15
+
16
+ RSpec::Core::RakeTask.new(:spec)
17
+
18
+ task default: :spec
19
+
20
+ namespace :frontman do
21
+ GEM_VERSION_FILE = File.join(Dir.pwd, 'lib/frontman/version.rb')
22
+ GIT_TAG_URL = 'https://github.com/algolia/frontman/releases/tag/'
23
+
24
+ def last_commit_date
25
+ `git log -1 --date=short --format=%cd`.chomp
26
+ end
27
+
28
+ def latest_tag
29
+ `git describe --tags --abbrev=0`.chomp
30
+ end
31
+
32
+ def changelog(git_start = latest_tag, git_end = 'HEAD', format = '%s')
33
+ `git log --no-decorate --no-merges --pretty=format:#{format} #{git_start}..#{git_end}`
34
+ end
35
+
36
+ desc 'Write latest changes to CHANGELOG.md'
37
+ task :changelog, [:version] do |t, args|
38
+ # Filters-out commits containing some keywords and adds header
39
+ exceptions_regexp = Regexp.union(['README'])
40
+ title = "## [#{args[:version]}] (#{GIT_TAG_URL}#{args[:version]}) (#{last_commit_date})\n\n"
41
+ changes = changelog.each_line
42
+ .map { |line| exceptions_regexp === line ? nil : "* #{line.capitalize}" }
43
+ .unshift(title)
44
+ .push("\n\n")
45
+ .join
46
+
47
+ puts changes
48
+ puts "\n\e[31mDo you want to update the CHANGELOG.md with the text above? [y/N]\e[0m"
49
+ exit if STDIN.gets.chomp.downcase != 'y'
50
+
51
+ # Rewrite CHANGELOG.md
52
+ old_changes = File.readlines('CHANGELOG.md', 'r').join
53
+ File.open('CHANGELOG.md', 'w') { |file| file.write(changes, old_changes) }
54
+
55
+ puts 'CHANGELOG.md successfully updated'
56
+ end
57
+
58
+ desc 'Bump gem version'
59
+ task :semver, [:version] do |t, args|
60
+
61
+ File.open(GEM_VERSION_FILE, 'w') do |file|
62
+ file.write <<~SEMVER
63
+ module Frontman
64
+ VERSION = "#{args[:version]}"
65
+ end
66
+ SEMVER
67
+ end
68
+
69
+ # This force to reload the file with the newest version.
70
+ # Hence, `gemspec.version` invoked by Bundler later on will be correct.
71
+ load GEM_VERSION_FILE
72
+
73
+ puts "Bumped gem version from #{latest_tag} to #{args[:version]}"
74
+ end
75
+
76
+ desc 'Release a new version of this gem'
77
+ task :release, [:version] => %i[changelog semver] do |t, args|
78
+ `git add #{File.expand_path('../lib/frontman/version.rb', __FILE__)} CHANGELOG.md`
79
+ `git commit -m "Bump to version #{args[:version]}"`
80
+
81
+ # Invoke Bundler :release task
82
+ # https://github.com/bundler/bundler/blob/master/lib/bundler/gem_helper.rb
83
+ #
84
+ # Rake::Task[:release].invoke
85
+ end
86
+ end
87
+
88
+ module Bundler
89
+ class GemHelper
90
+ def version_tag
91
+ version.to_s
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,6 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Since Frontman is used to statically generate HTML, and therefore not used on live servers, it should not pose security vulnerabilities.
6
+ However, in case you do find a vulnerability, please create an issue in the repository with the details of the vulnerability.
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'frontman/cli'
5
+
6
+ Frontman::CLI.start
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: false
2
+
3
+ require './lib/frontman/version'
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'frontman-ssg'
7
+ s.version = Frontman::VERSION
8
+ s.date = '2019-06-06'
9
+ s.summary = 'A Middleman-inspired static site generator built for speed.'
10
+ s.description = 'A Middleman-inspired static site generator built for speed.'
11
+ s.authors = ['Devin Beeuwkes']
12
+ s.email = 'devin@algolia.com'
13
+ s.homepage = 'https://github.com/algolia/frontman/wiki'
14
+ s.license = 'MIT'
15
+ s.files = `git ls-files`.split("\n")
16
+ s.require_path = 'lib'
17
+ s.executables = ['frontman']
18
+
19
+ # Min Ruby version
20
+ s.required_ruby_version = '~> 2', '>= 2.3.0'
21
+
22
+ # Development tools
23
+ s.add_development_dependency 'rake', '~> 12.3'
24
+ s.add_development_dependency 'rspec', '~> 3.8'
25
+ s.add_development_dependency 'rubocop', '~> 0.71.0'
26
+ s.add_development_dependency 'rubocop-performance', '~> 1.3.0'
27
+ s.add_development_dependency 'simplecov', '~> 0.16'
28
+ s.add_development_dependency 'sorbet', '~> 0.5'
29
+
30
+ # Frontman dependencies
31
+ s.add_runtime_dependency 'better_errors', '~> 2.6'
32
+ s.add_runtime_dependency 'binding_of_caller', '~> 0.8'
33
+ s.add_runtime_dependency 'bundler'
34
+ s.add_runtime_dependency 'dotenv', '~> 2.7'
35
+ s.add_runtime_dependency 'erubis', '~> 2.7'
36
+ s.add_runtime_dependency 'haml', '~> 5.0'
37
+ s.add_runtime_dependency 'htmlentities', '~> 4.3'
38
+ s.add_runtime_dependency 'kramdown', '~> 2.1'
39
+ s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1'
40
+ s.add_runtime_dependency 'listen', '~> 3.0'
41
+ s.add_runtime_dependency 'nokogiri', '~> 1.10'
42
+ s.add_runtime_dependency 'parallel', '~> 1.17'
43
+ s.add_runtime_dependency 'rouge', '~> 3.16'
44
+ s.add_runtime_dependency 'sinatra', '~> 2.0'
45
+ s.add_runtime_dependency 'sorbet-runtime', '~> 0.5'
46
+ s.add_runtime_dependency 'thor', '~> 0.20'
47
+ s.add_runtime_dependency 'yaml-front-matter', '0.0.1'
48
+ end