rspec_request_helpers 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3eba98c737fc0c7dbc0130ec73ddd1deb055a48d397dc6ee4ae032b212e5ef54
4
+ data.tar.gz: 90bd7b0a2381787c347a7f7801d3d938128d998f28ab0c93d719e0e953f5a1c0
5
+ SHA512:
6
+ metadata.gz: 6c34033fa3c65d19c0fda02c94b0d7f2a5c27fdd7354ddb98aefcba968a4118f3d9911ac1b14282c19071f45924408dcb22b706d961b8f62228f9e987731fe87
7
+ data.tar.gz: 19c1496ee81d7d130de16fa7cf6a8c1b7588894d2259f00874570673c41045d024f976bafbc3d308c0d63168349d8a2ed0b0f92254d13bdd4c1cdc55d5eacb05
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .DS_Store
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.9
5
+ before_install: gem install bundler -v 1.16.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at andriy.baran.v@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in rspec_request_helpers.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,94 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rspec_request_helpers (0.1.0)
5
+ actionpack (>= 3.0)
6
+ activesupport (>= 3.0)
7
+ rack (~> 2.0)
8
+ railties (>= 3.0)
9
+ rspec (~> 3.0)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actionpack (5.2.0)
15
+ actionview (= 5.2.0)
16
+ activesupport (= 5.2.0)
17
+ rack (~> 2.0)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
+ actionview (5.2.0)
22
+ activesupport (= 5.2.0)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
27
+ activesupport (5.2.0)
28
+ concurrent-ruby (~> 1.0, >= 1.0.2)
29
+ i18n (>= 0.7, < 2)
30
+ minitest (~> 5.1)
31
+ tzinfo (~> 1.1)
32
+ builder (3.2.3)
33
+ coderay (1.1.2)
34
+ concurrent-ruby (1.0.5)
35
+ crass (1.0.4)
36
+ diff-lcs (1.3)
37
+ erubi (1.7.1)
38
+ i18n (1.0.1)
39
+ concurrent-ruby (~> 1.0)
40
+ loofah (2.2.2)
41
+ crass (~> 1.0.2)
42
+ nokogiri (>= 1.5.9)
43
+ method_source (0.9.0)
44
+ mini_portile2 (2.3.0)
45
+ minitest (5.11.3)
46
+ nokogiri (1.8.3)
47
+ mini_portile2 (~> 2.3.0)
48
+ pry (0.11.3)
49
+ coderay (~> 1.1.0)
50
+ method_source (~> 0.9.0)
51
+ rack (2.0.5)
52
+ rack-test (1.0.0)
53
+ rack (>= 1.0, < 3)
54
+ rails-dom-testing (2.0.3)
55
+ activesupport (>= 4.2.0)
56
+ nokogiri (>= 1.6)
57
+ rails-html-sanitizer (1.0.4)
58
+ loofah (~> 2.2, >= 2.2.2)
59
+ railties (5.2.0)
60
+ actionpack (= 5.2.0)
61
+ activesupport (= 5.2.0)
62
+ method_source
63
+ rake (>= 0.8.7)
64
+ thor (>= 0.18.1, < 2.0)
65
+ rake (10.5.0)
66
+ rspec (3.7.0)
67
+ rspec-core (~> 3.7.0)
68
+ rspec-expectations (~> 3.7.0)
69
+ rspec-mocks (~> 3.7.0)
70
+ rspec-core (3.7.1)
71
+ rspec-support (~> 3.7.0)
72
+ rspec-expectations (3.7.0)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.7.0)
75
+ rspec-mocks (3.7.0)
76
+ diff-lcs (>= 1.2.0, < 2.0)
77
+ rspec-support (~> 3.7.0)
78
+ rspec-support (3.7.1)
79
+ thor (0.20.0)
80
+ thread_safe (0.3.6)
81
+ tzinfo (1.2.5)
82
+ thread_safe (~> 0.1)
83
+
84
+ PLATFORMS
85
+ ruby
86
+
87
+ DEPENDENCIES
88
+ bundler (~> 1.16)
89
+ pry
90
+ rake (~> 10.0)
91
+ rspec_request_helpers!
92
+
93
+ BUNDLED WITH
94
+ 1.16.1
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Andrii Baran
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Rspec Request Helpers
2
+
3
+ This gem provides few tools to make testing of API endpoint in your Rails application more effective.
4
+ This rules were influenced by real projects experience so
5
+ In order to use it in your `rspec/requests` specs you need to follow one rule:
6
+
7
+ For every test example you need to define `path`, `valid_headers`, `valid_params`, and `valid_response`.
8
+
9
+ So what you'll got for that? Few handy methods for the testing routine
10
+
11
+ * `do_get`, `do_post`, `do_put`, `do_delete`, `do_patch` shorthands for sending appropriate requests.
12
+ * `assert_201_json`, `assert_404_xml`, `assert_422_json` etc. shorthands for asserting content type and HTTP status code only. This methods are generated depends on configuration defined in `config/initializers/rspec_request_helpers.rb`.
13
+ * `assert_201_json_response_body`, `assert_422_json_responce_body` etc. shorthands for asserting content type, HTTP status code and if parsed body of the response is equal to `valid_response`.
14
+ * `assert_201_json_response_object`, `assert_422_json_responce_body` etc. same as previous assert specific attribute rather than whole response body.
15
+ * one lined form for simple examples `do_post_and_assert_201_json_response_body`
16
+
17
+ ## Installation
18
+
19
+ Add this line to your application's Gemfile:
20
+
21
+ ```ruby
22
+ gem 'rspec_request_helpers'
23
+ ```
24
+
25
+ And then execute:
26
+
27
+ $ bundle
28
+
29
+ Or install it yourself as:
30
+
31
+ $ gem install rspec_request_helpers
32
+
33
+ In project directory run
34
+
35
+ $ rails g rspec_request_helpers:install
36
+
37
+ ## Usage
38
+
39
+ Include helpers into RSpec
40
+
41
+ ```ruby
42
+ # spec/rails_helper.rb
43
+
44
+ RSpec.configure do |config|
45
+ config.include RspecRequestHelpers
46
+
47
+ # This will tell RSpec to collect all failures in test example
48
+ config.define_derived_metadata do |meta|
49
+ meta[:aggregate_failures] = true if meta[:type] == :request
50
+ end
51
+ end
52
+ ```
53
+
54
+ Generate new file for API endpoint
55
+
56
+ $ rails g rspec:endpoint show api/v1/users
57
+
58
+ ## Development
59
+
60
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
61
+
62
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
63
+
64
+ ## Contributing
65
+
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/andriy-baran/rspec_request_helpers. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
67
+
68
+ ## License
69
+
70
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
71
+
72
+ ## Code of Conduct
73
+
74
+ Everyone interacting in the RspecRequestHelpers project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/andriy-baran/rspec_request_helpers/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "rspec_request_helpers"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Generate a spec/requests file for specified action of controller
3
+
4
+ Example:
5
+ rails generate rspec:endpoint create users
6
+
7
+ This will create:
8
+ create_spec.rb in spec/requests/users directory
@@ -0,0 +1,34 @@
1
+ module Rspec
2
+ class EndpointGenerator < Rails::Generators::NamedBase
3
+ desc 'Generate a spec/requests file for specified action of controller'
4
+
5
+ argument :controller, type: :string, required: true, banner: 'CONTOLLER'
6
+
7
+ source_root File.expand_path('../templates', __FILE__)
8
+
9
+ # https://www.rubytapas.com/2012/11/28/episode-029-redirecting-output/
10
+ def capture_output
11
+ fake_stdout = StringIO.new
12
+ old_stdout = $stdout
13
+ $stdout = fake_stdout
14
+ yield
15
+ ensure
16
+ $stdout = old_stdout
17
+ return fake_stdout.string
18
+ end
19
+
20
+ def copy_files
21
+ Rails.application.load_tasks
22
+ routes = capture_output { Rake::Task['routes'].invoke }
23
+ @route = routes.split("\n").grep(Regexp.new "#{controller}##{file_name}").first || raise("#{controller}##{file_name} not found in routes")
24
+ @http_verb = @route[/GET|POST|DELETE|PUT|PATCH/]
25
+ @path = @route[/(\/.*)\(/, 1]
26
+ @path_params = @path.split('/').select{|i| i[/:/]}
27
+ @path_params.each do |param|
28
+ @path.sub!(param, '#{' + param[1..-1] + '}')
29
+ end
30
+ empty_directory "spec/requests/#{controller}"
31
+ template 'action_request_spec.rb', "spec/requests/#{controller}/#{file_name}_spec.rb"
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,17 @@
1
+ RSpec.describe '', type: :request do
2
+ <% @path_params.each do |param| %>
3
+ <%= "let(#{param}) { #{rand(99..500)} }" %>
4
+ <% end %>
5
+ let(:path) { "<%= @path %>" }
6
+ let(:valid_headers) { {} }
7
+ let(:valid_params) { {} }
8
+ let(:valid_response) { {} }
9
+
10
+ describe '<%= @http_verb.upcase %> <%= controller %>#<%= file_name %>' do
11
+ context '' do
12
+ xit 'renders correct response' do
13
+ do_<%= @http_verb.downcase %>
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ module RspecRequestHelpers
2
+ class InstallGenerator < Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+
5
+ def copy_files
6
+ template 'default_configuration.rb', 'config/initializers/rspec_request_helpers.rb'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ RspecRequestHelpers.configure do |config|
2
+ # Responces content type and shorthand as key
3
+ # The key will be used for the generation of helpers names
4
+ config.content_types = { json: 'application/json' }
5
+
6
+ # Array of supported status codes
7
+ config.status_codes = [404, 401, 422, 200, 201, 403]
8
+ end
@@ -0,0 +1,17 @@
1
+ module RspecRequestHelpers
2
+ class Configuration
3
+ attr_accessor :content_types, :status_codes
4
+
5
+ def initialize
6
+ @content_types = { json: 'application/json' }
7
+ @status_codes = [404, 401, 422, 200, 201]
8
+ end
9
+
10
+ def symbols_with_status_codes
11
+ status_codes.inject({}) do |hash, code|
12
+ hash[STATUS_CODE_TO_SYMBOL[code]] = code
13
+ hash
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,72 @@
1
+ module RspecRequestHelpers
2
+ module Helpers
3
+ def object(hash)
4
+ OpenStruct.new(hash)
5
+ end
6
+
7
+ def parse_json(json_data)
8
+ JSON.parse(json_data, symbolize_names: true)
9
+ end
10
+
11
+ def response_body
12
+ JSON.parse(response.body, symbolize_names: true)
13
+ end
14
+
15
+ def response_object
16
+ OpenStruct.new(responce_body)
17
+ end
18
+
19
+ def response_objects
20
+ JSON.parse(response.body, object_class: OpenStruct)
21
+ end
22
+
23
+ def assert_body
24
+ expect(response.body).to eq valid_response
25
+ end
26
+
27
+ def assert_response_object
28
+ expect(response_object).to have_attributes(valid_response)
29
+ end
30
+
31
+ def assert_response_body
32
+ expect(response_body).to eq(valid_response)
33
+ end
34
+
35
+ def self.generate_helpers
36
+ %i(get post put patch delete).each do |http_verb|
37
+ define_method :"do_#{http_verb}" do
38
+ if Rails::VERSION::MAJOR >= 5
39
+ public_send(http_verb, path, params: valid_params, headers: valid_headers)
40
+ else
41
+ public_send(http_verb, path, valid_params, valid_headers)
42
+ end
43
+ end
44
+
45
+ RspecRequestHelpers.configuration.content_types.each do |type, mime_type|
46
+ RspecRequestHelpers.configuration.symbols_with_status_codes.each do |status, code|
47
+ %i(body response_object response_body).each do |resp_assertion|
48
+ define_method :"assert_#{code}_#{type}" do
49
+ expect(response).to have_http_status(status)
50
+ expect(response.content_type).to eq mime_type
51
+ end
52
+
53
+ define_method :"assert_#{code}_#{type}_#{resp_assertion}" do
54
+ public_send(:"assert_#{code}_#{type}")
55
+ public_send(:"assert_#{resp_assertion}")
56
+ end
57
+
58
+ define_method :"do_#{http_verb}_and_assert_#{code}_#{type}_#{resp_assertion}" do
59
+ public_send(:"do_#{http_verb}")
60
+ public_send(:"assert_#{code}_#{type}_#{resp_assertion}")
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ class << self
69
+ alias_method :regenerate_helpers, :generate_helpers
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,3 @@
1
+ module RspecRequestHelpers
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,37 @@
1
+ require 'rspec_request_helpers/version'
2
+ require 'rspec_request_helpers/configuration'
3
+ require 'rspec_request_helpers/helpers'
4
+ require 'rack'
5
+ require 'pry'
6
+
7
+ module RspecRequestHelpers
8
+ SYMBOL_TO_STATUS_CODE = Rack::Utils::SYMBOL_TO_STATUS_CODE
9
+ STATUS_CODE_TO_SYMBOL =
10
+ SYMBOL_TO_STATUS_CODE.inject({}) do |hash, (symbol, code)|
11
+ hash[code] = symbol
12
+ hash
13
+ end
14
+
15
+ class << self
16
+ attr_accessor :configuration
17
+ end
18
+
19
+ def self.configuration
20
+ @configuration ||= Configuration.new
21
+ end
22
+
23
+ def self.reset
24
+ @configuration = Configuration.new
25
+ end
26
+
27
+ def self.configure
28
+ yield(configuration)
29
+ Helpers.regenerate_helpers
30
+ end
31
+
32
+ def self.included(receiver)
33
+ Helpers.generate_helpers
34
+ receiver.send :include, Helpers
35
+ end
36
+ end
37
+
@@ -0,0 +1,45 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "rspec_request_helpers/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rspec_request_helpers"
8
+ spec.version = RspecRequestHelpers::VERSION
9
+ spec.authors = ["Andrii Baran"]
10
+ spec.email = ["andriy.baran.v@gmail.com"]
11
+
12
+ spec.summary = %q{A set of helpers for request test with RSpec}
13
+ spec.homepage = "https://github.com/andriy-baran/rspec_request_helpers"
14
+ spec.license = "MIT"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = 'https://rubygems.org'
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+ spec.required_ruby_version = '>= 2.2.2'
32
+
33
+ version_string = ['>= 3.0']
34
+
35
+ spec.add_runtime_dependency 'activesupport', version_string
36
+ spec.add_runtime_dependency 'actionpack', version_string
37
+ spec.add_runtime_dependency 'railties', version_string
38
+
39
+ spec.add_dependency "rspec", "~> 3.0"
40
+ spec.add_dependency "rack", "~> 2.0"
41
+
42
+ spec.add_development_dependency "bundler", "~> 1.16"
43
+ spec.add_development_dependency "rake", "~> 10.0"
44
+ spec.add_development_dependency "pry"
45
+ end
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_request_helpers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrii Baran
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-06-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: actionpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: railties
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rack
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '2.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.16'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.16'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '10.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '10.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description:
126
+ email:
127
+ - andriy.baran.v@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - ".travis.yml"
135
+ - CODE_OF_CONDUCT.md
136
+ - Gemfile
137
+ - Gemfile.lock
138
+ - LICENSE
139
+ - README.md
140
+ - Rakefile
141
+ - bin/console
142
+ - bin/setup
143
+ - lib/generators/rspec/endpoint/USAGE
144
+ - lib/generators/rspec/endpoint/endpoint_generator.rb
145
+ - lib/generators/rspec/endpoint/templates/action_request_spec.rb
146
+ - lib/generators/rspec_request_helpers/install/install_generator.rb
147
+ - lib/generators/rspec_request_helpers/install/templates/default_configuration.rb
148
+ - lib/rspec_request_helpers.rb
149
+ - lib/rspec_request_helpers/configuration.rb
150
+ - lib/rspec_request_helpers/helpers.rb
151
+ - lib/rspec_request_helpers/version.rb
152
+ - rspec_request_helpers.gemspec
153
+ homepage: https://github.com/andriy-baran/rspec_request_helpers
154
+ licenses:
155
+ - MIT
156
+ metadata:
157
+ allowed_push_host: https://rubygems.org
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: 2.2.2
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ requirements: []
173
+ rubyforge_project:
174
+ rubygems_version: 2.7.6
175
+ signing_key:
176
+ specification_version: 4
177
+ summary: A set of helpers for request test with RSpec
178
+ test_files: []