Skip to content

Commit 88b07de

Browse files
authored
Merge pull request #256 from StackStorm/feature/release-1.3
Release 1.3.0
2 parents 867d293 + ea3c330 commit 88b07de

File tree

8 files changed

+39
-35
lines changed

8 files changed

+39
-35
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.rb eol=lf
2+
*.erb eol=lf
3+
*.pp eol=lf
4+
*.sh eol=lf
5+
*.epp eol=lf

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ AllCops:
1919
Metrics/LineLength:
2020
Description: People have wide screens, use them.
2121
Max: 200
22+
GetText/DecorateString:
23+
Description: We don't want to decorate test output.
24+
Exclude:
25+
- spec/*
2226
RSpec/BeforeAfterAll:
2327
Description: Beware of using after(:all) as it may cause state to leak between tests.
2428
A necessary evil in acceptance testing.

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

33
## Development
4-
4+
5+
6+
## 1.3.0 (Dec 17, 2018)
7+
58
- Added authentication for RabbitMQ, by default.
69
The authentication options are available in the `::st2` class:
710
- `rabbitmq_username` : Username for the new RabbitMQ user (default: `st2admin`)

Gemfile

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
22

33
def location_for(place_or_version, fake_version = nil)
4-
if place_or_version =~ %r{\A(git[:@][^#]*)#(.*)}
5-
[fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact
6-
elsif place_or_version =~ %r{\Afile:\/\/(.*)}
7-
['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }]
8-
else
9-
[place_or_version, { require: false }]
10-
end
11-
end
4+
git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
5+
file_url_regex = %r{\Afile:\/\/(?<path>.*)}
126

13-
def gem_type(place_or_version)
14-
if place_or_version =~ %r{\Agit[:@]}
15-
:git
16-
elsif !place_or_version.nil? && place_or_version.start_with?('file:')
17-
:file
7+
if place_or_version && (git_url = place_or_version.match(git_url_regex))
8+
[fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
9+
elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
10+
['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
1811
else
19-
:gem
12+
[place_or_version, { require: false }]
2013
end
2114
end
2215

@@ -48,7 +41,6 @@ group :development do
4841
end
4942

5043
puppet_version = ENV['PUPPET_GEM_VERSION']
51-
puppet_type = gem_type(puppet_version)
5244
facter_version = ENV['FACTER_GEM_VERSION']
5345
hiera_version = ENV['HIERA_GEM_VERSION']
5446

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ require 'puppetlabs_spec_helper/rake_tasks'
22
require 'puppet-syntax/tasks/puppet-syntax'
33
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
44
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
5+
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
56

67
def changelog_user
78
return unless Rake.application.top_level_tasks.include? "changelog"

metadata.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackstorm-st2",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"author": "stackstorm",
55
"summary": "Puppet module to manage/configure StackStorm",
66
"license": "Apache-2.0",
@@ -103,7 +103,7 @@
103103
"version_requirement": ">= 4.7.0 < 7.0.0"
104104
}
105105
],
106-
"pdk-version": "1.7.0",
106+
"pdk-version": "1.8.0",
107107
"template-url": "file:///opt/puppetlabs/pdk/share/cache/pdk-templates.git",
108-
"template-ref": "1.7.0-0-g57412ed"
109-
}
108+
"template-ref": "1.8.0-0-g0d9da00"
109+
}

spec/default_facts.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# Facts specified here will override the values provided by rspec-puppet-facts.
44
---
5-
concat_basedir: "/tmp"
65
ipaddress: "172.16.254.254"
76
is_pe: false
87
macaddress: "AA:AA:AA:AA:AA:AA"

spec/spec_helper.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
require 'puppetlabs_spec_helper/module_spec_helper'
22
require 'rspec-puppet-facts'
33

4-
begin
5-
require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
6-
rescue LoadError => loaderror
7-
warn "Could not require spec_helper_local: #{loaderror.message}"
8-
end
4+
require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
95

106
include RspecPuppetFacts
117

@@ -14,15 +10,19 @@
1410
facterversion: Facter.version,
1511
}
1612

17-
default_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml'))
18-
default_module_facts_path = File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml'))
13+
default_fact_files = [
14+
File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')),
15+
File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')),
16+
]
1917

20-
if File.exist?(default_facts_path) && File.readable?(default_facts_path)
21-
default_facts.merge!(YAML.safe_load(File.read(default_facts_path)))
22-
end
18+
default_fact_files.each do |f|
19+
next unless File.exist?(f) && File.readable?(f) && File.size?(f)
2320

24-
if File.exist?(default_module_facts_path) && File.readable?(default_module_facts_path)
25-
default_facts.merge!(YAML.safe_load(File.read(default_module_facts_path)))
21+
begin
22+
default_facts.merge!(YAML.safe_load(File.read(f)))
23+
rescue => e
24+
RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
25+
end
2626
end
2727

2828
RSpec.configure do |c|
@@ -36,8 +36,8 @@
3636

3737
def ensure_module_defined(module_name)
3838
module_name.split('::').reduce(Object) do |last_module, next_module|
39-
last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module)
40-
last_module.const_get(next_module)
39+
last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
40+
last_module.const_get(next_module, false)
4141
end
4242
end
4343

0 commit comments

Comments
 (0)