microgem 1.0.19 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/MIT-LICENSE.txt +1 -1
- data/README.md +2 -2
- data/lib/microgem/generator.rb +3 -3
- data/lib/microgem/version.rb +1 -1
- data/microgem.gemspec +2 -2
- data/template/.github/workflows/test.yml.tt +52 -0
- data/template/README.md.tt +1 -1
- data/template/Rakefile.tt +5 -1
- data/template/lib/%path%.rb.tt +2 -0
- data/template/lib/%path%/version.rb.tt +3 -1
- data/template/spec/%spec_name%_spec.rb.tt +2 -0
- metadata +6 -5
- data/template/.travis.yml.tt +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e7deb428e53c5eb766a68b6850a86628862dfc61868fd1742e3393c15d3f569
|
4
|
+
data.tar.gz: f956894939a12c0cce98750604adb00d5e151ade101ad5a12c3cd9c76d4a92c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e39da5dd41fce4c69f83bdda69234775ead03ee68de0b29ddc636abfab038d289ae06f054a2972af2b365b47cf6921aec4d4e6aa80434ad4b0bee2e4d8b2bf
|
7
|
+
data.tar.gz: f00b77543008be8bf933fbed293d213173b042fb7868031cd34decdd17207207745f431e9a23bbb2b2a95cfd22a3328ad6dc9a80d844b70d5bfd46ba9b9616dd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
## CHANGELOG
|
2
2
|
|
3
|
+
### 1.1.0
|
4
|
+
|
5
|
+
* Move from Travis CI to GitHub CI
|
6
|
+
* Rakefile: Make spec runner windows compatible
|
7
|
+
|
8
|
+
### 1.0.23
|
9
|
+
|
10
|
+
* travis.yml: Specify TruffleRuby at 20.2.0 and remove it from allowed failed
|
11
|
+
* travis.yml: Update JRuby to 9.2.11.1
|
12
|
+
|
13
|
+
### 1.0.22
|
14
|
+
|
15
|
+
* travis.yml: Update JRuby to 9.2.11.0
|
16
|
+
* travis.yml: Don't test 2.3 anymore
|
17
|
+
|
18
|
+
### 1.0.21
|
19
|
+
|
20
|
+
* Use frozen strings in generated Ruby files
|
21
|
+
|
22
|
+
### 1.0.20
|
23
|
+
|
24
|
+
* travis.yml: Update Rubies, add 2.7
|
25
|
+
|
3
26
|
### 1.0.19
|
4
27
|
|
5
28
|
* Add IRB to Gemfile (for bundler)
|
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# microgem [![[version]](https://badge.fury.io/rb/microgem.svg)](
|
1
|
+
# microgem [![[version]](https://badge.fury.io/rb/microgem.svg)](https://badge.fury.io/rb/microgem)
|
2
2
|
|
3
|
-
Yet another [thor](http://whatisthor.com/) based gem generator. Not much
|
3
|
+
Yet another [thor](http://whatisthor.com/) based gem generator. Not much configurable, if you are looking for something more flexible, consider using [ore](https://github.com/ruby-ore/ore) instead.
|
4
4
|
|
5
5
|
## Install
|
6
6
|
|
data/lib/microgem/generator.rb
CHANGED
@@ -69,7 +69,7 @@ class Microgem::Generator < Thor::Group
|
|
69
69
|
def path
|
70
70
|
name.gsub(/-[_-]*(?![_-]|$)/){ '/' }
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
73
|
def spec_name
|
74
74
|
name.gsub(/-[_-]*(?![_-]|$)/){ '_' }
|
75
75
|
end
|
@@ -99,10 +99,10 @@ class Microgem::Generator < Thor::Group
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def generate
|
102
|
-
directory ".", name, exclude_pattern: %r<_spec.rb|Gemfile|\.
|
102
|
+
directory ".", name, exclude_pattern: %r<_spec.rb|Gemfile|\.github>
|
103
103
|
if options[:specs]
|
104
104
|
directory "spec", name + "/spec"
|
105
|
-
|
105
|
+
directory ".github", name + "/.github"
|
106
106
|
copy_file "Gemfile", name + "/Gemfile"
|
107
107
|
end
|
108
108
|
end
|
data/lib/microgem/version.rb
CHANGED
data/microgem.gemspec
CHANGED
@@ -8,11 +8,11 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.summary = "Generates new micro gems."
|
9
9
|
gem.description = "Generates new micro gems. Usage: $ microgem gem_name"
|
10
10
|
gem.authors = ["Jan Lelis"]
|
11
|
-
gem.email = "
|
11
|
+
gem.email = ["hi@ruby.consulting"]
|
12
12
|
gem.homepage = "https://github.com/janlelis/microgem"
|
13
13
|
gem.license = "MIT"
|
14
14
|
|
15
|
-
gem.files = Dir["{
|
15
|
+
gem.files = Dir["{**/,template/.github/**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ }
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
name: Ruby ${{ matrix.ruby }} (${{ matrix.os }})
|
8
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
ruby:
|
12
|
+
- 3.0
|
13
|
+
- 2.7
|
14
|
+
- 2.6
|
15
|
+
- 2.5
|
16
|
+
- jruby-9.2.13.0
|
17
|
+
- truffleruby-20.3.0
|
18
|
+
os:
|
19
|
+
- ubuntu-latest
|
20
|
+
# - macos-latest
|
21
|
+
runs-on: ${{matrix.os}}
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
- name: Set up Ruby
|
25
|
+
uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: ${{matrix.ruby}}
|
28
|
+
bundler-cache: true
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake
|
31
|
+
|
32
|
+
test-windows:
|
33
|
+
name: Ruby ${{ matrix.ruby }} (windows-latest)
|
34
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
35
|
+
strategy:
|
36
|
+
matrix:
|
37
|
+
ruby:
|
38
|
+
- 3.0
|
39
|
+
- 2.7
|
40
|
+
- 2.6
|
41
|
+
- 2.5
|
42
|
+
runs-on: windows-latest
|
43
|
+
steps:
|
44
|
+
- uses: actions/checkout@v2
|
45
|
+
- name: Set up Ruby
|
46
|
+
uses: ruby/setup-ruby@v1
|
47
|
+
with:
|
48
|
+
ruby-version: ${{matrix.ruby}}
|
49
|
+
bundler-cache: true
|
50
|
+
# - run: cinst ansicon
|
51
|
+
- name: Run tests
|
52
|
+
run: bundle exec rake
|
data/template/README.md.tt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# <%= name %> [![[version]](https://badge.fury.io/rb/<%= name %>.svg)](https://badge.fury.io/rb/<%= name %>) [![[
|
1
|
+
# <%= name %> [![[version]](https://badge.fury.io/rb/<%= name %>.svg)](https://badge.fury.io/rb/<%= name %>) [![[ci]](https://github.com/<%= settings['github'] %>/<%= github_name %>/workflows/Test/badge.svg)](https://github.com/<%= settings['github'] %>/<%= github_name %>/actions?query=workflow%3ATest)
|
2
2
|
|
3
3
|
<%= info %>
|
4
4
|
|
data/template/Rakefile.tt
CHANGED
@@ -32,7 +32,11 @@ end
|
|
32
32
|
|
33
33
|
desc "#{gemspec.name} | Spec"
|
34
34
|
task :spec do
|
35
|
-
|
35
|
+
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
|
36
|
+
sh "for %f in (spec/\*.rb) do ruby spec/%f"
|
37
|
+
else
|
38
|
+
sh "for file in spec/*.rb; do ruby $file; done"
|
39
|
+
end
|
36
40
|
end
|
37
41
|
task default: :spec
|
38
42
|
<% end %>
|
data/template/lib/%path%.rb.tt
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
<% sub_modules.each.with_index do |sub_module, index| %><%= " " * index %><%= module_def(index) %> <%= sub_module %>
|
2
|
-
<% end %><%= " " * sub_modules.size %>VERSION = "<%= version %>"
|
4
|
+
<% end %><%= " " * sub_modules.size %>VERSION = "<%= version %>"
|
3
5
|
<% sub_modules.size.downto(1) do |index| %><%= " " * (index - 1) %>end
|
4
6
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: microgem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -25,7 +25,8 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.19.1
|
27
27
|
description: 'Generates new micro gems. Usage: $ microgem gem_name'
|
28
|
-
email:
|
28
|
+
email:
|
29
|
+
- hi@ruby.consulting
|
29
30
|
executables:
|
30
31
|
- microgem
|
31
32
|
extensions: []
|
@@ -43,8 +44,8 @@ files:
|
|
43
44
|
- lib/microgem/version.rb
|
44
45
|
- microgem.gemspec
|
45
46
|
- template/%name%.gemspec.tt
|
47
|
+
- template/.github/workflows/test.yml.tt
|
46
48
|
- template/.gitignore
|
47
|
-
- template/.travis.yml.tt
|
48
49
|
- template/CHANGELOG.md.tt
|
49
50
|
- template/CODE_OF_CONDUCT.md.tt
|
50
51
|
- template/Gemfile
|
@@ -73,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
74
|
- !ruby/object:Gem::Version
|
74
75
|
version: '0'
|
75
76
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
77
|
+
rubygems_version: 3.2.3
|
77
78
|
signing_key:
|
78
79
|
specification_version: 4
|
79
80
|
summary: Generates new micro gems.
|
data/template/.travis.yml.tt
DELETED