quintype 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +68 -0
- data/lib/quintype/api.rb +224 -0
- data/lib/quintype/api/author.rb +42 -0
- data/lib/quintype/api/stack.rb +18 -0
- data/lib/quintype/api/story.rb +119 -0
- data/lib/quintype/api/story/reading_time.rb +94 -0
- data/lib/quintype/api/url.rb +46 -0
- data/lib/quintype/engine.rb +5 -0
- data/quintype.gemspec +17 -0
- data/spec/api/stack_spec.rb +29 -0
- data/spec/api/story_spec.rb +102 -0
- data/spec/fixtures/vcr_cassettes/api_stack_all.yml +222 -0
- data/spec/fixtures/vcr_cassettes/api_stack_stories_with_params.yml +7334 -0
- data/spec/fixtures/vcr_cassettes/api_stack_with_stories.yml +6189 -0
- data/spec/fixtures/vcr_cassettes/api_stories_find_by_slug.yml +371 -0
- data/spec/fixtures/vcr_cassettes/api_stories_video.yml +67 -0
- data/spec/fixtures/vcr_cassettes/api_story_all.yml +1177 -0
- data/spec/fixtures/vcr_cassettes/api_story_find.yml +187 -0
- data/spec/fixtures/vcr_cassettes/api_story_find_by_stacks.yml +5970 -0
- data/spec/fixtures/vcr_cassettes/api_story_find_by_stacks_and_sections.yml +7115 -0
- data/spec/fixtures/vcr_cassettes/api_story_find_config.yml +406 -0
- data/spec/fixtures/vcr_cassettes/api_story_find_in_bulk.yml +186 -0
- data/spec/spec_helper.rb +110 -0
- data/spec/unit/api_spec.rb +0 -0
- metadata +28 -1
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'vcr'
|
3
|
+
require 'byebug'
|
4
|
+
require_relative '../lib/quintype/api.rb'
|
5
|
+
|
6
|
+
VCR.configure do |config|
|
7
|
+
config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
|
8
|
+
config.hook_into :webmock
|
9
|
+
config.configure_rspec_metadata!
|
10
|
+
end
|
11
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
12
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
13
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
14
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
15
|
+
# files.
|
16
|
+
#
|
17
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
18
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
19
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
20
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
21
|
+
# a separate helper file that requires the additional dependencies and performs
|
22
|
+
# the additional setup, and require it from the spec files that actually need
|
23
|
+
# it.
|
24
|
+
#
|
25
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
26
|
+
# users commonly want.
|
27
|
+
#
|
28
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
29
|
+
RSpec.configure do |config|
|
30
|
+
# rspec-expectations config goes here. You can use an alternate
|
31
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
32
|
+
# assertions if you prefer.
|
33
|
+
config.before(:all) do
|
34
|
+
API.establish_connection("http://localhost:8001")
|
35
|
+
end
|
36
|
+
|
37
|
+
config.expect_with :rspec do |expectations|
|
38
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
39
|
+
# and `failure_message` of custom matchers include text for helper methods
|
40
|
+
# defined using `chain`, e.g.:
|
41
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
42
|
+
# # => "be bigger than 2 and smaller than 4"
|
43
|
+
# ...rather than:
|
44
|
+
# # => "be bigger than 2"
|
45
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
46
|
+
end
|
47
|
+
|
48
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
49
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
50
|
+
config.mock_with :rspec do |mocks|
|
51
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
52
|
+
# a real object. This is generally recommended, and will default to
|
53
|
+
# `true` in RSpec 4.
|
54
|
+
mocks.verify_partial_doubles = true
|
55
|
+
end
|
56
|
+
|
57
|
+
# The settings below are suggested to provide a good initial experience
|
58
|
+
# with RSpec, but feel free to customize to your heart's content.
|
59
|
+
=begin
|
60
|
+
# These two settings work together to allow you to limit a spec run
|
61
|
+
# to individual examples or groups you care about by tagging them with
|
62
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
63
|
+
# get run.
|
64
|
+
config.filter_run :focus
|
65
|
+
config.run_all_when_everything_filtered = true
|
66
|
+
|
67
|
+
# Allows RSpec to persist some state between runs in order to support
|
68
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
69
|
+
# you configure your source control system to ignore this file.
|
70
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
71
|
+
|
72
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
73
|
+
# recommended. For more details, see:
|
74
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
75
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
76
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
77
|
+
config.disable_monkey_patching!
|
78
|
+
|
79
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
80
|
+
# be too noisy due to issues in dependencies.
|
81
|
+
config.warnings = true
|
82
|
+
|
83
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
84
|
+
# file, and it's useful to allow more verbose output when running an
|
85
|
+
# individual spec file.
|
86
|
+
if config.files_to_run.one?
|
87
|
+
# Use the documentation formatter for detailed output,
|
88
|
+
# unless a formatter has already been configured
|
89
|
+
# (e.g. via a command-line flag).
|
90
|
+
config.default_formatter = 'doc'
|
91
|
+
end
|
92
|
+
|
93
|
+
# Print the 10 slowest examples and example groups at the
|
94
|
+
# end of the spec run, to help surface which specs are running
|
95
|
+
# particularly slow.
|
96
|
+
config.profile_examples = 10
|
97
|
+
|
98
|
+
# Run specs in random order to surface order dependencies. If you find an
|
99
|
+
# order dependency and want to debug it, you can fix the order by providing
|
100
|
+
# the seed, which is printed after each run.
|
101
|
+
# --seed 1234
|
102
|
+
config.order = :random
|
103
|
+
|
104
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
105
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
106
|
+
# test failures related to randomization by passing the same `--seed` value
|
107
|
+
# as the one that triggered the failure.
|
108
|
+
Kernel.srand config.seed
|
109
|
+
=end
|
110
|
+
end
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quintype
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -44,7 +44,34 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- ".gitignore"
|
48
|
+
- ".rspec"
|
49
|
+
- Gemfile
|
50
|
+
- Gemfile.lock
|
47
51
|
- lib/quintype.rb
|
52
|
+
- lib/quintype/api.rb
|
53
|
+
- lib/quintype/api/author.rb
|
54
|
+
- lib/quintype/api/stack.rb
|
55
|
+
- lib/quintype/api/story.rb
|
56
|
+
- lib/quintype/api/story/reading_time.rb
|
57
|
+
- lib/quintype/api/url.rb
|
58
|
+
- lib/quintype/engine.rb
|
59
|
+
- quintype.gemspec
|
60
|
+
- spec/api/stack_spec.rb
|
61
|
+
- spec/api/story_spec.rb
|
62
|
+
- spec/fixtures/vcr_cassettes/api_stack_all.yml
|
63
|
+
- spec/fixtures/vcr_cassettes/api_stack_stories_with_params.yml
|
64
|
+
- spec/fixtures/vcr_cassettes/api_stack_with_stories.yml
|
65
|
+
- spec/fixtures/vcr_cassettes/api_stories_find_by_slug.yml
|
66
|
+
- spec/fixtures/vcr_cassettes/api_stories_video.yml
|
67
|
+
- spec/fixtures/vcr_cassettes/api_story_all.yml
|
68
|
+
- spec/fixtures/vcr_cassettes/api_story_find.yml
|
69
|
+
- spec/fixtures/vcr_cassettes/api_story_find_by_stacks.yml
|
70
|
+
- spec/fixtures/vcr_cassettes/api_story_find_by_stacks_and_sections.yml
|
71
|
+
- spec/fixtures/vcr_cassettes/api_story_find_config.yml
|
72
|
+
- spec/fixtures/vcr_cassettes/api_story_find_in_bulk.yml
|
73
|
+
- spec/spec_helper.rb
|
74
|
+
- spec/unit/api_spec.rb
|
48
75
|
homepage: http://rubygems.org/gems/quintype
|
49
76
|
licenses:
|
50
77
|
- MIT
|