Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Add dummy module for MDT
Browse files Browse the repository at this point in the history
  • Loading branch information
coderspeak-phitherek committed Feb 28, 2018
0 parents commit 65b5dc3
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*~
*#
.rvmrc
.idea/
*.iml
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gemspec
gem 'mdt-core', path: '/home/phitherek/workspace/priv/mdt-core'
24 changes: 24 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PATH
remote: .
specs:
mdt-dummy (0.0.1)
mdt-core (~> 0.0)

PATH
remote: /home/phitherek/workspace/priv/mdt-core
specs:
mdt-core (0.0.1)

GEM
remote: https://rubygems.org/
specs:

PLATFORMS
ruby

DEPENDENCIES
mdt-core!
mdt-dummy!

BUNDLED WITH
1.16.1
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2018 Piotr "Phitherek_" Żurek

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions lib/mdt-dummy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative 'mdt/version'
require_relative 'mdt/directory_choosers'
require_relative 'mdt/fetchers'
require_relative 'mdt/command_modifiers'
require_relative 'mdt/commands'
1 change: 1 addition & 0 deletions lib/mdt/command_modifiers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'command_modifiers/dummy'
21 changes: 21 additions & 0 deletions lib/mdt/command_modifiers/dummy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'mdt-core'
module MDT
module CommandModifiers
class Dummy < MDT::CommandModifiers::Base
def self.key
'dummy'
end

def self.subkeys
['dummy']
end

def prepend(key, cmd, options = {})
case key
when 'dummy'
0
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/mdt/commands.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'commands/dummy'
21 changes: 21 additions & 0 deletions lib/mdt/commands/dummy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'mdt-core'
module MDT
module Commands
class Dummy < MDT::Commands::Base
def self.key
'dummy'
end

def self.subkeys
['dummy']
end

def execute(key, modifiers = [], options = {})
case key
when 'dummy'
0
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/mdt/directory_choosers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'directory_choosers/dummy'
35 changes: 35 additions & 0 deletions lib/mdt/directory_choosers/dummy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require 'mdt-core'
module MDT
module DirectoryChoosers
class Dummy < MDT::DirectoryChoosers::Base
def self.key
'dummy'
end

def self.subkeys
['dummy']
end

def mkdir(key, options = {})
case key
when 'dummy'
0
end
end

def cd(key, options = {})
case key
when 'dummy'
0
end
end

def rm(key, options = {})
case key
when 'dummy'
0
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/mdt/fetchers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'fetchers/dummy'
21 changes: 21 additions & 0 deletions lib/mdt/fetchers/dummy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'mdt-core'
module MDT
module Fetchers
class Dummy < MDT::Fetchers::Base
def self.key
'dummy'
end

def self.subkeys
['dummy']
end

def fetch(key, options = {})
case key
when 'dummy'
0
end
end
end
end
end
5 changes: 5 additions & 0 deletions lib/mdt/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MDT
module Dummy
VERSION = '0.0.1'
end
end
15 changes: 15 additions & 0 deletions mdt-dummy.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require_relative './lib/mdt/version'

Gem::Specification.new do |s|
s.name = 'mdt-dummy'
s.version = MDT::Dummy::VERSION
s.date = '2018-02-28'
s.summary = 'MDT Dummy module'
s.description = 'Dummy module for MDT'
s.authors = ['Phitherek_']
s.email = ['phitherek@gmail.com']
s.files = Dir['lib/**/*.rb'] + Dir['bin/*']
s.homepage = 'https://rubygems.org/gems/mdt-dummy'
s.license = 'MIT'
s.add_runtime_dependency 'mdt-core', '~> 0.0'
end

0 comments on commit 65b5dc3

Please sign in to comment.