easy_commands 0.0.1
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 +7 -0
- data/lib/easy_commands.rb +45 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 16ab9f443b4949657a708fa30886e6215ae67f51
|
4
|
+
data.tar.gz: a314dca29c66085e932c5aaac37bfd91d1ab6efb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e2cfa5b4d6aa6d0d44b38a485c62ee268ebcddefe2b8dec933d4e71e42d2ed2c45edfddec50084a8257aecf7fd1c1b123801583803e29d745f73bc18a79c5714
|
7
|
+
data.tar.gz: fd7c85b474858f8fbe3879f3376b0abebff0ce817f1c7d9a3bca826a55d8ecec7364e7f9bd6f6a32741cd2d05b5db63d58bc1ed52024278b65713884b17482f4
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#basically, arguments are optional, if empty string is placed, command will execute without argument
|
2
|
+
#all argument are stored in a string
|
3
|
+
#made for ubuntu and windows
|
4
|
+
|
5
|
+
require 'os'
|
6
|
+
|
7
|
+
system_os = OS.windows?
|
8
|
+
|
9
|
+
if system_os == false then
|
10
|
+
def ls(argument)
|
11
|
+
puts `ls #{argument}`
|
12
|
+
end
|
13
|
+
|
14
|
+
def rm(argument)
|
15
|
+
puts `rm #{argument}`
|
16
|
+
end
|
17
|
+
|
18
|
+
def mkdir(argument)
|
19
|
+
puts `mkdir #{argument}`
|
20
|
+
end
|
21
|
+
|
22
|
+
def dirs(argument)
|
23
|
+
puts `dirs #{argument}`
|
24
|
+
end
|
25
|
+
|
26
|
+
def start(argument)
|
27
|
+
puts `xdg-open #{argument}`
|
28
|
+
end
|
29
|
+
else
|
30
|
+
def dir(argument)
|
31
|
+
puts `dir #{argument}`
|
32
|
+
end
|
33
|
+
|
34
|
+
def mkdir(argument)
|
35
|
+
puts `mkdir #{argument}`
|
36
|
+
end
|
37
|
+
|
38
|
+
def delete(argument)
|
39
|
+
puts `delete #{argument}`
|
40
|
+
end
|
41
|
+
|
42
|
+
def start(argument)
|
43
|
+
puts `start #{argument}`
|
44
|
+
end
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: easy_commands
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chandler Lofland
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-26 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Adds basic Unix/Linux and Windows commands as methods, will document
|
14
|
+
later.
|
15
|
+
email: chandlerl14@outlook.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/easy_commands.rb
|
21
|
+
homepage:
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.4.8
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: A simple gem allowing easy execution of commands from ruby.
|
45
|
+
test_files: []
|