stub_requests 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e7d62b2edc2b420340c364cd8f6a8e1c46c5d2c659ed58593a58f5c115bdec9
4
- data.tar.gz: 3a6d7f55774423c44c803ff400ea2c283fef345374df7975bcdf7074f1823b67
3
+ metadata.gz: d88ecaf83ef4567bf489d1f8eb680a819f477703d2590d1b18781a7367bd60e6
4
+ data.tar.gz: 2adf0a48a25b5507d044d83498b8847fad8fc1f37be3b5f954db7b6087d4fbd3
5
5
  SHA512:
6
- metadata.gz: 66e9acdd10df02305136dc8d9e6eb7e1d686027c161912dc8b1cb0ca1fad0742b522fd1ad77c228ba9c2d8266f87ee35b67650683370076ecd70fef0f49d633f
7
- data.tar.gz: e3c35f1c1c4a6e60217566b3c4d8759796d3089d057717a904ebfc4a4b4a8fa961d48bd133ce6fd6426b1cc2371afbb3a38dfc926104bf1d7c90de335132962d
6
+ metadata.gz: 983ab88481db1918b42fd3bca46f5fdc07690f7e501548c1ef71e7702e094f0c57177f8a257043219f1310b31fb17b30ea9c657fbfdd6855ffe9946c80451135
7
+ data.tar.gz: 4bbad922db8034a7a533e2a98387c046d2b23495f163cba9eb63b7f46e606c7a1f02f723b0948e015734276d08590fc15ee94ff48598fcdb71a48510e38e578c
@@ -1,5 +1,16 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.7](https://github.com/mhenrixon/stub_requests/tree/v0.1.7) (2019-02-07)
4
+ [Full Changelog](https://github.com/mhenrixon/stub_requests/compare/v0.1.6...v0.1.7)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Don't crash when service was registered [\#25](https://github.com/mhenrixon/stub_requests/pull/25) ([mhenrixon](https://github.com/mhenrixon))
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Update Changelog [\#24](https://github.com/mhenrixon/stub_requests/pull/24) ([mhenrixon](https://github.com/mhenrixon))
13
+
3
14
  ## [v0.1.6](https://github.com/mhenrixon/stub_requests/tree/v0.1.6) (2019-02-06)
4
15
  [Full Changelog](https://github.com/mhenrixon/stub_requests/compare/v0.1.5...v0.1.6)
5
16
 
data/README.md CHANGED
@@ -154,16 +154,13 @@ StubRequests.register_service(:documents, "https://company.com/api/v1") do
154
154
  post "documents", as: :documents_create
155
155
  patch "documents/:id", as: :documents_update
156
156
  put "documents/:id", as: :document_put
157
- delete "documents/:id" as: :documents_destroy
157
+ delete "documents/:id", as: :documents_destroy
158
158
  end
159
159
 
160
160
  #
161
161
  # 2. Create a module where the methods should be defined
162
162
  #
163
- module Stubs
164
- module Documents
165
- end
166
- end
163
+ module Stubs::Documents; end
167
164
 
168
165
  #
169
166
  # 3. Define the stubs for the registered endpoints
@@ -171,14 +168,14 @@ end
171
168
  StubRequests::DSL.define_stubs(:documents, Stubs::Documents)
172
169
 
173
170
  Documents.instance_methods #=>
174
- [
175
- :stub_documents_show
176
- :stub_documents_index
177
- :stub_documents_create
178
- :stub_documents_update
179
- :stub_document_put
180
- :stub_documents_destroy
181
- ]
171
+ [
172
+ :stub_documents_show,
173
+ :stub_documents_index,
174
+ :stub_documents_create,
175
+ :stub_documents_update,
176
+ :stub_document_put,
177
+ :stub_documents_destroy,
178
+ ]
182
179
 
183
180
  #
184
181
  # 4. Use the module in our tests
@@ -229,7 +226,7 @@ end
229
226
  #
230
227
  # 2. Print the stub definitions to STDOUT
231
228
  #
232
- StubRequests.print_stubs(:documents) #=>
229
+ StubRequests.print_stubs(:documents)
233
230
 
234
231
  #
235
232
  # 3. Copy the stubs into a module
data/Rakefile CHANGED
@@ -21,7 +21,8 @@ end
21
21
  task default: :spec
22
22
 
23
23
  task :release do
24
- sh("gem bump --tag --release --push")
25
- sh("./update_docs.sh")
24
+ sh("gem release --tag --push")
26
25
  Rake::Task["changelog"].invoke
26
+ sh("./update_docs.sh")
27
+ sh("gem bump")
27
28
  end
@@ -26,7 +26,7 @@ class NilClass
26
26
  # :nodoc:
27
27
  def blank?
28
28
  true
29
- end
29
+ end unless method_defined?(:blank?)
30
30
  end
31
31
 
32
32
  # @see FalseClass
@@ -35,7 +35,7 @@ class FalseClass
35
35
  # :nodoc:
36
36
  def blank?
37
37
  true
38
- end
38
+ end unless method_defined?(:blank?)
39
39
  end
40
40
 
41
41
  # @see TrueClass
@@ -44,31 +44,31 @@ class TrueClass
44
44
  # :nodoc:
45
45
  def blank?
46
46
  false
47
- end
47
+ end unless method_defined?(:blank?)
48
48
  end
49
49
 
50
50
  # @see Array
51
51
  # :nodoc:
52
52
  class Array
53
53
  # :nodoc:
54
- alias blank? empty?
54
+ alias blank? empty? unless method_defined?(:blank?)
55
55
  end
56
56
 
57
57
  # @see Hash
58
58
  # :nodoc:
59
59
  class Hash
60
60
  # :nodoc:
61
- alias blank? empty?
61
+ alias blank? empty? unless method_defined?(:blank?)
62
62
  end
63
63
 
64
64
  # @see String
65
65
  class String
66
66
  # :nodoc:
67
67
  # :nodoc:
68
- BLANK_RE = /\A[[:space:]]*\z/.freeze
68
+ BLANK_RE ||= /\A[[:space:]]*\z/.freeze
69
69
  # :nodoc:
70
70
  # :nodoc:
71
- ENCODED_BLANKS = Concurrent::Map.new do |map, enc|
71
+ ENCODED_BLANKS ||= Concurrent::Map.new do |map, enc|
72
72
  map[enc] = Regexp.new(BLANK_RE.source.encode(enc), BLANK_RE.options | Regexp::FIXEDENCODING)
73
73
  end
74
74
 
@@ -91,7 +91,7 @@ class String
91
91
  !!ENCODED_BLANKS[encoding].match(self)
92
92
  end
93
93
  end
94
- end
94
+ end unless method_defined?(:blank?)
95
95
  end
96
96
 
97
97
  # @see Numeric
@@ -100,7 +100,7 @@ class Numeric
100
100
  # :nodoc:
101
101
  def blank?
102
102
  false
103
- end
103
+ end unless method_defined?(:blank?)
104
104
  end
105
105
 
106
106
  # @see Time
@@ -109,5 +109,5 @@ class Time
109
109
  # :nodoc:
110
110
  def blank?
111
111
  false
112
- end
112
+ end unless method_defined?(:blank?)
113
113
  end
@@ -9,5 +9,5 @@
9
9
  module StubRequests
10
10
  #
11
11
  # @return [String] a version string
12
- VERSION = "0.1.7"
12
+ VERSION = "0.1.8"
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stub_requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson