mercurd 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +17 -2
- data/README.md +19 -3
- data/{bin → exe}/console +0 -0
- data/{bin → exe}/mercurd +1 -1
- data/{bin → exe}/setup +0 -0
- data/lib/mercurd/cli.rb +20 -5
- data/lib/mercurd/version.rb +1 -1
- data/mercurd.gemspec +2 -0
- metadata +37 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b878003e4f7e76e344ce98c73c79d8146bb8f47e816d74b72437b99cae97654a
|
4
|
+
data.tar.gz: b5ecf040ce655cd319b253e47c7171b81dbba2a75e0f3b8f5b770faba3ac7aac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffe3b4fec59761ea414f457a58a8c36bb63ad6b52761c99c42493f2eb8cd11863750c3524cd4fdd9b6a866bf20ea4bc6c356db0ccdea3d1bd0bce2f5770f44e1
|
7
|
+
data.tar.gz: d8ac6022623db3b26857b5dde10e9dd328f209c50b633ca017a342d2b762156501ca7feb833567ca3da763ad0e21d62fb5cea44e256e96368ee806b3e052be11
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mercurd (0.
|
4
|
+
mercurd (0.2.0)
|
5
|
+
activesupport
|
5
6
|
thor
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
11
|
+
activesupport (5.2.3)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 0.7, < 2)
|
14
|
+
minitest (~> 5.1)
|
15
|
+
tzinfo (~> 1.1)
|
10
16
|
aruba (0.14.10)
|
11
17
|
childprocess (>= 0.6.3, < 1.1.0)
|
12
18
|
contracts (~> 0.9)
|
@@ -19,6 +25,7 @@ GEM
|
|
19
25
|
childprocess (1.0.1)
|
20
26
|
rake (< 13.0)
|
21
27
|
coderay (1.1.2)
|
28
|
+
concurrent-ruby (1.1.5)
|
22
29
|
contracts (0.16.0)
|
23
30
|
cucumber (3.1.2)
|
24
31
|
builder (>= 2.1.2)
|
@@ -38,8 +45,12 @@ GEM
|
|
38
45
|
cucumber-wire (0.0.1)
|
39
46
|
diff-lcs (1.3)
|
40
47
|
ffi (1.11.1)
|
48
|
+
gem-release (2.0.3)
|
41
49
|
gherkin (5.1.0)
|
50
|
+
i18n (1.6.0)
|
51
|
+
concurrent-ruby (~> 1.0)
|
42
52
|
method_source (0.9.2)
|
53
|
+
minitest (5.11.3)
|
43
54
|
multi_json (1.13.1)
|
44
55
|
multi_test (0.1.2)
|
45
56
|
pry (0.12.2)
|
@@ -61,15 +72,19 @@ GEM
|
|
61
72
|
rspec-support (~> 3.8.0)
|
62
73
|
rspec-support (3.8.2)
|
63
74
|
thor (0.20.3)
|
75
|
+
thread_safe (0.3.6)
|
76
|
+
tzinfo (1.2.5)
|
77
|
+
thread_safe (~> 0.1)
|
64
78
|
|
65
79
|
PLATFORMS
|
66
80
|
ruby
|
67
81
|
|
68
82
|
DEPENDENCIES
|
69
|
-
mercurd!
|
70
83
|
aruba (~> 0.14.10)
|
71
84
|
bundler (~> 2.0)
|
72
85
|
cucumber (~> 3.0)
|
86
|
+
gem-release
|
87
|
+
mercurd!
|
73
88
|
pry
|
74
89
|
rake (~> 10.0)
|
75
90
|
rb-readline
|
data/README.md
CHANGED
@@ -2,7 +2,19 @@
|
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mercurd`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
|
5
|
+
Your benefits:
|
6
|
+
|
7
|
+
- Master the methods of code reading
|
8
|
+
- Support by a convenient command line
|
9
|
+
|
10
|
+
My Vision:
|
11
|
+
|
12
|
+
- Help to reading code
|
13
|
+
- Make code reading simple and fun
|
14
|
+
|
15
|
+
My Focus:
|
16
|
+
|
17
|
+
- Code Reading In Action
|
6
18
|
|
7
19
|
## Installation
|
8
20
|
|
@@ -14,11 +26,15 @@ gem 'mercurd'
|
|
14
26
|
|
15
27
|
And then execute:
|
16
28
|
|
17
|
-
|
29
|
+
```bash
|
30
|
+
bundle
|
31
|
+
```
|
18
32
|
|
19
33
|
Or install it yourself as:
|
20
34
|
|
21
|
-
|
35
|
+
```bash
|
36
|
+
gem install mercurd
|
37
|
+
```
|
22
38
|
|
23
39
|
## Usage
|
24
40
|
|
data/{bin → exe}/console
RENAMED
File without changes
|
data/{bin → exe}/mercurd
RENAMED
data/{bin → exe}/setup
RENAMED
File without changes
|
data/lib/mercurd/cli.rb
CHANGED
@@ -1,15 +1,30 @@
|
|
1
1
|
require 'thor'
|
2
2
|
|
3
|
+
require 'active_support'
|
4
|
+
require 'active_support/core_ext/object'
|
5
|
+
|
3
6
|
module Mercurd
|
4
7
|
class CLI < Thor
|
5
|
-
desc "zen", "
|
8
|
+
desc "zen", "The Zen of Code Reading"
|
6
9
|
def zen
|
7
10
|
puts <<-ZEN
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
11
|
+
The Zen of Code Reading
|
12
|
+
|
13
|
+
- Good first.
|
14
|
+
- Document first.
|
15
|
+
- When have to.
|
16
|
+
- For writting.
|
12
17
|
ZEN
|
13
18
|
end
|
19
|
+
|
20
|
+
desc "cloc [OPTIONS]", "The wrapper of github.com/AlDanial/cloc"
|
21
|
+
def cloc(src = nil)
|
22
|
+
cmd = `which cloc`
|
23
|
+
puts "cloc not found" and return if cmd.blank?
|
24
|
+
prefix = "Count Lines of Code"
|
25
|
+
dir = src ? src : '.'
|
26
|
+
ret = `cloc #{dir}`
|
27
|
+
puts [prefix, ret].join("\n\n")
|
28
|
+
end
|
14
29
|
end
|
15
30
|
end
|
data/lib/mercurd/version.rb
CHANGED
data/mercurd.gemspec
CHANGED
@@ -35,5 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_development_dependency "aruba"
|
36
36
|
spec.add_development_dependency "pry"
|
37
37
|
spec.add_development_dependency "rb-readline"
|
38
|
+
spec.add_development_dependency "gem-release"
|
38
39
|
spec.add_dependency "thor"
|
40
|
+
spec.add_dependency "activesupport"
|
39
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mercurd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zhenyuan Lau
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gem-release
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: thor
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,10 +136,27 @@ dependencies:
|
|
122
136
|
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: activesupport
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
125
153
|
description: ''
|
126
154
|
email:
|
127
155
|
- zhenyuanlau@icloud.com
|
128
|
-
executables:
|
156
|
+
executables:
|
157
|
+
- console
|
158
|
+
- mercurd
|
159
|
+
- setup
|
129
160
|
extensions: []
|
130
161
|
extra_rdoc_files: []
|
131
162
|
files:
|
@@ -138,9 +169,9 @@ files:
|
|
138
169
|
- LICENSE.txt
|
139
170
|
- README.md
|
140
171
|
- Rakefile
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
172
|
+
- exe/console
|
173
|
+
- exe/mercurd
|
174
|
+
- exe/setup
|
144
175
|
- lib/mercurd.rb
|
145
176
|
- lib/mercurd/cli.rb
|
146
177
|
- lib/mercurd/version.rb
|