pera1 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/pera1 +65 -0
- data.tar.gz.sig +0 -0
- metadata +67 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fed738b03425a69c32b26a042eab93be6b9eef69
|
4
|
+
data.tar.gz: d8cd48719fe68630a2d3100c327b461024f0afe1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 971d9f978584be9eab2420a102974d0dedc241c708ea8352c8984e342f843d350b9bb4a272c05693b46477a404c598be6fdb21d108206a43e09664fabf57244b
|
7
|
+
data.tar.gz: f5225c400e3c3b2392adcb1dc621c5e2626d40cd87a4223bc76b8bbaf1d2b268c9c2782af532239e9f99146309b446dda956084d8d1e5d284401b4cb6f7b529e
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/pera1
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
if ARGV.empty? || ARGV.size != 1
|
4
|
+
puts "Usage: pera1 FILE"
|
5
|
+
exit(false)
|
6
|
+
end
|
7
|
+
|
8
|
+
file = ARGV.first
|
9
|
+
|
10
|
+
unless File.exist?(file)
|
11
|
+
puts "#{ARGV.first} is not found"
|
12
|
+
exit(false)
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'erb'
|
16
|
+
template = DATA.read
|
17
|
+
|
18
|
+
default = lambda do
|
19
|
+
name = File.basename(file, '.rb')
|
20
|
+
version = '0.0.1'
|
21
|
+
license = 'MIT'
|
22
|
+
summary = ''
|
23
|
+
author = `git config --get user.name`.chomp
|
24
|
+
email = `git config --get user.email`.chomp
|
25
|
+
homepage = 'https://rubygems.org/gems/' + name
|
26
|
+
binding
|
27
|
+
end
|
28
|
+
|
29
|
+
config = default.call
|
30
|
+
|
31
|
+
require 'rubygems/user_interaction'
|
32
|
+
ui = Gem::ConsoleUI.new
|
33
|
+
RubyVM::InstructionSequence.of(default).to_a[10].each do |c|
|
34
|
+
v = config.local_variable_get(c)
|
35
|
+
if v.empty?
|
36
|
+
a = ui.ask("#{c}:")
|
37
|
+
else
|
38
|
+
a = ui.ask("#{c}: (#{v})")
|
39
|
+
end
|
40
|
+
config.local_variable_set(c, a) unless a.empty?
|
41
|
+
end
|
42
|
+
gemspec = ERB.new(template, nil, '-').result(config)
|
43
|
+
|
44
|
+
dir = File.dirname(file)
|
45
|
+
gemspec_path = File.join(dir, "#{config.local_variable_get('name')}.gemspec")
|
46
|
+
File.write(gemspec_path, gemspec)
|
47
|
+
|
48
|
+
__END__
|
49
|
+
Gem::Specification.new do |s|
|
50
|
+
s.name = <%= name.inspect %>
|
51
|
+
s.version = <%= version.inspect %>
|
52
|
+
s.license = <%= license.inspect %>
|
53
|
+
s.summary = <%= summary.inspect %>
|
54
|
+
s.author = <%= author.inspect %>
|
55
|
+
<%- unless email.empty? -%>
|
56
|
+
s.email = <%= email.inspect %>
|
57
|
+
<%- end -%>
|
58
|
+
<%- unless homepage.empty? -%>
|
59
|
+
s.homepage = <%= homepage.inspect %>
|
60
|
+
<%- end -%>
|
61
|
+
<%- if File.executable?(file) -%>
|
62
|
+
s.bindir = '.'
|
63
|
+
s.executables << <%= file.inspect %>
|
64
|
+
<%- end -%>
|
65
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pera1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Seiei Miyagi
|
8
|
+
autorequire:
|
9
|
+
bindir: "."
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDV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hSAzklJ7g6BocJCWROXuVzX9eCw7YB3F4xNzdw8HxHkA
|
29
|
+
WbyMQMURxOX5Em9t+EgSU9Odx0tJgnhygUSdTJknavnpaZUa2odWS4+wagh8nXxS
|
30
|
+
+zDzgwp9Z4A8i47ioz1YEGIkQhDKZeGQznwkht0zsrtswEAiOisL5uJDtWvQiwt6
|
31
|
+
a9nBgrpUm8NHrucdUDtMYjixgmU=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2017-05-27 00:00:00.000000000 Z
|
34
|
+
dependencies: []
|
35
|
+
description:
|
36
|
+
email: hanachin@gmail.com
|
37
|
+
executables:
|
38
|
+
- pera1
|
39
|
+
extensions: []
|
40
|
+
extra_rdoc_files: []
|
41
|
+
files:
|
42
|
+
- "./pera1"
|
43
|
+
homepage: https://github.com/hanachin/pera1
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.6.11
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: generate gemspec for a single .rb file
|
67
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|