Skip to content

Commit

Permalink
Address Dan's comments
Browse files Browse the repository at this point in the history
* use rubygems.org in Gemfile
* update language in README
* remove unnecessary facts from spec_helper.rb
* rename spec/classes/init_spec.rb to spec/classes/sentry_spec.rb
* trim down list of facts defined in spec/classes/sentry_spec.rb
* add a spec test to confirm failure with Sentry version < 8.4.0
* update CHANGELOG
  • Loading branch information
Scott Merrill committed Jun 3, 2016
1 parent 2fa148f commit e8d0a18
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 32 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
* Thu Jun 02 2016 Scott Merrill <[email protected]> - 3.0.0
- add new sentry::config and sentry::setup classes
- make all sub-classes private
- better manage class containment and ordering (Closes #22)
- restart background services after upgrade (Closes #21)
- better bootstrap on very first install
- make default team the same name as the default organization
- only support Sentry versions 8.4.0 and up, due to changes to Sentry code
initial spec test
* Fri Feb 26 2016 Dan Sajner <[email protected]) - 2.0.0
- BREAKING CHANGE - Add support for creating custom teams
- BREAKING CHANGE - Require Puppet >= 4
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "https://gems.covermymeds.com"
source "https://rubygems.org"
gem "rspec"
gem "json_pure"
gem "hiera", ">= 2.0", "< 4.0"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ puppet-sentry

[Sentry](https://www.getsentry.com) is "a modern error logging and aggregation platform." This module installs the [on-premise](https://docs.getsentry.com/on-premise/) open source version of Sentry. A Sentry administrative user, default Organization and default Team will be created.

**NOTE** version 3 of this module only supports Sentry versions 8.4.0 and above.

## Dependencies
This module supports only Red Hat Enterprise Linux 7 and its derivatives.

Expand Down Expand Up @@ -108,7 +110,7 @@ Class parameters:
* **redis_port**: port to use for Redis (6379)
* **secret_key**: string used to hash cookies (fqdn_rand_string(40))
* **smtp_host**: name or IP of SMTP server (localhost)
* **ssl_* **: Apache SSL controls. The `ssl_cert` and `ssl_key` parameters reference files on the Sentry server. You are responsible for getting these files onto the server yourself.
* **ssl_* **: Apache SSL controls. The `ssl_cert` and `ssl_key` parameters reference files on the Sentry server. Your Sentry profile class or other higher level class should manage the installation of these file resources.
* **url**: source URL form which to install Sentry (false, use [PyPI](https://pypi.python.org/pypi/sentry/))
* **user**: UNIX user to own virtualenv, and run background workers (sentry)
* **version**: the Sentry version to install
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
$wsgi_threads = $sentry::params::wsgi_threads,
) inherits ::sentry::params {

if $version != 'latest' {
if versioncmp('8.4.0', $version) > 0 {
fail('Sentry version 8.4.0 or greater is required.')
}
}
class { '::sentry::setup':
group => $group,
path => $path,
Expand Down
7 changes: 7 additions & 0 deletions spec/classes/init_spec.rb → spec/classes/sentry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,11 @@
it { is_expected.to contain_class('sentry::service') }
it { is_expected.to contain_class('sentry::wsgi') }
end

context 'Sentry version < 8.4.0' do
let (:params) {{ :version => '8.0.0' }}
it "should fail" do
expect { catalogue }.to raise_error(Puppet::Error, /Sentry version 8.4.0 or greater is required./)
end
end
end
30 changes: 0 additions & 30 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,3 @@
c.manifest_dir = File.join(fixture_path, 'manifests')
c.hiera_config = 'spec/fixtures/hiera/hiera.yaml'
end

shared_context 'RedHat 7' do
let(:facts) do
{
osfamily: 'RedHat',
operatingsystem: 'RedHat',
operatingsystemrelease: '7.2',
operatingsystemmajrelease: '7',
os: {
architecture: "x86_64",
family: "RedHat",
hardware: "x86_64",
name: "RedHat",
release: {
full: "7.2",
major: "7",
minor: "2"
},
selinux: {
config_mode: "permissive",
config_policy: "targeted",
current_mode: "permissive",
enabled: true,
enforced: false,
policy_version: "28"
}
}
}
end
end

0 comments on commit e8d0a18

Please sign in to comment.