mercurd 0.3.0 → 0.4.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 +1 -1
- data/lib/mercurd/cli.rb +6 -0
- data/lib/mercurd/generators/feature.rb +24 -0
- data/lib/mercurd/generators/feature/feature.txt +4 -0
- data/lib/mercurd/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a99cfaae753c9624df107faa27462261fa2d51fe760a7e3464df38cc27edb6
|
4
|
+
data.tar.gz: de2f79149ed2a7b7fe8b5f56524f8f22c96d3232503903c3d28b5ee4f2bcd12e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd11b11ea4266f5e1bfaae3e1cc6e4a40d917c7909223547daef7be1e345b054b17db624d70755a0889da35cbf718275cb1744534bb357281ab2c55014824aa6
|
7
|
+
data.tar.gz: 23198f3911c95adfefcd8f0b67f6f9e5d6b78fbe7ca7b797edd36f4da0de2cb72146f15828907a1272e7156a38e2b63f2caf5a3f5ed7bfb27e3b7dc1e6ce77b6
|
data/Gemfile.lock
CHANGED
data/lib/mercurd/cli.rb
CHANGED
@@ -2,6 +2,7 @@ require 'thor'
|
|
2
2
|
|
3
3
|
require 'active_support'
|
4
4
|
require 'active_support/core_ext/object'
|
5
|
+
require 'mercurd/generators/feature'
|
5
6
|
|
6
7
|
module Mercurd
|
7
8
|
class CLI < Thor
|
@@ -31,5 +32,10 @@ module Mercurd
|
|
31
32
|
ret = `cloc #{dir}`
|
32
33
|
puts [prefix, ret].join("\n\n")
|
33
34
|
end
|
35
|
+
|
36
|
+
desc "generate [ENTITY]", "Cucumber features generator"
|
37
|
+
def generate(entity, name)
|
38
|
+
Mercurd::Generators::Feature.start([entity, name])
|
39
|
+
end
|
34
40
|
end
|
35
41
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
|
3
|
+
module Mercurd
|
4
|
+
module Generators
|
5
|
+
class Feature < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :entity, type: :string
|
9
|
+
argument :name, type: :string
|
10
|
+
|
11
|
+
def create_directory
|
12
|
+
empty_directory(entity.pluralize)
|
13
|
+
end
|
14
|
+
|
15
|
+
def copy_feature
|
16
|
+
template("feature.txt", "#{entity.pluralize}/#{name}.feature")
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.source_root
|
20
|
+
File.dirname(__FILE__) + "/feature"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/mercurd/version.rb
CHANGED
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.4.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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -174,6 +174,8 @@ files:
|
|
174
174
|
- exe/setup
|
175
175
|
- lib/mercurd.rb
|
176
176
|
- lib/mercurd/cli.rb
|
177
|
+
- lib/mercurd/generators/feature.rb
|
178
|
+
- lib/mercurd/generators/feature/feature.txt
|
177
179
|
- lib/mercurd/version.rb
|
178
180
|
- mercurd.gemspec
|
179
181
|
homepage: https://github.com/zhenyuanlau/mercurd
|