make_me_a_gem_called 0.0.27 → 0.1.1
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 +4 -4
- data/README.md +5 -13
- data/bin/make_me_a_gem_called +2 -1
- data/lib/make_me_a_gem_called.rb +25 -6
- data/lib/make_me_a_gem_called/version.rb +1 -1
- metadata +1 -2
- data/test.txt +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efa60303c8b775dac9e93eb58ea26cc739eeedb1
|
4
|
+
data.tar.gz: 76258e204db152803594ab9206d14852ef6d4c1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4066608fe9e13373e764c95b8656d02d3e301eb60d4f72ecb3044b84a829c73b18bf89dca0379c29a803d1abef1e772675b00876ee454f0209ca5cfebe3cc8e7
|
7
|
+
data.tar.gz: fd60ce8c8e80c5df83014065e190afb2300aa0442e8b1e49c7bab459f3f44be74b672bb9329b8a5d8def9bda3a7c0d766167d140ea5f0d762442b73e58019152
|
data/README.md
CHANGED
@@ -1,26 +1,18 @@
|
|
1
1
|
# MakeMeAGemCalled
|
2
2
|
|
3
|
-
|
3
|
+
Having followed a tutorial by Matt Huggins on quickleft.com, I have been building some basic gems. This gem is designed to quickly set up the folder and file structure I like to use. It uses bundler to create the first layer and then I add a few more things on top.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'make_me_a_gem_called'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
7
|
+
Install the gem from the commmand line:
|
18
8
|
|
19
9
|
$ gem install make_me_a_gem_called
|
20
10
|
|
21
11
|
## Usage
|
22
12
|
|
23
|
-
|
13
|
+
Then just run:
|
14
|
+
|
15
|
+
$ make_me_a_gem_called TYPE_GEM_NAME_HERE
|
24
16
|
|
25
17
|
## Contributing
|
26
18
|
|
data/bin/make_me_a_gem_called
CHANGED
data/lib/make_me_a_gem_called.rb
CHANGED
@@ -2,7 +2,7 @@ require_relative "make_me_a_gem_called/version"
|
|
2
2
|
|
3
3
|
class MakeMeAGemCalled
|
4
4
|
|
5
|
-
attr_reader :name, :command_line, :rspec
|
5
|
+
attr_reader :name, :command_line, :rspec, :instructions
|
6
6
|
|
7
7
|
def initialize(name)
|
8
8
|
@name = name
|
@@ -35,7 +35,7 @@ class MakeMeAGemCalled
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def command_line?
|
38
|
-
@command_line == 'Y'||'y'||'yes'
|
38
|
+
@command_line == 'Y'||'y'||'yes'||'Yes'
|
39
39
|
end
|
40
40
|
|
41
41
|
def rspec_question
|
@@ -44,7 +44,7 @@ class MakeMeAGemCalled
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def rspec?
|
47
|
-
@rspec == 'Y'||'y'||'yes'
|
47
|
+
@rspec == 'Y'||'y'||'yes'||'Yes
|
48
48
|
end
|
49
49
|
|
50
50
|
def create_bin_files
|
@@ -74,12 +74,31 @@ class MakeMeAGemCalled
|
|
74
74
|
|
75
75
|
def add_to_gemspec
|
76
76
|
system("sed -i \'\' \'23i\\
|
77
|
-
|
77
|
+
\\ \\ spec.add_development_dependency \"rspec\"\\
|
78
78
|
\' #{name}/#{name}.gemspec")
|
79
79
|
end
|
80
80
|
|
81
|
-
def
|
82
|
-
puts "
|
81
|
+
def instructions_question
|
82
|
+
puts "Would you like to see Instructions for your next steps? Y/N"
|
83
|
+
@instructions = STDIN.gets.chomp
|
84
|
+
end
|
85
|
+
|
86
|
+
def instructions?
|
87
|
+
@instructions = 'Y'||'y'||'yes'||'Yes'
|
88
|
+
end
|
89
|
+
|
90
|
+
def show_instructions
|
91
|
+
puts "Basic Instructions"
|
92
|
+
puts "1. Change into the directory $ cd #{name}"
|
93
|
+
puts "2. In your gemspec: Replace 'summary' and 'description' sections with a string using double quotations."
|
94
|
+
puts "3. Write your code in the lib/#{name}.rb file."
|
95
|
+
puts "4. If you decide to change from a Module to a Class, remember to change the version.rb file to a Class too."
|
96
|
+
puts "5. The bin/#{name} file is run when your gem is called from the command line. Run your code in this file."
|
97
|
+
puts "6. Don't forget to complete your README.md file."
|
98
|
+
puts "7. If using GitHub, set up a new repo on GitHub. You do not need to run $git init because Bundle has done that for you."
|
99
|
+
puts "8. To run your tests: $ bundle exec rake spec"
|
100
|
+
puts "9. To uploaded to rubygems.org: $ bundle exec rake release"
|
101
|
+
puts "Note: You must change the version number every time to upload any changes."
|
83
102
|
end
|
84
103
|
|
85
104
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: make_me_a_gem_called
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Giles
|
@@ -75,7 +75,6 @@ files:
|
|
75
75
|
- spec/make_me_a_gem_called_spec.rb
|
76
76
|
- spec/spec_helper.rb
|
77
77
|
- tasks/rspec.rake
|
78
|
-
- test.txt
|
79
78
|
homepage: ''
|
80
79
|
licenses:
|
81
80
|
- MIT
|
data/test.txt
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
task goes here
|
2
|
-
This is line 7
|
3
|
-
|
4
|
-
task goes here/n
|
5
|
-
task goes here\n
|
6
|
-
This is line 6
|
7
|
-
\\\This is line 6
|
8
|
-
\This is line 6
|
9
|
-
" This is line 6"
|
10
|
-
This is line 6
|
11
|
-
\t\t\tThis is line 6
|
12
|
-
tttThis is line 6
|
13
|
-
This is line 6
|
14
|
-
task goes here
|
15
|
-
require 'this is a new test'
|