orphic 0.1.1 → 0.1.6

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
  SHA256:
3
- metadata.gz: a7546590c3972a1011faea32b3d920ef2efcce5aa651bf1bee8b2309eb9773a0
4
- data.tar.gz: c8129ccc82c513bee94ae8beb97cfea2eef2be459b5693252430da6051ddee99
3
+ metadata.gz: a3d05719f7ce5f1fbbb63421899632cc7522ed4dc99cd5022363e6ec2301e34d
4
+ data.tar.gz: 715f6405012ea276701c1816257837fab7a37b39b8c8001bf966ab370e9ac15b
5
5
  SHA512:
6
- metadata.gz: 74b06f4e150c63e4359f26620003523775d304dcb83d3c4d4feae16aa1d1234d66d4cf4b99019b7ea342f00e5854e44f6ffd9726199f5a8da4ca6e370326f26d
7
- data.tar.gz: 8adab37499d34b8097fc827d6edc3fe33e87eac157fe76941cc29905b4b428e9caa6964f18a871d8b997ade0616e2b72507fd88d67bb23ce85529a7ecae8daab
6
+ metadata.gz: e072c21c875c0a160c3d4534d34a661a672eca713ec6220cfbb320d6a80b75cd25d6359d5392f14a3ee811c200dd312ab6ba0fe60d0ca8823268666b33c61136
7
+ data.tar.gz: 1c5acc99a5484c34cb2cd15f1e7dd8ef5b3bb7873d0192258313b2822f4802e84b1066abb4578516665ca6a52ba6c7cffc68cd1926cb7d7a5438000975e2763c
@@ -1,6 +1,7 @@
1
+ # Orphic's Ruby CLI
1
2
  # Contributor Covenant Code of Conduct
2
3
 
3
- ## Our Pledge
4
+ ## Orphic's Pledge
4
5
 
5
6
  In the interest of fostering an open and welcoming environment, we as
6
7
  contributors and maintainers pledge to making participation in our project and
@@ -31,7 +32,7 @@ advances
31
32
  * Other conduct which could reasonably be considered inappropriate in a
32
33
  professional setting
33
34
 
34
- ## Our Responsibilities
35
+ ## Orphic Responsibilities
35
36
 
36
37
  Project maintainers are responsible for clarifying the standards of acceptable
37
38
  behavior and are expected to take appropriate and fair corrective action in
@@ -55,7 +56,7 @@ further defined and clarified by project maintainers.
55
56
  ## Enforcement
56
57
 
57
58
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at obrienk@webbhost.net. All
59
+ reported by contacting the project team at cli@orphic.enterprises. All
59
60
  complaints will be reviewed and investigated and will result in a response that
60
61
  is deemed necessary and appropriate to the circumstances. The project team is
61
62
  obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -72,3 +73,7 @@ available at [https://contributor-covenant.org/version/1/4][version]
72
73
 
73
74
  [homepage]: https://contributor-covenant.org
74
75
  [version]: https://contributor-covenant.org/version/1/4/
76
+
77
+ ## License
78
+
79
+ Orphic Ruby CLI License info can be found [here](https://github.com/orphic-inc/ruby-orphic-cli/LICENSE).
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Kyle OBrien
3
+ Copyright (c) 2020 Orphic Enterprises
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -3,7 +3,7 @@
3
3
  require "bundler/setup"
4
4
  require "orphic"
5
5
 
6
- Orphic::HammerOfTheGods.start( ARGV )
6
+ Orphic::Mjolnir.start( ARGV )
7
7
 
8
8
  # You can add fixtures and/or initialization code here to make experimenting
9
9
  # with your gem easier. You can also use a different console, if you like.
data/bin/setup CHANGED
@@ -6,3 +6,32 @@ set -vx
6
6
  bundle install
7
7
 
8
8
  # Do any other automated setup that you need to do here
9
+ # Install nvm, brew, and checkout-js from bash
10
+ # Checks git status first to test for git
11
+ /bin/bash -c "$(git status)"
12
+
13
+ # If you don't see a git status reflected as a test
14
+ # You're doing it wrong, need git installed.
15
+
16
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh |)"
17
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
18
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/nvm-sh/install/master/install.sh)"
19
+ /bin/bash -c "$(nvm install @stable)"
20
+ /bin/bash -c "$(nvm install 12)"
21
+
22
+
23
+ /bin/bash -c "($brew doctor)"
24
+ /bin/bash -c "($brew --version)"
25
+ /bin/bash -c "($rbenv --versions)"
26
+
27
+ # rb isn't installed yet but red test
28
+
29
+ ## try nvm stable or one we know should work
30
+
31
+ # Is npm running, this is the ticket
32
+ /bin/bash -c "$(npm i -g @obrienk/orphic-cli)"
33
+
34
+ # Related things cloned via git during setup.
35
+ git clone https://github.com/bigcommerce/checkout-js
36
+ git clone https://github.com/streamwall/streamwall
37
+ git clone https://github.com/obrien-k/multi-sf-cart
@@ -2,8 +2,10 @@ require "orphic/version"
2
2
  require "orphic/cli"
3
3
 
4
4
  module Orphic
5
- puts "Startled, you wake in a circular room surrounded by bright terminals."
6
- puts "Each terminal represents a pathway that is locked behind a series of keys."
7
- puts "Combining the skills gained from each path is possible, but wild paths taken will be less worn."
8
- puts "Some of these skills overlap. Learn wisely."
5
+ # TODO
6
+ CLI::UI::StdoutRouter.enable
7
+ CLI::UI::Frame.open('Orphic Developer Experience') do
8
+ CLI::UI::Frame.open('Ruby CLI') { puts "The Orphic Ruby CLI utilizes the Thor gem for self-documenting commands and cli-ui gem for UI." }
9
+ puts "Great minds never think alike."
10
+ end
9
11
  end
@@ -1,5 +1,8 @@
1
1
  require 'thor'
2
- require 'orphic/cli/hn'
2
+ require 'orphic/cli/node'
3
+ require 'orphic/cli/district'
4
+ require 'orphic/cli/type'
5
+ require 'cli/ui'
3
6
 
4
7
  module Orphic
5
8
  class Mjolnir < Thor
@@ -13,9 +16,15 @@ module Orphic
13
16
  def hello( name )
14
17
  greeting = "Hello, #{name}"
15
18
  greeting.upcase! if options[:upcase]
16
- puts greeting
19
+ CLI::UI::Frame.open( greeting ) do
20
+ puts greeting + " from the frame"
21
+ end
17
22
  end
18
- desc "hn COMMANDS", "Hacker News Control Module"
19
- subcommand "hn", Orphic::OrphicCli::Hn
23
+ desc "node COMMANDS", "Node.JS Commands"
24
+ subcommand "node", Orphic::OrphicCli::Node
25
+ desc "map DISTRICT ...ARGS", "View map for a district"
26
+ subcommand "map", Orphic::OrphicCli::District
27
+ desc "media TYPE", "Interface with various media types"
28
+ subcommand "media", Orphic::OrphicCli::Type
20
29
  end
21
30
  end
@@ -0,0 +1,65 @@
1
+ module Orphic
2
+ module OrphicCli
3
+ class District < Thor
4
+ desc "district", "Commands for a specific district"
5
+ long_desc <<-DISTRICT
6
+ Commands for a specific district.
7
+
8
+ View districts with <district>.
9
+ DISTRICT
10
+ def district( viewDistrict )
11
+ # implement viewDistrict
12
+ CLI::UI::Frame.open( "Map :: District : " + viewDistrict ) do
13
+ puts "#{viewDistrict}"
14
+ end
15
+ end
16
+ desc "createDistrict", "Create a new district with <createDistrict>"
17
+ long_desc <<-CREATE_DISTRICT
18
+ Create a new district with createDistrict. Base map includes the following options for branching:
19
+
20
+ \x5--AWAKE - The entrypoint. Create command line interfaces, web portals, and related tech.
21
+ \x5--GROW - User Interfaces and Experiences, projects here relate to front-end like React, CSS, and prototypes.
22
+ \x5--DISCOVER - Your current location. Educate your peers or yourself.
23
+ \x5--TRUST - Create authorization, cyphers, and cryptography-related projects.
24
+ \x5--TRUTH - The gateway. Can be used to verify authorizations and is often tied to the Trust District.
25
+ \x5--MAGIC - Let the magic begin! Here you can create ephemeral changes and middleware.
26
+ \x5--POETRY - The poet, the lover, and the coder are of imagination all compact... Code as art.
27
+ \x5--DRIVE - Real-time commands that will effect a concurrent stream or processes.
28
+ \x5--WILL - Databases and permanence.
29
+ \x5--LOYAL - The gauntlet. Test your loyalty with user or unit testing.
30
+ \x5--ENTHUSE - Live events and promotions.
31
+ \x5--CLARITY - The endgame, from your command-line, through staging and production.
32
+ CREATE_DISTRICT
33
+ option :awake
34
+ option :grow
35
+ option :discover
36
+ option :trust
37
+ option :truth
38
+ option :magic
39
+ option :poetry
40
+ option :drive
41
+ option :will
42
+ option :loyal
43
+ option :enthuse
44
+ option :clarity
45
+ def createDistrict ( createDistrict )
46
+ puts "Awake District info" if options[:awake]
47
+ puts "Grow District info" if options[:grow]
48
+ puts "Discover District info" if options[:discover]
49
+ puts "Trust District info" if options[:trust]
50
+ puts "Truth District info" if options[:truth]
51
+ puts "Magic District info" if options[:magic]
52
+ puts "Poetry District info" if options[:poetry]
53
+ puts "Drive District info" if options[:drive]
54
+ puts "Will District info" if options[:will]
55
+ puts "Loyal District info" if options[:loyal]
56
+ puts "Enthuse District info" if options[:enthuse]
57
+ puts "Clarity District info" if options[:clarity]
58
+ # implement createDistrict
59
+ CLI::UI::Frame.open( "Map :: District : Create " + createDistrict ) do
60
+ puts "#{createDistrict}"
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,24 @@
1
+ module Orphic
2
+ module OrphicCli
3
+ class Node < Thor
4
+ desc "help COMMAND", "Get help for the Orphic Node.JS CLI"
5
+ option :tags
6
+ def help ( command )
7
+ CLI::UI::Frame.open( "Node :: help : " + command ) do
8
+ puts "Looks like you are looking for #{command} with tags #{options[:tags]}"
9
+ end
10
+ end
11
+ desc "deploy SITE", "Deploy a Node.JS instance"
12
+ option :baseDistrict
13
+ def deploy ( site )
14
+ CLI::UI::Frame.open( "Node :: deploy : " + site ) do
15
+ if options[:baseDistrict]
16
+ puts "Starting deploy #{site} with #{options[:baseDistrict]}"
17
+ else
18
+ puts "Starting deploy #{site} with no base district."
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,56 @@
1
+ module Orphic
2
+ module OrphicCli
3
+ class Type < Thor
4
+ desc "type", "Interface with specific media TYPEs like mp4, mp3, flac, exe, and app."
5
+ long_desc <<-TYPE
6
+ Commands for a specific TYPE.
7
+
8
+ Learn more about a type with <type> help. Supported types include: mp3, mp4, flac, exe, app, wav, mkv, bin, jar, rb, js, ts, html, css.
9
+ TYPE
10
+ def type( viewType )
11
+ # implement viewType
12
+ CLI::UI::Frame.open( "Media :: Type : " + viewType ) do
13
+ puts "#{viewType}"
14
+ end
15
+ end
16
+ desc "createMedia", "Create a new file with a specific TYPE"
17
+ long_desc <<-CREATE_MEDIA
18
+ Create a new file with createMedia.
19
+ CREATE_MEDIA
20
+ option :mp3
21
+ option :mp4
22
+ option :flac
23
+ option :exe
24
+ option :app
25
+ option :wav
26
+ option :mkv
27
+ option :bin
28
+ option :jar
29
+ option :rb
30
+ option :js
31
+ option :ts
32
+ option :html
33
+ option :css
34
+ def createMedia ( createMedia )
35
+ puts "MP3 file created" if options[:mp3]
36
+ puts "MP4 file created" if options[:mp4]
37
+ puts "FLAC file created" if options[:flac]
38
+ puts "EXE file created" if options[:exe]
39
+ puts "APP file created" if options[:app]
40
+ puts "WAV file created" if options[:wav]
41
+ puts "MKV file created" if options[:mkv]
42
+ puts "BIN file created" if options[:bin]
43
+ puts "JAR file created" if options[:jar]
44
+ puts "RB file created" if options[:rb]
45
+ puts "JS file created" if options[:js]
46
+ puts "TS file created" if options[:ts]
47
+ puts "HTML file created" if options[:html]
48
+ puts "CSS file created" if options[:css]
49
+ # implement createDistrict
50
+ CLI::UI::Frame.open( "Map :: Media : Create " + createMedia ) do
51
+ puts "#{createMedia}"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -1,3 +1,3 @@
1
1
  module Orphic
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
  spec.add_dependency "thor", "~> 0.20"
32
+ spec.add_dependency "cli-ui", "~> 1.4"
32
33
  spec.add_development_dependency "rspec"
33
34
  spec.add_development_dependency "rspec-nc"
34
35
  spec.add_development_dependency "guard"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orphic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle OBrien
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-31 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.20'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cli-ui
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.4'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -159,7 +173,9 @@ files:
159
173
  - exe/orphic
160
174
  - lib/orphic.rb
161
175
  - lib/orphic/cli.rb
162
- - lib/orphic/cli/hn.rb
176
+ - lib/orphic/cli/district.rb
177
+ - lib/orphic/cli/node.rb
178
+ - lib/orphic/cli/type.rb
163
179
  - lib/orphic/version.rb
164
180
  - orphic.gemspec
165
181
  homepage: https://orphic.enterprises/orphic-cli
@@ -169,9 +185,9 @@ metadata:
169
185
  bug_tracker_uri: https://github.com/orphic-inc/ruby-orphic-cli/issues
170
186
  changlog_uri: https://github.com/orphic-inc/ruby-orphic-cli/blob/main/CHANGELOG.md
171
187
  documentation_uri: https://github.com/orphic-inc/ruby-orphic-cli/blob/main/README.md
172
- source_code_uri: https://github.com/orphic-inc/ruby-orphic-cli/tree/v0.1.1
188
+ source_code_uri: https://github.com/orphic-inc/ruby-orphic-cli/tree/v0.1.6
173
189
  wiki_uri: https://github.com/orphic-inc/ruby-orphic-cli/wiki
174
- post_install_message:
190
+ post_install_message:
175
191
  rdoc_options: []
176
192
  require_paths:
177
193
  - lib
@@ -187,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
203
  version: '0'
188
204
  requirements: []
189
205
  rubygems_version: 3.1.4
190
- signing_key:
206
+ signing_key:
191
207
  specification_version: 4
192
208
  summary: Orphic is a toolkit for building boilerplate interfaces invoking interaction
193
209
  test_files: []
@@ -1,11 +0,0 @@
1
- module Orphic
2
- module OrphicCli
3
- class Hn < Thor
4
- desc "search URL", "Search hn.algolia.com for a url mentioned on Hackernews"
5
- option :tags
6
- def search ( url )
7
- puts "Looks like you are looking for #{url} with tags #{options[:tags]}"
8
- end
9
- end
10
- end
11
- end