polytrix 0.0.1 → 0.1.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.rspec +1 -6
  4. data/.rubocop-todo.yml +19 -0
  5. data/.rubocop.yml +10 -0
  6. data/.travis.yml +11 -0
  7. data/Gemfile +0 -16
  8. data/README.md +119 -28
  9. data/Rakefile +18 -123
  10. data/bin/polytrix +5 -0
  11. data/doc-src/_markdown.md +5 -0
  12. data/doc-src/default_bootstrap.md +13 -0
  13. data/docs/influences.md +28 -0
  14. data/docs/samples/code2doc/java/HelloWorld.md +13 -0
  15. data/docs/samples/code2doc/java/Quine.md +33 -0
  16. data/docs/samples/code2doc/python/hello_world.md +3 -0
  17. data/docs/samples/code2doc/python/quine.md +4 -0
  18. data/docs/samples/code2doc/ruby/hello_world.md +7 -0
  19. data/features/execution.feature +67 -0
  20. data/features/fixtures/configs/empty.yml +12 -0
  21. data/features/fixtures/configs/hello_world.yml +10 -0
  22. data/features/fixtures/spec/polytrix_merge.rb +5 -0
  23. data/features/fixtures/spec/polytrix_spec.rb +10 -0
  24. data/features/reporting.feature +140 -0
  25. data/features/step_definitions/sdk_steps.rb +12 -0
  26. data/features/support/env.rb +8 -0
  27. data/lib/polytrix/challenge.rb +20 -7
  28. data/lib/polytrix/challenge_runner.rb +9 -44
  29. data/lib/polytrix/cli/add.rb +67 -0
  30. data/lib/polytrix/cli/report.rb +88 -0
  31. data/lib/polytrix/cli/reports/hash_reporter.rb +30 -0
  32. data/lib/polytrix/cli/reports/json_reporter.rb +14 -0
  33. data/lib/polytrix/cli/reports/markdown_reporter.rb +23 -0
  34. data/lib/polytrix/cli/reports/yaml_reporter.rb +14 -0
  35. data/lib/polytrix/cli.rb +158 -0
  36. data/lib/polytrix/configuration.rb +65 -4
  37. data/lib/polytrix/core/file_system_helper.rb +75 -0
  38. data/lib/polytrix/core/implementor.rb +31 -3
  39. data/lib/polytrix/documentation/code_segmenter.rb +168 -0
  40. data/lib/polytrix/documentation/comment_styles.rb +87 -0
  41. data/lib/polytrix/documentation/helpers/code_helper.rb +85 -0
  42. data/lib/polytrix/documentation/view_helper.rb +21 -0
  43. data/lib/polytrix/documentation_generator.rb +59 -10
  44. data/lib/polytrix/executor.rb +89 -0
  45. data/lib/polytrix/logger.rb +17 -0
  46. data/lib/polytrix/manifest.rb +64 -7
  47. data/lib/polytrix/result.rb +16 -2
  48. data/lib/polytrix/rspec/documentation_formatter.rb +41 -16
  49. data/lib/polytrix/rspec/yaml_report.rb +51 -0
  50. data/lib/polytrix/rspec.rb +32 -53
  51. data/lib/polytrix/runners/middleware/feature_executor.rb +4 -3
  52. data/lib/polytrix/runners/middleware/setup_env_vars.rb +6 -4
  53. data/lib/polytrix/validation.rb +20 -0
  54. data/lib/polytrix/validations.rb +23 -0
  55. data/lib/polytrix/validator.rb +20 -0
  56. data/lib/polytrix/validator_registry.rb +34 -0
  57. data/lib/polytrix/version.rb +1 -1
  58. data/lib/polytrix.rb +125 -22
  59. data/polytrix.gemspec +7 -2
  60. data/polytrix.rb +6 -0
  61. data/polytrix_tests.yml +20 -0
  62. data/resources/code_sample.tt +2 -0
  63. data/samples/.gitignore +2 -0
  64. data/samples/_markdown.md +5 -0
  65. data/samples/default_bootstrap.rb +14 -0
  66. data/samples/polytrix.rb +28 -0
  67. data/samples/polytrix_cli.sh +7 -0
  68. data/samples/polytrix_tests.yml +10 -0
  69. data/{sdks/fog → samples}/scripts/bootstrap +0 -2
  70. data/samples/scripts/wrapper +7 -0
  71. data/samples/sdks/custom/polytrix.yml +2 -0
  72. data/samples/sdks/java/.gitignore +2 -0
  73. data/samples/sdks/java/build.gradle +14 -0
  74. data/samples/sdks/java/challenges/HelloWorld.java +10 -0
  75. data/samples/sdks/java/challenges/Quine.java +31 -0
  76. data/samples/sdks/java/code_sample.tt +11 -0
  77. data/samples/sdks/java/scripts/bootstrap +2 -0
  78. data/samples/sdks/java/scripts/wrapper +8 -0
  79. data/samples/sdks/python/challenges/hello_world.py +2 -0
  80. data/samples/sdks/python/challenges/quine.py +2 -0
  81. data/{sdks/pkgcloud → samples/sdks/python}/scripts/wrapper +1 -1
  82. data/samples/sdks/ruby/challenges/hello_world.rb +4 -0
  83. data/scripts/bootstrap +1 -9
  84. data/scripts/wrapper +7 -0
  85. data/spec/fabricators/challenge_fabricator.rb +17 -0
  86. data/spec/fabricators/manifest_fabricator.rb +50 -0
  87. data/spec/fabricators/validator_fabricator.rb +12 -0
  88. data/spec/fixtures/{polytrix.yml → polytrix_tests.yml} +0 -0
  89. data/spec/fixtures/src-doc/_scenario.md.erb +1 -0
  90. data/spec/polytrix/challenge_runner_spec.rb +3 -3
  91. data/spec/polytrix/challenge_spec.rb +3 -4
  92. data/spec/polytrix/cli_spec.rb +39 -0
  93. data/spec/polytrix/configuration_spec.rb +45 -1
  94. data/spec/polytrix/documentation/helpers/code_helper_spec.rb +120 -0
  95. data/spec/polytrix/documentation_generator_spec.rb +41 -20
  96. data/spec/polytrix/file_finder_spec.rb +4 -3
  97. data/spec/polytrix/implementor_spec.rb +33 -0
  98. data/spec/polytrix/manifest_spec.rb +32 -14
  99. data/spec/polytrix/middleware/feature_executor_spec.rb +1 -1
  100. data/spec/polytrix/result_spec.rb +49 -0
  101. data/spec/polytrix/validations_spec.rb +16 -0
  102. data/spec/polytrix/validator_registry_spec.rb +39 -0
  103. data/spec/polytrix/validator_spec.rb +63 -0
  104. data/spec/polytrix_spec.rb +33 -7
  105. data/spec/spec_helper.rb +14 -1
  106. data/spec/thor_spy.rb +64 -0
  107. metadata +177 -160
  108. data/.rspec_parallel +0 -10
  109. data/Vagrantfile +0 -41
  110. data/features/0_identity_spec.rb +0 -40
  111. data/features/1_cloud_files_spec.rb +0 -48
  112. data/features/2_servers_spec.rb +0 -19
  113. data/features/features_helper.rb +0 -46
  114. data/features/helpers/cloudfiles_helper.rb +0 -31
  115. data/features/helpers/pacto_helper.rb +0 -33
  116. data/features/helpers/teardown_helper.rb +0 -49
  117. data/features/pacto/extensions/loaders/api_blueprint_loader.rb +0 -63
  118. data/features/pacto/extensions/loaders/simple_loader.rb +0 -55
  119. data/features/pacto/extensions/loaders/yaml_or_json_loader.rb +0 -17
  120. data/features/pacto/extensions/matchers.rb +0 -38
  121. data/features/phase2/feature_coverage_report.rb +0 -109
  122. data/features/phase2/run_all_features.rb +0 -14
  123. data/features/static_site/fixtures/index.html +0 -6
  124. data/lib/polytrix/challenge_builder.rb +0 -16
  125. data/lib/polytrix/core/file_finder.rb +0 -43
  126. data/lib/polytrix/core/result_tracker.rb +0 -25
  127. data/lib/polytrix/runners/middleware/pacto.rb +0 -59
  128. data/packer/.gitignore +0 -3
  129. data/packer/Berksfile +0 -15
  130. data/packer/Gemfile +0 -5
  131. data/packer/Vagrantfile +0 -128
  132. data/packer/cookbooks/drg/metadata.rb +0 -27
  133. data/packer/cookbooks/drg/recipes/admins.rb +0 -22
  134. data/packer/cookbooks/drg/recipes/default.rb +0 -9
  135. data/packer/cookbooks/drg/recipes/dotnet.rb +0 -4
  136. data/packer/cookbooks/drg/recipes/golang.rb +0 -4
  137. data/packer/cookbooks/drg/recipes/java.rb +0 -5
  138. data/packer/cookbooks/drg/recipes/php.rb +0 -10
  139. data/packer/cookbooks/drg/recipes/ruby.rb +0 -29
  140. data/packer/cookbooks/drg/recipes/system.rb +0 -13
  141. data/packer/create_box.sh +0 -10
  142. data/packer/http/preseed.cfg +0 -87
  143. data/packer/packer.json +0 -91
  144. data/packer/scripts/root_setup.sh +0 -37
  145. data/packer/scripts/setup.sh +0 -32
  146. data/pacto/config/pacto_server.rb +0 -40
  147. data/pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/extensions.json +0 -64
  148. data/pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/flavors/id.json +0 -100
  149. data/pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/images/id.json +0 -176
  150. data/pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/servers/id.json +0 -189
  151. data/pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/servers.json +0 -63
  152. data/pacto/contracts/dns.api.rackspacecloud.com/v1.0/_tenant_id/domains.json +0 -62
  153. data/pacto/contracts/identity.api.rackspacecloud.com/v2.0/tokens.json +0 -192
  154. data/pacto/contracts/monitoring.api.rackspacecloud.com/v1.0/_tenant_id/account.json +0 -39
  155. data/pacto/contracts/ord.autoscale.api.rackspacecloud.com/v1.0/_tenant_id/groups.json +0 -38
  156. data/pacto/contracts/ord.blockstorage.api.rackspacecloud.com/v1/_tenant_id/volumes.json +0 -30
  157. data/pacto/contracts/ord.databases.api.rackspacecloud.com/v1.0/_tenant_id/instances.json +0 -30
  158. data/pacto/contracts/ord.loadbalancers.api.rackspacecloud.com/v1.0/_tenant_id/loadbalancers.json +0 -114
  159. data/pacto/contracts/ord.queues.api.rackspacecloud.com/v1/_tenant_id/queues.json +0 -13
  160. data/pacto/contracts/ord.servers.api.rackspacecloud.com/v2/_tenant_id/os-networksv2.json +0 -46
  161. data/pacto/contracts/ord.servers.api.rackspacecloud.com/v2/_tenant_id/servers/detail.json +0 -230
  162. data/pacto/contracts/storage101.dfw1.clouddrive.com/v1/mosso_account/container/object.json +0 -15
  163. data/pacto/contracts/storage101.dfw1.clouddrive.com/v1/mosso_account.json +0 -43
  164. data/pacto/contracts/storage101.ord1.clouddrive.com/v1/_mosso_id.json +0 -44
  165. data/pacto/pacto_server.rb +0 -100
  166. data/pacto/rackspace_uri_map.yaml +0 -229
  167. data/scripts/cibuild +0 -4
  168. data/sdks/fog/.gitignore +0 -1
  169. data/sdks/fog/Gemfile +0 -5
  170. data/sdks/fog/challenges/all_connections.rb +0 -45
  171. data/sdks/fog/challenges/authenticate_token.rb +0 -15
  172. data/sdks/fog/challenges/cdn_enable_container.rb +0 -20
  173. data/sdks/fog/challenges/create_a_container.rb +0 -17
  174. data/sdks/fog/challenges/create_server.rb +0 -36
  175. data/sdks/fog/challenges/get_object_metadata.rb +0 -13
  176. data/sdks/fog/challenges/list_containers.rb +0 -10
  177. data/sdks/fog/challenges/provision_scalable_webapp.rb +0 -30
  178. data/sdks/fog/challenges/upload_folder.rb +0 -25
  179. data/sdks/fog/scripts/bootstrap.ps1 +0 -1
  180. data/sdks/fog/scripts/wrapper +0 -2
  181. data/sdks/fog/scripts/wrapper.ps1 +0 -1
  182. data/sdks/gophercloud/.gitignore +0 -2
  183. data/sdks/gophercloud/challenges/authenticate_token.go +0 -23
  184. data/sdks/gophercloud/scripts/bootstrap +0 -6
  185. data/sdks/gophercloud/scripts/wrapper +0 -10
  186. data/sdks/jclouds/.gitignore +0 -1
  187. data/sdks/jclouds/challenges/AuthenticateToken.java +0 -115
  188. data/sdks/jclouds/pom.xml +0 -34
  189. data/sdks/jclouds/scripts/bootstrap +0 -3
  190. data/sdks/jclouds/scripts/wrapper +0 -7
  191. data/sdks/openstack.net/.gitignore +0 -4
  192. data/sdks/openstack.net/.nuget/Microsoft.Build.dll +0 -0
  193. data/sdks/openstack.net/.nuget/NuGet.Config +0 -6
  194. data/sdks/openstack.net/.nuget/NuGet.exe +0 -0
  195. data/sdks/openstack.net/.nuget/NuGet.targets +0 -136
  196. data/sdks/openstack.net/Challenge.cs +0 -10
  197. data/sdks/openstack.net/RunChallenge.cs +0 -19
  198. data/sdks/openstack.net/challenges/AuthenticateToken.cs +0 -24
  199. data/sdks/openstack.net/challenges/Weird.cs +0 -133
  200. data/sdks/openstack.net/openstack.net.csproj +0 -58
  201. data/sdks/openstack.net/openstack.net.sln +0 -27
  202. data/sdks/openstack.net/openstack.net.userprefs +0 -8
  203. data/sdks/openstack.net/packages.config +0 -6
  204. data/sdks/openstack.net/scripts/bootstrap +0 -2
  205. data/sdks/openstack.net/scripts/bootstrap.ps1 +0 -2
  206. data/sdks/openstack.net/scripts/wrapper +0 -7
  207. data/sdks/openstack.net/scripts/wrapper.ps1 +0 -1
  208. data/sdks/php-opencloud/.gitignore +0 -4
  209. data/sdks/php-opencloud/challenges/all_connections.php +0 -64
  210. data/sdks/php-opencloud/challenges/authenticate_token.php +0 -14
  211. data/sdks/php-opencloud/challenges/create_server.php +0 -39
  212. data/sdks/php-opencloud/challenges/get_object_metadata.php +0 -19
  213. data/sdks/php-opencloud/composer.json +0 -5
  214. data/sdks/php-opencloud/scripts/bootstrap +0 -4
  215. data/sdks/php-opencloud/scripts/bootstrap.ps1 +0 -2
  216. data/sdks/php-opencloud/scripts/wrapper +0 -2
  217. data/sdks/php-opencloud/scripts/wrapper.ps1 +0 -1
  218. data/sdks/pkgcloud/.gitignore +0 -1
  219. data/sdks/pkgcloud/challenges/authenticate_token.js +0 -17
  220. data/sdks/pkgcloud/challenges/get_object_metadata.js +0 -18
  221. data/sdks/pkgcloud/scripts/bootstrap +0 -2
  222. data/sdks/pkgcloud/scripts/bootstrap.ps1 +0 -1
  223. data/sdks/pkgcloud/scripts/wrapper.ps1 +0 -1
  224. data/sdks/pyrax/.gitignore +0 -2
  225. data/sdks/pyrax/challenges/all_connections.py +0 -61
  226. data/sdks/pyrax/challenges/authenticate_token.py +0 -17
  227. data/sdks/pyrax/challenges/cdn_enable_container.py +0 -22
  228. data/sdks/pyrax/challenges/create_a_container.py +0 -21
  229. data/sdks/pyrax/challenges/create_server.py +0 -35
  230. data/sdks/pyrax/challenges/get_object_metadata.py +0 -17
  231. data/sdks/pyrax/challenges/upload_folder.py +0 -32
  232. data/sdks/pyrax/requirements.txt +0 -21
  233. data/sdks/pyrax/scripts/bootstrap +0 -9
  234. data/sdks/pyrax/scripts/bootstrap.ps1 +0 -7
  235. data/sdks/pyrax/scripts/wrapper +0 -3
  236. data/sdks/pyrax/scripts/wrapper.ps1 +0 -2
  237. data/spec/polytrix/challenge_builder_spec.rb +0 -16
  238. data/spec/rspec_spec.rb +0 -17
@@ -0,0 +1,63 @@
1
+ require 'spec_helper'
2
+
3
+ module Polytrix
4
+ describe 'Validator' do
5
+ describe '#initialize' do
6
+ let(:global_matcher) { Validator::UNIVERSAL_MATCHER }
7
+
8
+ it 'accepts scope options and callback' do
9
+ validator = Validator.new suite: 'java', sample: 'hello world' do |challenge|
10
+ # Validate the challenge
11
+ end
12
+ expect(validator.suite).to eq('java')
13
+ end
14
+
15
+ it 'defaults suite and sample to the universal matcher' do
16
+ validator = Validator.new do |challenge|
17
+ # Validate
18
+ end
19
+ expect(validator.suite).to eq(Validator::UNIVERSAL_MATCHER)
20
+ expect(validator.sample).to eq(Validator::UNIVERSAL_MATCHER)
21
+ end
22
+ end
23
+
24
+ describe '#should_validate?' do
25
+ let(:challenge) do
26
+ Fabricate(:challenge, suite: 'java', name: 'hello world')
27
+ end
28
+
29
+ it 'returns true if the scope matches the scope of the challenge' do
30
+ expect(validator('java', 'hello world').should_validate? challenge).to be true
31
+ expect(validator('java').should_validate? challenge).to be true
32
+ expect(validator(/j/, /hello/).should_validate? challenge).to be true
33
+ end
34
+
35
+ it 'returns false if the scope does not match' do
36
+ expect(validator('ruby', 'hello world').should_validate? challenge).to be false
37
+ expect(validator('ruby').should_validate? challenge).to be false
38
+ expect(validator(/r/, /hello/).should_validate? challenge).to be false
39
+ end
40
+ end
41
+
42
+ describe '#validate' do
43
+ let(:challenge) { Fabricate(:challenge) }
44
+
45
+ xit 'calls the validation callback' do
46
+ called = false
47
+ validator = Validator.new do |challenge|
48
+ called = true
49
+ end
50
+ expect { validator.validate challenge }.to change { called }.from(false).to(true)
51
+ end
52
+ end
53
+
54
+ def validator(*args)
55
+ scope = {}
56
+ scope[:suite] = args[0]
57
+ scope[:sample] = args[1] if args[1]
58
+ Validator.new scope do |challenge|
59
+ # Dummy validator
60
+ end
61
+ end
62
+ end
63
+ end
@@ -1,13 +1,39 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Polytrix do
4
- describe '.load_manifest' do
5
- it 'parses the YAML file' do
6
- expect do
7
- described_class.load_manifest 'spec/fixtures/polytrix.yml'
8
- end.to change {
9
- described_class.manifest
10
- }.from(nil).to(be_an_instance_of(Polytrix::Manifest))
4
+ describe '.find_implementor' do
5
+ it 'returns nil if no implementor is found for the file' do
6
+ tempfile = Tempfile.new(['foo', '.java'])
7
+ expect(described_class.find_implementor tempfile.path).to be_nil
8
+ end
9
+
10
+ it 'finds implementors from polytrix.yml in parent directories' do
11
+ sample_file = 'samples/sdks/custom/challenges/HelloWorld.custom'
12
+ implementor = described_class.find_implementor sample_file
13
+ expect(implementor).to be_an_instance_of Polytrix::Implementor
14
+ expect(implementor.name).to eq('My Custom project')
15
+ end
16
+
17
+ it 'finds implementors from by matching basedir to an already loaded implementor' do
18
+ Polytrix.configuration.implementor(
19
+ name: 'java',
20
+ basedir: 'samples/sdks/java'
21
+ )
22
+
23
+ sample_file = 'samples/sdks/java/challenges/HelloWorld.java'
24
+ implementor = described_class.find_implementor sample_file
25
+ expect(implementor).to be_an_instance_of Polytrix::Implementor
26
+ expect(implementor.name).to eq('java')
27
+ end
28
+ end
29
+
30
+ describe '.validate' do
31
+ context 'block given' do
32
+ it 'creates and registers a validator' do
33
+ Polytrix.validate suite: 'test', sample: 'test' do |challenge|
34
+ # Validate the challenge results
35
+ end
36
+ end
11
37
  end
12
38
  end
13
39
  end
data/spec/spec_helper.rb CHANGED
@@ -3,5 +3,18 @@ SimpleCov.start
3
3
 
4
4
  require 'polytrix'
5
5
  require 'polytrix/rspec'
6
+ require 'fabrication'
7
+ require 'thor_spy'
6
8
 
7
- Polytrix.implementors = Dir['sdks/*'].map{|sdk| File.basename sdk}
9
+ Polytrix.configure do |polytrix|
10
+ Dir['sdks/*'].each do |sdk|
11
+ polytrix.build_implementor sdk
12
+ end
13
+ end
14
+
15
+ RSpec.configure do |c|
16
+ c.before(:each) do
17
+ Polytrix.reset
18
+ end
19
+ c.expose_current_running_example_as :example
20
+ end
data/spec/thor_spy.rb ADDED
@@ -0,0 +1,64 @@
1
+ class ThorSpy
2
+ attr_reader :stdout, :stdin, :stderr
3
+ attr_accessor :app
4
+
5
+ def self.on(app, kernel = Kernel)
6
+ new([], StringIO.new, StringIO.new, StringIO.new, kernel).with_app(app)
7
+ end
8
+
9
+ # Allow everything fun to be injected from the outside while defaulting to normal implementations.
10
+ def initialize(argv = [], stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
11
+ @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
12
+ end
13
+
14
+ def app
15
+ fail 'You must set the Thor app via ThorSpy.on or #with_app before calling execute!' unless @app
16
+ @app
17
+ end
18
+
19
+ def with_app(app)
20
+ fail ArgumentError, 'app should be a class' unless app.is_a? Class
21
+ fail ArgumentError, 'app should be a subclass of Thor' unless app < Thor
22
+ @app = app
23
+ self
24
+ end
25
+
26
+ def execute!
27
+ exit_code = begin
28
+ # Thor accesses these streams directly rather than letting them be injected, so we replace them...
29
+ $stderr = @stderr
30
+ $stdin = @stdin
31
+ $stdout = @stdout
32
+
33
+ fail 'You must set the Thor app' if @app.nil?
34
+
35
+ # Run our normal Thor app the way we know and love.
36
+ app.start(@argv)
37
+
38
+ # Thor::Base#start does not have a return value, assume success if no exception is raised.
39
+ 0
40
+ rescue StandardError => e
41
+ # The ruby interpreter would pipe this to STDERR and exit 1 in the case of an unhandled exception
42
+ b = e.backtrace
43
+ b.unshift("#{b.shift}: #{e.message} (#{e.class})")
44
+ @stderr.puts(b.map { |s| "\tfrom #{s}" }.join("\n"))
45
+ 1
46
+ ensure
47
+ # ...then we put them back.
48
+ $stderr = STDERR
49
+ $stdin = STDIN
50
+ $stdout = STDOUT
51
+ end
52
+
53
+ # Proxy our exit code back to the injected kernel.
54
+ @kernel.exit(exit_code)
55
+ end
56
+
57
+ def method_missing(meth, *args)
58
+ # I don't think a block makes sense, unless it's stdin.
59
+ return super if block_given?
60
+
61
+ @argv = [meth.to_s].concat(args)
62
+ execute!
63
+ end
64
+ end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Lincoln
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-09 00:00:00.000000000 Z
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.19'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.19'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: mixlib-shellout
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +58,42 @@ dependencies:
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '2.14'
61
+ version: '2.99'
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '2.14'
68
+ version: '2.99'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: hashie
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '2.0'
75
+ version: '2.1'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '2.0'
82
+ version: '2.1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: padrino-helpers
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.12'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.12'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: bundler
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -94,182 +122,167 @@ dependencies:
94
122
  - - ">="
95
123
  - !ruby/object:Gem::Version
96
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: aruba
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.5'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.5'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.18.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.18.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: fabrication
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '2.11'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '2.11'
97
167
  description: A polyglot test runner for sample code
98
168
  email:
99
169
  - max@devopsy.com
100
- executables: []
170
+ executables:
171
+ - polytrix
101
172
  extensions: []
102
173
  extra_rdoc_files: []
103
174
  files:
104
175
  - ".gitignore"
105
176
  - ".groc.json"
106
177
  - ".rspec"
107
- - ".rspec_parallel"
178
+ - ".rubocop-todo.yml"
179
+ - ".rubocop.yml"
180
+ - ".travis.yml"
108
181
  - Gemfile
109
182
  - README.md
110
183
  - Rakefile
111
- - Vagrantfile
112
- - features/0_identity_spec.rb
113
- - features/1_cloud_files_spec.rb
114
- - features/2_servers_spec.rb
115
- - features/features_helper.rb
116
- - features/helpers/cloudfiles_helper.rb
117
- - features/helpers/pacto_helper.rb
118
- - features/helpers/teardown_helper.rb
119
- - features/pacto/extensions/loaders/api_blueprint_loader.rb
120
- - features/pacto/extensions/loaders/simple_loader.rb
121
- - features/pacto/extensions/loaders/yaml_or_json_loader.rb
122
- - features/pacto/extensions/matchers.rb
123
- - features/phase2/feature_coverage_report.rb
124
- - features/phase2/run_all_features.rb
125
- - features/static_site/fixtures/index.html
184
+ - bin/polytrix
185
+ - doc-src/_markdown.md
186
+ - doc-src/default_bootstrap.md
187
+ - docs/influences.md
188
+ - docs/samples/code2doc/java/HelloWorld.md
189
+ - docs/samples/code2doc/java/Quine.md
190
+ - docs/samples/code2doc/python/hello_world.md
191
+ - docs/samples/code2doc/python/quine.md
192
+ - docs/samples/code2doc/ruby/hello_world.md
193
+ - features/execution.feature
194
+ - features/fixtures/configs/empty.yml
195
+ - features/fixtures/configs/hello_world.yml
196
+ - features/fixtures/spec/polytrix_merge.rb
197
+ - features/fixtures/spec/polytrix_spec.rb
198
+ - features/reporting.feature
199
+ - features/step_definitions/sdk_steps.rb
200
+ - features/support/env.rb
126
201
  - lib/polytrix.rb
127
202
  - lib/polytrix/challenge.rb
128
- - lib/polytrix/challenge_builder.rb
129
203
  - lib/polytrix/challenge_runner.rb
204
+ - lib/polytrix/cli.rb
205
+ - lib/polytrix/cli/add.rb
206
+ - lib/polytrix/cli/report.rb
207
+ - lib/polytrix/cli/reports/hash_reporter.rb
208
+ - lib/polytrix/cli/reports/json_reporter.rb
209
+ - lib/polytrix/cli/reports/markdown_reporter.rb
210
+ - lib/polytrix/cli/reports/yaml_reporter.rb
130
211
  - lib/polytrix/configuration.rb
131
- - lib/polytrix/core/file_finder.rb
212
+ - lib/polytrix/core/file_system_helper.rb
132
213
  - lib/polytrix/core/implementor.rb
133
- - lib/polytrix/core/result_tracker.rb
214
+ - lib/polytrix/documentation/code_segmenter.rb
215
+ - lib/polytrix/documentation/comment_styles.rb
216
+ - lib/polytrix/documentation/helpers/code_helper.rb
217
+ - lib/polytrix/documentation/view_helper.rb
134
218
  - lib/polytrix/documentation_generator.rb
219
+ - lib/polytrix/executor.rb
220
+ - lib/polytrix/logger.rb
135
221
  - lib/polytrix/manifest.rb
136
222
  - lib/polytrix/result.rb
137
223
  - lib/polytrix/rspec.rb
138
224
  - lib/polytrix/rspec/documentation_formatter.rb
225
+ - lib/polytrix/rspec/yaml_report.rb
139
226
  - lib/polytrix/runners/linux_challenge_runner.rb
140
227
  - lib/polytrix/runners/middleware/change_directory.rb
141
228
  - lib/polytrix/runners/middleware/feature_executor.rb
142
- - lib/polytrix/runners/middleware/pacto.rb
143
229
  - lib/polytrix/runners/middleware/setup_env_vars.rb
144
230
  - lib/polytrix/runners/windows_challenge_runner.rb
231
+ - lib/polytrix/validation.rb
232
+ - lib/polytrix/validations.rb
233
+ - lib/polytrix/validator.rb
234
+ - lib/polytrix/validator_registry.rb
145
235
  - lib/polytrix/version.rb
146
- - packer/.gitignore
147
- - packer/Berksfile
148
- - packer/Gemfile
149
- - packer/Vagrantfile
150
- - packer/cookbooks/drg/metadata.rb
151
- - packer/cookbooks/drg/recipes/admins.rb
152
- - packer/cookbooks/drg/recipes/default.rb
153
- - packer/cookbooks/drg/recipes/dotnet.rb
154
- - packer/cookbooks/drg/recipes/golang.rb
155
- - packer/cookbooks/drg/recipes/java.rb
156
- - packer/cookbooks/drg/recipes/php.rb
157
- - packer/cookbooks/drg/recipes/ruby.rb
158
- - packer/cookbooks/drg/recipes/system.rb
159
- - packer/create_box.sh
160
- - packer/http/preseed.cfg
161
- - packer/packer.json
162
- - packer/scripts/root_setup.sh
163
- - packer/scripts/setup.sh
164
- - pacto/config/pacto_server.rb
165
- - pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/extensions.json
166
- - pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/flavors/id.json
167
- - pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/images/id.json
168
- - pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/servers.json
169
- - pacto/contracts/dfw.servers.api.rackspacecloud.com/v2/account_id/servers/id.json
170
- - pacto/contracts/dns.api.rackspacecloud.com/v1.0/_tenant_id/domains.json
171
- - pacto/contracts/identity.api.rackspacecloud.com/v2.0/tokens.json
172
- - pacto/contracts/monitoring.api.rackspacecloud.com/v1.0/_tenant_id/account.json
173
- - pacto/contracts/ord.autoscale.api.rackspacecloud.com/v1.0/_tenant_id/groups.json
174
- - pacto/contracts/ord.blockstorage.api.rackspacecloud.com/v1/_tenant_id/volumes.json
175
- - pacto/contracts/ord.databases.api.rackspacecloud.com/v1.0/_tenant_id/instances.json
176
- - pacto/contracts/ord.loadbalancers.api.rackspacecloud.com/v1.0/_tenant_id/loadbalancers.json
177
- - pacto/contracts/ord.queues.api.rackspacecloud.com/v1/_tenant_id/queues.json
178
- - pacto/contracts/ord.servers.api.rackspacecloud.com/v2/_tenant_id/os-networksv2.json
179
- - pacto/contracts/ord.servers.api.rackspacecloud.com/v2/_tenant_id/servers/detail.json
180
- - pacto/contracts/storage101.dfw1.clouddrive.com/v1/mosso_account.json
181
- - pacto/contracts/storage101.dfw1.clouddrive.com/v1/mosso_account/container/object.json
182
- - pacto/contracts/storage101.ord1.clouddrive.com/v1/_mosso_id.json
183
- - pacto/pacto_server.rb
184
- - pacto/rackspace_uri_map.yaml
185
236
  - polytrix.gemspec
237
+ - polytrix.rb
238
+ - polytrix_tests.yml
239
+ - resources/code_sample.tt
240
+ - samples/.gitignore
241
+ - samples/_markdown.md
242
+ - samples/default_bootstrap.rb
243
+ - samples/polytrix.rb
244
+ - samples/polytrix_cli.sh
245
+ - samples/polytrix_tests.yml
246
+ - samples/scripts/bootstrap
247
+ - samples/scripts/wrapper
248
+ - samples/sdks/custom/polytrix.yml
249
+ - samples/sdks/java/.gitignore
250
+ - samples/sdks/java/build.gradle
251
+ - samples/sdks/java/challenges/HelloWorld.java
252
+ - samples/sdks/java/challenges/Quine.java
253
+ - samples/sdks/java/code_sample.tt
254
+ - samples/sdks/java/scripts/bootstrap
255
+ - samples/sdks/java/scripts/wrapper
256
+ - samples/sdks/python/challenges/hello_world.py
257
+ - samples/sdks/python/challenges/quine.py
258
+ - samples/sdks/python/scripts/wrapper
259
+ - samples/sdks/ruby/challenges/hello_world.rb
186
260
  - scripts/bootstrap
187
- - scripts/cibuild
188
- - sdks/fog/.gitignore
189
- - sdks/fog/Gemfile
190
- - sdks/fog/challenges/all_connections.rb
191
- - sdks/fog/challenges/authenticate_token.rb
192
- - sdks/fog/challenges/cdn_enable_container.rb
193
- - sdks/fog/challenges/create_a_container.rb
194
- - sdks/fog/challenges/create_server.rb
195
- - sdks/fog/challenges/get_object_metadata.rb
196
- - sdks/fog/challenges/list_containers.rb
197
- - sdks/fog/challenges/provision_scalable_webapp.rb
198
- - sdks/fog/challenges/upload_folder.rb
199
- - sdks/fog/scripts/bootstrap
200
- - sdks/fog/scripts/bootstrap.ps1
201
- - sdks/fog/scripts/wrapper
202
- - sdks/fog/scripts/wrapper.ps1
203
- - sdks/gophercloud/.gitignore
204
- - sdks/gophercloud/challenges/authenticate_token.go
205
- - sdks/gophercloud/scripts/bootstrap
206
- - sdks/gophercloud/scripts/wrapper
207
- - sdks/jclouds/.gitignore
208
- - sdks/jclouds/challenges/AuthenticateToken.java
209
- - sdks/jclouds/pom.xml
210
- - sdks/jclouds/scripts/bootstrap
211
- - sdks/jclouds/scripts/wrapper
212
- - sdks/openstack.net/.gitignore
213
- - sdks/openstack.net/.nuget/Microsoft.Build.dll
214
- - sdks/openstack.net/.nuget/NuGet.Config
215
- - sdks/openstack.net/.nuget/NuGet.exe
216
- - sdks/openstack.net/.nuget/NuGet.targets
217
- - sdks/openstack.net/Challenge.cs
218
- - sdks/openstack.net/RunChallenge.cs
219
- - sdks/openstack.net/challenges/AuthenticateToken.cs
220
- - sdks/openstack.net/challenges/Weird.cs
221
- - sdks/openstack.net/openstack.net.csproj
222
- - sdks/openstack.net/openstack.net.sln
223
- - sdks/openstack.net/openstack.net.userprefs
224
- - sdks/openstack.net/packages.config
225
- - sdks/openstack.net/scripts/bootstrap
226
- - sdks/openstack.net/scripts/bootstrap.ps1
227
- - sdks/openstack.net/scripts/wrapper
228
- - sdks/openstack.net/scripts/wrapper.ps1
229
- - sdks/php-opencloud/.gitignore
230
- - sdks/php-opencloud/challenges/all_connections.php
231
- - sdks/php-opencloud/challenges/authenticate_token.php
232
- - sdks/php-opencloud/challenges/create_server.php
233
- - sdks/php-opencloud/challenges/get_object_metadata.php
234
- - sdks/php-opencloud/composer.json
235
- - sdks/php-opencloud/scripts/bootstrap
236
- - sdks/php-opencloud/scripts/bootstrap.ps1
237
- - sdks/php-opencloud/scripts/wrapper
238
- - sdks/php-opencloud/scripts/wrapper.ps1
239
- - sdks/pkgcloud/.gitignore
240
- - sdks/pkgcloud/challenges/authenticate_token.js
241
- - sdks/pkgcloud/challenges/get_object_metadata.js
242
- - sdks/pkgcloud/scripts/bootstrap
243
- - sdks/pkgcloud/scripts/bootstrap.ps1
244
- - sdks/pkgcloud/scripts/wrapper
245
- - sdks/pkgcloud/scripts/wrapper.ps1
246
- - sdks/pyrax/.gitignore
247
- - sdks/pyrax/challenges/all_connections.py
248
- - sdks/pyrax/challenges/authenticate_token.py
249
- - sdks/pyrax/challenges/cdn_enable_container.py
250
- - sdks/pyrax/challenges/create_a_container.py
251
- - sdks/pyrax/challenges/create_server.py
252
- - sdks/pyrax/challenges/get_object_metadata.py
253
- - sdks/pyrax/challenges/upload_folder.py
254
- - sdks/pyrax/requirements.txt
255
- - sdks/pyrax/scripts/bootstrap
256
- - sdks/pyrax/scripts/bootstrap.ps1
257
- - sdks/pyrax/scripts/wrapper
258
- - sdks/pyrax/scripts/wrapper.ps1
261
+ - scripts/wrapper
262
+ - spec/fabricators/challenge_fabricator.rb
263
+ - spec/fabricators/manifest_fabricator.rb
264
+ - spec/fabricators/validator_fabricator.rb
259
265
  - spec/fixtures/factorial.py
260
- - spec/fixtures/polytrix.yml
266
+ - spec/fixtures/polytrix_tests.yml
267
+ - spec/fixtures/src-doc/_scenario.md.erb
261
268
  - spec/fixtures/src-doc/quine.md.erb
262
- - spec/polytrix/challenge_builder_spec.rb
263
269
  - spec/polytrix/challenge_runner_spec.rb
264
270
  - spec/polytrix/challenge_spec.rb
271
+ - spec/polytrix/cli_spec.rb
265
272
  - spec/polytrix/configuration_spec.rb
273
+ - spec/polytrix/documentation/helpers/code_helper_spec.rb
266
274
  - spec/polytrix/documentation_generator_spec.rb
267
275
  - spec/polytrix/file_finder_spec.rb
276
+ - spec/polytrix/implementor_spec.rb
268
277
  - spec/polytrix/manifest_spec.rb
269
278
  - spec/polytrix/middleware/feature_executor_spec.rb
279
+ - spec/polytrix/result_spec.rb
280
+ - spec/polytrix/validations_spec.rb
281
+ - spec/polytrix/validator_registry_spec.rb
282
+ - spec/polytrix/validator_spec.rb
270
283
  - spec/polytrix_spec.rb
271
- - spec/rspec_spec.rb
272
284
  - spec/spec_helper.rb
285
+ - spec/thor_spy.rb
273
286
  homepage: ''
274
287
  licenses:
275
288
  - MIT
@@ -285,9 +298,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
285
298
  version: '0'
286
299
  required_rubygems_version: !ruby/object:Gem::Requirement
287
300
  requirements:
288
- - - ">="
301
+ - - ">"
289
302
  - !ruby/object:Gem::Version
290
- version: '0'
303
+ version: 1.3.1
291
304
  requirements: []
292
305
  rubyforge_project:
293
306
  rubygems_version: 2.2.0
@@ -295,31 +308,35 @@ signing_key:
295
308
  specification_version: 4
296
309
  summary: A polyglot test runner for sample code
297
310
  test_files:
298
- - features/0_identity_spec.rb
299
- - features/1_cloud_files_spec.rb
300
- - features/2_servers_spec.rb
301
- - features/features_helper.rb
302
- - features/helpers/cloudfiles_helper.rb
303
- - features/helpers/pacto_helper.rb
304
- - features/helpers/teardown_helper.rb
305
- - features/pacto/extensions/loaders/api_blueprint_loader.rb
306
- - features/pacto/extensions/loaders/simple_loader.rb
307
- - features/pacto/extensions/loaders/yaml_or_json_loader.rb
308
- - features/pacto/extensions/matchers.rb
309
- - features/phase2/feature_coverage_report.rb
310
- - features/phase2/run_all_features.rb
311
- - features/static_site/fixtures/index.html
311
+ - features/execution.feature
312
+ - features/fixtures/configs/empty.yml
313
+ - features/fixtures/configs/hello_world.yml
314
+ - features/fixtures/spec/polytrix_merge.rb
315
+ - features/fixtures/spec/polytrix_spec.rb
316
+ - features/reporting.feature
317
+ - features/step_definitions/sdk_steps.rb
318
+ - features/support/env.rb
319
+ - spec/fabricators/challenge_fabricator.rb
320
+ - spec/fabricators/manifest_fabricator.rb
321
+ - spec/fabricators/validator_fabricator.rb
312
322
  - spec/fixtures/factorial.py
313
- - spec/fixtures/polytrix.yml
323
+ - spec/fixtures/polytrix_tests.yml
324
+ - spec/fixtures/src-doc/_scenario.md.erb
314
325
  - spec/fixtures/src-doc/quine.md.erb
315
- - spec/polytrix/challenge_builder_spec.rb
316
326
  - spec/polytrix/challenge_runner_spec.rb
317
327
  - spec/polytrix/challenge_spec.rb
328
+ - spec/polytrix/cli_spec.rb
318
329
  - spec/polytrix/configuration_spec.rb
330
+ - spec/polytrix/documentation/helpers/code_helper_spec.rb
319
331
  - spec/polytrix/documentation_generator_spec.rb
320
332
  - spec/polytrix/file_finder_spec.rb
333
+ - spec/polytrix/implementor_spec.rb
321
334
  - spec/polytrix/manifest_spec.rb
322
335
  - spec/polytrix/middleware/feature_executor_spec.rb
336
+ - spec/polytrix/result_spec.rb
337
+ - spec/polytrix/validations_spec.rb
338
+ - spec/polytrix/validator_registry_spec.rb
339
+ - spec/polytrix/validator_spec.rb
323
340
  - spec/polytrix_spec.rb
324
- - spec/rspec_spec.rb
325
341
  - spec/spec_helper.rb
342
+ - spec/thor_spy.rb
data/.rspec_parallel DELETED
@@ -1,10 +0,0 @@
1
- -I features
2
- --format MatrixFormatter::Formatters::JSONFormatter --out reports/matrix<%= ENV['TEST_ENV_NUMBER'].to_i %>.json
3
- --format ParallelTests::RSpec::SummaryLogger --out reports/spec_summary.log
4
- --format ParallelTests::RSpec::FailuresLogger --out reports/failing_specs.log
5
- --format RspecJunitFormatter --out reports/junit/rspec<%= ENV['TEST_ENV_NUMBER'].to_i %>.xml
6
- --format documentation
7
- --color
8
- --require features_helper.rb
9
- --failure-exit-code 0
10
-