requires 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -11
- data/lib/requires.rb +1 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04c8b90e985a1a451657bb4f2271491faedc35095cc50afecd46264c254de58f
|
4
|
+
data.tar.gz: 767cd60f4491e310e7fbb3e6276fa80832aa597d96abc894ce9bfc9015c30e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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://
|
5
|
-
[![Build](https://
|
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
|
-
|
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
|
data/lib/requires.rb
CHANGED
@@ -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
|
-
|
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
|
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
|
+
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:
|
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.
|
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:
|
114
|
+
summary: Ruby's missing require function
|
115
115
|
test_files: []
|