fictium 0.3.6 → 0.4

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: 2f0eace448621c4f1f18d5ca332b484971bc7c7e331072007ca42159c6fa7054
4
- data.tar.gz: 8989a53b0173af50de555cce3a6df2402b687e8ca3b41a0f4b372da3ea1da17f
3
+ metadata.gz: abb23f9ae6488365b514b80f6cc2c23aef50fb4e4d20ffe23183d9b18d562155
4
+ data.tar.gz: 3739c58b555069e051f1f932aa7fd446db0eec591e350512ab22706376cfb484
5
5
  SHA512:
6
- metadata.gz: 93b8f6e426710c635d9b8294d63ca93b7e4475fee4106f92018bf101c258cebf05662f6776cd2e51ea56f774d5d60d3b7ddc9bddc4dca777484d7ec9b7b339d8
7
- data.tar.gz: a419afbf96427c24a898f2e1e469989ae2eebd6d7580adb74a4092e502d7e63d8c7801678222f2af41d957d033c96b81c91d18fa7e41dbfc7b3c08027df111ea
6
+ metadata.gz: c0eff8c382ebe9954fe1ef600f5fb1ab2ef4cc44fa1f4ca2aa0909359978d4479c9c18b072a93d7f9ddff1d10635b2aba79c532c9f543b26e3f33d57aecc3f8f
7
+ data.tar.gz: e52b5936e1b76290b3d09d150c6f7c5668c1d0a9d7ff1fc073e00d599ffa1b633139a59a3a6b25b2e09ed51a9657f02b11ad7f9df0c7a0dd76671fbffd4972c4
@@ -17,6 +17,14 @@
17
17
 
18
18
  ## LOG
19
19
 
20
+ ### 0.4.0 (2019-11-28)
21
+
22
+ Error messages
23
+
24
+ #### Changes
25
+
26
+ - Now the gem will check the configuration before running and give some nice error messages.
27
+
20
28
  ### 0.3.6 (2019-11-21)
21
29
 
22
30
  Small fixes
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fictium (0.3.6)
4
+ fictium (0.4)
5
5
  activesupport (>= 5.1, < 6.2)
6
6
  json-schema (~> 2.8)
7
7
  verbs (~> 2.1.4)
data/README.md CHANGED
@@ -68,7 +68,8 @@ To configure how this gem completes your documentation, you have some configurat
68
68
 
69
69
  ### RSpec Integration
70
70
 
71
- Just `require 'fictium/rspec'` in your spec helper and your RSpec test will include everything you need to work in your environment.
71
+ Just `require 'fictium/rspec'` in your rails helper and your RSpec test will include everything you need to work in your environment.
72
+ (be aware, the current version requires Rails to be previously loaded to work).
72
73
 
73
74
  At any test of type: :controller, you can just add the following helpers:
74
75
 
@@ -25,5 +25,23 @@ module Fictium
25
25
  def configure
26
26
  yield configuration
27
27
  end
28
+
29
+ def validate_config!
30
+ raise missing_fixtures if configuration.fixture_path.blank?
31
+ end
32
+
33
+ private
34
+
35
+ def missing_fixtures
36
+ <<~HEREDOC
37
+ Fictium requires to configure your fixture_path first in order to run Fictium.
38
+
39
+ Add the following lines into your rails_helper.rb:
40
+
41
+ Fictium.configure do |config|
42
+ config.fixture_path = File.join(__dir__, 'support', 'docs')
43
+ end
44
+ HEREDOC
45
+ end
28
46
  end
29
47
  end
@@ -33,6 +33,7 @@ RSpec.configure do |config|
33
33
  config.include Fictium::RSpec::Examples, fictium_example: true
34
34
 
35
35
  config.after(:suite) do
36
+ Fictium.validate_config!
36
37
  Fictium::RSpec.document.export
37
38
  end
38
39
  end
@@ -1,3 +1,5 @@
1
+ defined?(Rails) || raise('Rails is required to be loaded before "fictium/rspec" is required.')
2
+
1
3
  module Fictium
2
4
  module RSpec
3
5
  module Autocomplete
@@ -1,5 +1,5 @@
1
1
  module Fictium
2
- VERSION = '0.3.6'.freeze
2
+ VERSION = '0.4'.freeze
3
3
  RAILS_MIN_VERSION = '>= 5.1'.freeze
4
4
  RAILS_MAX_VERSION = '< 6.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fictium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramiro Rojo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2019-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport