theme-juice 0.16.4 → 0.16.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/theme-juice/config.rb +20 -22
- data/lib/theme-juice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c4256aac1ac03f8e2d2a67008b63593ff30c8e9
|
4
|
+
data.tar.gz: ec8373c22b814c3f9e886f258633d2c2201910bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33137d250faa8390bace847e8491bdcb79ca7c80074bad5ad492b06ce6f8bc5e1a4bb2b14a0229c188c1c54b32c65c95c5d31dc80a71da283db930a6250a47e8
|
7
|
+
data.tar.gz: 3457d87355d634e8c2d3f2894d06225b254a7f5f618b95b162227c6e203d41abe495fde08d3f2217e0e59c8eb2588a3311cc8e78a618d746cf0280904e21d08f
|
data/README.md
CHANGED
@@ -162,7 +162,7 @@ Yes and no; in order for `tj` to properly create a project, the Vagrant box need
|
|
162
162
|
[It's a file that contains custom rules to add into the main `Vagrantfile`, without actually having to modify it](https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/Vagrantfile#L208-L218). This allows us to easily modify the Vagrant box without causing merge conflicts if you were to update the VM source via `git pull`. Every file that `tj` modifies is _meant to be modified_, so at any time you may update your installation of VVV with a simple `git pull` without getting merge conflicts out the wazoo.
|
163
163
|
|
164
164
|
### What is a `Juicefile`?
|
165
|
-
A YAML configuration file called `Juicefile` can be used to store commonly-used build scripts, similar to [npm scripts](https://docs.npmjs.com/misc/scripts). Each command block sequence can be mapped to an individual project's build script, allowing a streamlined set of commands to be used across multiple projects that utilize different tools.
|
165
|
+
A YAML configuration file called `Juicefile` can be used to store commonly-used build scripts, similar to [npm scripts](https://docs.npmjs.com/misc/scripts). Each command block sequence can be mapped to an individual project's build script, allowing a streamlined set of commands to be used across multiple projects that utilize different tools. If you plan to deploy using `tj`, this file will also house your [deployment configuration](http://themejuice.it/deploy).
|
166
166
|
|
167
167
|
Below is the config that comes baked into [our starter template](https://github.com/ezekg/theme-juice-starter):
|
168
168
|
|
data/lib/theme-juice/config.rb
CHANGED
@@ -9,23 +9,23 @@ module ThemeJuice
|
|
9
9
|
@config = nil
|
10
10
|
|
11
11
|
def command(cmd, *args)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
@io.say "Skipping...", :color => :yellow, :icon => :notice
|
18
|
-
end
|
12
|
+
commands.fetch("#{cmd}") {
|
13
|
+
@io.error "Command '#{cmd}' not found in config", NotImplementedError }
|
14
|
+
.each { |c| run format_command(c, *args) }
|
15
|
+
rescue NoMethodError
|
16
|
+
@io.say "Skipping...", :color => :yellow, :icon => :notice
|
19
17
|
end
|
20
18
|
|
21
19
|
def commands
|
22
|
-
config.commands
|
23
|
-
|
20
|
+
config.commands
|
21
|
+
rescue NoMethodError
|
22
|
+
{}
|
24
23
|
end
|
25
24
|
|
26
25
|
def deployment
|
27
|
-
config.deployment
|
28
|
-
|
26
|
+
config.deployment
|
27
|
+
rescue NoMethodError
|
28
|
+
@io.error("Deployment settings not found in config", NotImplementedError)
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
@@ -54,19 +54,17 @@ module ThemeJuice
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def read_config
|
57
|
-
|
58
|
-
@project.location ||= Dir.pwd
|
57
|
+
@project.location ||= Dir.pwd
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
67
|
-
rescue LoadError, SystemExit
|
68
|
-
nil
|
59
|
+
YAML.load_file Dir["#{@project.location}/*"].select { |f|
|
60
|
+
config_regex =~ File.basename(f) }.last ||
|
61
|
+
@io.error("Config file not found in '#{@project.location}'", LoadError)
|
62
|
+
rescue ::Psych::SyntaxError => err
|
63
|
+
@io.error "Config file contains invalid YAML", SyntaxError do
|
64
|
+
puts err
|
69
65
|
end
|
66
|
+
rescue LoadError, SystemExit
|
67
|
+
nil
|
70
68
|
end
|
71
69
|
|
72
70
|
def config_regex
|
data/lib/theme-juice/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: theme-juice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ezekiel Gabrielse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|