reportir 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +81 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/lib/reportir/static_site_template/.editorconfig +13 -0
  13. data/lib/reportir/static_site_template/.gitattributes +1 -0
  14. data/lib/reportir/static_site_template/.gitignore +2 -0
  15. data/lib/reportir/static_site_template/.htaccess +984 -0
  16. data/lib/reportir/static_site_template/404.html +60 -0
  17. data/lib/reportir/static_site_template/LICENSE.txt +19 -0
  18. data/lib/reportir/static_site_template/apple-touch-icon.png +0 -0
  19. data/lib/reportir/static_site_template/browserconfig.xml +12 -0
  20. data/lib/reportir/static_site_template/crossdomain.xml +15 -0
  21. data/lib/reportir/static_site_template/css/font/FontAwesome.otf +0 -0
  22. data/lib/reportir/static_site_template/css/font/fontawesome-webfont.eot +0 -0
  23. data/lib/reportir/static_site_template/css/font/fontawesome-webfont.svg +284 -0
  24. data/lib/reportir/static_site_template/css/font/fontawesome-webfont.ttf +0 -0
  25. data/lib/reportir/static_site_template/css/font/fontawesome-webfont.woff +0 -0
  26. data/lib/reportir/static_site_template/css/main.css +348 -0
  27. data/lib/reportir/static_site_template/css/normalize.css +424 -0
  28. data/lib/reportir/static_site_template/css/vendor/bootstrap.min.css +5 -0
  29. data/lib/reportir/static_site_template/css/vendor/font-awesome.min.css +33 -0
  30. data/lib/reportir/static_site_template/doc/TOC.md +29 -0
  31. data/lib/reportir/static_site_template/doc/css.md +162 -0
  32. data/lib/reportir/static_site_template/doc/extend.md +663 -0
  33. data/lib/reportir/static_site_template/doc/faq.md +62 -0
  34. data/lib/reportir/static_site_template/doc/html.md +223 -0
  35. data/lib/reportir/static_site_template/doc/js.md +37 -0
  36. data/lib/reportir/static_site_template/doc/misc.md +175 -0
  37. data/lib/reportir/static_site_template/doc/usage.md +130 -0
  38. data/lib/reportir/static_site_template/favicon.ico +0 -0
  39. data/lib/reportir/static_site_template/humans.txt +15 -0
  40. data/lib/reportir/static_site_template/img/.gitignore +0 -0
  41. data/lib/reportir/static_site_template/img/pagination.png +0 -0
  42. data/lib/reportir/static_site_template/index.html +78 -0
  43. data/lib/reportir/static_site_template/js/main.js +0 -0
  44. data/lib/reportir/static_site_template/js/plugins.js +24 -0
  45. data/lib/reportir/static_site_template/js/vendor/bootstrap.min.js +7 -0
  46. data/lib/reportir/static_site_template/js/vendor/jquery-1.11.3.min.js +6 -0
  47. data/lib/reportir/static_site_template/js/vendor/jquery.slides.min.js +7 -0
  48. data/lib/reportir/static_site_template/js/vendor/modernizr-2.8.3.min.js +4 -0
  49. data/lib/reportir/static_site_template/robots.txt +5 -0
  50. data/lib/reportir/static_site_template/tile-wide.png +0 -0
  51. data/lib/reportir/static_site_template/tile.png +0 -0
  52. data/lib/reportir/version.rb +3 -0
  53. data/lib/reportir.rb +109 -0
  54. data/reportir.gemspec +29 -0
  55. metadata +196 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 92e1fdb20e4ee2b4656c292e1974f78d23a8f6e1
4
+ data.tar.gz: 63532ec97ab47789d2c49d940035f598c762d63a
5
+ SHA512:
6
+ metadata.gz: de24debe6eed4a9781916c426469619641f3d602876260c06adf77342d6f16ff72895658d21d43a8fed08c2a22aa97b876861a3f8e634299e86735521476e5ab
7
+ data.tar.gz: f9bbea3fcc04d0abf5dc1e96b0bbdb891e0db8ebcfa526d2fdeaaf8c66c449c74ad30397c9ef38b27965920f4c516d62ed7bf8b56413a139412fe2e20db93f73
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
4
+ before_install: gem install bundler -v 1.10.5
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in reportir.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Dean Shelton
4
+
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:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
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 ADDED
@@ -0,0 +1,81 @@
1
+ # Reportir
2
+
3
+ Use Reportir to send your feature spec's screenshots to an s3 bucket as a functional static site.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'reportir'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install reportir
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ # spec_helper.rb
25
+ require 'reportir'
26
+ require 'rspec'
27
+
28
+ RSpec.configure do |config|
29
+ # Include Reportir's methods in your tests
30
+ config.include Reportir, type: :feature
31
+
32
+ # Send auto-generated results to your configured s3 bucket
33
+ config.after :each, type: :feature do
34
+ upload_result_to_s3_as_static_site
35
+ end
36
+ end
37
+ ```
38
+
39
+ Take Screenshots using the helper method anywhere in your spec.
40
+ Screenshots will display in the order they were taken.
41
+ ```ruby
42
+ # spec/features/my_feature_spec.rb
43
+ describe 'My Feature', :type => :feature do
44
+ it 'does something' do
45
+ ...
46
+ s3_screenshot('whatever-bananas') # 1-whatever-bananas.png
47
+ ...
48
+ s3_screenshot('whatever-apples') # 2-whatever-apples.png
49
+ ...
50
+ end
51
+ end
52
+ ```
53
+ Just ensure your ENV cars are configured, and run your spec like normal.
54
+ ```bash
55
+ # ~/.bashrc
56
+ export ENV['AWS_DEFAULT_BUCKET']=<YOURBUCKETNAME>
57
+ export ENV['AWS_ACCESS_KEY_ID']=<YOURACCESSKEYID>
58
+ export ENV['AWS_SECRET_ACCESS_KEY']=<YOURSECRETACCESSKEY>
59
+ export ENV['AWS_DEFAULT_REGION']=<YOURREGION>
60
+
61
+ ```
62
+ ```bash
63
+ rspec spec/features
64
+ ```
65
+
66
+
67
+ ## Development
68
+
69
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
70
+
71
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
72
+
73
+ ## Contributing
74
+
75
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/reportir. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
76
+
77
+
78
+ ## License
79
+
80
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
81
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "reportir"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,13 @@
1
+ # editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_size = 4
8
+ indent_style = space
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
@@ -0,0 +1 @@
1
+ * text=auto
@@ -0,0 +1,2 @@
1
+ # Include your project-specific ignores in this file
2
+ # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files