lex-tasker 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d9d7b6c4260668d01072b22b500fb5fa97be8cf806717a229d35e8f02487e616
4
+ data.tar.gz: d7154ec42ccece3309fe1003e50d9defeaffdcfe82f6658af7816e9ed0a1a3b2
5
+ SHA512:
6
+ metadata.gz: 4a26f1ae61130d7657e504fc8ca8601d11855faa2189abff936b339dc277ea72a0cf15b55fd932a87f17e1f93cd42c27bf378cfbdc475accf20af211542995b1
7
+ data.tar.gz: 40600eb8530b9b79edb4a583f15cf6fc93e10185555053a30a06c4770c7f2725257ccdc5d0d87e705355267945ec03d788cc3115df7588eeaa033eb2c38dda6c
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="jdk" jdkName="RVM: ruby-2.4.5" jdkType="RUBY_SDK" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JavaScriptSettings">
4
+ <option name="languageLevel" value="ES6" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.4.0" project-jdk-type="RUBY_SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/legion-extensions-tasker.iml" filepath="$PROJECT_DIR$/.idea/legion-extensions-tasker.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PropertiesComponent">
4
+ <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
5
+ <property name="nodejs_npm_path_reset_for_default_project" value="true" />
6
+ </component>
7
+ </project>
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.4.5
7
+ before_install: gem install bundler -v 1.17.3
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'legion-extensions', path: '~/legion-io/legion-extensions'
4
+ gem 'legion-transport', path: '~/legion-io/legion-transport'
5
+
6
+ # Specify your gem's dependencies in legion-extensions-tasker.gemspec
7
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Miverson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # Legion::Extensions::Tasker
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/legion/extensions/tasker`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'legion-extensions-tasker'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install legion-extensions-tasker
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/legion-extensions-tasker.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'legion/extensions/tasker'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,30 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'legion/extensions/tasker/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'lex-tasker'
7
+ spec.version = Legion::Extensions::Tasker::VERSION
8
+ spec.authors = ['Miverson']
9
+ spec.email = ['matthewdiverson@gmail.com']
10
+
11
+ spec.summary = 'LEX::Tasker manages tasks status from Legion'
12
+ spec.description = 'This LEX keeps track of tasks and their status'
13
+ spec.homepage = 'https://bitbucket.org/legion-io/lex-tasker'
14
+ spec.license = 'MIT'
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = 'exe'
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ['lib']
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'rspec'
28
+
29
+ spec.add_dependency 'legion-extensions'
30
+ end
@@ -0,0 +1,82 @@
1
+ require 'legion/extensions/tasker/version'
2
+ require 'legion/extensions'
3
+ require 'legion/extensions/tasker/actors/task_update'
4
+ require 'legion/extensions/tasker/actors/task_log'
5
+ require 'legion/extensions/tasker/actors/lex_register'
6
+ require 'legion/extensions/tasker/actors/task_subtask'
7
+ require 'legion/extensions/tasker/actors/task_check_subtask'
8
+
9
+ module Legion
10
+ module Extensions
11
+ module Tasker
12
+ extend Legion::Extensions::Default
13
+ attr_reader :actors, :requirements, :default_settings, :autobuild
14
+ def self.actors
15
+ [
16
+ {
17
+ path: path + 'actors/task_update',
18
+ class: klass::Actor::TaskUpdater,
19
+ group_name: 'taskupdater'
20
+ },
21
+ {
22
+ path: path + 'actors/task_log',
23
+ class: klass::Actor::TaskLog,
24
+ group_name: 'task_logger'
25
+ }, {
26
+ path: path + 'actors/lex_register',
27
+ class: klass::Actor::LexRegister,
28
+ group_name: 'lex_register'
29
+ }, {
30
+ path: path + 'actors/task_check_subtask',
31
+ class: klass::Actor::TaskCheckSubtask,
32
+ group_name: 'task_check_subtask'
33
+ }
34
+ ]
35
+ end
36
+
37
+ def self.lex_methods
38
+ [{
39
+ namespace: 'legion::extensions::tasker::runners::tasklog',
40
+ queue: 'task.log',
41
+ uri: 'task_log',
42
+ class_methods: {
43
+ add_log: {},
44
+ delete_log: {},
45
+ delete_all_task_logs: {}
46
+ }
47
+ }, {
48
+ namespace: 'legion::extensions::tasker::runners::taskupdater',
49
+ queue: 'task',
50
+ uri: 'task',
51
+ class_methods: {
52
+ update_status: {}
53
+ }
54
+ }, {
55
+ namespace: 'legion::extensions::tasker::runners::lexregister',
56
+ queue: 'lex.register',
57
+ uri: 'lex_register',
58
+ class_methods: {
59
+ save: {},
60
+ save_namespace: {},
61
+ save_funciton: {}
62
+ }
63
+ }]
64
+ end
65
+
66
+ def self.requirements
67
+ # ['legion-transport', 'legion-data']
68
+ ['legion-transport']
69
+ end
70
+
71
+ def self.klass
72
+ Legion::Extensions::Tasker
73
+ end
74
+
75
+ def self.path
76
+ 'legion/extensions/tasker/'
77
+ end
78
+
79
+ module_function
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,7 @@
1
+ module Legion
2
+ module Extensions
3
+ module Tasker
4
+ VERSION = '0.1.0'.freeze
5
+ end
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lex-tasker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Miverson
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: legion-extensions
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'
69
+ description: This LEX keeps track of tasks and their status
70
+ email:
71
+ - matthewdiverson@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".idea/encodings.xml"
78
+ - ".idea/legion-extensions-tasker.iml"
79
+ - ".idea/misc.xml"
80
+ - ".idea/modules.xml"
81
+ - ".idea/workspace.xml"
82
+ - ".rspec"
83
+ - ".travis.yml"
84
+ - Gemfile
85
+ - LICENSE.txt
86
+ - README.md
87
+ - Rakefile
88
+ - bin/console
89
+ - bin/setup
90
+ - legion-extensions-tasker.gemspec
91
+ - lib/legion/extensions/tasker.rb
92
+ - lib/legion/extensions/tasker/version.rb
93
+ homepage: https://bitbucket.org/legion-io/lex-tasker
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.7.8
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: LEX::Tasker manages tasks status from Legion
117
+ test_files: []