cssbundling-rails 1.3.0 → 1.3.1

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: 80c2c969114694a1020f70a4f5025ddaaddd9814c802646e768631942a1adbdf
4
- data.tar.gz: d5a828cf779270bf0f05257fcc2e9ee33fbbae7b23e5f668bcad26779a0131f0
3
+ metadata.gz: c0e0270ce3ff8d039ffc7b9d7a3853d7d67b7c4b2571d640078b4392a08dd601
4
+ data.tar.gz: 7973f04cf1ef54513b9e36ff0571024e087e0515986ced9a2cf8e9e5468cb00f
5
5
  SHA512:
6
- metadata.gz: a42545bdef51ea41c6c386067a643a84c862fe996b0f1d519891ada561db3ad067796a66172ee628bcfc993540644529dfda0c6b938410a121d727c04e111ada
7
- data.tar.gz: 1ed4b170f44f51e8db2d04e7d963702bacef1eab17099eac42a9df6166f1aa4ad480b60caa11437973e219ab1c35c3a6292eb08252db42ccf26c88ddc08ac4bb
6
+ metadata.gz: bcba15c277b4a46a8699ac641e9904b925c4a39c402a0c69ac5b7fb7856f13a5d8ab2ece33b389533e1b5e9013bca180a52dd139842fcb6fff79d2db0f268361
7
+ data.tar.gz: 29e8e279c1811baefff15f8baa4a1b4926701ed6a3c2e8d4b4a744c57aa50ffc48c68824b4dc96dd9d313a6bc3f0e3e16b6da4b8975366c86b1965f689ee127b
@@ -1,3 +1,3 @@
1
1
  module Cssbundling
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  namespace :css do
2
2
  desc "Install JavaScript dependencies"
3
3
  task :install do
4
- command = install_command
4
+ command = Cssbundling::Tasks.install_command
5
5
  unless system(command)
6
6
  raise "cssbundling-rails: Command install failed, ensure #{command.split.first} is installed"
7
7
  end
@@ -9,7 +9,7 @@ namespace :css do
9
9
 
10
10
  desc "Build your CSS bundle"
11
11
  build_task = task :build do
12
- command = build_command
12
+ command = Cssbundling::Tasks.build_command
13
13
  unless system(command)
14
14
  raise "cssbundling-rails: Command build failed, ensure `#{command}` runs without errors"
15
15
  end
@@ -17,20 +17,26 @@ namespace :css do
17
17
  build_task.prereqs << :install unless ENV["SKIP_YARN_INSTALL"] || ENV["SKIP_BUN_INSTALL"]
18
18
  end
19
19
 
20
- def install_command
21
- return "bun install" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
22
- return "yarn install" if File.exist?('yarn.lock') || tool_exists?('yarn')
23
- raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
24
- end
20
+ module Cssbundling
21
+ module Tasks
22
+ extend self
25
23
 
26
- def build_command
27
- return "bun run build:css" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
28
- return "yarn build:css" if File.exist?('yarn.lock') || tool_exists?('yarn')
29
- raise "cssbundling-rails: No suitable tool found for building CSS"
30
- end
24
+ def install_command
25
+ return "bun install" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
26
+ return "yarn install" if File.exist?('yarn.lock') || tool_exists?('yarn')
27
+ raise "cssbundling-rails: No suitable tool found for installing JavaScript dependencies"
28
+ end
31
29
 
32
- def tool_exists?(tool)
33
- system "command -v #{tool} > /dev/null"
30
+ def build_command
31
+ return "bun run build:css" if File.exist?('bun.lockb') || (tool_exists?('bun') && !File.exist?('yarn.lock'))
32
+ return "yarn build:css" if File.exist?('yarn.lock') || tool_exists?('yarn')
33
+ raise "cssbundling-rails: No suitable tool found for building CSS"
34
+ end
35
+
36
+ def tool_exists?(tool)
37
+ system "command -v #{tool} > /dev/null"
38
+ end
39
+ end
34
40
  end
35
41
 
36
42
  unless ENV["SKIP_CSS_BUILD"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cssbundling-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-12 00:00:00.000000000 Z
12
+ date: 2023-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties