hx 0.23.0 → 0.24.0

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/hx/cli.rb +10 -0
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.23.0
1
+ 0.24.0
@@ -49,6 +49,7 @@ Usage: hx [--config CONFIG_FILE] [upgen]
49
49
  hx [--config CONFIG_FILE] post[up] SOURCE:PATH
50
50
  hx [--config CONFIG_FILE] edit[up] SOURCE:PATH
51
51
  hx [--config CONFIG_FILE] list SOURCE:PATTERN
52
+ hx [--config CONFIG_FILE] dump SOURCE:PATTERN
52
53
  hx [--config CONFIG_FILE] serve [PORT]
53
54
 
54
55
  EOS
@@ -209,6 +210,15 @@ def self.cmd_list(site, entry_spec)
209
210
  source.each_entry_path(selector) { |path| puts path }
210
211
  end
211
212
 
213
+ def self.cmd_dump(site, entry_spec)
214
+ source, selector = parse_entry_pattern(site, entry_spec)
215
+ items = []
216
+ source.each_entry(selector) do |path, entry|
217
+ items << {path => entry}
218
+ end
219
+ puts YAML.dump(items)
220
+ end
221
+
212
222
  def self.do_edit(site, source, path, prototype)
213
223
  catch(:unchanged) do
214
224
  begin
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 67
4
+ hash: 127
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 23
8
+ - 24
9
9
  - 0
10
- version: 0.23.0
10
+ version: 0.24.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - MenTaLguY
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-15 00:00:00 -07:00
18
+ date: 2011-03-25 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency