eworld 1.0.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5a6f13c99033d419e6d557f7740560b4702d57aa
4
+ data.tar.gz: d99638ca6da63f332b4182b04bfa53d768e1d291
5
+ SHA512:
6
+ metadata.gz: 295f1ca0694e1789aee23b16010fb314bdf1da0f3e9bf4e2c3e4d4f59033ee7cbeaf488dd89b961b0f3f113f0d8d4be6a1ebc6f725fc1eca1d1653077a2962c9
7
+ data.tar.gz: f287ebd0b20e61621bf7bcb0ebcbc06fbcf11cb1a1bbbb0e0f6580327101008e4aec09e80398418edb452fdec4bfd3e619d3305322062b9a307efa71b133c422
data/bin/ew ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'eworld'
4
+
5
+ App::execute
data/bin/eworld ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'eworld'
4
+
5
+ App::execute
data/lib/core/opt.rb ADDED
@@ -0,0 +1,17 @@
1
+ module App
2
+
3
+ class Opt
4
+
5
+ OPT_PATH = '/opt'
6
+
7
+ # Get PATH to opt files.
8
+ # @return String
9
+ def self.get_base_path
10
+ base_path = File.dirname(File.expand_path(__FILE__))
11
+ base_path = base_path.gsub(/\/\w+\/\w+\z/i, '')
12
+ base_path
13
+ end
14
+
15
+ end
16
+
17
+ end
data/lib/eworld.rb ADDED
@@ -0,0 +1,62 @@
1
+ require 'blufin-lib'
2
+ require 'columnist'
3
+ require 'convoy'
4
+ require 'yaml'
5
+ require_relative 'version'
6
+
7
+ Dir["#{File.dirname(__FILE__)}/core/**/*.rb"].each { |file| load(file) }
8
+ Dir["#{File.dirname(__FILE__)}/routes/**/*.rb"].each { |file| load(file) }
9
+
10
+ module App
11
+
12
+ GEM_NAME = 'eworld'
13
+ SCHEMA_FILE = "#{App::Opt::get_base_path}#{App::Opt::OPT_PATH}/config/schema.yml"
14
+ TEMPLATE_FILE = "#{App::Opt::get_base_path}#{App::Opt::OPT_PATH}/config/template.yml"
15
+ CONFIG_FILE = '~/.eworld.yml'
16
+
17
+ def self.execute
18
+
19
+ begin
20
+
21
+ unless ARGV[0] == 'config' || ARGV[0] == 'x'
22
+ Blufin::Config::init(SCHEMA_FILE, TEMPLATE_FILE, CONFIG_FILE, GEM_NAME)
23
+ end
24
+
25
+ Convoy::App.create do |eworld|
26
+
27
+ eworld.version EWORLD_VERSION
28
+ eworld.summary <<TEMPLATE
29
+ \x1B[48;5;130m\x1B[38;5;255m eWorld-CLI \x1B[0m\x1B[0m \x1B[38;5;130m\xe2\x80\x94 eWorld Commmand-Line Interface\x1B[38;5;248m
30
+
31
+ _ ______ ____ __ ____ ________ ____
32
+ ___| | / / __ \\/ __ \\/ / / __ \\ / ____/ / / _/
33
+ / _ \\ | /| / / / / / /_/ / / / / / /_____/ / / / / /
34
+ / __/ |/ |/ / /_/ / _, _/ /___/ /_/ /_____/ /___/ /____/ /
35
+ \\___/|__/|__/\\____/_/ |_/_____/_____/ \\____/_____/___/\x1B[0m
36
+ TEMPLATE
37
+ eworld.description 'An internal tool intended for improving/automating development tasks.'
38
+
39
+ # x - CONFIG
40
+ eworld.command :config, :aliases => [:x] do |config|
41
+ config.summary 'Setup your configuration file'
42
+ config.action do
43
+ Blufin::Config::edit_config(App::CONFIG_FILE)
44
+ end
45
+ end
46
+
47
+ # eworld - DEFAULT
48
+ eworld.action do
49
+ system("#{App::GEM_NAME} -h")
50
+ end
51
+
52
+ end
53
+
54
+ rescue RuntimeError => e
55
+
56
+ Blufin::Terminal::print_exception(e);
57
+
58
+ end
59
+
60
+ end
61
+
62
+ end
data/lib/version.rb ADDED
@@ -0,0 +1 @@
1
+ EWORLD_VERSION = '1.0.0'
@@ -0,0 +1,4 @@
1
+ type: map
2
+ mapping:
3
+ RemoveMe:
4
+ required: yes
@@ -0,0 +1 @@
1
+ RemoveMe: Please
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: eworld
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Albert Rannetsperger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: blufin-lib
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.6.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.6.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: columnist
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.2.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: convoy
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 1.3.2
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.3.2
55
+ description: An internal tool intended for improving/automating development tasks.
56
+ email: albertrannetsperger@eworldes.com
57
+ executables:
58
+ - ew
59
+ - eworld
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - bin/ew
64
+ - bin/eworld
65
+ - lib/core/opt.rb
66
+ - lib/eworld.rb
67
+ - lib/version.rb
68
+ - opt/config/schema.yml
69
+ - opt/config/template.yml
70
+ homepage: http://rubygems.org/gems/eworld
71
+ licenses:
72
+ - MIT
73
+ metadata: {}
74
+ post_install_message:
75
+ rdoc_options: []
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '2.3'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 2.6.12
91
+ signing_key:
92
+ specification_version: 4
93
+ summary: eWorld-CLI.
94
+ test_files: []