pwd 1.0.0 → 1.1.0

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: 4e3dd975f5179a0ab716bab10e4645e50056fd92
4
- data.tar.gz: 43a62f04053dc020cb39afcedb1706acbd705a45
3
+ metadata.gz: 16de8f6d0fd8bb1cd9be3cd43ca4eb3ad1ffb756
4
+ data.tar.gz: a42c684883006e599ee4d6733a0aa73c70777490
5
5
  SHA512:
6
- metadata.gz: dfc921e012782eaa33976fe4b1ed77bc31864ed377df6bd9705c4e2daee846f7972c2397875b8952b2c67439802a2734684033070a88fd162b50cb007752766a
7
- data.tar.gz: 2e8e5e9c7b93228300f69cb9e53ce86859f1c506d2761d4a38dac5c38b56d1dd3073a969293c105a1ee0c13295b99f826e5a2b2c440cb85b4d40105f2b78ad2b
6
+ metadata.gz: 18d64a062049094f8535a3caccf6d0e6bd8989f296ac828e74b0d4ae31bb5fc18f17b34c5805c14c1fd8ebaaa83ecafc68c8d2b3d8ae531730ba1a64325711af
7
+ data.tar.gz: a3fcb76d346011f75d563b876e422a4a4f3d72185301b170cdc8d289dfcb2835435d6d8067479d18f0ac3a250157187882da17f70bfd4aa7d698420e6cd23382
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Pwd
2
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/pwd`. 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
3
+ Look up for project root folder based on conventions
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,15 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ ```ruby
24
+
25
+ require 'pwd'
26
+
27
+ PWD.pwd #> returns project root folder
28
+
29
+ Dir.root_folder #> the same but more readable in that form
30
+
31
+ ```
26
32
 
27
33
  ## Development
28
34
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lib/pwd.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  module PWD
2
- require "pwd/version"
2
+
3
+ require 'pwd/version'
4
+ require 'pwd/core_ext'
3
5
 
4
6
  extend self
5
7
 
@@ -0,0 +1,9 @@
1
+ module PWD::CoreExt
2
+ require 'pwd/core_ext/dir'
3
+ extend self
4
+
5
+ def apply!
6
+ ::Dir.__send__(:extend,::PWD::CoreExt::Dir)
7
+ end
8
+
9
+ end
@@ -0,0 +1,7 @@
1
+ module PWD::CoreExt::Dir
2
+
3
+ def root_folder
4
+ ::PWD.pwd
5
+ end
6
+
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
@@ -70,6 +70,8 @@ files:
70
70
  - bin/console
71
71
  - bin/setup
72
72
  - lib/pwd.rb
73
+ - lib/pwd/core_ext.rb
74
+ - lib/pwd/core_ext/dir.rb
73
75
  - lib/pwd/version.rb
74
76
  - pwd.gemspec
75
77
  homepage: https://github.com/adamluzsi/pwd.rb