geny 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1865a94af00ab3badb4bdbab792430b36231fec33bfa08474e45e323bb0c319
4
- data.tar.gz: 6b627f7f4ffd8e6b4faa044c67351f6ebc1ff671f06bedc667da75811245a8b9
3
+ metadata.gz: 1bc848e8409e0bade3ed8a6ecdd931f0355c4fd12617a28fa9b82653e7f21064
4
+ data.tar.gz: 4002b6123125e73bdbee5d118e5732283b6df39ab958c399d74756311aa8e2e8
5
5
  SHA512:
6
- metadata.gz: 4ed5e8d8ae37ec2bc44ee0c40b945ca8e9dc8031056b6da702c944ee3310186a8e14b87cfafb5e85d2c4b94060282cf1afd6318579e60a88b7613b479234a39f
7
- data.tar.gz: bbb6a96d6ec5b22e17037ffbe8d2678b8bd4a6aa3aa30dde873246b19ba9e3cd64d0977ae446e2258c030496ac879a28b15ae94d1a0f9539cb51ce016a5e0767
6
+ metadata.gz: b7f18b863910ab8b163cfb4ff09546ada715402d2785d4e7b87abed141232e78fca79720a3eb3ceb0df95c0a32daed0ba61e8cddbbf51bd8ebfd0af36a2aedaf
7
+ data.tar.gz: cdc37bad979303e1d715eab3b9df86cd0ed62982fd815d18663b13a4bb0177ecb9cd39172c7afbe96d14a71574fcb68af8d9226676d91eb4fcbd5094f4997d09
@@ -0,0 +1,22 @@
1
+ name: Build
2
+ on: [push]
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Checkout
8
+ uses: actions/checkout@v2
9
+
10
+ - name: Setup Ruby
11
+ uses: actions/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7.x
14
+
15
+ - name: Install bundler
16
+ run: gem install bundler
17
+
18
+ - name: Install dependencies
19
+ run: bundle install
20
+
21
+ - name: Test
22
+ run: bundle exec rspec
@@ -0,0 +1,38 @@
1
+ name: Publish
2
+ on:
3
+ release:
4
+ types: [published]
5
+ jobs:
6
+ publish:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout
10
+ uses: actions/checkout@v2
11
+
12
+ - name: Setup Ruby
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.7.x
16
+
17
+ - name: Install bundler
18
+ run: gem install bundler
19
+
20
+ - name: Install dependencies
21
+ run: bundle install
22
+
23
+ - name: Test
24
+ run: bundle exec rspec
25
+
26
+ - name: Set version
27
+ run: perl -pi -e "s/0\.0\.0/${GITHUB_REF:11}/" lib/geny/version.rb
28
+
29
+ - name: Publish
30
+ run: |
31
+ mkdir -p $HOME/.gem
32
+ touch $HOME/.gem/credentials
33
+ chmod 0600 $HOME/.gem/credentials
34
+ printf -- "---\n:rubygems_api_key: ${RUBYGEMS_TOKEN}\n" > $HOME/.gem/credentials
35
+ gem build *.gemspec
36
+ gem push *.gem
37
+ env:
38
+ RUBYGEMS_TOKEN: ${{ secrets.RUBYGEMS_TOKEN }}
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in geny.gemspec
4
4
  gemspec
5
-
6
- gem "coveralls", require: false
data/README.md CHANGED
@@ -1,4 +1,11 @@
1
- # Geny [![Build Status](https://travis-ci.org/rzane/geny.svg?branch=master)](https://travis-ci.org/rzane/geny) [![Coverage Status](https://coveralls.io/repos/github/rzane/geny/badge.svg?branch=master)](https://coveralls.io/github/rzane/geny?branch=master)
1
+ <h1 align="center">Geny</h1>
2
+
3
+ <div align="center">
4
+
5
+ ![Build](https://github.com/rzane/geny/workflows/Build/badge.svg)
6
+ ![Version](https://img.shields.io/gem/v/geny)
7
+
8
+ </div>
2
9
 
3
10
  A tool for building code generators.
4
11
 
data/Rakefile CHANGED
@@ -1,8 +1,5 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- require "coveralls/rake/task"
4
- Coveralls::RakeTask.new
5
-
6
3
  require "rspec/core/rake_task"
7
4
  RSpec::Core::RakeTask.new(:spec)
8
5
 
@@ -24,14 +24,14 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_dependency "argy", "~> 0.2.2"
28
- spec.add_dependency "pastel", "~> 0.7.3"
29
- spec.add_dependency "tty-file", "~> 0.8.0"
30
- spec.add_dependency "tty-prompt", "~> 0.21.0"
27
+ spec.add_dependency "argy", "~> 0.2"
28
+ spec.add_dependency "pastel", "~> 0.7"
29
+ spec.add_dependency "tty-file", "~> 0.9"
30
+ spec.add_dependency "tty-prompt", "~> 0.21"
31
31
 
32
32
  spec.add_development_dependency "bundler", "~> 2.0"
33
33
  spec.add_development_dependency "rake", "~> 13.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
- spec.add_development_dependency "simplecov", "~> 0.17.1"
35
+ spec.add_development_dependency "simplecov", "~> 0.18"
36
36
  spec.add_development_dependency "file_spec", "~> 0.1.0"
37
37
  end
@@ -120,8 +120,8 @@ module Geny
120
120
  #
121
121
  # @example
122
122
  # files.chmod("bin/test", "+x")
123
- def chmod(path, mode, *args)
124
- TTY::File.chmod(path, coerce_mode(mode), *args)
123
+ def chmod(path, mode, *args, **opts)
124
+ TTY::File.chmod(path, mode, *args, **opts)
125
125
  end
126
126
 
127
127
  # @see #insert
@@ -133,16 +133,6 @@ module Geny
133
133
  def insert_after(path, pattern, content, **opts)
134
134
  insert(path, content, after: pattern, **opts)
135
135
  end
136
-
137
- private
138
-
139
- def coerce_mode(mode)
140
- if mode.respond_to?(:match?) && mode.match?(/^[+-]/)
141
- "a#{mode}"
142
- else
143
- mode
144
- end
145
- end
146
136
  end
147
137
  end
148
138
  end
@@ -68,7 +68,7 @@ module Geny
68
68
  FileUtils.mv(path, dest, force: force)
69
69
 
70
70
  # Find and rename the children of the path
71
- rename(dest, pattern, replacement, options) if File.directory?(dest)
71
+ rename(dest, pattern, replacement, **options) if File.directory?(dest)
72
72
 
73
73
  # We already searched the directory's children, so we should stop
74
74
  ::Find.prune
@@ -23,7 +23,7 @@ module Geny
23
23
  # templates.copy("hello.erb", "hello.txt", locals: {name: "world"})
24
24
  def copy(source, *args, **opts)
25
25
  source = expand_path(source)
26
- context, opts = build_context(opts)
26
+ context, opts = build_context(**opts)
27
27
  TTY::File.copy_file(source, *args, context: context, **opts)
28
28
  end
29
29
 
@@ -36,7 +36,7 @@ module Geny
36
36
  # templates.copy_dir("boilerplate", output, locals: {name: "world"})
37
37
  def copy_dir(source, *args, **opts)
38
38
  source = expand_path(source)
39
- context, opts = build_context(opts)
39
+ context, opts = build_context(**opts)
40
40
  TTY::File.copy_dir(source, *args, context: context, **opts)
41
41
  end
42
42
 
@@ -49,7 +49,7 @@ module Geny
49
49
  def render(path, **opts)
50
50
  path = expand_path(path)
51
51
  input = File.binread(path)
52
- context, _opts = build_context(opts)
52
+ context, _opts = build_context(**opts)
53
53
  erb = ERB.new(input, nil, "-", "@output_buffer")
54
54
  erb.result(context.instance_eval("binding"))
55
55
  end
@@ -1,3 +1,3 @@
1
1
  module Geny
2
- VERSION = "2.5.0"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geny
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ray Zane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: argy
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.2
19
+ version: '0.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.2
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pastel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.7.3
33
+ version: '0.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.7.3
40
+ version: '0.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: tty-file
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.8.0
47
+ version: '0.9'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.8.0
54
+ version: '0.9'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: tty-prompt
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.21.0
61
+ version: '0.21'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.21.0
68
+ version: '0.21'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.17.1
117
+ version: '0.18'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.17.1
124
+ version: '0.18'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: file_spec
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -144,9 +144,10 @@ executables:
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".github/workflows/build.yml"
148
+ - ".github/workflows/publish.yml"
147
149
  - ".gitignore"
148
150
  - ".rspec"
149
- - ".travis.yml"
150
151
  - ".yardopts"
151
152
  - CODE_OF_CONDUCT.md
152
153
  - Gemfile
@@ -198,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
199
  - !ruby/object:Gem::Version
199
200
  version: '0'
200
201
  requirements: []
201
- rubygems_version: 3.0.3
202
+ rubygems_version: 3.1.2
202
203
  signing_key:
203
204
  specification_version: 4
204
205
  summary: The only tool you need to build a code generator.
@@ -1,8 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.3
7
- before_install: gem install bundler -v 2.0.2
8
- after_script: bundle exec rake coveralls:push