just_the_gem 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/just_the_gem +3 -1
- data/lib/just_the_gem.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab0761691a4d8fb4709daa82669f3531ae24fed59ab9ca8c4bf28011b0f0f899
|
4
|
+
data.tar.gz: 65117b43d3514ffe9016f76da4cedbc7b6509f5691485d063444621219bbe7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f67d25c20bef2f4c4c3d8a73dec5563c544722824ebb76abf4a3a4e36940875ca762ddc3acef84929f45c7b3d3f538f99f1757c2e298d50759bf4353fb49363d
|
7
|
+
data.tar.gz: b52de7bec2798b4e3ed55f213d1ae064d0da2be096f62d4f7afad921c9fa42c0c77143c55572ff0b237d88576d1c3ad067900433ecb4e4fc7bce7d28d55076c0
|
data/bin/just_the_gem
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
def gem_name
|
4
|
-
unless (gem_name = $*[
|
4
|
+
unless (gem_name = $*[0])
|
5
5
|
puts 'Please specify the name of the gem like so: just_the_gem test_gem'
|
6
6
|
exit
|
7
7
|
end
|
@@ -10,6 +10,8 @@ def gem_name
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def main
|
13
|
+
require_relative '../lib/just_the_gem'
|
14
|
+
|
13
15
|
include JustTheGem
|
14
16
|
|
15
17
|
create(gem_name: gem_name)
|
data/lib/just_the_gem.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module JustTheGem
|
2
|
+
module_function
|
3
|
+
|
2
4
|
def create(gem_name:)
|
3
5
|
abort 'Please specify the gem name' if gem_name.empty?
|
4
6
|
|
@@ -14,8 +16,9 @@ module JustTheGem
|
|
14
16
|
end
|
15
17
|
|
16
18
|
def create_files(gem_name:)
|
17
|
-
|
18
|
-
File.
|
19
|
+
Dir.chdir(gem_name)
|
20
|
+
File.new("lib/#{gem_name}.rb", 'w')
|
21
|
+
File.new("test/test_#{gem_name}.rb", 'w')
|
19
22
|
end
|
20
23
|
|
21
24
|
def write_gem_spec(gem_name:)
|