benry 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 06de5c26179c3410476f7910188d5e097c204b5002897d6914f4f16a061fb886
4
+ data.tar.gz: 108f89b0457e5940bc0d796daf247c136c1b05642c1f6e3635e51918ade4ef5e
5
+ SHA512:
6
+ metadata.gz: 381bb0f5563ddf1c4079faaa7c49cd021a513b8449cb225f6290c6dd63adff0162f39c1754408987921d761b0e7ee980e90d5f5622cd0599ba52eb81d6c4de06
7
+ data.tar.gz: b7d42b6de2e2c3b74eccbabe54349c6af123de840b2c35f5140addfd6d4b24b152d03c097d8b2eebe7db10d82f29125bb820787b9d940fb0c49772da38c4acc9
@@ -0,0 +1,9 @@
1
+ =======
2
+ CHANGES
3
+ =======
4
+
5
+
6
+ Release 1.0.0 (2021-01-18)
7
+ --------------------------
8
+
9
+ * First public release
@@ -0,0 +1,15 @@
1
+ Benry README
2
+ ============
3
+
4
+ ($Release: 1.0.0 $)
5
+
6
+ Benry is just a namespace for other `benry-*` gems.
7
+ It contains only empty module `Benry`.
8
+
9
+
10
+ License and Copyright
11
+ =====================
12
+
13
+ $License: MIT License $
14
+
15
+ $Copyright: copyright(c) 2021 kuwata-lab.com all rights reserved $
@@ -0,0 +1,92 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+
4
+ project = "benry"
5
+ release = ENV['RELEASE'] || "0.0.0"
6
+ copyright = "copyright(c) 2021 kuwata-lab.com all rights reserved"
7
+ license = "MIT License"
8
+
9
+ target_files = Dir[*%W[
10
+ README.md CHANGES.md MIT-LICENSE.txt Rakefile.rb
11
+ lib/**/*.rb
12
+ test/**/*_test.rb
13
+ #{project}.gemspec
14
+ ]]
15
+
16
+
17
+ require 'rake/clean'
18
+ CLEAN << "build"
19
+ CLOBBER << Dir.glob("#{project}-*.gem")
20
+
21
+
22
+ task :default => :help
23
+
24
+
25
+ desc "show help"
26
+ task :help do
27
+ puts "rake help # help"
28
+ puts "rake test # run test"
29
+ puts "rake package RELEASE=X.X.X # create gem file"
30
+ puts "rake publish RELEASE=X.X.X # upload gem file"
31
+ puts "rake clean # remove files"
32
+ end
33
+
34
+
35
+ desc "do test"
36
+ task :test do
37
+ sh "ruby", *Dir.glob("test/*.rb")
38
+ end
39
+
40
+
41
+ desc "create package"
42
+ task :package do
43
+ release != "0.0.0" or
44
+ raise "specify $RELEASE"
45
+ ## copy
46
+ dir = "build"
47
+ rm_rf dir if File.exist?(dir)
48
+ mkdir dir
49
+ target_files.each do |file|
50
+ dest = File.join(dir, File.dirname(file))
51
+ mkdir_p dest, :verbose=>false unless File.exist?(dest)
52
+ cp file, "#{dir}/#{file}"
53
+ end
54
+ ## edit
55
+ Dir.glob("#{dir}/**/*").each do |file|
56
+ next unless File.file?(file)
57
+ File.open(file, 'rb+') do |f|
58
+ s1 = f.read()
59
+ s2 = s1
60
+ s2 = s2.gsub(/\$Release[:].*?\$/, "$"+"Release: #{release} $")
61
+ s2 = s2.gsub(/\$Copyright[:].*?\$/, "$"+"Copyright: #{copyright} $")
62
+ s2 = s2.gsub(/\$License[:].*?\$/, "$"+"License: #{license} $")
63
+ #
64
+ if s1 != s2
65
+ f.rewind()
66
+ f.truncate(0)
67
+ f.write(s2)
68
+ end
69
+ end
70
+ end
71
+ ## build
72
+ chdir dir do
73
+ sh "gem build #{project}.gemspec"
74
+ end
75
+ mv "#{dir}/#{project}-#{release}.gem", "."
76
+ end
77
+
78
+
79
+ desc "upload gem file to rubygems.org"
80
+ task :publish do
81
+ release != "0.0.0" or
82
+ raise "specify $RELEASE"
83
+ #
84
+ gemfile = "#{project}-#{release}.gem"
85
+ print "** Are you sure to publish #{gemfile}? [y/N]: "
86
+ answer = $stdin.gets().strip()
87
+ if answer.downcase == "y"
88
+ sh "gem push #{gemfile}"
89
+ sh "git tag ruby-#{project}-#{release}"
90
+ sh "git push --tags"
91
+ end
92
+ end
@@ -0,0 +1,30 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'benry'
5
+ spec.version = '$Release: 1.0.0 $'.split()[1]
6
+ spec.author = 'kwatch'
7
+ spec.email = 'kwatch@gmail.com'
8
+ spec.platform = Gem::Platform::RUBY
9
+ spec.homepage = 'https://github.com/kwatch/benry/tree/ruby/benry'
10
+ spec.summary = "namespace for `benry-*` gems"
11
+ spec.description = <<-'END'
12
+ Namespace for `benry-*` gems.
13
+ END
14
+ spec.license = 'MIT'
15
+ spec.files = Dir[
16
+ 'README.md', 'CHANGES.md', 'MIT-LICENSE',
17
+ 'Rakefile.rb', 'benry.gemspec',
18
+ 'bin/*',
19
+ 'lib/**/*.rb',
20
+ 'test/**/*.rb',
21
+ ]
22
+ #spec.executables = ['benry']
23
+ spec.bindir = 'bin'
24
+ spec.require_path = 'lib'
25
+ spec.test_files = Dir['test/**/*_test.rb']
26
+ #spec.extra_rdoc_files = ['README.md', 'CHANGES.md']
27
+
28
+ #spec.add_development_dependency 'minitest' , '~> 5.8'
29
+ #spec.add_development_dependency 'minitest-ok' , '~> 0.3'
30
+ end
@@ -0,0 +1,11 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ ###
4
+ ### $Release$
5
+ ### $Copyright$
6
+ ### $License$
7
+ ###
8
+
9
+
10
+ module Benry
11
+ end
@@ -0,0 +1,5 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ $LOAD_PATH << File.join(File.dirname(File.dirname(__FILE__)), 'lib')
4
+
5
+ require 'benry'
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: benry
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - kwatch
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-01-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: 'Namespace for `benry-*` gems.
14
+
15
+ '
16
+ email: kwatch@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - CHANGES.md
22
+ - README.md
23
+ - Rakefile.rb
24
+ - benry.gemspec
25
+ - lib/benry.rb
26
+ - test/benry_test.rb
27
+ homepage: https://github.com/kwatch/benry/tree/ruby/benry
28
+ licenses:
29
+ - MIT
30
+ metadata: {}
31
+ post_install_message:
32
+ rdoc_options: []
33
+ require_paths:
34
+ - lib
35
+ required_ruby_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ requirements: []
46
+ rubygems_version: 3.1.2
47
+ signing_key:
48
+ specification_version: 4
49
+ summary: namespace for `benry-*` gems
50
+ test_files:
51
+ - test/benry_test.rb