foucault_http 0.4.10 → 0.4.11

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: b0c06c596cd34440fed2c6f58aaa90dcf1a857722e22e119bb5226dd9987fbc3
4
- data.tar.gz: 42cdb95c159371d5ccb1f0674d0cce670f6596294dc6a2965987d1ac18234c97
3
+ metadata.gz: 95baa7204a47a77f874aea71650797851ff1b6af319b0a4f1ad0d6aa6339572a
4
+ data.tar.gz: 56924276c49dfa71c5287fb92ffd7c95d59bcc3efa30bf348097da3758ba53ad
5
5
  SHA512:
6
- metadata.gz: 949286ae86289d4d63bf642ed2de57eb707b65f5fad6a65759ef718f8aa481b731f436d012633639fe85dbb25ab660dde835486d29681865046a68c3f561c2f9
7
- data.tar.gz: 700b65e88b60e8c7a02ba192af503e9ab9161c64a6c46e55505b60031835323cd7b89807931e1d17f42974cf190c62f5857fd8ff82517b89e6ec00662e48ee37
6
+ metadata.gz: 2cb90af2217b3a4e466f7e08c334c60a50d4029a01ce34021ec05dc3e409ca4d79fa647ebf053bf1c23df492876875b05b66aeb68cbfa4e2af9cc7912197deac
7
+ data.tar.gz: 89e9e42167d7cbd3f63c208df6aa11b77a46ca290ccb3ddfe28e4b7d3f6325a84b4f2a12440732cb3fe1bd912179cb4f346a7b59ab45e5cbc58486130f96c3e7
data/README.md CHANGED
@@ -114,6 +114,12 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
114
114
 
115
115
  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).
116
116
 
117
+ To update the gem on RubyGems:
118
+
119
+ + Update the version
120
+ + `gem build foucault_http.gemspec`
121
+ + `gem push foucault_http-v.v.v.gem`
122
+
117
123
  ## Contributing
118
124
 
119
125
  Bug reports and pull requests are welcome on GitHub at https://github.com/wildfauve/foucault_http. 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.
@@ -30,13 +30,13 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_dependency 'stoplight'
33
+ spec.add_dependency 'stoplight', "~> 2.2"
34
34
  spec.add_dependency 'dry-monads', "~> 1.0"
35
- spec.add_dependency 'dry-configurable'
36
- spec.add_dependency 'funcify'
35
+ spec.add_dependency 'dry-configurable', "~> 0.11"
36
+ spec.add_dependency 'funcify', "~> 0.4"
37
37
  spec.add_dependency 'faraday', '~> 1.0'
38
- spec.add_dependency "dry-types"
39
- spec.add_dependency "dry-struct"
38
+ spec.add_dependency "dry-types", "~> 1.4"
39
+ spec.add_dependency "dry-struct", "~> 1.3"
40
40
 
41
41
  spec.add_development_dependency "bundler", "~> 2.0"
42
42
  spec.add_development_dependency "rake", "~> 13.0"
@@ -27,9 +27,10 @@ module FoucaultHttp
27
27
 
28
28
  def post(hdrs, body)
29
29
  return @http_connection.to_result if @http_connection.failure?
30
+ return body.to_result if body.failure?
30
31
  Try {
31
32
  @http_connection.value_or.post do |r|
32
- r.body = body
33
+ r.body = body.value_or
33
34
  r.headers = hdrs
34
35
  end
35
36
  }.to_result
@@ -50,7 +50,7 @@ module FoucaultHttp
50
50
 
51
51
  def run_post
52
52
  -> hdrs, body_fn, body, connection {
53
- connection.post(hdrs, body_fn.(body))
53
+ connection.post(hdrs, Try { body_fn.(body) })
54
54
  }.curry
55
55
  end
56
56
 
@@ -82,7 +82,7 @@ module FoucaultHttp
82
82
  end
83
83
 
84
84
  def json_body_fn
85
- -> body { body.to_json }
85
+ -> body { JSON.generate(body) }
86
86
  end
87
87
 
88
88
 
@@ -1,3 +1,3 @@
1
1
  module FoucaultHttp
2
- VERSION = "0.4.10"
2
+ VERSION = "0.4.11"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foucault_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Col Perks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-19 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stoplight
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: dry-monads
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: dry-configurable
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.11'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.11'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: funcify
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '0.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '0.4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -84,30 +84,30 @@ dependencies:
84
84
  name: dry-types
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1.4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: dry-struct
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '1.3'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '1.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bundler
113
113
  requirement: !ruby/object:Gem::Requirement