health_check 1.7.1 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -8,6 +8,7 @@ before_install:
8
8
  - gem update --system $RUBYGEMS_VERSION
9
9
  - gem --version
10
10
  - gem install bundler ${BUNDLER_VERSION:+-v} ${BUNDLER_VERSION}
11
+ - gem install smarter_bundler
11
12
  - bundle --version
12
13
  - bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} --version
13
14
  - mkdir -p tmp/bundle
data/CHANGELOG CHANGED
@@ -1,6 +1,11 @@
1
1
  = Change Log =
2
2
 
3
- * pre_rails4 branch
3
+ * rails3 branch
4
+
5
+ *1.7.2
6
+ * Change to using smarter_bundler to improve test robustness and pin gems that have newer versions with imcompatibilities
7
+ * Depends on railties rather than rails so it can be used with trimmed down stacks
8
+ * Cleanup test code
4
9
  *1.7.1
5
10
  * Restricted sass version for ruby 1.9.7 compatibility
6
11
  * Added Vgrantfile for easier testing
data/README.rdoc CHANGED
@@ -1,13 +1,11 @@
1
- = health_check gem (pre_rails4 branch)
1
+ = health_check gem (rails3 branch)
2
2
 
3
- Simple health check of Rails app for use with Pingdom, NewRelic, EngineYard or uptime.openacs.org etc.
3
+ Simple health check of Rails 3.x apps for use with Pingdom, NewRelic, EngineYard or uptime.openacs.org etc.
4
4
 
5
- Use
6
- * {pre_rails4}[https://github.com/ianheggie/health_check/tree/pre_rails4] branch or gem versions ~> 1.7 for Rails 3.*
7
- * {master}[https://github.com/ianheggie/health_check/tree/master] branch or gem versions >= 2.0 for Rails 4.0+
8
- * {rails2.3}[https://github.com/ianheggie/health_check/tree/rails2.3] branch or gem versions ~> 1.6.1 for Rails 2.3.*
5
+ The basic goal is to quickly check that rails is up and running and that it has access to correctly configured resources (database, email gateway).
9
6
 
10
- The basic goal is to quickly check that rails is up and running and that it has access to correctly configured resources (database, email gateway)
7
+ Check the latest README {master}[https://github.com/ianheggie/health_check/tree/master] for other rails versions.
8
+ Consider using {RAILS LTS 3.2}[https://railslts.com/] rather than the unsupported 3.x versions.
11
9
 
12
10
  health_check provides various monitoring URIs, for example:
13
11
 
@@ -50,7 +48,7 @@ Specify full or include email in the list of checks to verify the smtp settings
50
48
 
51
49
  Add the following line to Gemfile
52
50
 
53
- gem "health_check"
51
+ gem "health_check", "~> 1.7"
54
52
 
55
53
  And then execute
56
54
 
@@ -58,7 +56,7 @@ And then execute
58
56
 
59
57
  Or install it yourself as:
60
58
 
61
- gem install health_check
59
+ gem install --version '~> 1.7' health_check
62
60
 
63
61
  == Configuration
64
62
 
@@ -180,7 +178,7 @@ See https://github.com/ianheggie/health_check/wiki/Ajax-Example for an Ajax exam
180
178
 
181
179
  === Automated testing
182
180
 
183
- * {<img src="https://travis-ci.org/ianheggie/health_check.svg?branch=pre_rails4">}[https://travis-ci.org/ianheggie/health_check.svg?branch=pre_rails4] - Travis CI
181
+ * {<img src="https://travis-ci.org/ianheggie/health_check.svg?branch=rails3">}[https://travis-ci.org/ianheggie/health_check.svg?branch=rails3] - Travis CI
184
182
 
185
183
  === Manual testing
186
184
 
data/health_check.gemspec CHANGED
@@ -20,7 +20,9 @@ Gem::Specification.new do |gem|
20
20
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
21
  gem.extra_rdoc_files = [ "README.rdoc" ]
22
22
  gem.require_paths = ["lib"]
23
- gem.add_dependency(%q<rails>, ['~> 3.0'])
23
+ gem.required_ruby_version = '>= 1.8.7'
24
+ gem.add_dependency(%q<railties>, ['~> 3.0'])
25
+ gem.add_development_dependency(%q<smarter_bundler>, [">= 0.1.0"])
24
26
  gem.add_development_dependency(%q<rake>, [">= 0.8.3", "< 11.0"])
25
27
  gem.add_development_dependency(%q<shoulda>, ["~> 2.11.0"])
26
28
  gem.add_development_dependency(%q<bundler>, ["~> 1.2"])
@@ -1,4 +1,4 @@
1
1
  module HealthCheck
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
4
4
 
@@ -3,7 +3,7 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  gem 'rails', "~> 3.2.0"
6
- gem 'rake', '>= 0.8.3'
6
+ gem 'rake', '>= 0.8.3', '< 11.0' # REQUIRED
7
7
 
8
8
  group :development, :test do
9
9
  if defined?(JRUBY_VERSION)
@@ -25,3 +25,6 @@ gem 'rack', "< 2.0" if RUBY_VERSION < '2.2.2' # REQUIRED
25
25
  # Initial Gemfile has therubyracer commented out
26
26
  gem 'therubyrhino', :platform => :jruby # REQUIRED
27
27
  gem 'therubyracer', :platform => :ruby # REQUIRED
28
+
29
+ # Pin gems to avoid incompatible versions
30
+ gem 'sass', '< 3.5.0' # REQUIRED
data/test/setup_railsapp CHANGED
@@ -45,7 +45,7 @@ else
45
45
  fi
46
46
 
47
47
  echo "Running bundle with BUNDLE_GEMFILE=$BUNDLE_GEMFILE ..."
48
- if ! bundle install ; then
48
+ if ! smarter_bundle ; then
49
49
  echo "Test aborted (missing required gems)"
50
50
  exit 2
51
51
  else
@@ -84,7 +84,7 @@ echo Set GEM_PATH=$GEM_PATH
84
84
  case "$BUNDLE_GEMFILE" in
85
85
  *_lts*)
86
86
  echo "Re-running bundle with changed GEM_PATH (required by git install of rails lts) ..."
87
- if ! bundle install ; then
87
+ if ! smarter_bundle ; then
88
88
  echo "Test aborted (missing required gems)"
89
89
  exit 2
90
90
  else
@@ -170,72 +170,62 @@ echo Unsetting BUNDLE_GEMFILE '(so Gemfile for rails application will be used)'
170
170
  INITIAL_BUNDLE_GEMFILE=$BUNDLE_GEMFILE
171
171
  unset BUNDLE_GEMFILE
172
172
 
173
- if [ -s Gemfile ]
173
+ if [ ! -s Gemfile ]
174
174
  then
175
- echo Adding health_check as gem to Gemfile...
176
- echo "gem 'health_check', :path => '$base_dir'" >> Gemfile
175
+ echo Missing Gemfile!
176
+ exit 2
177
+ fi
177
178
 
178
- case "$RAILS_SERVER" in
179
- webrick|'')
180
- echo "Using default webrick server"
181
- ;;
182
- *)
183
- echo "Adding $RAILS_SERVER gem to Gemfile (for use as server)"
184
- echo "gem '$RAILS_SERVER'" >> Gemfile
185
- ;;
186
- esac
187
- echo Adding required Gemfile lines ...
188
- egrep REQUIRED $INITIAL_BUNDLE_GEMFILE | tee -a Gemfile
189
- echo
190
- echo ================= Gemfile ===================
191
- cat Gemfile
192
- echo
193
- echo running bundle install
194
- bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} install
195
- $rehash
196
- echo "Using binstubs in $railsapp/bin for rails and rake commands"
197
- rails="$railsapp/bin/rails"
198
-
199
- echo Checking $rails is present ...
200
- [ -f $rails ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub railties || echo '(ignored bundle exit status)'
201
- [ -f $rails ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub rails || echo '(ignored bundle exit status)'
202
- if [ ! -f $rails ]; then
203
- echo "Test aborted (unable to create $rails)"
204
- exit 2
205
- fi
179
+ rm -f Gemfile.lock
206
180
 
207
- rake="$railsapp/bin/rake"
181
+ echo Adding health_check as gem to Gemfile...
182
+ echo "gem 'health_check', :path => '$base_dir'" >> Gemfile
208
183
 
209
- echo Checking $rake is present ...
210
- [ -f $rake ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub rake || echo '(ignored bundle exit status)'
211
- if [ ! -f $rake ]; then
212
- echo "Test aborted (unable to create $rake)"
213
- exit 2
214
- fi
184
+ case "$RAILS_SERVER" in
185
+ webrick|'')
186
+ echo "Using default webrick server"
187
+ ;;
188
+ *)
189
+ echo "Adding $RAILS_SERVER gem to Gemfile (for use as server)"
190
+ echo "gem '$RAILS_SERVER'" >> Gemfile
191
+ ;;
192
+ esac
193
+ echo Adding required Gemfile lines ...
194
+ egrep REQUIRED $INITIAL_BUNDLE_GEMFILE | tee -a Gemfile
195
+ echo
196
+ echo ================= Gemfile ===================
197
+ cat Gemfile
198
+ echo
199
+ echo running bundle install
200
+ smarter_bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} install
201
+ $rehash
202
+ echo "Using binstubs in $railsapp/bin for rails and rake commands"
203
+ rails="$railsapp/bin/rails"
215
204
 
216
- $rehash
217
- # Fix for rvm, otherwise bundle run from rails create fails
218
- export PATH="`pwd`/bin:$PATH"
219
- echo ================= Gemfile.lock ===================
220
- cat Gemfile.lock
221
- echo
222
- else
223
- dest=$railsapp/vendor/plugins/health_check
224
- echo Installing health_check as plugin in $dest ...
225
- mkdir -p $dest
226
- (
227
- cd $base_dir
228
-
229
- git ls-files | cpio -pdl $dest
230
-
231
- cd $dest
232
-
233
- echo Files installed as plugin:
234
- find . -type f
235
- echo
236
- )
205
+ echo Checking $rails is present ...
206
+ [ -f $rails ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub railties || echo '(ignored bundle exit status)'
207
+ [ -f $rails ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub rails || echo '(ignored bundle exit status)'
208
+ if [ ! -f $rails ]; then
209
+ echo "Test aborted (unable to create $rails)"
210
+ exit 2
211
+ fi
212
+
213
+ rake="$railsapp/bin/rake"
214
+
215
+ echo Checking $rake is present ...
216
+ [ -f $rake ] || bundle ${BUNDLER_VERSION:+_${BUNDLER_VERSION}_} binstub rake || echo '(ignored bundle exit status)'
217
+ if [ ! -f $rake ]; then
218
+ echo "Test aborted (unable to create $rake)"
219
+ exit 2
237
220
  fi
238
221
 
222
+ $rehash
223
+ # Fix for rvm, otherwise bundle run from rails create fails
224
+ export PATH="`pwd`/bin:$PATH"
225
+ echo ================= Gemfile.lock ===================
226
+ cat Gemfile.lock
227
+ echo
228
+
239
229
  for e in test ${RAILS_ENV2:-production}
240
230
  do
241
231
  if [ -f config/environments/$e.rb ]; then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-25 00:00:00.000000000 Z
12
+ date: 2018-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: railties
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: smarter_bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.1.0
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.0
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rake
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -137,10 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
153
  requirements:
138
154
  - - ! '>='
139
155
  - !ruby/object:Gem::Version
140
- version: '0'
141
- segments:
142
- - 0
143
- hash: 4152709430930612224
156
+ version: 1.8.7
144
157
  required_rubygems_version: !ruby/object:Gem::Requirement
145
158
  none: false
146
159
  requirements: