mkdircd 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06fd43bd631a6b8162b1cc8e2d0f64449778bb8d
4
- data.tar.gz: 19cd8543c3c3c89c2050e35d81174181e5723bbe
3
+ metadata.gz: 33f8b36a697c45de128c9589018f8a293aef5572
4
+ data.tar.gz: 3b2ef3b4cd6b69bd919ec695208738d73fe27730
5
5
  SHA512:
6
- metadata.gz: 36d6026a39f88dce3f78603ef90402ed1170672d4db9822954416d7540714fed301ea5f399ca6d84d6ed45f85cc13885c1db4364a564460a5f4c5d42f8852472
7
- data.tar.gz: a41f369df4bec30130593d6206857cb7b97aebc236d40a6bd96a286a72f2793abae8ca8b65e61182549e3e3fb74e40417dbe3b7ab811934a726fc2be5576ede5
6
+ metadata.gz: ea7f1b980742dbad86367549f6cf98b3841d4b611523a1a66cb422257d403abe72372df4d932e598e0e6a0ba82fae21a82a96a099fc46146e49d2c705a2b0562
7
+ data.tar.gz: d8a9efa69a45955b89f7bb2c19a486e1d9de467d78e726af8446d5b94de436567b80722984838b9a0d5c047a84e19494632abe1c4d025669fc7188a99c1492dd
data/bin/mkdircd CHANGED
@@ -1,3 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- puts ARGV
3
+ # This code was taken from https://github.com/lsegal/yard/blob/master/bin/yard. The code is licensed under the MIT License.
4
+
5
+ # We do all this work just to find the proper load path
6
+ path = __FILE__
7
+ while File.symlink?(path)
8
+ path = File.expand_path(File.readlink(path), File.dirname(path))
9
+ end
10
+ $:.unshift(File.join(File.dirname(File.expand_path(path)), '..', 'lib'))
11
+
12
+ require 'mkdircd'
13
+
14
+ process_argv(ARGV)
@@ -1,3 +1,3 @@
1
1
  module Mkdircd
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/mkdircd.rb CHANGED
@@ -1,5 +1,11 @@
1
1
  require "mkdircd/version"
2
+ require 'fileutils'
3
+
2
4
 
3
5
  module Mkdircd
4
- # Your code goes here...
6
+ def process_argv(input_argument)
7
+ new_folder_name = "#{Dir.pwd}/#{input_argument}"
8
+ FileUtils::mkdir_p(new_folder_name)
9
+ Dir.chdir(new_folder_name)
10
+ end
5
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mkdircd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adhithya Rajasekaran