gr8 0.1.0 → 0.1.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
  SHA1:
3
- metadata.gz: c3f8564628ffbf75fc7bb94b6eda6e9270b143b5
4
- data.tar.gz: ab024c49b8e07534b5289855fec96ffb5bf68c65
3
+ metadata.gz: d8c47af0d2892c976a1a787de4be021bd04f3948
4
+ data.tar.gz: 085adc0430168d7fb4961a9a293c3d57f1c621ee
5
5
  SHA512:
6
- metadata.gz: 108d301bd334c933977bc53b97ddf8a225d89a33378374f9647085ba4260a06f8a35832c9f0f57a9081909850922781cf81247bde78ac2588cadade16ae6c467
7
- data.tar.gz: 72fb0e5ad4ad98ac56c3512335d62b27a643f95ec0d29a68e64b9368ed17e8312b9342def37f7ee19e10c62e12231208f4668aa8b8427425aabd9067d2b74f01
6
+ metadata.gz: f6ac8a153170c7a5126b8cc05a17bfea73643ceec396b374ce8fe7ff12f7091064c41644a0281281fc9682ed195149888b45d68694480c8349d180619f85933f
7
+ data.tar.gz: 9c86a673f73b3ece6a7899c2894af853cbde950fe6e8773a50ee096889bd01cf706a390c7f9501e291d2cde7f1915b151f85bcc79e4ffa46da8ebe9d57244c67
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # gr8 README
2
2
 
3
- (Release: $Release: 0.1.0 $)
3
+ (Release: $Release: 0.1.1 $)
4
4
 
5
5
  gr8 (pronounce as _greight_ or _great_) is a great command-line utility powered by Ruby.
6
6
  You can use gr8 instead of sed or awk.
data/Rakefile CHANGED
@@ -39,23 +39,43 @@ task :build do
39
39
  end
40
40
 
41
41
 
42
- desc "release preparation"
43
- task :release => [:test, :build] do
44
- ver = _get_1st_argument(:build, "version")
45
- dir = "build/gr8-#{ver}"
46
- gemfile = "gr8-#{ver}.gem"
47
- puts ""
48
- print "** Are you sure to release #{gemfile}? [y/N] "
49
- answer = $stdin.gets()
50
- if answer =~ /\A[yY]/
51
- sh "git tag #{ver}"
52
- sh "git push --tags"
53
- Dir.chdir "build" do
54
- sh "gem push #{gemfile}"
42
+ namespace :release do
43
+
44
+
45
+ desc "edit files to set release number"
46
+ task :edit => [:test] do
47
+ ver = _get_1st_argument(:build, "version")
48
+ spec = _load_gemspec_file("gr8.gemspec")
49
+ spec.files.each do |fpath|
50
+ _edit_file(fpath, ver) {|s|
51
+ s.gsub!(/\$[R]elease:.*?\$/, "$\Release: #{ver} $")
52
+ s.gsub!(/\$[R]elease\$/, "$\Release: #{ver} $")
53
+ s
54
+ }
55
+ end
56
+ end
57
+
58
+
59
+ desc "upload gem file to rubygems.org"
60
+ task :publish => [:test] do
61
+ ver = _get_1st_argument(:build, "version")
62
+ gemfile = "gr8-#{ver}.gem"
63
+ puts ""
64
+ print "** Are you sure to publish #{ver}? [y/N] "
65
+ answer = $stdin.gets()
66
+ if answer =~ /\A[yY]/
67
+ Rake::Task[:build].invoke
68
+ sh "git tag ruby-#{ver}"
69
+ sh "git push --tags"
70
+ Dir.chdir "build" do
71
+ sh "gem push #{gemfile}"
72
+ end
73
+ else
74
+ $stderr.puts "** Canceled."
55
75
  end
56
- else
57
- $stderr.puts "** Canceled."
58
76
  end
77
+
78
+
59
79
  end
60
80
 
61
81
 
data/bin/gr8 CHANGED
@@ -4,7 +4,7 @@
4
4
  ###
5
5
  ### gr8 -- a great command-line utility powered by Ruby
6
6
  ###
7
- ### $Release: 0.1.0 $
7
+ ### $Release: 0.1.1 $
8
8
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
9
9
  ### $License: MIT License $
10
10
  ###
@@ -412,7 +412,7 @@ end
412
412
 
413
413
  module Gr8
414
414
 
415
- VERSION = "$Release: 0.1.0 $".split()[1]
415
+ VERSION = "$Release: 0.1.1 $".split()[1]
416
416
 
417
417
  WEBSITE_URL = "https://kwatch.github.io/gr8/"
418
418
 
@@ -435,15 +435,15 @@ Example:
435
435
  Haruhi 100
436
436
  Mikuru 80
437
437
  Yuki 120
438
- $ cat data | %{script}s 'map{|s| s.split()[1]}' ## self == $stdin.lazy
438
+ $ cat data | %{script} 'map{|s| s.split()[1]}' ## self == $stdin.lazy
439
439
  100
440
440
  80
441
441
  120
442
- $ cat data | %{script}s 'map{split()[1].to_i}.sum' ## map{self} == map{|s| s}
442
+ $ cat data | %{script} 'map{split()[1].to_i}.sum' ## map{self} == map{|s| s}
443
443
  300
444
- $ cat data | %{script}s 'map{split[1]}.sum_i' ## .sum_i == map(&:to_i).sum
444
+ $ cat data | %{script} 'map{split[1]}.sum_i' ## .sum_i == map(&:to_i).sum
445
445
  300
446
- $ cat data | %{script}s -C2 'sum_i' ## -C2 == map{split[1]}
446
+ $ cat data | %{script} -C2 'sum_i' ## -C2 == map{split[1]}
447
447
  300
448
448
 
449
449
  See #{WEBSITE_URL} for details and examples.
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |o|
5
5
  o.name = "gr8"
6
- o.version = "$Release: 0.1.0 $".split[1]
6
+ o.version = "$Release: 0.1.1 $".split[1]
7
7
  o.author = "makoto kuwata"
8
8
  o.email = "kwa(at)kuwata-lab.com"
9
9
  o.platform = Gem::Platform::RUBY
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  ###
4
- ### $Release: 0.1.0 $
4
+ ### $Release: 0.1.1 $
5
5
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
6
6
  ### $License: MIT License $
7
7
  ###
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  ###
4
- ### $Release: 0.1.0 $
4
+ ### $Release: 0.1.1 $
5
5
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
6
6
  ### $License: MIT License $
7
7
  ###
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  ###
4
- ### $Release: 0.1.0 $
4
+ ### $Release: 0.1.1 $
5
5
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
6
6
  ### $License: MIT License $
7
7
  ###
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  ###
4
- ### $Release: 0.1.0 $
4
+ ### $Release: 0.1.1 $
5
5
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
6
6
  ### $License: MIT License $
7
7
  ###
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  ###
4
- ### $Release: 0.1.0 $
4
+ ### $Release: 0.1.1 $
5
5
  ### $Copyright: copyright(c) 2015 kuwata-lab.com all rights reserved $
6
6
  ### $License: MIT License $
7
7
  ###
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gr8
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - makoto kuwata
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir:
10
10
  - bin
11
11
  cert_chain: []
12
- date: 2015-08-17 00:00:00.000000000 Z
12
+ date: 2015-08-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oktest