microgem 1.0.23 → 1.1.0
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/CHANGELOG.md +5 -0
- data/lib/microgem/generator.rb +3 -3
- data/lib/microgem/version.rb +1 -1
- data/microgem.gemspec +1 -1
- data/template/.github/workflows/test.yml.tt +52 -0
- data/template/README.md.tt +1 -1
- data/template/Rakefile.tt +5 -1
- metadata +4 -4
- data/template/.travis.yml.tt +0 -17
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
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
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
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 %>
|
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: 2020-
|
11
|
+
date: 2020-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -44,8 +44,8 @@ files:
|
|
44
44
|
- lib/microgem/version.rb
|
45
45
|
- microgem.gemspec
|
46
46
|
- template/%name%.gemspec.tt
|
47
|
+
- template/.github/workflows/test.yml.tt
|
47
48
|
- template/.gitignore
|
48
|
-
- template/.travis.yml.tt
|
49
49
|
- template/CHANGELOG.md.tt
|
50
50
|
- template/CODE_OF_CONDUCT.md.tt
|
51
51
|
- template/Gemfile
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
77
|
+
rubygems_version: 3.2.3
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Generates new micro gems.
|
data/template/.travis.yml.tt
DELETED