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 +4 -4
- data/README.md +1 -1
- data/Rakefile +35 -15
- data/bin/gr8 +6 -6
- data/gr8.gemspec +1 -1
- data/test/app_test.rb +1 -1
- data/test/common.rb +1 -1
- data/test/enum_test.rb +1 -1
- data/test/test_all.rb +1 -1
- data/test/util_test.rb +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: d8c47af0d2892c976a1a787de4be021bd04f3948
|
4
|
+
data.tar.gz: 085adc0430168d7fb4961a9a293c3d57f1c621ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6ac8a153170c7a5126b8cc05a17bfea73643ceec396b374ce8fe7ff12f7091064c41644a0281281fc9682ed195149888b45d68694480c8349d180619f85933f
|
7
|
+
data.tar.gz: 9c86a673f73b3ece6a7899c2894af853cbde950fe6e8773a50ee096889bd01cf706a390c7f9501e291d2cde7f1915b151f85bcc79e4ffa46da8ebe9d57244c67
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -39,23 +39,43 @@ task :build do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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.
|
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.
|
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}
|
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}
|
442
|
+
$ cat data | %{script} 'map{split()[1].to_i}.sum' ## map{self} == map{|s| s}
|
443
443
|
300
|
444
|
-
$ cat data | %{script}
|
444
|
+
$ cat data | %{script} 'map{split[1]}.sum_i' ## .sum_i == map(&:to_i).sum
|
445
445
|
300
|
446
|
-
$ cat data | %{script}
|
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.
|
data/gr8.gemspec
CHANGED
data/test/app_test.rb
CHANGED
data/test/common.rb
CHANGED
data/test/enum_test.rb
CHANGED
data/test/test_all.rb
CHANGED
data/test/util_test.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oktest
|