brief 1.16.1 → 1.16.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76c61dacce82a9ea1329bb888dc2723a3e7f85bd
4
- data.tar.gz: bb1341e68317e98be5cc81c39a704795d2c2e81a
3
+ metadata.gz: 2ab0c3413dab15b505c92df133f1a4e144352dd9
4
+ data.tar.gz: 4a613723060393c2b3338ad020cef71b06710ad9
5
5
  SHA512:
6
- metadata.gz: c79fb12cff4ab1a73739db0656249db3dc1f488db650aad492d6a068c82dfbd0d25fa170a0ac034d078616dc47276d39ecb84124b7473853ddf62687d328a27b
7
- data.tar.gz: 55546bb2df599a18f52164a4e74eab24c58cb8bb028b884b80ed73280cfe98a3dbceba30a62638140607c7334e6da914ce8ff36f0c5143ffe5c070dd00cb9d8b
6
+ metadata.gz: 933b94b0c4b6d1b137eda4eb5c2f73ab6140943cb189fc85e752a9227613159b2df5706fe5f37d6065061da98bf00457311d58ec3083ee98874013d6e5fd91e4
7
+ data.tar.gz: 3792781b3e13298ff9a6b2d0e5e0626f1c720afea837aa304553801251f15c10e6bdd0c3c4fa7b60120815c62998007b27688c2212c2cdbe613d1c7ab54f36bb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brief (1.16.1)
4
+ brief (1.16.2)
5
5
  activesupport (> 3.2)
6
6
  commander (~> 4.3)
7
7
  em-websocket (~> 0.5)
@@ -74,7 +74,7 @@ GEM
74
74
  coderay (~> 1.1.0)
75
75
  method_source (~> 0.8.1)
76
76
  slop (~> 3.4)
77
- rack (1.6.1)
77
+ rack (1.6.4)
78
78
  rack-test (0.6.3)
79
79
  rack (>= 1.0)
80
80
  rake (0.9.6)
@@ -0,0 +1,47 @@
1
+ command "view example" do |c|
2
+ c.syntax = "brief view example MODEL"
3
+ c.description = "View an example document"
4
+ c.option '--format TYPE', String, 'Which format to present the information. json, or table'
5
+
6
+ c.action do |args, options|
7
+ options.default(format: 'editor')
8
+ model = args.first
9
+
10
+ briefcase = Brief.case = Brief::Briefcase.new(root: Pathname(options.root || Brief.pwd))
11
+ schema_map = briefcase.schema_map(false)
12
+
13
+ payload = schema_map
14
+
15
+ if args.length > 0
16
+ payload = schema_map.fetch(args.first) do
17
+ raise "Invalid model."
18
+ end
19
+ end
20
+
21
+ puts "Viewing Documentation for #{ payload }"
22
+ end
23
+ end
24
+
25
+ command "view documentation" do |c|
26
+ c.syntax = "brief view documentation for MODEL"
27
+ c.description = "View the documentation for a model"
28
+ c.option '--format TYPE', String, 'Which format to present the information. json, or table'
29
+
30
+ c.action do |args, options|
31
+ options.default(format: 'editor')
32
+ model = args.first
33
+
34
+ briefcase = Brief.case = Brief::Briefcase.new(root: Pathname(options.root || Brief.pwd))
35
+ schema_map = briefcase.schema_map(false)
36
+
37
+ payload = schema_map
38
+
39
+ if args.length > 0
40
+ payload = schema_map.fetch(args.first) do
41
+ raise "Invalid model."
42
+ end
43
+ end
44
+
45
+ puts "Viewing Documentation for #{ payload }"
46
+ end
47
+ end
data/lib/brief/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Brief
2
- VERSION = '1.16.1'
2
+ VERSION = '1.16.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brief
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Soeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-30 00:00:00.000000000 Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -377,6 +377,7 @@ files:
377
377
  - lib/brief/cli/browse.rb
378
378
  - lib/brief/cli/create.rb
379
379
  - lib/brief/cli/edit.rb
380
+ - lib/brief/cli/examples.rb
380
381
  - lib/brief/cli/export.rb
381
382
  - lib/brief/cli/parse.rb
382
383
  - lib/brief/cli/render.rb