symbiote 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ec0549216f3d55f7e16bd2b37aed307395e9f60
4
- data.tar.gz: cf2d54e3824dcafa388cb6efa9539670f4bbb9b4
3
+ metadata.gz: d0ab020ad934aae6710883ab1c922ef9d61b895f
4
+ data.tar.gz: d37334c4edc39c670619d02e06d03737bbd2d142
5
5
  SHA512:
6
- metadata.gz: 0539a73d3ee9cdd64a84dff6bec77b3ca78b648c4206be051c2839fd32bdaf5f4a33d8e053fe705b9532228ddd6fa39c2d0822e830db0ab64c7010f6ebd15eca
7
- data.tar.gz: e84ee2e270ca6c58a3166cbe00f9eecbdb7ff30343156a42e74687f8ce9c80464b991c5e79f340f1db05992ab44f891b2d77aaa5c8f5b8f5c6bae89c01d71e31
6
+ metadata.gz: 8fc0f9fd299c7f54a991e4ed5f9dd30fb733ad560c9b65022a3d195394416be396627dd9e5da0a5b3cbd31f42e9f5e107e82c7f99755facf900b3ec0e7045e8d
7
+ data.tar.gz: b85f717e24efc176aa8f4ab87a3c2411a4b0e9b8a9514f81b387bd25fa22ddde1eb7c14e8c2ca8c3a3908630746cbf9aee9b2f26f4cc3642083150aa80370c2b
data/.gitignore CHANGED
@@ -1,19 +1,40 @@
1
- *.gem
2
- *.rbc
1
+ # Ruby-Specific
2
+
3
+ /.bundle/
4
+ /.yardoc
5
+ /Gemfile.lock
6
+ /_yardoc/
7
+
8
+ # Ouput-Specific
9
+
10
+ /coverage/
11
+ /doc/
12
+ /pkg/
13
+ /spec/reports/
14
+ /tmp/
15
+ *.log
16
+ *.tmp
17
+ *.swp
18
+ *.bak
19
+
20
+ # IDE-Specific
21
+
3
22
  .idea
4
- .bundle
5
- .config
6
- .yardoc
7
- Gemfile.lock
8
- InstalledFiles
9
- _yardoc
10
- coverage
11
- doc/
12
- output/
13
- lib/bundler/man
14
- pkg
15
- rdoc
16
- spec/reports
17
- test/tmp
18
- test/version_tmp
19
- tmp
23
+ .settings
24
+ .project
25
+ .classpath
26
+ *.iws
27
+
28
+ # Windows-Specific
29
+
30
+ Thumbs.db
31
+
32
+ # Mac OS-Specific
33
+
34
+ *.DS_Store
35
+ ._*
36
+
37
+ # Linux-Specific
38
+
39
+ .directory
40
+ .Trash-*
data/.hound.yml ADDED
@@ -0,0 +1,62 @@
1
+ AllCops:
2
+ Exclude:
3
+ - symbiote.gemspec
4
+ - test/*.rb
5
+ - spec/**/*
6
+
7
+ # Removing need for frozen string literal comment.
8
+ Style/FrozenStringLiteralComment:
9
+ Enabled: false
10
+
11
+ # Removing the preference for string single quotes.
12
+ Style/StringLiterals:
13
+ Enabled: false
14
+
15
+ # Missing top-level module documentation comment.
16
+ Style/Documentation:
17
+ Enabled: false
18
+
19
+ # Prefer reduce over inject.
20
+ Style/CollectionMethods:
21
+ PreferredMethods:
22
+ reduce: 'inject'
23
+
24
+ # Use each_with_object instead of inject.
25
+ Style/EachWithObject:
26
+ Enabled: false
27
+
28
+ # Prefer fail over raise.
29
+ Style/SignalException:
30
+ Enabled: false
31
+
32
+ # This never works for validations.
33
+ Style/AlignHash:
34
+ EnforcedLastArgumentHashStyle: ignore_implicit
35
+
36
+ # Align multi-line params with previous line.
37
+ Style/AlignParameters:
38
+ EnforcedStyle: with_fixed_indentation
39
+
40
+ # Indent `when` clause one step from `case`.
41
+ Style/CaseIndentation:
42
+ IndentOneStep: true
43
+
44
+ # Don't force bad var names for reduce/inject loops.
45
+ Style/SingleLineBlockParams:
46
+ Enabled: false
47
+
48
+ # For method chains, keep the dot with the method name.
49
+ Style/DotPosition:
50
+ EnforcedStyle: leading
51
+
52
+ # Stop nesting so hard.
53
+ Metrics/BlockNesting:
54
+ Max: 2
55
+
56
+ # Encourage short methods.
57
+ Metrics/MethodLength:
58
+ Max: 10
59
+
60
+ # Encourage fewer parameters.
61
+ Metrics/ParameterLists:
62
+ Max: 4
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ inherit_from:
2
+ - .hound.yml
data/.travis.yml CHANGED
@@ -1,14 +1,5 @@
1
- script: "rake"
2
-
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
-
7
- branches:
8
- only:
9
- - master
10
- - develop
11
-
12
- notifications:
13
- recipients:
14
- - jeffnyman@gmail.com
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.13.3
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at jeffnyman@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in symbiote.gemspec
4
4
  gemspec
5
-
6
- gem 'coveralls', require: false
data/LICENSE.txt CHANGED
@@ -1,22 +1,21 @@
1
- Copyright (c) 2013 Jeff Nyman
1
+ The MIT License (MIT)
2
2
 
3
- MIT License
3
+ Copyright (c) 2016 Jeff Nyman
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
12
11
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
15
14
 
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
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,46 +1,65 @@
1
- Symbiote
2
- ========
1
+ # Symbiote
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/symbiote.svg)](http://badge.fury.io/rb/symbiote)
4
+ [![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jnyman/symbiote/blob/master/LICENSE.txt)
3
5
 
4
- [![Build Status](https://secure.travis-ci.org/jnyman/symbiote.png)](http://travis-ci.org/jnyman/symbiote)
5
6
  [![Dependency Status](https://gemnasium.com/jnyman/symbiote.png)](https://gemnasium.com/jnyman/symbiote)
6
- [![Gem Version](https://badge.fury.io/rb/symbiote.png)](http://badge.fury.io/rb/symbiote)
7
- [![Coverage Status](https://coveralls.io/repos/jnyman/symbiote/badge.png?branch=master)](https://coveralls.io/r/jnyman/symbiote)
8
7
 
9
- Description
10
- -----------
8
+ Symbiote provides a semantic DSL to construct a fluent interface for test execution libraries.
9
+
10
+ This fluent interface promotes the idea of compressibility of your test logic, allowing for more factoring, more reuse, and less repetition. You can use Symbiote directly as an automated test library or you can use it with other tools such as RSpec, Cucumber, or anything else that allows you to delegate down to a different level of abstraction.
11
+
12
+ Note that Symbiote is currently being put together as part of a series of classes I am teaching on micro-framework construction for modern testing practices.
11
13
 
12
- Symbiote is designed to be a more streamlined version of Symbiont. Specifically, it will be streamlined in terms of its feature set, based on lessons I learned during the development of Symbiont. The general interface that Symbiont exposed will still be available.
14
+ ## Installation
13
15
 
14
- Installation
15
- ------------
16
+ To get the latest stable release, add this line to your application's Gemfile:
16
17
 
17
- Add this line to your application's Gemfile:
18
+ ```ruby
19
+ gem 'symbiote'
20
+ ```
18
21
 
19
- gem 'symbiote'
22
+ To get the latest code:
20
23
 
21
- And then execute:
24
+ ```ruby
25
+ gem 'symbiote', git: 'https://github.com/jnyman/symbiote'
26
+ ```
27
+
28
+ After doing one of the above, execute the following command:
22
29
 
23
30
  $ bundle
24
31
 
25
- Or install it yourself as:
32
+ You can also install Symbiote just as you would any other gem:
26
33
 
27
34
  $ gem install symbiote
28
35
 
29
- Using Symbiote
30
- --------------
36
+ ## Usage
37
+
38
+ Probably the best way to get a feel for the current state of the code is to look at the [Symbiote test script](https://github.com/jnyman/symbiote/blob/master/test/symbiote-script.rb). If you clone the repository, you can see this script in action by running the command `rake scripts:simple`.
39
+
40
+ More details will be forthcoming as the project evolves.
41
+
42
+ ## Development
43
+
44
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec:all` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`.
45
+
46
+ ## Contributing
47
+
48
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/jnyman/symbiote](https://github.com/jnyman/symbiote). The testing ecosystem of Ruby is very large and this project is intended to be a welcoming arena for collaboration on yet another testing tool. As such, contributors are very much welcome but are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
+
50
+ To contribute to Symbiote:
51
+
52
+ 1. [Fork the project](http://gun.io/blog/how-to-github-fork-branch-and-pull-request/).
53
+ 2. Create your feature branch. (`git checkout -b my-new-feature`)
54
+ 3. Commit your changes. (`git commit -am 'new feature'`)
55
+ 4. Push the branch. (`git push origin my-new-feature`)
56
+ 5. Create a new [pull request](https://help.github.com/articles/using-pull-requests).
31
57
 
32
- See the [Symbiote wiki](https://github.com/jnyman/symbiote/wiki) for details on how to use the tool.
58
+ ## Author
33
59
 
34
- Contributing
35
- ------------
60
+ * [Jeff Nyman](http://testerstories.com)
36
61
 
37
- 1. Fork the project.
38
- 2. Create a branch for your change.
39
- 3. Make your feature additions or bug fixes in your branch.
40
- 4. Create unit tests (in spec) for your changes.
41
- 5. Create acceptance tests (in specs) for your changes.
42
- 6. Commit your changes.
43
- 7. Push to the branch.
44
- 8. Create a new [pull request](https://help.github.com/articles/using-pull-requests).
62
+ ## License
45
63
 
46
- Do note that pull requests are very welcome and are considered better than bug reports. Please create a topic branch for every separate change that you make. When you make commits, do not change the rakefile, version or history information.
64
+ Symbiote is distributed under the [MIT](http://www.opensource.org/licenses/MIT) license.
65
+ See the [LICENSE](https://github.com/jnyman/symbiote/blob/master/LICENSE.txt) file for details.
data/Rakefile CHANGED
@@ -1,22 +1,38 @@
1
1
  #!/usr/bin/env rake
2
- require 'bundler/gem_tasks'
3
- require 'rspec/core/rake_task'
2
+ require "bundler/gem_tasks"
3
+ require "rdoc/task"
4
+ require "rubocop/rake_task"
5
+ require "rspec/core/rake_task"
6
+
7
+ RuboCop::RakeTask.new
8
+
9
+ namespace :scripts do
10
+ desc 'Run the Symbiote script.'
11
+ task :simple do
12
+ system('ruby ./test/symbiote-script.rb')
13
+ end
14
+ end
4
15
 
5
16
  namespace :spec do
6
- desc 'Get file output for spec execution'
7
- RSpec::Core::RakeTask.new('detail') do |config|
17
+ desc 'Clean all generated reports'
18
+ task :clean do
19
+ system('rm -rf spec/reports')
20
+ end
21
+
22
+ RSpec::Core::RakeTask.new(all: :clean) do |config|
8
23
  options = %w(--color)
9
24
  options += %w(--format documentation)
10
- options += %w(--format nested --out output/rspec-report.txt)
11
- options += %w(--format html --out output/rspec-report.html)
25
+ options += %w(--format html --out spec/reports/unit-test-report.html)
26
+
12
27
  config.rspec_opts = options
13
28
  end
14
29
  end
15
30
 
16
- RSpec::Core::RakeTask.new do |config|
17
- options = %w(--color)
18
- options += %w(--format documentation)
19
- config.rspec_opts = options
31
+ Rake::RDocTask.new do |rdoc|
32
+ rdoc.rdoc_dir = 'doc'
33
+ rdoc.main = 'README.md'
34
+ rdoc.title = "Symbiote #{Symbiote::VERSION}"
35
+ rdoc.rdoc_files.include('README*', 'lib/**/*.rb')
20
36
  end
21
37
 
22
- task :default => :spec
38
+ task default: ['spec:all', :rubocop]
data/bin/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "symbiote"
5
+
6
+ require "pry"
7
+ Pry.start
8
+
9
+ # require "irb"
10
+ # IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here