Skip to content

Commit

Permalink
Merge branch 'master' into threading_and_sandstorm
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-graham committed Nov 28, 2014
2 parents 6773f5f + 689a859 commit d8005fa
Show file tree
Hide file tree
Showing 30 changed files with 359 additions and 698 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
2.1.5

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ language: ruby
matrix:
include:
- rvm: 1.9.3
gemfile: Gemfile-ruby1.9
gemfile: Gemfile
script: "bundle exec rspec spec && bundle exec rake pact:verify && bundle exec cucumber features"
env: BUNDLE_GEMFILE=Gemfile-ruby1.9
- rvm: '2.0'
gemfile: Gemfile
script: "bundle exec rspec spec && bundle exec rake pact:verify && bundle exec cucumber features"
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
## Flapjack Changelog

# 1.2.0 - 2014-11-07
- Bug: multi blocks for safe redis connection pool usage #694 (@ali-graham)
- Bug: data migration to work around previous notification rule bug #699 (@ali-graham)

# 1.2.0rc2 - 2014-10-17
- Feature: Cache entity and check name <-> id lookups #682 (@ali-graham)
- Chore: Add last_change field to status_reports in the API (closes: #678) #679 (@Hobbsee)
- Chore: Move archive cache responsibility to mirror source. #683 (@ali-graham)
- Bug: jsonapi: GET /entities is non performant #674 (@ali-graham)

# 1.2.0rc1 - 2014-10-08
- Feature: Allow updating an entities name via PATCH /entities/id[,id...] #628 (@ali-graham)
- Feature: Pact specs for flapjack-diner compatability testing #663 (@ali-graham)
- Feature: more api check methods #644 (@ali-graham)
- Chore: optimise tag code #654 (@ali-graham)
- Chore: fix #653, overuse of Redis KEYS in mirror #661 (@ali-graham)
- Bug: Entities should return linked checks with list of check "ids" in API #648 (@ali-graham)
- Bug: 500 error getting all checks from API #641 (@ali-graham)
- Bug: Pager Duty credentials get throws error #657 (@ali-graham)
- Bug: Flapjack crashes when email alert is triggered #656 (@ali-graham)
- Bug: Fix /edit_contacts media saving after adding contacts #651 (@ali-graham)

# 1.1.0 - 2014-09-10
- Feature: Add autorefresh for the web GUI (Closes: #494) #607 (@Hobbsee)
- Feature: twilio sms sending #633 (@jessereynolds)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get install -y gnupg
RUN gpg --keyserver keys.gnupg.net --recv-keys 803709B6
RUN gpg -a --export 803709B6 | apt-key add -

RUN echo "deb http://packages.flapjack.io/deb/1.0 trusty main" | tee /etc/apt/sources.list.d/flapjack.list
RUN echo "deb http://packages.flapjack.io/deb/v1 trusty main" | tee /etc/apt/sources.list.d/flapjack.list
RUN apt-get update
RUN apt-cache policy flapjack
RUN apt-get install -y flapjack
Expand Down
8 changes: 1 addition & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ end

group :test do
gem 'rspec'
gem 'cucumber'
gem 'cucumber', '>= 2.0.0.beta.3'
gem 'delorean'
gem 'rack-test'
gem 'webmock'
gem 'pact'
gem 'fuubar'
gem 'simplecov', :require => false

# # Not compiling at the moment
# if RUBY_VERSION.split('.')[0] == '1' && RUBY_VERSION.split('.')[1] == '9'
# gem 'debugger-ruby_core_source', :github => 'moneill/debugger-ruby_core_source', :branch => '1.9.3-p550_headers' # required for perftools.rb
# gem 'perftools.rb'
# end
end
1 change: 0 additions & 1 deletion Gemfile-ruby1.9

This file was deleted.

167 changes: 0 additions & 167 deletions Gemfile-ruby1.9.lock

This file was deleted.

9 changes: 6 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GIT
PATH
remote: .
specs:
flapjack (1.1.0)
flapjack (2.0.0a1)
activesupport
chronic
chronic_duration
Expand Down Expand Up @@ -49,12 +49,15 @@ GEM
numerizer (~> 0.1.1)
crack (0.4.2)
safe_yaml (~> 1.0.0)
cucumber (1.3.17)
cucumber (2.0.0.beta.3)
builder (>= 2.1.2)
cucumber-core (~> 1.0.0.beta.3)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.1)
cucumber-core (1.0.0.beta.3)
gherkin (~> 2.12.0)
dante (0.2.0)
delorean (2.1.0)
chronic
Expand Down Expand Up @@ -153,7 +156,7 @@ PLATFORMS
ruby

DEPENDENCIES
cucumber
cucumber (>= 2.0.0.beta.3)
delorean
flapjack!
fuubar
Expand Down
2 changes: 1 addition & 1 deletion features/steps/flapjack-netsaint-parser_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

Then /^I should see a valid JSON output$/ do
expect {
@data = Oj.load(@output)
@data = Flapjack.load_json(@output)
}.not_to raise_error
end

Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def redis_peek(queue, klass, start = 0, count = nil)
'tmp/cucumber_cli/flapjack-populator-entities.json',
].each do |file|
next unless File.exists?(file)
# File.unlink(file)
File.unlink(file)
end
end

Expand Down
14 changes: 7 additions & 7 deletions lib/flapjack/cli/maintenance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,23 +282,23 @@ def self.extract_time_range(time_period_in_words, base_time)
def common_arguments(cmd_type, gli_cmd)

if [:show, :delete, :create].include?(cmd_type)
gli_cmd.flag [:c, 'check'],
gli_cmd.flag ['check', :c],
:desc => 'The check for the maintenance window to occur on. This can ' +
'be a string, or a Ruby regex of the form \'http*\' or \'[[:lower:]]\'',
:required => :create.eql?(cmd_type)

gli_cmd.flag [:r, 'reason'],
gli_cmd.flag ['reason', :r],
:desc => 'The reason for the maintenance window to occur. This can ' +
'be a string, or a Ruby regex of the form \'Downtime for *\' or ' +
'\'[[:lower:]]\''

gli_cmd.flag [:s, 'start', 'started', 'starting'],
gli_cmd.flag ['start', 'started', 'starting', :s],
:desc => 'The start time for the maintenance window. This should ' +
'be prefixed with "more than", "less than", "on", "before", ' +
'or "after", or of the form "between T1 and T2"',
:must_match => /^(?:more than|less than|on|before|after|between)\s+.+$/

gli_cmd.flag [:d, 'duration'],
gli_cmd.flag ['duration', :d],
:desc => 'The total duration of the maintenance window. This should ' +
'be prefixed with "more than", "less than", or "equal to", ' +
'or of the form "between M and N hours". This should be an ' +
Expand All @@ -307,19 +307,19 @@ def common_arguments(cmd_type, gli_cmd)
end

if [:show, :delete].include?(cmd_type)
gli_cmd.flag [:f, 'finish', 'finished', 'finishing', 'remain', 'remained', 'remaining', 'end'],
gli_cmd.flag ['finish', 'finished', 'finishing', 'remain', 'remained', 'remaining', 'end', :f],
:desc => 'The finishing time for the maintenance window. This should ' +
'prefixed with "more than", "less than", "on", "before", or ' +
'"after", or of the form "between T1 and T2"' ,
:must_match => /^(?:more than|less than|on|before|after|between)\s+.+$/

gli_cmd.flag [:st, 'state'],
gli_cmd.flag ['state', :st],
:desc => 'The state that the check is currently in',
:must_match => %w(ok warning critical unknown)
end

if [:show, :delete, :create].include?(cmd_type)
gli_cmd.flag [:t, 'type'],
gli_cmd.flag ['type', :t],
:desc => 'The type of maintenance scheduled',
:required => true,
:default_value => 'scheduled',
Expand Down
Loading

0 comments on commit d8005fa

Please sign in to comment.