guard-jekyll-plus 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -34,3 +34,8 @@ New config options
34
34
  - Copy and remove ignore changes in directories beginning with an underscore.
35
35
  - Improved output for Jekyll build.
36
36
 
37
+ ### 1.2.3
38
+
39
+ - Added configuration to change the message prefix for Guard UI
40
+ - Added license to gemspec
41
+
data/README.md CHANGED
@@ -80,6 +80,7 @@ This guard has two configurations.
80
80
  | `future` | Build your site with future dated posts | false |
81
81
  | `config_hash` | Use a config hash instead of an array of files | nil |
82
82
  | `silent` | Slience all output other than exception message | false |
83
+ | `msg_prefix` | Output messages are prefixed with with this | 'Jekyll' |
83
84
 
84
85
  **Note:** customizations to the `extensions` configuration are additive.
85
86
 
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{A Guard plugin for smarter Jekyll watching}
12
12
  gem.summary = %q{A Guard plugin for Jekyll which intelligently handles changes to static and template files, only running a Jekyll build when necessary. }
13
13
  gem.homepage = "http://github.com/imathis/guard-jekyll-plus"
14
+ gem.license = 'MIT'
14
15
 
15
16
  gem.add_dependency 'guard', '>= 1.1.0'
16
17
  gem.add_dependency 'jekyll', '>= 1.0.0'
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  class JekyllPlusVersion
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
4
4
  end
5
5
  end
@@ -20,7 +20,8 @@ module Guard
20
20
  :drafts => false,
21
21
  :future => false,
22
22
  :config_hash => nil,
23
- :silent => false
23
+ :silent => false,
24
+ :msg_prefix => 'Jekyll'
24
25
  }.merge(options)
25
26
 
26
27
  # The config_hash option should be a hash ready to be consumed by Jekyll's Site class.
@@ -36,7 +37,7 @@ module Guard
36
37
  #
37
38
  @source = local_path @config['source']
38
39
  @destination = local_path @config['destination']
39
- @label = "Guard::Jekyll"
40
+ @msg_prefix = @options[:msg_prefix]
40
41
 
41
42
  # Convert array of extensions into a regex for matching file extensions eg, /\.md$|\.markdown$|\.html$/i
42
43
  #
@@ -57,10 +58,10 @@ module Guard
57
58
  if @options[:serve]
58
59
  start_server
59
60
  build
60
- UI.info "#{@label} " + "watching and serving at #{@config['host']}:#{@config['port']}#{@config['baseurl']}" unless @config[:silent]
61
+ UI.info "#{@msg_prefix} " + "watching and serving at #{@config['host']}:#{@config['port']}#{@config['baseurl']}" unless @config[:silent]
61
62
  else
62
63
  build
63
- UI.info "#{@label} " + "watching" unless @config[:silent]
64
+ UI.info "#{@msg_prefix} " + "watching" unless @config[:silent]
64
65
  end
65
66
  end
66
67
 
@@ -112,17 +113,17 @@ module Guard
112
113
 
113
114
  def build(files = nil, message = '', mark = nil)
114
115
  begin
115
- UI.info "#{@label} #{message}" + "building...".yellow unless @config[:silent]
116
+ UI.info "#{@msg_prefix} #{message}" + "building...".yellow unless @config[:silent]
116
117
  if files
117
118
  puts '| ' # spacing
118
119
  files.each { |file| puts '|' + mark + file }
119
120
  puts '| ' # spacing
120
121
  end
121
122
  @site.process
122
- UI.info "#{@label} " + "build complete ".green + "#{@source} → #{@destination}" unless @config[:silent]
123
+ UI.info "#{@msg_prefix} " + "build complete ".green + "#{@source} → #{@destination}" unless @config[:silent]
123
124
 
124
125
  rescue Exception => e
125
- UI.error "#{@label} build has failed" unless @config[:silent]
126
+ UI.error "#{@msg_prefix} build has failed" unless @config[:silent]
126
127
  stop_server
127
128
  throw :task_has_failed
128
129
  end
@@ -134,7 +135,7 @@ module Guard
134
135
  begin
135
136
  message = 'copied file'
136
137
  message += 's' if files.size > 1
137
- UI.info "#{@label} #{message.green}" unless @config[:silent]
138
+ UI.info "#{@msg_prefix} #{message.green}" unless @config[:silent]
138
139
  puts '| ' #spacing
139
140
  files.each do |file|
140
141
  path = destination_path file
@@ -145,7 +146,7 @@ module Guard
145
146
  puts '| ' #spacing
146
147
 
147
148
  rescue Exception => e
148
- UI.error "#{@label} copy has failed" unless @config[:silent]
149
+ UI.error "#{@msg_prefix} copy has failed" unless @config[:silent]
149
150
  UI.error e
150
151
  stop_server
151
152
  throw :task_has_failed
@@ -159,7 +160,7 @@ module Guard
159
160
  begin
160
161
  message = 'removed file'
161
162
  message += 's' if files.size > 1
162
- UI.info "#{@label} #{message.red}" unless @config[:silent]
163
+ UI.info "#{@msg_prefix} #{message.red}" unless @config[:silent]
163
164
  puts '| ' #spacing
164
165
 
165
166
  files.each do |file|
@@ -178,7 +179,7 @@ module Guard
178
179
  puts '| ' #spacing
179
180
 
180
181
  rescue Exception => e
181
- UI.error "#{@label} remove has failed" unless @config[:silent]
182
+ UI.error "#{@msg_prefix} remove has failed" unless @config[:silent]
182
183
  UI.error e
183
184
  stop_server
184
185
  throw :task_has_failed
data/test/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- guard-jekyll-plus (1.2.2)
4
+ guard-jekyll-plus (1.2.3)
5
5
  guard (>= 1.1.0)
6
6
  jekyll (>= 1.0.0)
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-jekyll-plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-19 00:00:00.000000000 Z
12
+ date: 2013-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
@@ -78,7 +78,8 @@ files:
78
78
  - test/images/twitter.png
79
79
  - test/index.html
80
80
  homepage: http://github.com/imathis/guard-jekyll-plus
81
- licenses: []
81
+ licenses:
82
+ - MIT
82
83
  post_install_message:
83
84
  rdoc_options: []
84
85
  require_paths: