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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31bb7cfda33ee4156d857b26343cb1c64205222d15b24fb30fc391c79cec069f
4
- data.tar.gz: caabaa30ab27c0447241e2bf1ef0cea098d9db9be7c334ed3ac3a31884de745d
3
+ metadata.gz: 62a99cfaae753c9624df107faa27462261fa2d51fe760a7e3464df38cc27edb6
4
+ data.tar.gz: de2f79149ed2a7b7fe8b5f56524f8f22c96d3232503903c3d28b5ee4f2bcd12e
5
5
  SHA512:
6
- metadata.gz: 48ed938ebe583363e2f095b485ed0acf63c8a3dcd1f1eeceed95d3d135547b7c01a9949bb1eeb4f445b289a90284876fa1902729dc6a151650cc04b56bd54298
7
- data.tar.gz: 4435984ff5e7d54efbb37e0c0cf69c48a982b20799393487425ce2232cd45a7cfd7e0fc404251816fd7f154619c549b6655e79551ed3f759a8741b98196ae1b1
6
+ metadata.gz: dd11b11ea4266f5e1bfaae3e1cc6e4a40d917c7909223547daef7be1e345b054b17db624d70755a0889da35cbf718275cb1744534bb357281ab2c55014824aa6
7
+ data.tar.gz: 23198f3911c95adfefcd8f0b67f6f9e5d6b78fbe7ca7b797edd36f4da0de2cb72146f15828907a1272e7156a38e2b63f2caf5a3f5ed7bfb27e3b7dc1e6ce77b6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mercurd (0.3.0)
4
+ mercurd (0.4.0)
5
5
  activesupport
6
6
  thor
7
7
 
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
@@ -0,0 +1,4 @@
1
+ Feature: <feature name>
2
+ As a <user or stakeholder type>
3
+ I want <some software feature>
4
+ So that <some business value>
@@ -1,3 +1,3 @@
1
1
  module Mercurd
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  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.3.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-14 00:00:00.000000000 Z
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