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 +4 -4
- data/app/helpers/images_helper.rb +1 -1
- data/lib/bullet_train/version.rb +1 -1
- data/lib/bullet_train.rb +1 -0
- data/lib/tasks/bullet_train_tasks.rake +26 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00c7f440f91d0914bbb81d49c9bf97eb8a28086ca528d284580494aa2462f202
|
4
|
+
data.tar.gz: c2bd5dfb77dc7ffaa59b95b99eceda5e530f5c295e0a8634e77afc40446af9ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
data/lib/bullet_train/version.rb
CHANGED
data/lib/bullet_train.rb
CHANGED
@@ -1,4 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
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.
|
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-
|
11
|
+
date: 2022-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|