govuk_content_models 43.0.0 → 43.0.1

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: f15eb0a9eef38fe905ab33a5d01ce094b4797f11
4
- data.tar.gz: cc94807990d1d85e930f640023dad9cb9e8a9541
3
+ metadata.gz: 54b7d713506a0afb97612ae9222dbbbce18e8f07
4
+ data.tar.gz: 04fe73a18bf538aa18919191dda6922b96d375fa
5
5
  SHA512:
6
- metadata.gz: ac60a959b9cc31d0061ea4ad7f85b39edfef0fba9ca9269217cbc6c642c470f1f489498e827b1e475c768625ed6ccc604ea7e33e87423cacb5fba9f87d1fae60
7
- data.tar.gz: 1ca84a731d074eb102e01ea80863dc55022d4f200ce253dd6bb2093e17b801a89b8ab7dbef067ff4cd1712ed3cd897b751d28e7fc7dd2f0a41dfde7158bf785b
6
+ metadata.gz: 87a0c5f42cb3d6536ff9a7df7681cd648e8ede6b6f79965f3d2868b6a4348a71e8a3e648ba61543249e0aef78dade031415613542939adc826cf7c199ab3d421
7
+ data.tar.gz: 4b18ffb4d9babfcd4415a15af0b0fd3a49fb1ec138ea2d91a39234a695be245ccf1f5a3136572b720c31fa7bd524c6268498ceeff968c0ed529d37f6c84488f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 43.0.1
4
+
5
+ - Expose the display_start_time of a Downtime object
6
+
3
7
  ## 43.0.0
4
8
 
5
9
  - Bump Ruby version to 2.2.3
data/Jenkinsfile ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env groovy
2
+
3
+ REPOSITORY = 'govuk_content_models'
4
+
5
+ node {
6
+ def govuk = load '/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy'
7
+
8
+ try {
9
+ stage('Checkout') {
10
+ checkout scm
11
+ }
12
+
13
+ stage('Clean') {
14
+ govuk.cleanupGit()
15
+ govuk.mergeMasterBranch()
16
+ }
17
+
18
+ stage('Bundle') {
19
+ echo 'Bundling'
20
+ sh("bundle install --path ${JENKINS_HOME}/bundles/${JOB_NAME}")
21
+ }
22
+
23
+ stage('Linter') {
24
+ govuk.rubyLinter()
25
+ }
26
+
27
+ stage('Tests') {
28
+ govuk.setEnvar('RAILS_ENV', 'test')
29
+ govuk.setEnvar('GOVUK_APP_DOMAIN', 'dev.gov.uk')
30
+ govuk.runTests()
31
+ }
32
+
33
+ if(env.BRANCH_NAME == "master") {
34
+ stage('Publish Gem') {
35
+ govuk.publishGem(REPOSITORY, env.BRANCH_NAME)
36
+ }
37
+ }
38
+
39
+ } catch (e) {
40
+ currentBuild.result = 'FAILED'
41
+ step([$class: 'Mailer',
42
+ notifyEveryUnstableBuild: true,
43
+ recipients: 'govuk-ci-notifications@digital.cabinet-office.gov.uk',
44
+ sendToIndividuals: true])
45
+ throw e
46
+ }
47
+ }
@@ -17,7 +17,11 @@ class Downtime
17
17
  end
18
18
 
19
19
  def publicise?
20
- Time.zone.now.between?(start_time.yesterday.at_midnight, end_time)
20
+ Time.zone.now.between?(display_start_time, end_time)
21
+ end
22
+
23
+ def display_start_time
24
+ start_time.yesterday.at_midnight
21
25
  end
22
26
 
23
27
  private
@@ -1,4 +1,4 @@
1
1
  module GovukContentModels
2
2
  # Changing this causes Jenkins to tag and release the gem into the wild
3
- VERSION = "43.0.0"
3
+ VERSION = "43.0.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_content_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 43.0.0
4
+ version: 43.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Battley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-01 00:00:00.000000000 Z
11
+ date: 2017-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bson_ext
@@ -317,6 +317,7 @@ files:
317
317
  - CHANGELOG.md
318
318
  - CONTRIBUTING.md
319
319
  - Gemfile
320
+ - Jenkinsfile
320
321
  - LICENSE
321
322
  - README.md
322
323
  - Rakefile
@@ -365,8 +366,6 @@ files:
365
366
  - app/validators/slug_validator.rb
366
367
  - config/mongoid.yml
367
368
  - govuk_content_models.gemspec
368
- - jenkins.sh
369
- - jenkins_branches.sh
370
369
  - lib/govuk_content_models.rb
371
370
  - lib/govuk_content_models/action_processors.rb
372
371
  - lib/govuk_content_models/action_processors/approve_fact_check_processor.rb
data/jenkins.sh DELETED
@@ -1,12 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
- rm -f Gemfile.lock
4
- bundle install --path "${HOME}/bundles/${JOB_NAME}"
5
- export GOVUK_APP_DOMAIN=dev.gov.uk
6
- bundle exec rake
7
-
8
- bundle exec govuk-lint-ruby --diff --cached --format clang app config lib test
9
-
10
- if [[ -n "$PUBLISH_GEM" ]]; then
11
- bundle exec rake publish_gem
12
- fi
data/jenkins_branches.sh DELETED
@@ -1,20 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- VENV_PATH="${HOME}/venv/${JOB_NAME}"
5
-
6
- [ -x ${VENV_PATH}/bin/pip ] || virtualenv ${VENV_PATH}
7
- . ${VENV_PATH}/bin/activate
8
-
9
- pip install -q ghtools
10
-
11
- REPO="alphagov/govuk_content_models"
12
- gh-status "$REPO" "$GIT_COMMIT" pending -d "\"Build #${BUILD_NUMBER} is running on Jenkins\"" -u "$BUILD_URL" >/dev/null
13
-
14
- if ./jenkins.sh; then
15
- gh-status "$REPO" "$GIT_COMMIT" success -d "\"Build #${BUILD_NUMBER} succeeded on Jenkins\"" -u "$BUILD_URL" >/dev/null
16
- exit 0
17
- else
18
- gh-status "$REPO" "$GIT_COMMIT" failure -d "\"Build #${BUILD_NUMBER} failed on Jenkins\"" -u "$BUILD_URL" >/dev/null
19
- exit 1
20
- fi