mkgem 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/Gemfile +3 -0
- data/README.md +3 -0
- data/Rakefile +1 -0
- data/exe/mkgem +4 -0
- data/lib/mkgem/cli.rb +38 -0
- data/lib/mkgem/version.rb +3 -0
- data/lib/mkgem.rb +5 -0
- data/mkgem.gemspec +24 -0
- data/templates/gem/%name%.gemspec.tt +22 -0
- data/templates/gem/.gitignore +5 -0
- data/templates/gem/Gemfile +3 -0
- data/templates/gem/README.md.tt +3 -0
- data/templates/gem/Rakefile +1 -0
- data/templates/gem/bin/console.tt +7 -0
- data/templates/gem/lib/%name%/version.rb.tt +3 -0
- data/templates/gem/lib/%name%.rb.tt +1 -0
- metadata +117 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c5ade3b6dee7ad1d383b0ca09fcb7fa6e15fe5f9
|
4
|
+
data.tar.gz: 4a7e00eb57c4cd7d2ba357c9da6b024fb01164fc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b108be53341f800c20d00c88a8fbe5d6b513b6c31324ed95cf04bfc2da014dce83e71c7c201daeb61ed1e683841b577d069ab30246657a7b2368eb760ea9da3b
|
7
|
+
data.tar.gz: f850fea4ae3c428a658010c2753f25a15289fd22cb752b3b744eada3fd198ae3f6c94783bab6c5e11a4090c19207fcfefd43af215eadf8e7fb0096d12e54ad57
|
data/Gemfile
ADDED
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/exe/mkgem
ADDED
data/lib/mkgem/cli.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module Mkgem
|
2
|
+
class Cli < Thor::Group
|
3
|
+
include Thor::Actions
|
4
|
+
|
5
|
+
desc 'Creates a new Ruby gem'
|
6
|
+
argument :name, type: :string, desc: 'Name of new gem'
|
7
|
+
|
8
|
+
def self.source_root
|
9
|
+
File.expand_path('../../../templates', __FILE__)
|
10
|
+
end
|
11
|
+
|
12
|
+
def setup
|
13
|
+
@name = name.underscore
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_dir
|
17
|
+
directory 'gem', name
|
18
|
+
end
|
19
|
+
|
20
|
+
def set_permissions
|
21
|
+
inside(name) do
|
22
|
+
chmod 'bin/console', 'a+x'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def init_git_repo
|
27
|
+
inside(name) do
|
28
|
+
run('git init .')
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def install_deps
|
33
|
+
inside(name) do
|
34
|
+
run('bundle')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/mkgem.rb
ADDED
data/mkgem.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require 'mkgem/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'mkgem'
|
8
|
+
spec.version = Mkgem::VERSION
|
9
|
+
spec.authors = ['Alexander Tipugin']
|
10
|
+
spec.email = ['atipugin@gmail.com']
|
11
|
+
spec.summary = 'An opinionated Ruby gem generator'
|
12
|
+
spec.homepage = 'https://github.com/atipugin/mkgem'
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.bindir = 'exe'
|
16
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
20
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
21
|
+
|
22
|
+
spec.add_dependency 'thor'
|
23
|
+
spec.add_dependency 'activesupport'
|
24
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require '<%= name %>/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = '<%= name %>'
|
8
|
+
spec.version = <%= name.classify %>::VERSION
|
9
|
+
spec.authors = []
|
10
|
+
spec.email = []
|
11
|
+
spec.summary = '...'
|
12
|
+
spec.homepage = '...'
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.bindir = 'exe'
|
16
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_development_dependency 'bundler'
|
20
|
+
spec.add_development_dependency 'rake'
|
21
|
+
spec.add_development_dependency 'pry'
|
22
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
@@ -0,0 +1 @@
|
|
1
|
+
require '<%= name %>/version'
|
metadata
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mkgem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexander Tipugin
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: activesupport
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- atipugin@gmail.com
|
72
|
+
executables:
|
73
|
+
- mkgem
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- README.md
|
80
|
+
- Rakefile
|
81
|
+
- exe/mkgem
|
82
|
+
- lib/mkgem.rb
|
83
|
+
- lib/mkgem/cli.rb
|
84
|
+
- lib/mkgem/version.rb
|
85
|
+
- mkgem.gemspec
|
86
|
+
- templates/gem/%name%.gemspec.tt
|
87
|
+
- templates/gem/.gitignore
|
88
|
+
- templates/gem/Gemfile
|
89
|
+
- templates/gem/README.md.tt
|
90
|
+
- templates/gem/Rakefile
|
91
|
+
- templates/gem/bin/console.tt
|
92
|
+
- templates/gem/lib/%name%.rb.tt
|
93
|
+
- templates/gem/lib/%name%/version.rb.tt
|
94
|
+
homepage: https://github.com/atipugin/mkgem
|
95
|
+
licenses: []
|
96
|
+
metadata: {}
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.4.5.1
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: An opinionated Ruby gem generator
|
117
|
+
test_files: []
|