theme-juice 0.7.6 → 0.7.7

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
  SHA1:
3
- metadata.gz: 5d78a7169a4c3799728ba0d7fbe5d3553a3e6f59
4
- data.tar.gz: eab7e61c4dfd6b4450f0887db9424f6bfb8ba721
3
+ metadata.gz: 4b205b3fc677c63ee8edc2a0c13f77278ef8b6bf
4
+ data.tar.gz: 3d8b2f995129d7fb25720a519f249e10b4402116
5
5
  SHA512:
6
- metadata.gz: c84429630cd653c15ba70e8560d3a28b21364f9163088f734f4dc01e1907d589b66666eeffa14d865c5ce1c2eddcaf1845b1d94eed8a1953ab712f3d44ac2548
7
- data.tar.gz: 5093ba361d92597e68e67bd66d81b7223f3f6e7ed69d2b81d8918f66c09592b46497c7b7cab3279fe2d8cfe33c9784c01cba2217518b0da2b839388996dc366b
6
+ metadata.gz: e3478fc683ad1dba3a8ef25314187bb40c47f80fee4240c7c95fa3d956b640daf694497018f20360b793fda7f7c01aac3ea1a0ffe58e8820c540633bdaf4ebea
7
+ data.tar.gz: 1c44dc8d3def277761857fa77a62fb035fa0ec8f29375d8a205152a306f0e1f6241ca3d55e71b4fd389116f2c76137ffe8501783a46b561f02ef390a2e45c63d
@@ -10,9 +10,15 @@ module ThemeJuice
10
10
  def method_missing(method, *args, &block)
11
11
  @project.location ||= Dir.pwd
12
12
 
13
- config.fetch("commands", {})
14
- .fetch(method.to_s) { @io.error("Command '#{method}' not found in config") }
15
- .each { |cmd| run format_command(cmd, *args) }
13
+ begin
14
+ config.fetch("commands", {})
15
+ .fetch("#{method}") { @io.error("Command '#{method}' not found in config") }
16
+ .each { |cmd| run format_command(cmd, *args) }
17
+ rescue ::NoMethodError => err
18
+ @io.error "Config file is invalid" do
19
+ puts err
20
+ end
21
+ end
16
22
  end
17
23
 
18
24
  private
@@ -29,7 +35,7 @@ module ThemeJuice
29
35
  cmd.gsub! multi_arg_regex, args.join(" ")
30
36
  else
31
37
  args.to_enum.with_index(1).each do |arg, i|
32
- cmd.gsub! single_arg_regex, arg
38
+ cmd.gsub! single_arg_regex(i), arg
33
39
  end
34
40
  end
35
41
 
@@ -55,7 +61,7 @@ module ThemeJuice
55
61
  %r{(%args%)|(%arguments%)}
56
62
  end
57
63
 
58
- def single_arg_regex
64
+ def single_arg_regex(i)
59
65
  %r{(%arg#{i}%)|(%argument#{i}%)}
60
66
  end
61
67
 
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module ThemeJuice
4
- VERSION = "0.7.6"
4
+ VERSION = "0.7.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme-juice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezekiel Gabrielse