see_double 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46d3acaed94306f4a9bec8c0f506259bc75edf1648f4efe2a9af2a0a6d0c9aa5
4
- data.tar.gz: 94230fc20133fb3edb7463a161d157199e0bc3c861b8c1a4e11c0886418d88c9
3
+ metadata.gz: 233e461d113373303718470a251ed8c1476576deb01ff80b84e4274c3829887f
4
+ data.tar.gz: 6d56ecdabccbc367cd2b6276f4a3294eb3b84c8f0678ff5914c976430a7af516
5
5
  SHA512:
6
- metadata.gz: cd8aed8c68bdc3f8c4e08b995cf7c7b90e3d040c6c8f874749ec4258cdd69c0f78748cb5156aa093428619765fefcc9b8af792ec9be087545c1e49bb2fc0e0f6
7
- data.tar.gz: 4af091b518e5b4e3539471f55a79b9eb024c342b0495a83795738899a00b7691e84e755687c3fb420fb91099cf6e899e4edbdefaeba94dbe41351f3ccfed9f95
6
+ metadata.gz: f5d29ffec753a12ca08f35fbecf6ee3926c05a49580d039f027fcdeb459ee1a74d1d3e81b22772c9e42a644f163a19be246326f71c67a99a4d649f01009eb15a
7
+ data.tar.gz: 688996fcb5723e3781da1d033277923c03eea285c1d0e52f97f1f320c74c6fcbd778455906d8f85288117347cc153408a9f83acd343c22043405b88eca441397
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SeeDouble
2
2
 
3
- A small tool CLI to monitoring your FEATURE specs and check your duplication.
3
+ A small tool CLI, for Rspec Lover, to monitoring your FEATURE specs and check your duplication.
4
4
  SeeDouble go through all your specs and count the number of occurence of your 'expect'
5
5
  and 'result'.
6
6
 
@@ -21,8 +21,10 @@ Or install it yourself as:
21
21
  $ gem install see_double
22
22
 
23
23
  ## Get started
24
- Just open you terminal, go in your project and type
24
+ Just open you terminal, go in your project and type:
25
+
25
26
  `see_double expect` or `see_double result`.
27
+ (if you are facing somme issue try to prepend `bundle exec` before the commands above)
26
28
 
27
29
  An example is better than 1000 words so.. imagine you have written the following and beautiful test:
28
30
 
@@ -1,15 +1,30 @@
1
1
  require 'rails'
2
- require_relative 'check_expect'
3
2
  require 'colorize'
3
+ require_relative 'check_expect'
4
4
 
5
5
  class CheckDuplication
6
6
  class << self
7
7
  def recupere_data_from_spec(arg)
8
+ check_si_arg_est_valide(arg)
9
+ return unless mot_cles_gere_par_la_gem?(arg)
8
10
  datas = GetDataFromSpec.resultat_trie(arg)
9
11
  trie_les_expects_et_les_noms_de_fichiers(datas)
10
12
  identifie_duplication_au_sein_d_un_mm_file(datas, arg)
11
13
  end
12
14
 
15
+ def check_si_arg_est_valide(arg)
16
+ print message_erreur(arg) unless mot_cles_gere_par_la_gem?(arg)
17
+ end
18
+
19
+ def message_erreur(arg)
20
+ "Sorry we does not handle '#{arg}', feel free to make a PR about ! ;)"
21
+ end
22
+
23
+ def mot_cles_gere_par_la_gem?(mot_cle)
24
+ array = ['expect', 'result']
25
+ array.include?(mot_cle)
26
+ end
27
+
13
28
  def trie_les_expects_et_les_noms_de_fichiers(datas)
14
29
  @array_filename = []
15
30
  datas.each do |a|
@@ -1,3 +1,3 @@
1
1
  module SeeDouble
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: see_double
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clement Morisset
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: |-
70
- A small tool CLI to monitoring your FEATURE specs and check your duplication.
70
+ A small tool CLI, for Rspec lover, to monitoring your FEATURE specs and check your duplication.
71
71
  SeeDouble go through all your specs and count the number of occurence of your 'expect'
72
72
  and 'result'.
73
73
  email:
@@ -109,5 +109,5 @@ rubyforge_project:
109
109
  rubygems_version: 2.7.6
110
110
  signing_key:
111
111
  specification_version: 4
112
- summary: 'ok: Summary of SeeDouble.'
112
+ summary: Monitor your Rspec test occurence.
113
113
  test_files: []