busser-pybot 0.1.0

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
+ SHA1:
3
+ metadata.gz: '099edaa4b0ce4e306d91e8f93011a87c5d639f82'
4
+ data.tar.gz: 7196bd7dfadfaedc7850de896b1533676fa19557
5
+ SHA512:
6
+ metadata.gz: 00d1d57b8c937bddd02e528b4a92ad7fc3a7b19a6947253585a0d5f59fb5e9901a43dc8964f11f5d131eb522150ff02b87dfabf787a036575a90e175bba006a6
7
+ data.tar.gz: 194630bc7f9b903c3d0b55b813da11424dacbe2e74c34b4666389b450242db19a613e8ded2a6ddf87f62e6c046b28943d7e672cc8fbfe3be6d78ec8d2c5c66e8
data/.cane ADDED
File without changes
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,3 @@
1
+ ## 0.1.0 / Unreleased
2
+
3
+ * 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:: TODO: Write your name (<TODO: Write your email>)
2
+
3
+ Copyright (C) 2017, TODO: Write your name
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,41 @@
1
+ # <a name="title"></a> Busser::RunnerPlugin::Pybot
2
+
3
+ A Busser runner plugin for Pybot
4
+
5
+ ## <a name="installation"></a> Installation and Setup
6
+
7
+ Please read the Busser [plugin usage][plugin_usage] page for more details.
8
+
9
+ ## <a name="usage"></a> Usage
10
+
11
+ **TODO:** Write documentation explaining the structure/format of testing files.
12
+
13
+ ## <a name="development"></a> Development
14
+
15
+ * Source hosted at [GitHub][repo]
16
+ * Report issues/questions/feature requests on [GitHub Issues][issues]
17
+
18
+ Pull requests are very welcome! Make sure your patches are well tested.
19
+ Ideally create a topic branch for every separate change you make. For
20
+ example:
21
+
22
+ 1. Fork the repo
23
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
24
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
25
+ 4. Push to the branch (`git push origin my-new-feature`)
26
+ 5. Create new Pull Request
27
+
28
+ ## <a name="authors"></a> Authors
29
+
30
+ Created and maintained by [TODO: Write your name][author] (<TODO: Write your email>)
31
+
32
+ ## <a name="license"></a> License
33
+
34
+ Apache 2.0 (see [LICENSE][license])
35
+
36
+
37
+ [author]: https://github.com/enter-github-user
38
+ [issues]: https://github.com/enter-github-user/busser-pybot/issues
39
+ [license]: https://github.com/enter-github-user/busser-pybot/blob/master/LICENSE
40
+ [repo]: https://github.com/enter-github-user/busser-pybot
41
+ [plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage
data/Rakefile ADDED
@@ -0,0 +1,69 @@
1
+ require "bundler/gem_tasks"
2
+ require "open-uri"
3
+
4
+ namespace :pybot do
5
+
6
+ url = "https://github.com/robotframework/robotframework/archive/master.zip"
7
+ tarball = "tmp/robotframework.zip"
8
+ vendor = "vendor/pybot"
9
+
10
+ desc "Vendors pybot #{version} source code into gem codebase"
11
+ task :vendor => "#{vendor}/VERSION.txt"
12
+
13
+ directory File.dirname(tarball)
14
+ directory vendor
15
+
16
+ file tarball => File.dirname(tarball) do |t|
17
+ begin
18
+ src = open(url).binmode
19
+ dst = open(t.name, "wb")
20
+ IO.copy_stream(src, dst)
21
+ ensure
22
+ src.close
23
+ dst.close
24
+ end
25
+ end
26
+
27
+ file "#{vendor}/VERSION.txt" => [vendor, tarball] do |t|
28
+ abs_tarball = File.expand_path(tarball)
29
+ Dir.chdir(vendor) { sh "tar xzf #{abs_tarball} --strip-components=1" }
30
+ rm_rf "#{vendor}/test"
31
+ IO.write(t.name, url + "\n")
32
+ end
33
+
34
+ desc "Clean up a vendored pybot in preparation for a new vendored version"
35
+ task :clean do
36
+ rm_rf [vendor, tarball]
37
+ end
38
+ end
39
+
40
+ require 'cucumber/rake/task'
41
+ require 'cane/rake_task'
42
+ require 'tailor/rake_task'
43
+
44
+ Cucumber::Rake::Task.new(:features) do |t|
45
+ t.cucumber_opts = ['features', '-x', '--format progress']
46
+ end
47
+
48
+ desc "Run all test suites"
49
+ task :test => [:features]
50
+
51
+ desc "Run cane to check quality metrics"
52
+ Cane::RakeTask.new do |cane|
53
+ cane.canefile = './.cane'
54
+ end
55
+
56
+ Tailor::RakeTask.new
57
+
58
+ desc "Display LOC stats"
59
+ task :stats do
60
+ puts "\n## Production Code Stats"
61
+ sh "countloc -r lib"
62
+ puts "\n## Test Code Stats"
63
+ sh "countloc -r features"
64
+ end
65
+
66
+ desc "Run all quality tasks"
67
+ task :quality => [:cane, :tailor, :stats]
68
+
69
+ task :default => [:test, :quality]
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'busser/pybot/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'busser-pybot'
8
+ gem.version = Busser::Pybot::VERSION
9
+ gem.authors = ['KOTINI TIRUMULA']
10
+ gem.email = ['kotinitirumula@gmail.coml']
11
+ gem.description = %q{A Busser runner plugin for Pybot}
12
+ gem.summary = gem.description
13
+ gem.homepage = 'https://github.com/kotini/busser-pybot.git'
14
+ gem.license = 'Apache 2.0'
15
+
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.executables = []
18
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
+ gem.require_paths = ['lib']
20
+
21
+ gem.add_dependency 'busser'
22
+
23
+ gem.add_development_dependency 'bundler', '~> 1.3'
24
+ gem.add_development_dependency 'rake'
25
+ gem.add_development_dependency 'aruba'
26
+
27
+ gem.add_development_dependency 'cane'
28
+ gem.add_development_dependency 'tailor'
29
+ gem.add_development_dependency 'countloc'
30
+ end
@@ -0,0 +1,11 @@
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-pybot-install"
8
+
9
+ Scenario: Running the postinstall generator
10
+ When I run `busser plugin install busser-pybot --force-postinstall`
11
+ Then 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 /^pybot\b/
@@ -0,0 +1,13 @@
1
+ require 'aruba/cucumber'
2
+ require 'busser/cucumber'
3
+
4
+ Before do
5
+ @aruba_timeout_seconds = 10
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,31 @@
1
+ Feature: Test command
2
+ In order to run tests written with pybot
3
+ As a user of Busser
4
+ I want my tests to run when the pybot runner plugin is installed
5
+
6
+ Background:
7
+ Given a test BUSSER_ROOT directory named "busser-pybot-test"
8
+ When I successfully run `busser plugin install busser-pybot --force-postinstall`
9
+ Given a suite directory named "pybot"
10
+
11
+ Scenario: A passing test suite
12
+ Given a file in suite "pybot" named "<YOUR_FILE>" with:
13
+ """
14
+ TEST FILE CONTENT
15
+
16
+ A good test might be a simple passing statement
17
+ """
18
+ When I run `busser test pybot`
19
+ Then I should verify some output for the pybot plugin
20
+ And the exit status should be 0
21
+
22
+ Scenario: A failing test suite
23
+ Given a file in suite "pybot" named "<YOUR_FILE>" with:
24
+ """
25
+ TEST FILE CONTENT
26
+
27
+ A good test might be a failing test case, raised exception, etc.
28
+ """
29
+ When I run `busser test pybot`
30
+ Then I should verify some output for the pybot plugin
31
+ And the exit status should not be 0
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: TODO: Write your name (<TODO: Write your email>)
4
+ #
5
+ # Copyright (C) 2017, TODO: Write your name
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 Pybot
22
+
23
+ # Version string for the Pybot Busser runner plugin
24
+ VERSION = "0.1.0"
25
+ end
26
+ end
@@ -0,0 +1,37 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: TODO: Write your name (<TODO: Write your email>)
4
+ #
5
+ # Copyright (C) 2017, TODO: Write your name
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
+
21
+ # A Busser runner plugin for Pybot.
22
+ #
23
+ # @author TODO: Write your name <TODO: Write your email>
24
+ #
25
+ class Busser::RunnerPlugin::Pybot < Busser::RunnerPlugin::Base
26
+
27
+ #postinstall do
28
+ # inside(Pathname.new(__FILE__).dirname.join("../../../vendor/pybot")) do
29
+ # FileUtils.ln_sf("../libexec/pybot", "bin/pybot")
30
+ # run!(%{./install.sh #{vendor_path("pybot")}})
31
+ # end
32
+ #end
33
+
34
+ def test
35
+ run!("#{vendor_path("pybot").join("bin/pybot")} #{suite_path("pybot")}")
36
+ end
37
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: busser-pybot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - KOTINI TIRUMULA
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-04-22 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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
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: aruba
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: cane
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: tailor
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: countloc
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
+ description: A Busser runner plugin for Pybot
112
+ email:
113
+ - kotinitirumula@gmail.coml
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".cane"
119
+ - ".gitignore"
120
+ - ".tailor"
121
+ - ".travis.yml"
122
+ - CHANGELOG.md
123
+ - Gemfile
124
+ - LICENSE
125
+ - README.md
126
+ - Rakefile
127
+ - busser-pybot.gemspec
128
+ - features/plugin_install_command.feature
129
+ - features/plugin_list_command.feature
130
+ - features/support/env.rb
131
+ - features/test_command.feature
132
+ - lib/busser/pybot/version.rb
133
+ - lib/busser/runner_plugin/pybot.rb
134
+ homepage: https://github.com/kotini/busser-pybot.git
135
+ licenses:
136
+ - Apache 2.0
137
+ metadata: {}
138
+ post_install_message:
139
+ rdoc_options: []
140
+ require_paths:
141
+ - lib
142
+ required_ruby_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ required_rubygems_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ requirements: []
153
+ rubyforge_project:
154
+ rubygems_version: 2.6.11
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: A Busser runner plugin for Pybot
158
+ test_files:
159
+ - features/plugin_install_command.feature
160
+ - features/plugin_list_command.feature
161
+ - features/support/env.rb
162
+ - features/test_command.feature