Skip to content

Commit

Permalink
Implement Liquid::CaptureTag (forem#565)
Browse files Browse the repository at this point in the history
* Remove package-lock.json

* Remove phantom schema row

* Add better_errors gem

* Implement Liquid::CaptureTag

* Update .gitignore
  • Loading branch information
maestromac authored Aug 31, 2018
1 parent c888fd6 commit 954efd3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19,332 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ latest.dump
# Ignore storybook static site generation
storybook-static/
yarn-error.log

# Ignore package-lock.json because we use yarn
package-lock.json
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ gem "webpacker", "~> 3.5"
gem "webpush", "~> 0.3"

group :development do
gem "better_errors", "~> 2.5"
gem "binding_of_caller", "~> 0.8"
gem "brakeman", "~> 4.3", require: false
gem "bullet", "~> 5.7"
gem "bundler-audit", "~> 0.6"
Expand Down
9 changes: 9 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ GEM
execjs (~> 2.0)
bcrypt (3.1.11)
benchmark-ips (2.7.2)
better_errors (2.5.0)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.5.0)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bourbon (1.4.0)
sass (>= 3.1)
brakeman (4.3.1)
Expand Down Expand Up @@ -215,6 +221,7 @@ GEM
database_cleaner (1.7.0)
datetime_picker_rails (0.0.7)
momentjs-rails (>= 2.8.1)
debug_inspector (0.0.3)
declarative (0.0.10)
declarative-option (0.1.0)
delayed_job (4.1.4)
Expand Down Expand Up @@ -928,6 +935,8 @@ DEPENDENCIES
approvals (~> 0.0)
autoprefixer-rails (~> 6.7)
aws-sdk-lambda (~> 1.5)
better_errors (~> 2.5)
binding_of_caller (~> 0.8)
bourbon (~> 1.4)
brakeman (~> 4.3)
buffer!
Expand Down
7 changes: 7 additions & 0 deletions app/liquid_tags/capture_tag.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class CaptureTag < Liquid::Block
def initialize(_tag_name, _markup, _options)
raise StandardError.new("Liquid's Capture tag is disabled")
end
end

Liquid::Template.register_tag("capture".freeze, CaptureTag)
4 changes: 0 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@
create_table "messages", force: :cascade do |t|
t.bigint "chat_channel_id", null: false
t.datetime "created_at", null: false
t.text "encrypted_message_html"
t.text "encrypted_message_html_iv"
t.text "encrypted_message_markdown"
t.text "encrypted_message_markdown_iv"
t.string "message_html", null: false
t.string "message_markdown", null: false
t.datetime "updated_at", null: false
Expand Down
Loading

0 comments on commit 954efd3

Please sign in to comment.