mapa 0.0.1 → 0.0.2
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 +4 -4
- data/bin/mapa +4 -0
- data/lib/mapa.rb +24 -3
- data/lib/mapa/utility.rb +46 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b43edda210ffc404b9862a21a7e5fc8a34c9953e
|
4
|
+
data.tar.gz: 676b6cd230cd41ab1b73ab9d8cbb88b49156a0be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57e5f17f8e54f7df8bf505236cb1568e8d322d6c20fd75bd66594c8dd9be397f471d62e7fc7a813e5952cb1c5d34db6b906e7a724386a9bd40e109d8fadca63b
|
7
|
+
data.tar.gz: 79c1bda161dda7423583959786f8f73dfcf78b61f45f9c35a74d295cf133f99ca1c8083cb2903b963aaed9e1b5d57b0f02e117170009ff2cc44554a7aa6e1fc5
|
data/bin/mapa
ADDED
data/lib/mapa.rb
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
class Mapa
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
def initialize(args)
|
4
|
+
if args.compact.reject{|e|e.empty?}.empty?
|
5
|
+
greeting
|
6
|
+
else
|
7
|
+
@utility = Utility.new(args)
|
8
|
+
end
|
4
9
|
end
|
5
|
-
|
10
|
+
|
11
|
+
def greeting
|
12
|
+
puts "\nThanks for using Mapa!\n\n"
|
13
|
+
puts 'Available Commands'
|
14
|
+
puts ' ginit Alias for "git init"'
|
15
|
+
puts ' gad Alias for "git add ."'
|
16
|
+
puts ' gst Alias for "git status"'
|
17
|
+
puts ' gcm Alias for "git commit -m"'
|
18
|
+
puts ' gbr Alias for "git branch"'
|
19
|
+
puts ' gpl Alias for "git pull origin"'
|
20
|
+
puts ' gph Alias for "git push origin"'
|
21
|
+
puts ' gco Alias for "git checkout"'
|
22
|
+
puts ' gcob Alias for "git checkout -b"'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require 'mapa/utility'
|
data/lib/mapa/utility.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
class Mapa::Utility
|
2
|
+
|
3
|
+
def initialize(args)
|
4
|
+
action = args[0]
|
5
|
+
options = args[1]
|
6
|
+
if self.respond_to? action.to_sym
|
7
|
+
self.send(action.to_sym,options)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def ginit(params)
|
12
|
+
exec 'git init'
|
13
|
+
end
|
14
|
+
|
15
|
+
def gad(params)
|
16
|
+
exec 'git add .'
|
17
|
+
end
|
18
|
+
|
19
|
+
def gst(params)
|
20
|
+
exec 'git status'
|
21
|
+
end
|
22
|
+
|
23
|
+
def gcm(message)
|
24
|
+
exec "git commit -m #{message}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def gbr(params)
|
28
|
+
exec 'git branch | grep \'*\''
|
29
|
+
end
|
30
|
+
|
31
|
+
def gpl(remote_branch)
|
32
|
+
exec "git pull origin #{remote_branch}"
|
33
|
+
end
|
34
|
+
|
35
|
+
def gph(remote_branch)
|
36
|
+
exec "git push origin #{remote_branch}"
|
37
|
+
end
|
38
|
+
|
39
|
+
def gco(branch)
|
40
|
+
exec "git checkout #{branch}"
|
41
|
+
end
|
42
|
+
|
43
|
+
def gcob(new_branch)
|
44
|
+
exec "git checkout -b #{new_branch}"
|
45
|
+
end
|
46
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mapa Dev
|
@@ -12,11 +12,14 @@ date: 2017-05-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
13
13
|
description: A simple hello world gem
|
14
14
|
email: tangposma@gmail.com
|
15
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- mapa
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
19
20
|
- lib/mapa.rb
|
21
|
+
- lib/mapa/utility.rb
|
22
|
+
- bin/mapa
|
20
23
|
homepage: http://rubygems.org/gems/mapa
|
21
24
|
licenses:
|
22
25
|
- MIT
|
@@ -27,17 +30,17 @@ require_paths:
|
|
27
30
|
- lib
|
28
31
|
required_ruby_version: !ruby/object:Gem::Requirement
|
29
32
|
requirements:
|
30
|
-
- -
|
33
|
+
- - '>='
|
31
34
|
- !ruby/object:Gem::Version
|
32
35
|
version: '0'
|
33
36
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
37
|
requirements:
|
35
|
-
- -
|
38
|
+
- - '>='
|
36
39
|
- !ruby/object:Gem::Version
|
37
40
|
version: '0'
|
38
41
|
requirements: []
|
39
42
|
rubyforge_project:
|
40
|
-
rubygems_version: 2.
|
43
|
+
rubygems_version: 2.0.14.1
|
41
44
|
signing_key:
|
42
45
|
specification_version: 4
|
43
46
|
summary: Mapa!
|