requires 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -11
  3. data/lib/requires.rb +1 -3
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d49814c4ad9d9d1aab9123078d95f3499cafc8918bfdced4e4c2e8e6d7199e22
4
- data.tar.gz: 0d3e51d5743f3528a700d951334e3def4ef5de98da4825db3190519e630c9129
3
+ metadata.gz: 04c8b90e985a1a451657bb4f2271491faedc35095cc50afecd46264c254de58f
4
+ data.tar.gz: 767cd60f4491e310e7fbb3e6276fa80832aa597d96abc894ce9bfc9015c30e5f
5
5
  SHA512:
6
- metadata.gz: 2a4f3b80f4b5464b0b5ebaa28071f50e5dbba3a22c4ac7c62dca9710c2eacd003941aafca78792438aef2b5dc7210cb6ad4fc81d946d115a7e02359fd621b50d
7
- data.tar.gz: 76db13ca8cdcc4dd18be4a4548078448523f449c18f2a93323815c037a2eb7911613997fb694118e4db9fa83b75119df86a3425bd17916573d10663275337c2d
6
+ metadata.gz: df8e98d81bc5ef99cfa1f692a39013d6206d53798bd66e0e15f18f2b32202a7e5616e714640951d41fa1bbb609bc859fc97644687ef0f987f27b4a6600da0dcf
7
+ data.tar.gz: 95f76edbe0595ccd102c7e676d8f9239c85788eac39ba4740c5697b2e6078c5c05a1549e81e080aaff407704306e96077c117596b97afd53896e1686a82575d7
data/README.md CHANGED
@@ -1,25 +1,30 @@
1
1
  Requires
2
2
  ==================================================
3
3
 
4
- [![Gem](https://img.shields.io/gem/v/requires.svg?style=flat-square)](https://rubygems.org/gems/requires)
5
- [![Build](https://img.shields.io/travis/DannyBen/requires.svg?style=flat-square)](https://travis-ci.org/DannyBen/requires)
6
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/DannyBen/requires.svg?style=flat-square)](https://codeclimate.com/github/DannyBen/requires)
7
- [![Issues](https://img.shields.io/codeclimate/issues/github/DannyBen/requires.svg?style=flat-square)](https://codeclimate.com/github/DannyBen/requires)
4
+ [![Gem Version](https://badge.fury.io/rb/requires.svg)](https://badge.fury.io/rb/requires)
5
+ [![Build Status](https://travis-ci.com/DannyBen/requires.svg?branch=master)](https://travis-ci.com/DannyBen/requires)
8
6
 
9
- ---
7
+ **Requires** is ruby's missing `require` function.
8
+
9
+ It lets you...
10
+
11
+ ```ruby
12
+ # ...require multiple files
13
+ requires 'any_file', 'with/or/without/extension.rb'
14
+
15
+ # ...require directories
16
+ requires 'first/directory', 'second-dierectory'
10
17
 
11
- Easily require files and directories
18
+ # ...require any other library
19
+ requires 'yaml', 'lib/important', 'lib'
20
+ ```
12
21
 
13
22
  ---
14
23
 
24
+
15
25
  Installation
16
26
  --------------------------------------------------
17
27
 
18
28
  $ gem install requires
19
29
 
20
30
 
21
-
22
- Usage
23
- --------------------------------------------------
24
-
25
- TODO
@@ -1,5 +1,3 @@
1
- require 'byebug' if ENV['BYEBUG']
2
-
3
1
  def requires(*items)
4
2
  items = ['.'] if items.empty?
5
3
 
@@ -13,7 +11,7 @@ def requires(*items)
13
11
  elsif File.file? "#{item}.rb" or File.file? item
14
12
  require "./#{item}"
15
13
  else
16
- raise ArgumentError, "Cannot require #{item}"
14
+ require item
17
15
  end
18
16
  end
19
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: requires
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-11 00:00:00.000000000 Z
11
+ date: 2018-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -80,7 +80,7 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.4'
83
- description: Easily require files and directories
83
+ description: A simple gem to require them all!
84
84
  email: db@dannyben.com
85
85
  executables: []
86
86
  extensions: []
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 2.0.0
103
+ version: 2.2.2
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - ">="
@@ -111,5 +111,5 @@ rubyforge_project:
111
111
  rubygems_version: 2.7.6
112
112
  signing_key:
113
113
  specification_version: 4
114
- summary: Easily require files and directories
114
+ summary: Ruby's missing require function
115
115
  test_files: []