bullet_train-themes-light 1.3.24 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bullet_train/themes/light/version.rb +1 -1
- data/lib/tasks/application.rb +12 -3
- 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: 15b257a23112f0b0ffae2175c3408b95474565503274e7f149d8d2fc185ae713
|
4
|
+
data.tar.gz: c21e0b35953ba7153dd8cab5fd51663e87e60e092aecc364c5b4a81e2a318d78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed863ab94c33f78b784cd3088d814f50fbd546602761f6da2597edfa8561d0fc6274b8c560c22a4674d728fe10ca7a8f0c81d2b70a7b65d485b8a7407e21324
|
7
|
+
data.tar.gz: c458c9610daaacadcdd7fc4ad847b9e53377a5c3415a4767b5b81af8a9c03fac098012d1514464b0bde984d244fd533a86849a3f8054988ab67d81a23cde0584
|
data/lib/tasks/application.rb
CHANGED
@@ -69,10 +69,19 @@ module BulletTrain
|
|
69
69
|
%x(sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/module #{constantized_theme}/module #{ejected_theme_name.titlecase}/g" #{target_path})
|
70
70
|
%x(sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/TailwindCss/#{constantized_theme}/g" #{target_path})
|
71
71
|
%x(sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/#{theme_name}/#{ejected_theme_name}/g" #{target_path})
|
72
|
-
|
73
|
-
|
74
|
-
|
72
|
+
|
73
|
+
theme_file = Pathname.new(target_path)
|
74
|
+
msmn = Masamune::AbstractSyntaxTree.new(theme_file.readlines.join)
|
75
|
+
data_to_skip =
|
76
|
+
msmn.method_calls(name: "require") +
|
77
|
+
msmn.method_calls(name: "mattr_accessor") +
|
78
|
+
msmn.comments.select { |comment| comment[:token].match?("TODO") }
|
79
|
+
lines_to_skip = data_to_skip.map { |data| data[:line_number] - 1 }
|
80
|
+
new_lines = theme_file.readlines.select.with_index do |line, idx|
|
81
|
+
!lines_to_skip.include?(idx) || line.match?("mattr_accessor :colors")
|
75
82
|
end
|
83
|
+
theme_file.write new_lines.join
|
84
|
+
|
76
85
|
`standardrb --fix #{target_path}`
|
77
86
|
|
78
87
|
puts "Cutting local project over from `#{theme_name}` to `#{ejected_theme_name}` in `app/helpers/application_helper.rb`."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-themes-light
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|