busser-rspec_datadog 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7705dea25e87232bbc50b28e8b04ebe15710debc13458896d5374ac2b1e9cc48
4
+ data.tar.gz: ff48e0ec3bff39da37e545bf5b6613112c8be316e42a7cd4d1b1a7c271edc095
5
+ SHA512:
6
+ metadata.gz: c25606552d9ec03ca9356dc1ade505c2901b7fb1c62d584390c9f92ced4d09bbbd90c4bb3a56b36d7325d578440081c4a13aa38502778bf9eae5adfd3562e53f
7
+ data.tar.gz: 788909ab55fc1fbe7e7925f7ec57f79b2c19474ff55fa9f936cd59ffbeae819f0e6c60445c88aabb34914545f7f02cd52ca80414951ddc2e6813d36ead61eba8
data/.cane ADDED
File without changes
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.tailor ADDED
@@ -0,0 +1,4 @@
1
+ Tailor.config do |config|
2
+ config.formatters "text"
3
+ config.file_set 'lib/**/*.rb'
4
+ end
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
6
+ - 1.9.2
7
+ - ruby-head
8
+
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: ruby-head
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ ## 0.8.1 / 2023-01-25
2
+
3
+ * Fix runner_plugin file name following gem rename
4
+
5
+ ## 0.8.0 / 2023-01-25
6
+
7
+ * Pin bundler version installed in postinstall to 2.3.26
8
+
9
+ ## 0.7.6 / 2015-09-28
10
+
11
+ * Additional windows fixes for recent Omnibus Chef
12
+ * Documentation (`README`) updates
13
+
14
+ ## 0.7.5 / 2015-09-17
15
+
16
+ * Fix bundle install on windows
17
+
18
+ ## 0.1.0 / 2013-05-22
19
+
20
+ * Initial release
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
2
+
3
+ Copyright (C) 2013, HIGUCHI Daisuke
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # Busser::RunnerPlugin::Rspec
2
+
3
+ A Busser runner plugin for Rspec
4
+
5
+ ## Status
6
+
7
+ This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.
8
+
9
+ ## Installation and Setup
10
+
11
+ Please read the Busser [plugin usage](plugin_usage) page for more details.
12
+
13
+ ## Usage
14
+
15
+ Please put test files into [COOKBOOK]/test/integration/[SUITES]/rspec/
16
+
17
+ ```
18
+ -- [COOKBOOK]
19
+ `-- test
20
+ `-- integration
21
+ `-- default
22
+ `-- rspec
23
+ `-- spec_helper.rb
24
+ `-- Gemfile
25
+ ```
26
+
27
+ You can specify your own test gem dependencies with a `Gemfile` under the `rspec` path, like this: `test/integration/<suite>/rspec/Gemfile`. Don't forget to put `gem "rspec"` there!
28
+
29
+ ## How do I ... ?
30
+
31
+ ### Change the rspec formatter?
32
+
33
+ You may be familar with using the `rspec -f` flag to change the rspec formatter. RSpec also offers a way to set the formatter from your specs:
34
+
35
+ ```ruby
36
+ RSpec.configure do |config|
37
+ # The same as `rspec -f documentation`
38
+ config.add_formatter "documentation"
39
+ ```
40
+
41
+ ## Development
42
+
43
+ * Source hosted at [GitHub](https://github.com/opscode/busser-rspec)
44
+ * Report issues/questions/feature requests on [GitHub Issues](issues)
45
+
46
+ Pull requests are very welcome! Make sure your patches are well tested.
47
+ Ideally create a topic branch for every separate change you make. For
48
+ example:
49
+
50
+ 1. Fork the repo
51
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
52
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
53
+ 4. Push to the branch (`git push origin my-new-feature`)
54
+ 5. Create new Pull Request
55
+
56
+ ## Authors
57
+
58
+ Created and maintained by Adam Jacob (adam@opscode.com)
59
+
60
+ Based on [busser-serverspec](https://github.com/cl-lab-k/busser-serverspec), created and maintained by HIGUCHI Daisuke (d-higuchi@creationline.com)
61
+
62
+ ## License
63
+
64
+ Apache 2.0 (see [LICENSE](license))
65
+
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ require "bundler/gem_tasks"
2
+ require 'cucumber/rake/task'
3
+ require 'cane/rake_task'
4
+ require 'tailor/rake_task'
5
+
6
+ Cucumber::Rake::Task.new(:features) do |t|
7
+ t.cucumber_opts = ['features', '-x', '--format progress']
8
+ end
9
+
10
+ desc "Run all test suites"
11
+ task :test => [:features]
12
+
13
+ desc "Run cane to check quality metrics"
14
+ Cane::RakeTask.new do |cane|
15
+ cane.canefile = './.cane'
16
+ end
17
+
18
+ Tailor::RakeTask.new
19
+
20
+ desc "Display LOC stats"
21
+ task :stats do
22
+ puts "\n## Production Code Stats"
23
+ sh "countloc -r lib"
24
+ puts "\n## Test Code Stats"
25
+ sh "countloc -r features"
26
+ end
27
+
28
+ desc "Run all quality tasks"
29
+ task :quality => [:cane, :tailor, :stats]
30
+
31
+ task :default => [:test, :quality]
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'busser/rspec_datadog/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'busser-rspec_datadog'
8
+ spec.version = Busser::RspecDatadog::VERSION
9
+ spec.authors = ['Adam Jacob']
10
+ spec.email = ['adam@opscode.com']
11
+ spec.description = %q{A Busser runner plugin for RSpec}
12
+ spec.summary = spec.description
13
+ spec.homepage = 'https://github.com/adamhjk/busser-rspec'
14
+ spec.license = 'Apache 2.0'
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = []
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'busser'
22
+
23
+ spec.add_development_dependency 'rspec'
24
+ spec.add_development_dependency 'chef'
25
+
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'aruba'
28
+ spec.add_development_dependency 'cane'
29
+ spec.add_development_dependency 'tailor'
30
+ spec.add_development_dependency 'countloc'
31
+ end
@@ -0,0 +1,13 @@
1
+ Feature: Plugin install command
2
+ In order to use this plugin
3
+ As a user of Busser
4
+ I want to run the postinstall for this plugin
5
+
6
+ Background:
7
+ Given a test BUSSER_ROOT directory named "busser-rspec-install"
8
+ And a sandboxed GEM_HOME directory named "busser-rspec-gem-home"
9
+
10
+ Scenario: Running the postinstall generator
11
+ When I run `busser plugin install busser-rspec --force-postinstall`
12
+ Then a gem named "rspec" is installed
13
+ And the exit status should be 0
@@ -0,0 +1,8 @@
1
+ Feature: Plugin list command
2
+ In order to use this plugin
3
+ As a user of Busser
4
+ I want to see this plugin in the 'busser plugin list' command
5
+
6
+ Scenario: Plugin appears in plugin list command
7
+ When I successfully run `busser plugin list`
8
+ Then the output should match /^rspec\b/
@@ -0,0 +1,13 @@
1
+ require 'aruba/cucumber'
2
+ require 'busser/cucumber'
3
+
4
+ Before do
5
+ @aruba_timeout_seconds = 20
6
+ end
7
+
8
+ After do |s|
9
+ # Tell Cucumber to quit after this scenario is done - if it failed.
10
+ # This is useful to inspect the 'tmp/aruba' directory before any other
11
+ # steps are executed and clear it out.
12
+ Cucumber.wants_to_quit = true if s.failed?
13
+ end
@@ -0,0 +1,41 @@
1
+ Feature: Test command
2
+ In order to run tests written with rspec
3
+ As a user of Busser
4
+ I want my tests to run when the rspec runner plugin is installed
5
+
6
+ Background:
7
+ Given a test BUSSER_ROOT directory named "busser-rspec-test"
8
+ And a sandboxed GEM_HOME directory named "busser-rspec-gem-home"
9
+ When I successfully run `busser plugin install busser-rspec --force-postinstall`
10
+ Given a suite directory named "rspec"
11
+
12
+ Scenario: A passing test suite
13
+ Given a file in suite "rspec" named "default_spec.rb" with:
14
+ """
15
+ describe 'default' do
16
+ it 'succeed' do
17
+ end
18
+ end
19
+ """
20
+ When I run `busser test rspec`
21
+ Then the output should contain:
22
+ """
23
+ 1 example, 0 failures
24
+ """
25
+ And the exit status should be 0
26
+
27
+ Scenario: A failing test suite
28
+ Given a file in suite "rspec" named "default_spec.rb" with:
29
+ """
30
+ describe 'default' do
31
+ it 'fail' do
32
+ raise
33
+ end
34
+ end
35
+ """
36
+ When I run `busser test rspec`
37
+ Then the output should contain:
38
+ """
39
+ 1 example, 1 failure
40
+ """
41
+ And the exit status should not be 0
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- encoding: utf-8 -*-
3
+ #
4
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
5
+ #
6
+ # Copyright (C) 2013, HIGUCHI Daisuke
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+
20
+ require 'bundler/setup'
21
+ require 'rspec/core'
22
+
23
+ exit RSpec::Core::Runner.run(ARGV)
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
4
+ #
5
+ # Copyright (C) 2013, HIGUCHI Daisuke
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ module Busser
20
+
21
+ module RspecDatadog
22
+
23
+ # Version string for the Rspec Busser runner plugin
24
+ VERSION = "0.8.2"
25
+ end
26
+ end
@@ -0,0 +1,63 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
4
+ #
5
+ # Copyright (C) 2013, HIGUCHI Daisuke
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ require 'busser/runner_plugin'
20
+ require 'rubygems'
21
+
22
+ # A Busser runner plugin for Rspec.
23
+ #
24
+ # @author Adam Jacob <adam@opscode.com>
25
+ #
26
+ class Busser::RunnerPlugin::RspecDatadog < Busser::RunnerPlugin::Base
27
+ postinstall do
28
+ install_gem("rspec")
29
+ install_gem("bundler", "2.3.26")
30
+ end
31
+
32
+ def test
33
+ rspec_path = suite_path('rspec').to_s
34
+
35
+ setup_file = File.join(rspec_path, "setup-recipe.rb")
36
+
37
+ Dir.chdir(rspec_path) do
38
+
39
+ # Referred from busser-serverspec
40
+ gemfile_path = File.join(rspec_path, 'Gemfile')
41
+ if File.exists?(gemfile_path)
42
+ # Bundle install local completes quickly if the gems are already found locally
43
+ # it fails if it needs to talk to the internet. The || below is the fallback
44
+ # to the internet-enabled version. It's a speed optimization.
45
+ banner('Bundle Installing..')
46
+ ENV['PATH'] = [ENV['PATH'], Gem.bindir, RbConfig::CONFIG['bindir']].join(File::PATH_SEPARATOR)
47
+ bundle_exec = "#{File.join(RbConfig::CONFIG['bindir'], 'ruby')} " +
48
+ "#{File.join(Gem.bindir, 'bundle')} install --gemfile #{gemfile_path}"
49
+ run("#{bundle_exec} --local || #{bundle_exec}")
50
+ end
51
+
52
+ if File.exists?(setup_file)
53
+ if !File.exists?("/opt/chef/bin/chef-apply")
54
+ raise "You have a chef setup file at #{setup_file}, but /opt/chef/bin/chef-apply does not if exist"
55
+ end
56
+ run("/opt/chef/bin/chef-apply #{setup_file}")
57
+ end
58
+
59
+ runner = File.expand_path(File.join(File.dirname(__FILE__), "..", "rspec", "runner.rb"))
60
+ run_ruby_script!("#{runner} -I #{rspec_path} -I #{rspec_path}/lib #{rspec_path}")
61
+ end
62
+ end
63
+ end
metadata ADDED
@@ -0,0 +1,177 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: busser-rspec_datadog
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.2
5
+ platform: ruby
6
+ authors:
7
+ - Adam Jacob
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: busser
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: chef
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: aruba
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: cane
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: tailor
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: countloc
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: A Busser runner plugin for RSpec
126
+ email:
127
+ - adam@opscode.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".cane"
133
+ - ".github/dependabot.yml"
134
+ - ".gitignore"
135
+ - ".tailor"
136
+ - ".travis.yml"
137
+ - CHANGELOG.md
138
+ - Gemfile
139
+ - LICENSE
140
+ - README.md
141
+ - Rakefile
142
+ - busser-rspec.gemspec
143
+ - features/plugin_install_command.feature
144
+ - features/plugin_list_command.feature
145
+ - features/support/env.rb
146
+ - features/test_command.feature
147
+ - lib/busser/rspec_datadog/runner.rb
148
+ - lib/busser/rspec_datadog/version.rb
149
+ - lib/busser/runner_plugin/rspec_datadog.rb
150
+ homepage: https://github.com/adamhjk/busser-rspec
151
+ licenses:
152
+ - Apache 2.0
153
+ metadata: {}
154
+ post_install_message:
155
+ rdoc_options: []
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ requirements: []
169
+ rubygems_version: 3.3.26
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: A Busser runner plugin for RSpec
173
+ test_files:
174
+ - features/plugin_install_command.feature
175
+ - features/plugin_list_command.feature
176
+ - features/support/env.rb
177
+ - features/test_command.feature