microgem 1.0.19 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04c6594fde3e8e1e6ee9cb2c3b7faa32f632d3c769b9e77ca0928acd7fdbb24a
4
- data.tar.gz: eab410b2afe68879b422c31462f286245394ca94fbcda335fa78b2c4440b9dd0
3
+ metadata.gz: 8e7deb428e53c5eb766a68b6850a86628862dfc61868fd1742e3393c15d3f569
4
+ data.tar.gz: f956894939a12c0cce98750604adb00d5e151ade101ad5a12c3cd9c76d4a92c2
5
5
  SHA512:
6
- metadata.gz: e910e746db67bc8187aad3e63931432cc2f587993ad740731a4442ca5566110f87fa18440f3fa9a67e7191e1a6336f00c87757cdba1ffbbec7cea246f02f98e2
7
- data.tar.gz: 2c65be0db05eb80f43dc4bba4bdc9b5b00d917fea249c552b3620b4d1ee6cddfe2231408b65e82a25c65f9593171b4e54321396e4a364f64318a3816010af379
6
+ metadata.gz: 92e39da5dd41fce4c69f83bdda69234775ead03ee68de0b29ddc636abfab038d289ae06f054a2972af2b365b47cf6921aec4d4e6aa80434ad4b0bee2e4d8b2bf
7
+ data.tar.gz: f00b77543008be8bf933fbed293d213173b042fb7868031cd34decdd17207207745f431e9a23bbb2b2a95cfd22a3328ad6dc9a80d844b70d5bfd46ba9b9616dd
@@ -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)
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Jan Lelis
1
+ Copyright (c) 2015-2020 Jan Lelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # microgem [![[version]](https://badge.fury.io/rb/microgem.svg)](http://badge.fury.io/rb/microgem)
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 options, if you are looking for something more flexible, consider using [ore](https://github.com/ruby-ore/ore) instead.
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
 
@@ -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|\.travis\.yml>
102
+ directory ".", name, exclude_pattern: %r<_spec.rb|Gemfile|\.github>
103
103
  if options[:specs]
104
104
  directory "spec", name + "/spec"
105
- template ".travis.yml", name + "/.travis.yml"
105
+ directory ".github", name + "/.github"
106
106
  copy_file "Gemfile", name + "/Gemfile"
107
107
  end
108
108
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Microgem
4
- VERSION = "1.0.19"
4
+ VERSION = "1.1.0"
5
5
  end
@@ -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 = "mail@janlelis.de"
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["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ }
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
@@ -1,4 +1,4 @@
1
- # <%= name %> [![[version]](https://badge.fury.io/rb/<%= name %>.svg)](https://badge.fury.io/rb/<%= name %>) [![[travis]](https://travis-ci.org/<%= settings['github'] %>/<%= github_name %>.svg)](https://travis-ci.org/<%= settings['github'] %>/<%= github_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
 
@@ -32,7 +32,11 @@ end
32
32
 
33
33
  desc "#{gemspec.name} | Spec"
34
34
  task :spec do
35
- sh "for file in spec/*_spec.rb; do ruby $file; done"
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 %>
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "<%= last_name %>/version"
2
4
 
3
5
  <% sub_modules.each.with_index do |sub_module, index| %><%= " " * index %><%= module_def(index) %> <%= sub_module %>
@@ -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 %>".freeze
4
+ <% end %><%= " " * sub_modules.size %>VERSION = "<%= version %>"
3
5
  <% sub_modules.size.downto(1) do |index| %><%= " " * (index - 1) %>end
4
6
  <% end %>
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative "../lib/<%= path %>"
2
4
  require "minitest/autorun"
3
5
 
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.19
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: 2019-04-02 00:00:00.000000000 Z
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: mail@janlelis.de
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.0.3
77
+ rubygems_version: 3.2.3
77
78
  signing_key:
78
79
  specification_version: 4
79
80
  summary: Generates new micro gems.
@@ -1,18 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- rvm:
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - 2.3
9
- - ruby-head
10
- - jruby-9.2.6.0
11
- - truffleruby
12
-
13
- matrix:
14
- allow_failures:
15
- - rvm: ruby-head
16
- - rvm: truffleruby
17
- - rvm: 2.3
18
- # fast_finish: true