togostanza 1.4.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/togostanza/cli.rb +1 -3
- data/lib/togostanza/version.rb +1 -1
- data/templates/stanza/gemspec.erb +10 -5
- data/templates/stanza/metadata.json.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cebb5d9a634d56c3ccfee2e9566cce3446d13c0
|
4
|
+
data.tar.gz: 5871e598ffd60ae73012ea2c0df2cb6a8dbe0027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb67b26e503a04f8e064689ba248ca84cc5cf3bd9a69fbb5ae2a27d0bfddeba220d386e5041ba692ca326ad058c4da40cdc152de0917d54cebef5ea3ef55310
|
7
|
+
data.tar.gz: 1b066ab9948b46112481517e2e221b2deee2a8937490cd2c7fe17659e80ddf511c2c9e5c70ff0f53a9be2658e7daef781af0ad41c96d6a612d4c8422b733b3c3
|
data/lib/togostanza/cli.rb
CHANGED
@@ -207,7 +207,6 @@ module TogoStanza
|
|
207
207
|
end
|
208
208
|
|
209
209
|
def replace_author
|
210
|
-
gsub_file("#{template_dir}/gemspec.erb", /spec.authors\s*=\s\[\'.*\'\]/, "spec.authors = ['#{name}']")
|
211
210
|
gsub_file("#{template_dir}/metadata.json.erb", /author":\s".*"/, "author\": \"#{name}\"")
|
212
211
|
end
|
213
212
|
end
|
@@ -221,8 +220,7 @@ module TogoStanza
|
|
221
220
|
File.expand_path('../../../templates/stanza', __FILE__)
|
222
221
|
end
|
223
222
|
|
224
|
-
def
|
225
|
-
gsub_file("#{template_dir}/gemspec.erb", /spec.email\s*=\s\[\'.*\'\]/, "spec.email = ['#{addr}']")
|
223
|
+
def replace_address
|
226
224
|
gsub_file("#{template_dir}/metadata.json.erb", /address":\s".*"/, "address\": \"#{addr}\"")
|
227
225
|
end
|
228
226
|
end
|
data/lib/togostanza/version.rb
CHANGED
@@ -1,15 +1,20 @@
|
|
1
1
|
lib = File.expand_path('../lib', __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
|
4
|
+
require 'json'
|
5
|
+
metadata = open('./metadata.json') do |io|
|
6
|
+
JSON.load(io)
|
7
|
+
end
|
8
|
+
|
4
9
|
Gem::Specification.new do |spec|
|
5
10
|
spec.name = '<%= file_name %>'
|
6
11
|
spec.version = '0.0.1'
|
7
|
-
spec.authors = [
|
8
|
-
spec.email = [
|
9
|
-
spec.summary =
|
10
|
-
spec.description =
|
12
|
+
spec.authors = Array(metadata["stanza:author"])
|
13
|
+
spec.email = Array(metadata["stanza:address"])
|
14
|
+
spec.summary = metadata["stanza:label"]
|
15
|
+
spec.description = metadata["stanza:definition"]
|
11
16
|
spec.homepage = ''
|
12
|
-
spec.license =
|
17
|
+
spec.license = metadata["stanza:license"]
|
13
18
|
|
14
19
|
spec.files = Dir.glob('**/*')
|
15
20
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -12,7 +12,7 @@
|
|
12
12
|
"stanza:license": "",
|
13
13
|
"stanza:author": "author name",
|
14
14
|
"stanza:address": "name@example.org",
|
15
|
-
"stanza:contributor": [
|
15
|
+
"stanza:contributor": [],
|
16
16
|
"stanza:created": "<%= Date.today %>",
|
17
17
|
"stanza:updated": "<%= Date.today %>"
|
18
18
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togostanza
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keita Urashima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|