rspec_api_blueprint 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module RspecApiBlueprint
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,8 +1,11 @@
1
1
  require "rspec_api_blueprint/version"
2
2
 
3
3
  RSpec.configure do |config|
4
- config.before(:suite) do
5
- Dir.glob(File.join(Rails.root, '/docs/', '*')).each do |f|
4
+ config.before(:all, type: :request) do
5
+ api_docs_folder_path = File.join(Rails.root, '/api_docs/')
6
+ Dir.mkdir(api_docs_folder_path) unless Dir.exists?(api_docs_folder_path)
7
+
8
+ Dir.glob(File.join(api_docs_folder_path, '*')).each do |f|
6
9
  File.delete(f)
7
10
  end
8
11
  end
@@ -21,7 +24,7 @@ RSpec.configure do |config|
21
24
  example_groups[-1][:description_args].first.match(/(\w+)\sRequests/)
22
25
  file_name = $1.underscore
23
26
 
24
- File.open(File.join(Rails.root, "/docs/#{file_name}.txt"), 'a') do |f|
27
+ File.open(File.join(Rails.root, "/api_docs/#{file_name}.txt"), 'a') do |f|
25
28
  # Resource & Action
26
29
  f.write "# #{action}\n\n"
27
30
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_api_blueprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-26 00:00:00.000000000 Z
12
+ date: 2013-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 2955463937644059294
92
+ hash: 1602726730343922702
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  segments:
100
100
  - 0
101
- hash: 2955463937644059294
101
+ hash: 1602726730343922702
102
102
  requirements: []
103
103
  rubyforge_project:
104
104
  rubygems_version: 1.8.24