bullet_train 1.0.47 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4a10e169bed7e2cc9dfef7fe304ff60ab66a1eecceb50129ca616c1c7b390f7
4
- data.tar.gz: 5370e36c4d668fe9282abb1c3c6d9552bd6351eb045a646ad388f74bc83e49b5
3
+ metadata.gz: 1eb8115bc5740b033b7f934111f0522270c2e83072502f1c4a5acebea63e5ff5
4
+ data.tar.gz: bd36f0282e6d97331f8eec2def0e941fd6862d6c21549ea0f1b0f289767d576c
5
5
  SHA512:
6
- metadata.gz: 341306e5e082f27c17a1240a156b7680e0fb150d21dcf1621bbca7f273af8560f17b131742022b10b0a29ceb8dd5af9d82f037bea24a11bff50b6ecbc0ee2165
7
- data.tar.gz: 14a518a963da1f8f122ceb2ba332f6839f5cc92d23b147820c57dba59554a4241a9224e1760729710a29770792c83d5d0deffc6c68fc05c885701d816799ef4b
6
+ metadata.gz: 9b2c9cc8df78ba5a6e24c574f9564d25876424c25dd95b26f37cf2fa3db59e0a7dc0af6b44b26f69a20cb08855cb3e0d016c2ae7a7289a3157e75d9778ef9c9d
7
+ data.tar.gz: c886a9a4b1c1df7f4e620af288865ec5942ea6376bdc121516b9b9e580881bab0b2d7fef533551667684fc36ce723b40c62da1ef3af49948bb8e6f800f04ae85
@@ -2,7 +2,7 @@ module CurrentAttributes::Base
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
- attribute :user, :team, :membership, :ability
5
+ attribute :user, :team, :membership, :ability, :context
6
6
 
7
7
  resets do
8
8
  Time.zone = nil
@@ -1,2 +1,3 @@
1
+ <!-- This line is intentionally left blank. -->
1
2
  <%= render @needle do |p| %>
2
3
  <% end %>
@@ -23,7 +23,7 @@ Bullet Train's Super Scaffolding engine is a unique approach to code generation,
23
23
 
24
24
  ## Prerequisites
25
25
 
26
- Before getting started with Super Scaffolding, we recommend reading about [the philosophy of domain modeling in Bullet Train](/docs/topics/domain-modeling.md).
26
+ Before getting started with Super Scaffolding, we recommend reading about [the philosophy of domain modeling in Bullet Train](/docs/modeling.md).
27
27
 
28
28
  ## Usage
29
29
 
@@ -0,0 +1,18 @@
1
+ require "unicode/emoji"
2
+
3
+ module BulletTrain
4
+ module CoreExt
5
+ module StringEmojiHelper
6
+ def strip_emojis
7
+ gsub(Unicode::Emoji::REGEX, "")
8
+ end
9
+
10
+ def only_emoji?
11
+ return false if strip.empty?
12
+ strip_emojis.strip.empty?
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+ String.include(BulletTrain::CoreExt::StringEmojiHelper)
@@ -92,7 +92,7 @@ module BulletTrain
92
92
  result[:absolute_path] = class_path || partial_path || locale_path || file_path
93
93
 
94
94
  if result[:absolute_path]
95
- base_path = "bullet_train" + result[:absolute_path].split("/bullet_train").last
95
+ base_path = "bullet_train" + result[:absolute_path].partition("/bullet_train").last
96
96
 
97
97
  # Try to calculate which package the file is from, and what it's path is within that project.
98
98
  ["app", "config", "lib"].each do |directory|
@@ -138,7 +138,9 @@ module BulletTrain
138
138
 
139
139
  def file_path
140
140
  # We don't have to do anything here... the absolute path is what we're passed, and we just pass it back.
141
- @needle
141
+ if @needle[0] == "/"
142
+ @needle
143
+ end
142
144
  end
143
145
 
144
146
  def locale_path
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.0.47"
2
+ VERSION = "1.0.50"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -9,7 +9,7 @@ require "bullet_train/has_uuid"
9
9
  require "bullet_train/scope_validator"
10
10
 
11
11
  require "colorizer"
12
- require "string/emoji"
12
+ require "bullet_train/core_ext/string_emoji_helper"
13
13
 
14
14
  require "devise"
15
15
  # require "devise-two-factor"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.47
4
+ version: 1.0.50
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-04 00:00:00.000000000 Z
11
+ date: 2022-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - '='
256
256
  - !ruby/object:Gem::Version
257
- version: 5.0.0.pre8
257
+ version: 5.0.0.pre9
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - '='
263
263
  - !ruby/object:Gem::Version
264
- version: 5.0.0.pre8
264
+ version: 5.0.0.pre9
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: hiredis
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -360,6 +360,20 @@ dependencies:
360
360
  - - ">="
361
361
  - !ruby/object:Gem::Version
362
362
  version: '0'
363
+ - !ruby/object:Gem::Dependency
364
+ name: unicode-emoji
365
+ requirement: !ruby/object:Gem::Requirement
366
+ requirements:
367
+ - - ">="
368
+ - !ruby/object:Gem::Version
369
+ version: '0'
370
+ type: :runtime
371
+ prerelease: false
372
+ version_requirements: !ruby/object:Gem::Requirement
373
+ requirements:
374
+ - - ">="
375
+ - !ruby/object:Gem::Version
376
+ version: '0'
363
377
  description: Bullet Train
364
378
  email:
365
379
  - andrew.culver@gmail.com
@@ -578,11 +592,11 @@ files:
578
592
  - docs/webhooks/incoming.md
579
593
  - docs/webhooks/outgoing.md
580
594
  - lib/bullet_train.rb
595
+ - lib/bullet_train/core_ext/string_emoji_helper.rb
581
596
  - lib/bullet_train/engine.rb
582
597
  - lib/bullet_train/resolver.rb
583
598
  - lib/bullet_train/version.rb
584
599
  - lib/colorizer.rb
585
- - lib/string/emoji.rb
586
600
  - lib/tasks/bullet_train_tasks.rake
587
601
  homepage: https://github.com/bullet-train-co/bullet_train
588
602
  licenses:
data/lib/string/emoji.rb DELETED
@@ -1,10 +0,0 @@
1
- class String
2
- def strip_emojis
3
- gsub(Unicode::Emoji::REGEX, "")
4
- end
5
-
6
- def only_emoji?
7
- return false if strip.empty?
8
- strip_emojis.strip.empty?
9
- end
10
- end