notifications-ruby-client 1.1.1 → 1.1.2

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
  SHA1:
3
- metadata.gz: 526cd293f41883133d625d11f5ec463e437cd7a5
4
- data.tar.gz: a1cfba8086a71c42f4ad27830e713005d1e667d9
3
+ metadata.gz: c878b94e8c21c7ab8709764b27e242de18dccc1e
4
+ data.tar.gz: 4a3a9fad24a4b0685841bf7bfceadb05efe8339b
5
5
  SHA512:
6
- metadata.gz: 0dc3d6e520d552d4bbf162258783308f7040db46304bd493563d09e6387638a334feac1930edaa6b8d91786e3619d12dc86cc0d4ee1e2756c509c69908fcf23a
7
- data.tar.gz: 5222d707f9cb24b316466976ca2c447eeac5a4a1ee65bdc2cf105862c6d2d8fb0a03aec533f9f86e9af9897882f1210a7eebbf50cb4410e091c2bb17a3bc2de3
6
+ metadata.gz: f03bef489bf792cf544f05c457a07066fd93cdb4a80be7fa8a83fc9ecda165f19a7ddacac5095fad24b93db92d5d62bc2c31c33fbd02e536f25caa3b5bad49d7
7
+ data.tar.gz: 6702179d9bb960e7935060b87185dcc1f6eeaf77b4887e52acee009715807d0a00282fc2f52bb6cb1bfab8f3e4b2bcaecd9e55c9f756e656a493d626e78aa17b
data/Makefile CHANGED
@@ -25,7 +25,7 @@ test: ## Run tests
25
25
  .PHONY: integration-test
26
26
  integration-test: ## Run integration tests
27
27
  bundle exec bin/test_client.rb
28
-
28
+
29
29
  .PHONY: generate-env-file
30
30
  generate-env-file: ## Generate the environment file for running the tests inside a Docker container
31
31
  bin/generate_docker_env.sh
@@ -39,6 +39,11 @@ build-with-docker: prepare-docker-runner-image ## Build inside a Docker containe
39
39
  docker run -i --rm \
40
40
  --name "${DOCKER_CONTAINER_PREFIX}-build" \
41
41
  -v `pwd`:/var/project \
42
+ -e http_proxy="${HTTP_PROXY}" \
43
+ -e HTTP_PROXY="${HTTP_PROXY}" \
44
+ -e https_proxy="${HTTPS_PROXY}" \
45
+ -e HTTPS_PROXY="${HTTPS_PROXY}" \
46
+ -e NO_PROXY="${NO_PROXY}" \
42
47
  ${DOCKER_BUILDER_IMAGE_NAME} \
43
48
  make build
44
49
 
@@ -47,6 +52,11 @@ test-with-docker: prepare-docker-runner-image generate-env-file ## Run tests ins
47
52
  docker run -i --rm \
48
53
  --name "${DOCKER_CONTAINER_PREFIX}-test" \
49
54
  -v `pwd`:/var/project \
55
+ -e http_proxy="${HTTP_PROXY}" \
56
+ -e HTTP_PROXY="${HTTP_PROXY}" \
57
+ -e https_proxy="${HTTPS_PROXY}" \
58
+ -e HTTPS_PROXY="${HTTPS_PROXY}" \
59
+ -e NO_PROXY="${NO_PROXY}" \
50
60
  --env-file docker.env \
51
61
  ${DOCKER_BUILDER_IMAGE_NAME} \
52
62
  make test
@@ -56,6 +66,11 @@ integration-test-with-docker: prepare-docker-runner-image generate-env-file ## R
56
66
  docker run -i --rm \
57
67
  --name "${DOCKER_CONTAINER_PREFIX}-integration-test" \
58
68
  -v `pwd`:/var/project \
69
+ -e http_proxy="${HTTP_PROXY}" \
70
+ -e HTTP_PROXY="${HTTP_PROXY}" \
71
+ -e https_proxy="${HTTPS_PROXY}" \
72
+ -e HTTPS_PROXY="${HTTPS_PROXY}" \
73
+ -e NO_PROXY="${NO_PROXY}" \
59
74
  --env-file docker.env \
60
75
  ${DOCKER_BUILDER_IMAGE_NAME} \
61
76
  make integration-test
@@ -65,4 +80,4 @@ clean-docker-containers: ## Clean up any remaining docker containers
65
80
  docker rm -f $(shell docker ps -q -f "name=${DOCKER_CONTAINER_PREFIX}") 2> /dev/null || true
66
81
 
67
82
  clean:
68
- rm -rf vendor
83
+ rm -rf vendor
data/README.md CHANGED
@@ -40,10 +40,8 @@ sms = client.send_sms(to: number,
40
40
 
41
41
  Email:
42
42
  ```ruby
43
- email = client.send_email(to: number, template: template_id)
44
-
45
- sms = client.send_sms(
46
- to: number,
43
+ email = client.send_email(
44
+ to: email_address,
47
45
  template: template_id,
48
46
  personalisation: {
49
47
  name: "name",
@@ -1,7 +1,10 @@
1
1
  FROM ruby:2.3.1-slim
2
2
 
3
+ ARG APT_HTTP_PROXY
4
+
3
5
  RUN \
4
6
  echo "Install Debian packages" \
7
+ && ([ -z "$APT_HTTP_PROXY" ] || echo "Acquire::http::Proxy \"${APT_HTTP_PROXY}\";\n" > /etc/apt/apt.conf.d/99HttpProxy) \
5
8
  && apt-get update \
6
9
  && apt-get install -y --no-install-recommends \
7
10
  make \
@@ -7,4 +7,4 @@ help:
7
7
 
8
8
  .PHONY: build
9
9
  build:
10
- docker build --pull -t govuk/notify-ruby-client-builder .
10
+ docker build --pull -t govuk/notify-ruby-client-builder --build-arg APT_HTTP_PROXY="${HTTP_PROXY}" .
@@ -84,7 +84,7 @@ module Notifications
84
84
 
85
85
  def open(request)
86
86
  uri = URI.parse(@base_url)
87
- Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
87
+ Net::HTTP.start(uri.host, uri.port, :ENV, use_ssl: uri.scheme == 'https') do |http|
88
88
  http.request(request)
89
89
  end
90
90
  end
@@ -1,5 +1,5 @@
1
1
  module Notifications
2
2
  class Client
3
- VERSION = "1.1.1".freeze
3
+ VERSION = "1.1.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifications-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bitzesty
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-10-26 00:00:00.000000000 Z
12
+ date: 2016-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jwt