konstruct 0.1.3 → 0.2.0

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: af3e952ba75ca52ec4b08bca0866b8faf59c9565
4
- data.tar.gz: 05af5e6f2b8125923bd8327981511f2d47164a46
3
+ metadata.gz: c30796203320cb3a5740bbb2cfe6188966c1dd4c
4
+ data.tar.gz: 988fe6dbb495d02d94286ac3666de5836c9226fe
5
5
  SHA512:
6
- metadata.gz: 1ac3b71723a30ffeed0b01f57fc43dcdfb3db977dd85e692fb54eb6ac54f3082515e9845e3a9edae46a16fcf3bd4175faafe5e64cea30029d82968de238a48c5
7
- data.tar.gz: 267db95e426754bb1692cd4afdcffd2e22ec9dbce03f3e186840022a9ef45b1800e139480eeb7c1ee746ea3f6e004c6ff1dc663d6280c32cae793e54af522b5e
6
+ metadata.gz: ca3174b805aed75aa2fdf7f3d78a0efc2e42e23a41fef56b9c87a1a9b6c2f2ec763850cdfdf4c26d855c8e33d4373d884bc67c46a37549681d2b86eacfb597a3
7
+ data.tar.gz: 8a969758126991264c3336eecdd253d2d8120a298c62d34246e3b7c3f9435c2c2e0f2acc3db22e0794a2c162b8394491f4e3d130d138bb4aa60a6356890bf16f
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Konstruct Cli - 0.1.3
1
+ # Konstruct Cli
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/konstruct.svg)](https://badge.fury.io/rb/konstruct)
2
4
 
3
5
  The Konstruct Cli provides tools to make working with Konstruct painless and quick. You can access documentation, build a new project structure and scaffold a new site with simple to use commands.
4
6
 
@@ -28,13 +30,15 @@ This feature is coming soon.
28
30
 
29
31
  The skeleton command builds a basic starter project template for common website projects. It builds common folders to ensure your project is tidy and organised.
30
32
 
31
- #### Documentation
33
+ #### Stat
32
34
 
33
35
  This feature is coming soon.
34
36
 
35
- #### Stat
37
+ #### Documentation
38
+
39
+ $ konstruct documentation
36
40
 
37
- This feature is coming soon.
41
+ Loads up the [Konstruct Documentation](http://konstruct.github.io/) in your default browser.
38
42
 
39
43
  ## Contributing
40
44
 
data/konstruct.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency 'commander'
21
21
  spec.add_dependency 'minigit'
22
22
  spec.add_dependency 'paint'
23
+ spec.add_dependency 'launchy'
23
24
 
24
25
  spec.add_development_dependency "bundler", "~> 1.11"
25
26
  spec.add_development_dependency "rake", "~> 10.0"
@@ -0,0 +1,44 @@
1
+ # KONSTRUCT CLI [ KONSTRUCT MODULE ] ==================================================================================
2
+
3
+ # ====== INDEX =======================================================================================================
4
+ # ==
5
+ # == A. OPEN DOCUMENTATION
6
+ # ==
7
+ # ====== INDEX =======================================================================================================
8
+
9
+ # A. OPEN DOCUMENTATION +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10
+
11
+ module Konstruct
12
+
13
+ class Cli
14
+
15
+ def documentation
16
+
17
+ # B.1. INITIALISE FUNCTIONS -------------------------------------------------------------------------------
18
+
19
+ msg = Util::Message.new()
20
+
21
+ # B.1. END ------------------------------------------------------------------------------------------------
22
+
23
+ msg.heading("KONSTRUCT DOCUMENTATION")
24
+
25
+ # B.2. IS YOUR DIRECTORY EMPTY? ---------------------------------------------------------------------------
26
+
27
+ puts Paint["Opening documentation in your default browser!", "999999"]
28
+ puts ""
29
+
30
+ Launchy.open( "http://konstruct.github.io/" )
31
+
32
+ exit(0)
33
+
34
+ # B.3. END ------------------------------------------------------------------------------------------------
35
+
36
+ end
37
+
38
+ end
39
+
40
+ end
41
+
42
+ # B. END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
43
+
44
+ # END OF FILE =========================================================================================================
data/lib/konstruct.rb CHANGED
@@ -14,6 +14,7 @@ require "konstruct/version"
14
14
  require 'rubygems'
15
15
  require 'commander/import'
16
16
  require 'paint'
17
+ require 'launchy'
17
18
 
18
19
  # A.1. END ------------------------------------------------------------------------------------------------------------
19
20
 
@@ -28,6 +29,7 @@ require_relative 'utilities/utils'
28
29
 
29
30
  require_relative 'cli/scaffold'
30
31
  require_relative 'cli/skeleton'
32
+ require_relative 'cli/documentation'
31
33
 
32
34
  # A.2. END ------------------------------------------------------------------------------------------------------------
33
35
 
@@ -57,7 +59,7 @@ program :description, 'The Konstruct CLI provides scaffolding and other tools to
57
59
 
58
60
  # B.1. END ------------------------------------------------------------------------------------------------------------
59
61
 
60
- # B.3. COMMAND: SKELETON ----------------------------------------------------------------------------------------------
62
+ # B.2. COMMAND: SKELETON ----------------------------------------------------------------------------------------------
61
63
 
62
64
  # -- DESCRIPTION: Scaffolds a skeleton project folder structure for you.
63
65
 
@@ -79,6 +81,29 @@ command :skeleton do |c|
79
81
 
80
82
  end
81
83
 
84
+ # B.2. END ------------------------------------------------------------------------------------------------------------
85
+
86
+ # B.3. COMMAND: DOCUMENTATION -----------------------------------------------------------------------------------------
87
+
88
+ # -- DESCRIPTION: Launches Konstruct documentation in a browser
89
+
90
+ # -- USAGE: $ konstruct documentation
91
+
92
+ command :documentation do |c|
93
+
94
+ c.syntax = 'konstruct documentation'
95
+ c.summary = 'Launches Konstruct documentation in a browser'
96
+ c.description = 'Launches Konstruct documentation in a browser'
97
+ c.action do |args, options|
98
+
99
+ art.icon()
100
+
101
+ cli.documentation()
102
+
103
+ end
104
+
105
+ end
106
+
82
107
  # B.3. END ------------------------------------------------------------------------------------------------------------
83
108
 
84
109
  # B. END ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -1,3 +1,3 @@
1
1
  module Konstruct
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konstruct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Kirsten
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: launchy
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,6 +114,7 @@ files:
100
114
  - bin/konstruct
101
115
  - bin/setup
102
116
  - konstruct.gemspec
117
+ - lib/cli/documentation.rb
103
118
  - lib/cli/scaffold.rb
104
119
  - lib/cli/skeleton.rb
105
120
  - lib/konstruct.rb