busser-mamba 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c4ba65ee2f3daedeecec17295247c1d3f08afc3
4
+ data.tar.gz: 6bab514c4ecb1b2985505d2dded6819165cb8085
5
+ SHA512:
6
+ metadata.gz: 1b5c71829738d96df595a5682a105cfac3add69a9780caebff6ce90693d8ed729bba2ac35abd75c7d9c1a0667b8eec2e5d07a2b8ccae57e802acedcfc66a3e3a
7
+ data.tar.gz: c5a5ff7ee4497cc6b29399cc6ca1e22f7026238142a5b1052984b831de3cbbee5f8a4aa7ad02378cf19ea54f01584fa3501b172e7d0b93ad81b0698d3d48235e
data/.cane ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1,18 @@
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
18
+ vendor/
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 / 2014-09-06
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,13 @@
1
+ Copyright (C) 2014, Jaime Gil de Sagredo Luna <jaimegildesagredo@gmail.com>
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Busser::RunnerPlugin::Mamba
2
+
3
+ [![Build Status](https://travis-ci.org/jaimegildesagredo/busser-mamba.svg)](https://travis-ci.org/jaimegildesagredo/busser-mamba)
4
+
5
+ A Busser runner plugin for [Mamba](https://github.com/nestorsalceda/mamba.git)
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,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'busser/mamba/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'busser-mamba'
8
+ spec.version = Busser::Mamba::VERSION
9
+ spec.authors = ['Jaime Gil de Sagredo Luna']
10
+ spec.email = ['jaimegildesagredo@gmail.com']
11
+ spec.description = %q{A Busser runner plugin for Mamba}
12
+ spec.summary = spec.description
13
+ spec.homepage = 'https://github.com/jaimegildesagredo/busser-mamba'
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 'bundler', '~> 1.3'
24
+ spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'aruba'
26
+ spec.add_development_dependency 'cane'
27
+ spec.add_development_dependency 'tailor'
28
+ spec.add_development_dependency 'countloc'
29
+ 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-mamba-install"
8
+
9
+ Scenario: Running the postinstall generator
10
+ When I run `busser plugin install busser-mamba --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 /^mamba\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,37 @@
1
+ Feature: Test command
2
+ In order to run tests written with mamba
3
+ As a user of Busser
4
+ I want my tests to run when the mamba runner plugin is installed
5
+
6
+ Background:
7
+ Given a test BUSSER_ROOT directory named "busser-mamba-test"
8
+ When I successfully run `busser plugin install busser-mamba --force-postinstall`
9
+ Given a suite directory named "mamba"
10
+
11
+ Scenario: A passing test suite
12
+ Given a file in suite "mamba" named "default_spec.py" with:
13
+ """
14
+ with describe('default'):
15
+ with it('succeed'):
16
+ assert True
17
+ """
18
+ When I run `busser test mamba`
19
+ Then the output should contain:
20
+ """
21
+ 1 examples ran
22
+ """
23
+ And the exit status should be 0
24
+
25
+ Scenario: A failing test suite
26
+ Given a file in suite "mamba" named "default_spec.py" with:
27
+ """
28
+ with describe('default'):
29
+ with it('fail'):
30
+ assert False
31
+ """
32
+ When I run `busser test mamba`
33
+ Then the output should contain:
34
+ """
35
+ 1 examples failed of 1 ran
36
+ """
37
+ And the exit status should not be 0
@@ -0,0 +1,7 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ module Busser
4
+ module Mamba
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require 'busser/runner_plugin'
4
+
5
+ # A Busser runner plugin for Mamba.
6
+ #
7
+ # @author Jaime Gil de Sagredo Luna <jaimegildesagredo@gmail.com>
8
+ #
9
+ class Busser::RunnerPlugin::Mamba < Busser::RunnerPlugin::Base
10
+ postinstall do
11
+ run!("pip install -e git+git://github.com/nestorsalceda/mamba.git#egg=mamba")
12
+ end
13
+
14
+ def test
15
+ mamba_path = suite_path('mamba').to_s
16
+ requirements_file = File.join(mamba_path, 'requirements.txt')
17
+
18
+ if File.exists?(requirements_file)
19
+ run!("pip install -r #{requirements_file}")
20
+ end
21
+
22
+ run!("mamba #{mamba_path}")
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,162 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: busser-mamba
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jaime Gil de Sagredo Luna
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-06 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 Mamba
112
+ email:
113
+ - jaimegildesagredo@gmail.com
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-mamba.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/mamba/version.rb
133
+ - lib/busser/runner_plugin/mamba.rb
134
+ homepage: https://github.com/jaimegildesagredo/busser-mamba
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.0.14
155
+ signing_key:
156
+ specification_version: 4
157
+ summary: A Busser runner plugin for Mamba
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