bullet_train-themes-tester 1.0 → 1.0.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: a853cac5bfc14eac7cd4b7752843828f1ebd4ee57d9d8c01cf7db0242e973033
4
- data.tar.gz: a397925ff8870559d044adae012d53381397f40ec7f7d873bf2b5f921f273f72
3
+ metadata.gz: 446199229901459c552c1e0a410e37b919d059346584c01650bc273d0e1d7d2e
4
+ data.tar.gz: c4b43665a144d1c8f20def6a6e8e5e2254a7efc02284cade6ec60dca095eb669
5
5
  SHA512:
6
- metadata.gz: 1b4c403434ac17bcaf735c26a298c7b7ceb177cbc782e91b9a1ec678b2ba8b72412ae44fb9438bcf01b19487a47dead5e354617d97176b19ef28d2a142f8a339
7
- data.tar.gz: 756ad09d089a6a5fccf940f91016e35a9c3b2a28b921ab42507843a512640b18b493b3514cc42b83d0962309d149585ad8c351165889566838cb4103eb963040
6
+ metadata.gz: 258136ebdb59140173f71bbe907a3d51c132f382bceec3f515052845b8ec4045a9d14233cd8f4c79cb2440553e3dded927c7ced05bebe9ac2b8ee4ce84969ed8
7
+ data.tar.gz: ca1d6d1733397424dfff9b3a0b21e83dfe707bd1835ea6924de89310eea1a5565a53ea8d68d90e4435bc708f2ecad0d88fc51e6c5118ead174732c972bf4e83f
@@ -1,11 +1,11 @@
1
1
  :root, .theme-blue {
2
- --primary-300: #95acff;
3
- --primary-400: #448eef;
4
- --primary-500: #047bf8;
5
- --primary-600: #0362c6;
6
- --primary-700: #1c4cc3;
7
- --primary-800: #0e369a;
8
- --primary-900: #00369D;
2
+ --primary-300: #95efff;
3
+ --primary-400: #86d3e0;
4
+ --primary-500: #77bfcc;
5
+ --primary-600: #568891;
6
+ --primary-700: #42666d;
7
+ --primary-800: #2f464b;
8
+ --primary-900: #253a3d;
9
9
 
10
10
  --dark-primary-300: #ccd9e8;
11
11
  --dark-primary-400: #9facc7;
@@ -18,7 +18,7 @@
18
18
  --dark-accent-200: #b3bcde;
19
19
 
20
20
  --light-gradient-from: #D7BBEA;
21
- --light-gradient-to: #65A8F1;
21
+ --light-gradient-to: #77bfcc;
22
22
  --dark-gradient-from: #633d7d;
23
23
  --dark-gradient-to: #2867ab;
24
24
  }
@@ -1,7 +1,7 @@
1
1
  module BulletTrain
2
2
  module Themes
3
3
  module Tester
4
- VERSION = "1.0"
4
+ VERSION = "1.0.1"
5
5
  end
6
6
  end
7
7
  end
@@ -5,6 +5,7 @@ require "bullet_train/themes/light"
5
5
  module BulletTrain
6
6
  module Themes
7
7
  module Tester
8
+ mattr_accessor :color, default: :blue
8
9
  class Theme < BulletTrain::Themes::Light::Theme
9
10
  def directory_order
10
11
  ["tester"] + super
@@ -9,6 +9,10 @@ namespace :bullet_train do
9
9
  puts "Ejecting Tailwind configuration into `./tailwind.#{args[:destination]}.config.js`."
10
10
  `cp #{theme_base_path}/tailwind.tester.config.js #{Rails.root}/tailwind.#{args[:destination]}.config.js`
11
11
 
12
+ puts "Ejecting Tailwind mailer configuration into `./tailwind.mailer.#{args[:destination]}.config.js`."
13
+ `cp #{theme_base_path}/tailwind.mailer.tester.config.js #{Rails.root}/tailwind.mailer.#{args[:destination]}.config.js`
14
+ `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/tester/#{args[:destination]}/g" #{Rails.root}/tailwind.mailer.#{args[:destination]}.config.js`
15
+
12
16
  puts "Ejecting stylesheets into `./app/assets/stylesheets/#{args[:destination]}`."
13
17
  `mkdir #{Rails.root}/app/assets/stylesheets`
14
18
  `cp -R #{theme_base_path}/app/assets/stylesheets/tester #{Rails.root}/app/assets/stylesheets/#{args[:destination]}`
@@ -31,7 +35,7 @@ namespace :bullet_train do
31
35
 
32
36
  # Stub out the class that represents this theme and establishes its inheritance structure.
33
37
  target_path = "#{Rails.root}/app/lib/bullet_train/themes/#{args[:destination]}.rb"
34
- puts "Stubbing out a class that represents this theme in `./#{target_path}`."
38
+ puts "Stubbing out a class that represents this theme in `.#{target_path}`."
35
39
  `mkdir -p #{Rails.root}/app/lib/bullet_train/themes`
36
40
  `cp #{theme_base_path}/lib/bullet_train/themes/tester.rb #{target_path}`
37
41
  `sed -i #{'""' if `echo $OSTYPE`.include?("darwin")} "s/module Tester/module #{args[:destination].titlecase}/g" #{target_path}`
@@ -48,6 +52,42 @@ namespace :bullet_train do
48
52
 
49
53
  puts "You must restart `bin/dev` at this point, because of the changes to `Procfile.dev` and `package.json`."
50
54
  end
55
+
56
+ desc "Install this theme to your main application."
57
+ task :install do |rake_task|
58
+ # Grab the theme name from the rake task, bullet_train:theme:tester:install
59
+ theme_name = rake_task.name.split(":")[2]
60
+
61
+ # Grabs the current theme from
62
+ # def current_theme
63
+ # :theme_name
64
+ # end
65
+ current_theme_regexp = /(^ :)(.*)/
66
+ current_theme = nil
67
+
68
+ new_lines = []
69
+ [
70
+ "./app/helpers/application_helper.rb",
71
+ "./Procfile.dev",
72
+ "./package.json"
73
+ ].each do |file|
74
+ File.open(file, "r") do |f|
75
+ new_lines = f.readlines
76
+ new_lines = new_lines.map do |line|
77
+ # Make sure we get the current theme before trying to replace it in any of the files.
78
+ # We grab it from the first file in the array above.
79
+ current_theme = line.scan(current_theme_regexp).flatten.last if line.match?(current_theme_regexp)
80
+
81
+ line.gsub!(/#{current_theme}/, theme_name) unless current_theme.nil?
82
+ line
83
+ end
84
+ end
85
+
86
+ File.open(file, "w") do |f|
87
+ f.puts new_lines.join
88
+ end
89
+ end
90
+ end
51
91
  end
52
92
  end
53
93
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes-tester
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Zayas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-16 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: standard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rails
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: 7.0.0
33
+ version: 6.0.0
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: 7.0.0
40
+ version: 6.0.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bullet_train-themes-tailwind_css
29
43
  requirement: !ruby/object:Gem::Requirement