nonnative 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +22 -0
- data/.editorconfig +24 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +9 -0
- data/.ruby-version +1 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +64 -0
- data/LICENSE +24 -0
- data/Makefile +10 -0
- data/README.md +49 -0
- data/Rakefile +4 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/nonnative.rb +29 -0
- data/lib/nonnative/configuration.rb +8 -0
- data/lib/nonnative/cucumber.rb +9 -0
- data/lib/nonnative/error.rb +6 -0
- data/lib/nonnative/version.rb +5 -0
- data/nonnative.gemspec +33 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b01dea5ebaa9e2aa1d2d063048becc970754fe1a4a3ba54dd5714c36249d3ccd
|
4
|
+
data.tar.gz: e3f5c4de9b55c8c57bee33aff57c3a37eaa8929cad2189c2b885f9694ed5414d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d418eca36f02f59274be718dd49e6a9c29d1526fd085f3f33f38833ff48a436ce72144e51aba59347ed75769819a5944711111caa0fb0c5d3e6f4512965b7a56
|
7
|
+
data.tar.gz: 69f9f4dc3f987245774ec0faf9175be5ec0e601cc14d9923270e3edf66f2561075cefd7fa637eed773886abce6721dfe0dae8f02e646e2e4348cb9311a748ea0
|
@@ -0,0 +1,22 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
docker:
|
5
|
+
- image: circleci/ruby:2.6
|
6
|
+
environment:
|
7
|
+
BUNDLE_JOBS: "3"
|
8
|
+
BUNDLE_PATH: vendor/bundle
|
9
|
+
BUNDLE_RETRY: "3"
|
10
|
+
steps:
|
11
|
+
- checkout
|
12
|
+
- restore_cache:
|
13
|
+
keys:
|
14
|
+
- nonnative-gem-cache-{{ checksum "Gemfile.lock" }}
|
15
|
+
- nonnative-gem-cache-
|
16
|
+
- run: make dependencies
|
17
|
+
- save_cache:
|
18
|
+
key: nonnative-gem-cache-{{ checksum "Gemfile.lock" }}
|
19
|
+
paths:
|
20
|
+
- vendor/bundle
|
21
|
+
- run: make features
|
22
|
+
- run: make analysis
|
data/.editorconfig
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
root = true
|
2
|
+
|
3
|
+
[*]
|
4
|
+
charset = utf-8
|
5
|
+
end_of_line = lf
|
6
|
+
indent_style = space
|
7
|
+
insert_final_newline = true
|
8
|
+
trim_trailing_whitespace = true
|
9
|
+
|
10
|
+
[Makefile]
|
11
|
+
indent_style = tab
|
12
|
+
indent_size = 8
|
13
|
+
|
14
|
+
[*.go]
|
15
|
+
indent_style = tab
|
16
|
+
indent_size = 4
|
17
|
+
|
18
|
+
[*.rb]
|
19
|
+
indent_style = space
|
20
|
+
indent_size = 2
|
21
|
+
|
22
|
+
[*.feature]
|
23
|
+
indent_style = space
|
24
|
+
indent_size = 2
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.6.3
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
nonnative (0.1.0)
|
5
|
+
cucumber
|
6
|
+
rspec-expectations
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ast (2.4.0)
|
12
|
+
backports (3.15.0)
|
13
|
+
builder (3.2.3)
|
14
|
+
cucumber (3.1.2)
|
15
|
+
builder (>= 2.1.2)
|
16
|
+
cucumber-core (~> 3.2.0)
|
17
|
+
cucumber-expressions (~> 6.0.1)
|
18
|
+
cucumber-wire (~> 0.0.1)
|
19
|
+
diff-lcs (~> 1.3)
|
20
|
+
gherkin (~> 5.1.0)
|
21
|
+
multi_json (>= 1.7.5, < 2.0)
|
22
|
+
multi_test (>= 0.1.2)
|
23
|
+
cucumber-core (3.2.1)
|
24
|
+
backports (>= 3.8.0)
|
25
|
+
cucumber-tag_expressions (~> 1.1.0)
|
26
|
+
gherkin (~> 5.0)
|
27
|
+
cucumber-expressions (6.0.1)
|
28
|
+
cucumber-tag_expressions (1.1.1)
|
29
|
+
cucumber-wire (0.0.1)
|
30
|
+
diff-lcs (1.3)
|
31
|
+
gherkin (5.1.0)
|
32
|
+
jaro_winkler (1.5.3)
|
33
|
+
multi_json (1.13.1)
|
34
|
+
multi_test (0.1.2)
|
35
|
+
parallel (1.17.0)
|
36
|
+
parser (2.6.3.0)
|
37
|
+
ast (~> 2.4.0)
|
38
|
+
rainbow (3.0.0)
|
39
|
+
rake (12.3.2)
|
40
|
+
rspec-expectations (3.8.4)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.8.0)
|
43
|
+
rspec-support (3.8.2)
|
44
|
+
rubocop (0.73.0)
|
45
|
+
jaro_winkler (~> 1.5.1)
|
46
|
+
parallel (~> 1.10)
|
47
|
+
parser (>= 2.6)
|
48
|
+
rainbow (>= 2.2.2, < 4.0)
|
49
|
+
ruby-progressbar (~> 1.7)
|
50
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
51
|
+
ruby-progressbar (1.10.1)
|
52
|
+
unicode-display_width (1.6.0)
|
53
|
+
|
54
|
+
PLATFORMS
|
55
|
+
ruby
|
56
|
+
|
57
|
+
DEPENDENCIES
|
58
|
+
bundler
|
59
|
+
nonnative!
|
60
|
+
rake
|
61
|
+
rubocop
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
1.17.2
|
data/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
2
|
+
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4
|
+
distribute this software, either in source code form or as a compiled
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
6
|
+
means.
|
7
|
+
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
9
|
+
of this software dedicate any and all copyright interest in the
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
11
|
+
of the public at large and to the detriment of our heirs and
|
12
|
+
successors. We intend this dedication to be an overt act of
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
14
|
+
software under copyright law.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
For more information, please refer to <http://unlicense.org>
|
data/Makefile
ADDED
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Nonnative
|
2
|
+
|
3
|
+
Allows you to keep using the power of ruby to test other systems
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'nonnative'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install nonnative
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Configure the system withh the process and how long we give to wait until it's ready
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'nonnative'
|
27
|
+
|
28
|
+
Nonnative.configure do |config|
|
29
|
+
config.process = 'features/support/bin/start'
|
30
|
+
config.wait = 0.5
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
Tag your cucumber scenarios with @nonnative
|
35
|
+
|
36
|
+
```cucumber
|
37
|
+
@nonnative
|
38
|
+
Scenario: Successful Response
|
39
|
+
When we send "test" with the echo client
|
40
|
+
Then we should receive a "test" response
|
41
|
+
```
|
42
|
+
|
43
|
+
## Development
|
44
|
+
|
45
|
+
Look at the Makefile
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nonnative.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'nonnative'
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require 'irb'
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/nonnative.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cucumber'
|
4
|
+
|
5
|
+
require 'nonnative/version'
|
6
|
+
require 'nonnative/error'
|
7
|
+
require 'nonnative/configuration'
|
8
|
+
require 'nonnative/cucumber'
|
9
|
+
|
10
|
+
module Nonnative
|
11
|
+
class << self
|
12
|
+
def configuration
|
13
|
+
@configuration ||= Nonnative::Configuration.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def configure
|
17
|
+
yield configuration if block_given?
|
18
|
+
end
|
19
|
+
|
20
|
+
def start
|
21
|
+
@child_pid = spawn(configuration.process)
|
22
|
+
sleep configuration.wait
|
23
|
+
end
|
24
|
+
|
25
|
+
def stop
|
26
|
+
Process.kill('SIGHUP', @child_pid)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/nonnative.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'nonnative/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'nonnative'
|
9
|
+
spec.version = Nonnative::VERSION
|
10
|
+
spec.authors = ['Alex Falkowski']
|
11
|
+
spec.email = ['alexrfalkowski@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = 'Allows you to keep using the power of ruby to test other systems'
|
14
|
+
spec.description = spec.summary
|
15
|
+
spec.homepage = 'https://github.com/alexfalkowski/nonnative'
|
16
|
+
spec.license = 'Unlicense'
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = 'exe'
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ['lib']
|
26
|
+
|
27
|
+
spec.add_dependency 'cucumber'
|
28
|
+
spec.add_dependency 'rspec-expectations'
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler'
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'rubocop'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nonnative
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Falkowski
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: cucumber
|
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-expectations
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
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: bundler
|
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: rubocop
|
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
|
+
description: Allows you to keep using the power of ruby to test other systems
|
84
|
+
email:
|
85
|
+
- alexrfalkowski@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".circleci/config.yml"
|
91
|
+
- ".editorconfig"
|
92
|
+
- ".gitignore"
|
93
|
+
- ".rubocop.yml"
|
94
|
+
- ".ruby-version"
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE
|
98
|
+
- Makefile
|
99
|
+
- README.md
|
100
|
+
- Rakefile
|
101
|
+
- bin/console
|
102
|
+
- bin/setup
|
103
|
+
- lib/nonnative.rb
|
104
|
+
- lib/nonnative/configuration.rb
|
105
|
+
- lib/nonnative/cucumber.rb
|
106
|
+
- lib/nonnative/error.rb
|
107
|
+
- lib/nonnative/version.rb
|
108
|
+
- nonnative.gemspec
|
109
|
+
homepage: https://github.com/alexfalkowski/nonnative
|
110
|
+
licenses:
|
111
|
+
- Unlicense
|
112
|
+
metadata: {}
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubygems_version: 3.0.3
|
129
|
+
signing_key:
|
130
|
+
specification_version: 4
|
131
|
+
summary: Allows you to keep using the power of ruby to test other systems
|
132
|
+
test_files: []
|