eworld 1.2.0 → 1.2.1

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: dabd36b84d249c382e7f1fd077f927536f491ae5
4
- data.tar.gz: 70f52a1bbce657d4a73ebf8d6dae044989bbd520
3
+ metadata.gz: 7e5552cd65eb30561e3a62e5d6aa469f546c7cf6
4
+ data.tar.gz: b7b1bc3674c029e29bf7559c08ee8e56908782c0
5
5
  SHA512:
6
- metadata.gz: fe007a4bd2286e8d6f7452144040d46e2a2b32d4546893799c527837648ee96568c36a7cdcb98a5f702075be401d92afdee4e7643b0f9a187d20a1ff8e06fb44
7
- data.tar.gz: b300fefc9711e4c9d042947f6007afbcce95ae671c85dce82e92c7b9acb28dd6081b5897dce7d024d1ead16a8068b87199b3caaa9d55c234726a8af7558c3c48
6
+ metadata.gz: '08fbdf3ce162d5d94631c8511f73123728a4c2689ee11434ce56448415fcb35b8cb2e72e3ca87f165a3dde577b0235ea0e539b80f7cacd9c4b08cbcf315d9ff1'
7
+ data.tar.gz: e70e8bad0a5cbc09490c78ebd0b7a44ba34fc0c04601816022ee438c398f12815ec45f5a0d527b054aea8ba34f5c16ddf9ed733530c5c187027c3960bd43a04d
data/lib/eworld.rb CHANGED
@@ -13,6 +13,7 @@ module App
13
13
  SCHEMA_FILE = "#{App::Opt::get_base_path}#{App::Opt::OPT_PATH}/config/schema.yml"
14
14
  TEMPLATE_FILE = "#{App::Opt::get_base_path}#{App::Opt::OPT_PATH}/config/template.yml"
15
15
  CONFIG_FILE = '~/.eworld.yml'
16
+ SECRET = 'dLZDk82LU8kEZ6pbcuyJHmbrWs3ujzvM2cHNtD6BgKyvDZAcJRjU7yHde7nWejnR'
16
17
 
17
18
  def self.execute
18
19
 
@@ -23,10 +24,10 @@ module App
23
24
  Blufin::Projects.new(Blufin::Config::get['Projects'])
24
25
  end
25
26
 
26
- Convoy::App.create do |eworld|
27
+ Convoy::App.create do |app|
27
28
 
28
- eworld.version EWORLD_VERSION
29
- eworld.summary <<TEMPLATE
29
+ app.version EWORLD_VERSION
30
+ app.summary <<TEMPLATE
30
31
  \x1B[48;5;89m\x1B[38;5;255m eWorld-CLI \x1B[0m\x1B[0m \x1B[38;5;89m\xe2\x80\x94 eWorld Commmand-Line Interface\x1B[38;5;248m
31
32
 
32
33
  __ __ _ _ _ _
@@ -35,10 +36,10 @@ module App
35
36
  | __/\\ V V / (_) | | | | (_| |_____| (__| | |
36
37
  \\___| \\_/\\_/ \\___/|_| |_|\\__,_| \\___|_|_|\x1B[0m
37
38
  TEMPLATE
38
- eworld.description "\x1B[38;5;240mAn internal tool intended for improving/automating development tasks.\x1B[0m"
39
+ app.description "\x1B[38;5;240mAn internal tool intended for improving/automating development tasks.\x1B[0m"
39
40
 
40
41
  # g - GENERATE
41
- eworld.command :generate, :aliases => [:g] do |generate|
42
+ app.command :generate, :aliases => [:g] do |generate|
42
43
  generate.summary 'Generate boiler-plate code'
43
44
  # a - GENERATE API
44
45
  generate.command :api, :aliases => [:a] do |generate_api|
@@ -76,8 +77,18 @@ TEMPLATE
76
77
  end
77
78
  end
78
79
 
79
- # u - UPDATE
80
- eworld.command :update, :aliases => [:u] do |update|
80
+ # s - SCAN
81
+ if is_albert_mac
82
+ app.command :scan, :aliases => [:s] do |scan|
83
+ scan.summary 'Scan the codebase for inconsistencies'
84
+ scan.action do |opts, args|
85
+ AppCommand::Scan.new(opts, args).execute
86
+ end
87
+ end
88
+ end
89
+
90
+ # U - UPDATE
91
+ app.command :update, :aliases => [:U] do |update|
81
92
  update.summary 'Check for updates'
82
93
  update.action do
83
94
  Blufin::Update::run(App::GEM_NAME)
@@ -85,7 +96,7 @@ TEMPLATE
85
96
  end
86
97
 
87
98
  # x - CONFIG
88
- eworld.command :config, :aliases => [:x] do |config|
99
+ app.command :config, :aliases => [:x] do |config|
89
100
  config.summary 'Setup your configuration file'
90
101
  config.action do
91
102
  Blufin::Config::edit_config(App::CONFIG_FILE)
@@ -93,7 +104,7 @@ TEMPLATE
93
104
  end
94
105
 
95
106
  # eworld - DEFAULT
96
- eworld.action do
107
+ app.action do
97
108
  system("#{App::GEM_NAME} -h")
98
109
  end
99
110
 
@@ -107,4 +118,13 @@ TEMPLATE
107
118
 
108
119
  end
109
120
 
121
+ # Very hacky code that looks in the configuration file for a key/pair value and if exists, returns true.
122
+ # @return bool
123
+ def self.is_albert_mac
124
+ if Blufin::Config::get.has_key?('CustomOptions') && Blufin::Config::get['CustomOptions'].has_key?('Secret')
125
+ return Blufin::Config::get['CustomOptions']['Secret'] == SECRET
126
+ end
127
+ false
128
+ end
129
+
110
130
  end
@@ -26,22 +26,12 @@ module AppCommand
26
26
 
27
27
  def opts_routing
28
28
 
29
- ui_projects = Blufin::Projects.get_projects_as_array(type: Blufin::Projects::TYPE_UI)
30
- project = Blufin::Projects.show_project_prompt(ui_projects)
29
+ projects = Blufin::Projects.get_projects_as_array(types: [Blufin::Projects::TYPE_QUASAR])
30
+ project = Blufin::Projects.show_project_prompt(projects)
31
31
 
32
32
  @errors, @warnings = Blufin::GenerateUiRoutes::run(project)
33
33
 
34
- # TODO - Have a way to display these.
35
- # puts @errors.inspect
36
- # puts @warnings.inspect
37
-
38
- # Display errors, if any.
39
- if @errors.any?
40
- Blufin::Terminal::error('Please fix the following issues:', nil, false)
41
- @errors.each { |error| puts " #{error}" }
42
- puts
43
- exit 1
44
- end
34
+ Blufin::GenerateBase::exit_code_generation(@errors, @warnings)
45
35
 
46
36
  end
47
37
 
@@ -0,0 +1,41 @@
1
+ module AppCommand
2
+
3
+ class Scan < ::Convoy::ActionCommand::Base
4
+
5
+ def execute
6
+
7
+ begin
8
+
9
+ @opts = command_options
10
+ @args = arguments
11
+
12
+ opts_validate
13
+ opts_routing
14
+
15
+ rescue => e
16
+
17
+ Blufin::Terminal::print_exception(e)
18
+
19
+ end
20
+
21
+ end
22
+
23
+ def opts_validate
24
+
25
+ end
26
+
27
+ def opts_routing
28
+
29
+ projects = Blufin::Projects.get_projects_as_array(types: [Blufin::Projects::TYPE_QUASAR, Blufin::Projects::TYPE_API_SIMPLE])
30
+ project = Blufin::Projects.show_project_prompt(projects)
31
+
32
+ # TODO - REMOVE
33
+ raise RuntimeError, 'Not yet implemented!'
34
+
35
+ @scanner = Blufin::Scanner::new
36
+
37
+ end
38
+
39
+ end
40
+
41
+ end
data/lib/version.rb CHANGED
@@ -1 +1 @@
1
- EWORLD_VERSION = '1.2.0'
1
+ EWORLD_VERSION = '1.2.1'
@@ -1,5 +1,10 @@
1
1
  type: map
2
2
  mapping:
3
+ CustomOptions:
4
+ type: map
5
+ mapping:
6
+ Secret:
7
+ required: true
3
8
  Databases:
4
9
  type: seq
5
10
  required: yes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eworld
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Rannetsperger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2019-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blufin-lib
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.8.0
19
+ version: 1.8.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.8.0
26
+ version: 1.8.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: columnist
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +66,7 @@ files:
66
66
  - lib/eworld.rb
67
67
  - lib/routes/generate_api_entities.rb
68
68
  - lib/routes/generate_ui_routes.rb
69
+ - lib/routes/scan.rb
69
70
  - lib/version.rb
70
71
  - opt/config/schema.yml
71
72
  - opt/config/template.yml
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  version: '0'
90
91
  requirements: []
91
92
  rubyforge_project:
92
- rubygems_version: 2.5.1
93
+ rubygems_version: 2.5.2.3
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: eWorld-CLI.