bullet_train 1.0.17 → 1.0.20

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: 59e1e50e3477aece2de7d9371347e383d81b8e1730fcc3a7fb1e3d53057c2575
4
- data.tar.gz: 78f02e92206009dab04af7f44e3f91fb948d750b77d2317f1aaf3b2704a533ef
3
+ metadata.gz: 00c7f440f91d0914bbb81d49c9bf97eb8a28086ca528d284580494aa2462f202
4
+ data.tar.gz: c2bd5dfb77dc7ffaa59b95b99eceda5e530f5c295e0a8634e77afc40446af9ee
5
5
  SHA512:
6
- metadata.gz: 4a9ebcc8664f5dac9ef71417bda9527fab127deb2eccb025d152551f7e9c852a38c258c0079aef204d0b8e5cdddadf5ed303f72b68e7ad07de0da29d1fd70996
7
- data.tar.gz: 3dbb897dfe99542b31a31cd129057e7329b960f3ed0893bd8441a08ae61cf1af517dade2313b9f602c28645792d2e151c0ce7b4e1683decb42a67f4bd3330983
6
+ metadata.gz: ef443f4dce7333063c26332059b2ce7b429ea8329bb59e465df6a52f8630f68a68188feaa3e080017583a1f53f8f2ee08dccce98bb0f818b43b2668399dd1f68
7
+ data.tar.gz: 025e58532bc37ff74e842530d882518ee7e5162fd9351316574d8161bf6e1e73246023b505cba7bf0b685bdd71b207deb736b88d4794d0b6fc666d9075aa1108
@@ -1,6 +1,6 @@
1
1
  module ImagesHelper
2
2
  def image_width_for_height(filename, target_height)
3
- source_width, source_height = FastImage.size("#{Rails.root}/app/javascript/images/#{filename}")
3
+ source_width, source_height = FastImage.size("#{Rails.root}/app/assets/images/#{filename}")
4
4
  ratio = source_width.to_f / source_height.to_f
5
5
  (target_height * ratio).to_i
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.0.17"
2
+ VERSION = "1.0.20"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -9,4 +9,5 @@ require "bullet_train/scope_validator"
9
9
 
10
10
  module BulletTrain
11
11
  mattr_accessor :routing_concerns, default: []
12
+ mattr_accessor :linked_gems, default: ["bullet_train"]
12
13
  end
@@ -1,4 +1,26 @@
1
- # desc "Explaining what the task does"
2
- # task :bullet_train do
3
- # # Task goes here
4
- # end
1
+ namespace :bullet_train do
2
+ desc "Symlink registered gems in `./tmp/gems` so their views, etc. can be inspected by Tailwind CSS."
3
+ task :link_gems => :environment do
4
+ if Dir.exists?("tmp/gems")
5
+ puts "Removing previously linked gems."
6
+ `rm -f tmp/gems/*`
7
+ else
8
+ if File.exists?("tmp/gems")
9
+ raise "A file named `tmp/gems` already exists? It has to be removed before we can create the required directory."
10
+ end
11
+
12
+ puts "Creating 'tmp/gems' directory."
13
+ `mkdir tmp/gems`
14
+ end
15
+
16
+ `touch tmp/gems/.keep`
17
+
18
+ BulletTrain.linked_gems.each do |linked_gem|
19
+ target = `bundle show #{linked_gem}`.chomp
20
+ if target.present?
21
+ puts "Linking '#{linked_gem}' to '#{target}'."
22
+ puts `ln -s #{target} tmp/gems/#{linked_gem}`
23
+ end
24
+ end
25
+ end
26
+ end
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.17
4
+ version: 1.0.20
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-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails