bridgetown-core 0.15.0.beta1 → 0.15.0.beta2

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: ba553587c222b3cedc1844d3bf40845a83dd24d70e3c85d49965ad010687e1b5
4
- data.tar.gz: 223fea6ecf255ebaab06e34d3f8fa8e47ab64d0dd63d2dffc5cd25361a232ded
3
+ metadata.gz: 34bf7d4a458a8c56d645d8243fc445948bbed43c65d32930437ec92a06c25620
4
+ data.tar.gz: be2065a0a7e49ba29d84e49a5eb33df6d43f2a543d2cd29540e2f712599af4aa
5
5
  SHA512:
6
- metadata.gz: dbb889837e2ef982295b2880d76bf6f928ba808b048792250c201bf101eff0151406bad78ed1ea2229d1f1bd572c7b031889386c7dc765506f5f631c30825aff
7
- data.tar.gz: c6c582d64cab40f9ad203752cc8168b91e446a6535716ea7d318359990ab74f256c57b2a910bed1fbfce316a590e389901a1335770d9171c6ae3852509625ef5
6
+ metadata.gz: bf8ef56bf7943a347c9fe092794551e2c6c620a068d7008eca1ee1c8c1c95ae9d71dd42448fd57011f77f4fc5025a32219345917d7e5aa72c2de196ddade77c0
7
+ data.tar.gz: ed4bee93af751055e526365d84b3c34c10665add8f2d5329da7cd7549a473ed2f0beb6b19d5e8b04e2f511926465d8cb892355cb25f8b22b4060dc33915dafc9
@@ -11,6 +11,17 @@ module Bridgetown
11
11
  def create_builder(filename, data = nil)
12
12
  say_status :create_builder, filename
13
13
  data ||= yield if block_given?
14
+
15
+ site_builder = File.join("plugins", "site_builder.rb")
16
+ unless File.exist?(site_builder)
17
+ create_file("plugins/site_builder.rb", verbose: true) do
18
+ <<~RUBY
19
+ class SiteBuilder < Bridgetown::Builder
20
+ end
21
+ RUBY
22
+ end
23
+ end
24
+
14
25
  create_file("plugins/builders/#{filename}", data, verbose: false)
15
26
  end
16
27
 
@@ -66,7 +77,10 @@ module Bridgetown
66
77
 
67
78
  private
68
79
 
80
+ # TODO: option to download and confirm remote automation?
69
81
  def transform_automation_url(arg)
82
+ return arg unless arg.start_with?("http")
83
+
70
84
  remote_file = if arg.end_with?(".rb")
71
85
  arg.split("/").yield_self do |segments|
72
86
  arg.sub!(%r!/#{segments.last}$!, "")
@@ -86,9 +100,7 @@ module Bridgetown
86
100
  ) + "/master/#{remote_file}"
87
101
  end
88
102
 
89
- # TODO: option to download and confirm remote automation?
90
-
91
- arg
103
+ arg + "/#{remote_file}"
92
104
  end
93
105
  end
94
106
  end
@@ -7,7 +7,7 @@ module Bridgetown
7
7
 
8
8
  mutable false
9
9
 
10
- def_delegators :@obj, :content, :dir, :name, :path, :url
10
+ def_delegators :@obj, :content, :dir, :name, :path, :url, :pager
11
11
  private def_delegator :@obj, :data, :fallback_data
12
12
  end
13
13
  end
@@ -73,18 +73,6 @@ module Bridgetown
73
73
  end
74
74
  end
75
75
 
76
- # For backwards-compatibility in subclasses that do not redefine
77
- # the `:to_liquid` method, stash existing definition under a new name
78
- #
79
- # TODO: Remove in Bridgetown 5.0
80
- alias_method :legacy_to_liquid, :to_liquid
81
- private :legacy_to_liquid
82
-
83
- # Private
84
- # Subclasses can choose to optimize their `:to_liquid` method by wrapping
85
- # it around this definition.
86
- #
87
- # TODO: Remove in Bridgetown 5.0
88
76
  def liquid_drop
89
77
  @liquid_drop ||= begin
90
78
  defaults = site.frontmatter_defaults.all(relative_path, type)
@@ -94,15 +82,12 @@ module Bridgetown
94
82
  Drops::PageDrop.new(self)
95
83
  end
96
84
  end
97
- private :liquid_drop
98
85
 
99
86
  # Public
100
87
  #
101
88
  # Liquid representation of current page
102
- #
103
- # TODO: Remove optional parameter in Bridgetown 5.0
104
- def to_liquid(attrs = nil)
105
- self.class == Bridgetown::Page ? liquid_drop : legacy_to_liquid(attrs)
89
+ def to_liquid
90
+ liquid_drop
106
91
  end
107
92
 
108
93
  # The full path and filename of the post. Defined in the YAML of the post
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bridgetown
4
- VERSION = "0.15.0.beta1"
4
+ VERSION = "0.15.0.beta2"
5
5
  CODE_NAME = "Overlook"
6
6
  end
@@ -14,6 +14,7 @@
14
14
  "devDependencies": {
15
15
  "@babel/core": "^7.9.0",
16
16
  "@babel/plugin-proposal-class-properties": "^7.8.3",
17
+ "@babel/plugin-proposal-decorators": "^7.10.1",
17
18
  "@babel/plugin-transform-runtime": "^7.9.0",
18
19
  "@babel/preset-env": "^7.9.0",
19
20
  "babel-loader": "^8.1.0",
@@ -36,7 +36,8 @@ module.exports = {
36
36
  options: {
37
37
  presets: ["@babel/preset-env"],
38
38
  plugins: [
39
- "@babel/plugin-proposal-class-properties",
39
+ ["@babel/plugin-proposal-decorators", { "legacy": true }],
40
+ ["@babel/plugin-proposal-class-properties", { "loose" : true }],
40
41
  [
41
42
  "@babel/plugin-transform-runtime",
42
43
  {
@@ -57,8 +58,7 @@ module.exports = {
57
58
  options: {
58
59
  sassOptions: {
59
60
  includePaths: [
60
- path.resolve(__dirname, "src/_components"),
61
- path.resolve(__dirname, "src/_includes"),
61
+ path.resolve(__dirname, "src/_components")
62
62
  ],
63
63
  },
64
64
  },
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0.beta1
4
+ version: 0.15.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-29 00:00:00.000000000 Z
11
+ date: 2020-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport