factory_bot_instrumentation 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +30 -0
  3. data/.gitignore +13 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +43 -0
  6. data/.simplecov +3 -0
  7. data/.travis.yml +28 -0
  8. data/Appraisals +15 -0
  9. data/CHANGELOG.md +3 -0
  10. data/Gemfile +8 -0
  11. data/Gemfile.lock +161 -0
  12. data/LICENSE +21 -0
  13. data/Makefile +96 -0
  14. data/README.md +713 -0
  15. data/Rakefile +8 -0
  16. data/app/assets/config/factory_bot_instrumentation_manifest.js +2 -0
  17. data/app/assets/javascripts/factory_bot_instrumentation/application.js +16 -0
  18. data/app/assets/javascripts/factory_bot_instrumentation/create.js +134 -0
  19. data/app/assets/javascripts/factory_bot_instrumentation/hooks.js +123 -0
  20. data/app/assets/javascripts/factory_bot_instrumentation/lib/form.js +66 -0
  21. data/app/assets/javascripts/factory_bot_instrumentation/lib/utils.js +116 -0
  22. data/app/assets/stylesheets/factory_bot_instrumentation/application.css +91 -0
  23. data/app/controllers/factory_bot/instrumentation/application_controller.rb +7 -0
  24. data/app/controllers/factory_bot/instrumentation/root_controller.rb +113 -0
  25. data/app/views/factory_bot/instrumentation/application/_config.html.erb +5 -0
  26. data/app/views/factory_bot/instrumentation/application/_scripts.html.erb +18 -0
  27. data/app/views/factory_bot/instrumentation/application/_spinner.html.erb +7 -0
  28. data/app/views/factory_bot/instrumentation/application/_styles.html.erb +20 -0
  29. data/app/views/factory_bot/instrumentation/root/index.html.erb +31 -0
  30. data/app/views/factory_bot_instrumentation/_blocks.html.erb +6 -0
  31. data/app/views/factory_bot_instrumentation/_navigation.html.erb +13 -0
  32. data/app/views/factory_bot_instrumentation/_scripts.html.erb +5 -0
  33. data/app/views/factory_bot_instrumentation/_styles.html.erb +5 -0
  34. data/app/views/layouts/factory_bot/instrumentation/application.html.erb +29 -0
  35. data/bin/rails +14 -0
  36. data/config/instrumentation.yml +55 -0
  37. data/config/routes.rb +8 -0
  38. data/doc/assets/blocks.png +0 -0
  39. data/doc/assets/customized.png +0 -0
  40. data/doc/assets/navigation.png +0 -0
  41. data/doc/assets/project.svg +68 -0
  42. data/doc/assets/regular.png +0 -0
  43. data/docker-compose.yml +8 -0
  44. data/factory_bot_instrumentation.gemspec +33 -0
  45. data/gemfiles/rails_4.gemfile +7 -0
  46. data/gemfiles/rails_4.gemfile.lock +147 -0
  47. data/gemfiles/rails_5.0.gemfile +7 -0
  48. data/gemfiles/rails_5.0.gemfile.lock +154 -0
  49. data/gemfiles/rails_5.1.gemfile +7 -0
  50. data/gemfiles/rails_5.1.gemfile.lock +154 -0
  51. data/gemfiles/rails_5.2.gemfile +7 -0
  52. data/gemfiles/rails_5.2.gemfile.lock +162 -0
  53. data/lib/factory_bot/instrumentation/configuration.rb +20 -0
  54. data/lib/factory_bot/instrumentation/engine.rb +19 -0
  55. data/lib/factory_bot/instrumentation/version.rb +7 -0
  56. data/lib/factory_bot_instrumentation.rb +43 -0
  57. metadata +209 -0
data/config/routes.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ FactoryBot::Instrumentation::Engine.routes.draw do
4
+ # The instrumentation frontend
5
+ root to: 'root#index'
6
+ # The instrumentation API endpoint
7
+ post '/', to: 'root#create'
8
+ end
Binary file
Binary file
Binary file
@@ -0,0 +1,68 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ version="1.1"
9
+ id="Ebene_1"
10
+ x="0px"
11
+ y="0px"
12
+ viewBox="0 0 800 200"
13
+ xml:space="preserve"
14
+ width="800"
15
+ height="200"><metadata
16
+ id="metadata33"><rdf:RDF><cc:Work
17
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
18
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
19
+ id="defs31" />
20
+ <style
21
+ type="text/css"
22
+ id="style2">
23
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#E73E11;}
24
+ .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#0371B9;}
25
+ .st2{fill:#132E48;}
26
+ .st3{font-family:'OpenSans-Bold';}
27
+ .st4{font-size:29.5168px;}
28
+ .st5{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
29
+ .st6{opacity:0.5;fill:#132E48;}
30
+ .st7{font-family:'OpenSans';}
31
+ .st8{font-size:12px;}
32
+ </style>
33
+ <g
34
+ transform="translate(0,1.53584)"
35
+ id="g828"><g
36
+ transform="translate(35.93985,35.66416)"
37
+ id="g8">
38
+ <path
39
+ style="clip-rule:evenodd;fill:#e73e11;fill-rule:evenodd"
40
+ id="path4"
41
+ d="m -0.1,124.4 c 0,0 33.7,-123.2 66.7,-123.2 12.8,0 26.9,21.9 38.8,47.2 -23.6,27.9 -66.6,59.7 -94,76 -7.1,0 -11.5,0 -11.5,0 z"
42
+ class="st0" />
43
+ <path
44
+ style="clip-rule:evenodd;fill:#0371b9;fill-rule:evenodd"
45
+ id="path6"
46
+ d="m 88.1,101.8 c 13.5,-10.4 18.4,-16.2 27.1,-25.4 10,25.7 16.7,48 16.7,48 0,0 -41.4,0 -78,0 14.6,-7.9 18.7,-10.7 34.2,-22.6 z"
47
+ class="st1" />
48
+ </g><text
49
+ y="106.40316"
50
+ x="192.43155"
51
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.51733398px;font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#132e48"
52
+ id="text10"
53
+ class="st2 st3 st4">factory_bot_instrumentation</text>
54
+ <rect
55
+ style="clip-rule:evenodd;fill:none;fill-rule:evenodd"
56
+ id="rect12"
57
+ height="24"
58
+ width="314.5"
59
+ class="st5"
60
+ y="118.06416"
61
+ x="194.23985" /><text
62
+ y="127.22146"
63
+ x="194.21715"
64
+ style="font-size:12px;font-family:'Open Sans', sans-serif;opacity:0.5;fill:#132e48;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
65
+ id="text14"
66
+ class="st6 st7 st8">Allow your testers to generate test data on demand</text>
67
+ </g>
68
+ </svg>
Binary file
@@ -0,0 +1,8 @@
1
+ version: "3"
2
+ services:
3
+ test:
4
+ image: ruby:2.3
5
+ network_mode: bridge
6
+ working_dir: /app
7
+ volumes:
8
+ - .:/app
@@ -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 'factory_bot/instrumentation/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'factory_bot_instrumentation'
9
+ spec.version = FactoryBot::Instrumentation::VERSION
10
+ spec.authors = ['Hermann Mayer']
11
+ spec.email = ['hermann.mayer92@gmail.com']
12
+
13
+ spec.summary = 'Allow your testers to generate test data on demand'
14
+ spec.description = 'Allow your testers to generate test data on demand'
15
+ spec.homepage = 'https://github.com/hausgold/factory_bot_instrumentation'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = 'exe'
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_runtime_dependency 'rails', '>= 3.2.0'
25
+ spec.add_runtime_dependency 'factory_bot'
26
+
27
+ spec.add_development_dependency 'bundler', '~> 1.16'
28
+ spec.add_development_dependency 'rspec', '~> 3.0'
29
+ spec.add_development_dependency 'simplecov', '~> 0.15'
30
+ spec.add_development_dependency 'timecop', '~> 0.9.1'
31
+ spec.add_development_dependency 'sqlite3'
32
+ spec.add_development_dependency 'appraisal'
33
+ end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "4.2.10"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,147 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ factory_bot_instrumentation (0.1.0)
5
+ factory_bot
6
+ rails (>= 3.2.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.10)
12
+ actionpack (= 4.2.10)
13
+ actionview (= 4.2.10)
14
+ activejob (= 4.2.10)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.10)
18
+ actionview (= 4.2.10)
19
+ activesupport (= 4.2.10)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.10)
25
+ activesupport (= 4.2.10)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
30
+ activejob (4.2.10)
31
+ activesupport (= 4.2.10)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.10)
34
+ activesupport (= 4.2.10)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.10)
37
+ activemodel (= 4.2.10)
38
+ activesupport (= 4.2.10)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.10)
41
+ i18n (~> 0.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ appraisal (2.2.0)
46
+ bundler
47
+ rake
48
+ thor (>= 0.14.0)
49
+ arel (6.0.4)
50
+ builder (3.2.3)
51
+ concurrent-ruby (1.1.4)
52
+ crass (1.0.4)
53
+ diff-lcs (1.3)
54
+ docile (1.3.1)
55
+ erubis (2.7.0)
56
+ factory_bot (4.11.1)
57
+ activesupport (>= 3.0.0)
58
+ globalid (0.4.1)
59
+ activesupport (>= 4.2.0)
60
+ i18n (0.9.5)
61
+ concurrent-ruby (~> 1.0)
62
+ json (2.1.0)
63
+ loofah (2.2.3)
64
+ crass (~> 1.0.2)
65
+ nokogiri (>= 1.5.9)
66
+ mail (2.7.1)
67
+ mini_mime (>= 0.1.1)
68
+ mini_mime (1.0.1)
69
+ mini_portile2 (2.4.0)
70
+ minitest (5.11.3)
71
+ nokogiri (1.10.0)
72
+ mini_portile2 (~> 2.4.0)
73
+ rack (1.6.11)
74
+ rack-test (0.6.3)
75
+ rack (>= 1.0)
76
+ rails (4.2.10)
77
+ actionmailer (= 4.2.10)
78
+ actionpack (= 4.2.10)
79
+ actionview (= 4.2.10)
80
+ activejob (= 4.2.10)
81
+ activemodel (= 4.2.10)
82
+ activerecord (= 4.2.10)
83
+ activesupport (= 4.2.10)
84
+ bundler (>= 1.3.0, < 2.0)
85
+ railties (= 4.2.10)
86
+ sprockets-rails
87
+ rails-deprecated_sanitizer (1.0.3)
88
+ activesupport (>= 4.2.0.alpha)
89
+ rails-dom-testing (1.0.9)
90
+ activesupport (>= 4.2.0, < 5.0)
91
+ nokogiri (~> 1.6)
92
+ rails-deprecated_sanitizer (>= 1.0.1)
93
+ rails-html-sanitizer (1.0.4)
94
+ loofah (~> 2.2, >= 2.2.2)
95
+ railties (4.2.10)
96
+ actionpack (= 4.2.10)
97
+ activesupport (= 4.2.10)
98
+ rake (>= 0.8.7)
99
+ thor (>= 0.18.1, < 2.0)
100
+ rake (12.3.2)
101
+ rspec (3.8.0)
102
+ rspec-core (~> 3.8.0)
103
+ rspec-expectations (~> 3.8.0)
104
+ rspec-mocks (~> 3.8.0)
105
+ rspec-core (3.8.0)
106
+ rspec-support (~> 3.8.0)
107
+ rspec-expectations (3.8.2)
108
+ diff-lcs (>= 1.2.0, < 2.0)
109
+ rspec-support (~> 3.8.0)
110
+ rspec-mocks (3.8.0)
111
+ diff-lcs (>= 1.2.0, < 2.0)
112
+ rspec-support (~> 3.8.0)
113
+ rspec-support (3.8.0)
114
+ simplecov (0.16.1)
115
+ docile (~> 1.1)
116
+ json (>= 1.8, < 3)
117
+ simplecov-html (~> 0.10.0)
118
+ simplecov-html (0.10.2)
119
+ sprockets (3.7.2)
120
+ concurrent-ruby (~> 1.0)
121
+ rack (> 1, < 3)
122
+ sprockets-rails (3.2.1)
123
+ actionpack (>= 4.0)
124
+ activesupport (>= 4.0)
125
+ sprockets (>= 3.0.0)
126
+ sqlite3 (1.3.13)
127
+ thor (0.20.3)
128
+ thread_safe (0.3.6)
129
+ timecop (0.9.1)
130
+ tzinfo (1.2.5)
131
+ thread_safe (~> 0.1)
132
+
133
+ PLATFORMS
134
+ ruby
135
+
136
+ DEPENDENCIES
137
+ activesupport (= 4.2.10)
138
+ appraisal
139
+ bundler (~> 1.16)
140
+ factory_bot_instrumentation!
141
+ rspec (~> 3.0)
142
+ simplecov (~> 0.15)
143
+ sqlite3
144
+ timecop (~> 0.9.1)
145
+
146
+ BUNDLED WITH
147
+ 1.17.2
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activesupport", "5.0.6"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,154 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ factory_bot_instrumentation (0.1.0)
5
+ factory_bot
6
+ rails (>= 3.2.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (5.0.6)
12
+ actionpack (= 5.0.6)
13
+ nio4r (>= 1.2, < 3.0)
14
+ websocket-driver (~> 0.6.1)
15
+ actionmailer (5.0.6)
16
+ actionpack (= 5.0.6)
17
+ actionview (= 5.0.6)
18
+ activejob (= 5.0.6)
19
+ mail (~> 2.5, >= 2.5.4)
20
+ rails-dom-testing (~> 2.0)
21
+ actionpack (5.0.6)
22
+ actionview (= 5.0.6)
23
+ activesupport (= 5.0.6)
24
+ rack (~> 2.0)
25
+ rack-test (~> 0.6.3)
26
+ rails-dom-testing (~> 2.0)
27
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
+ actionview (5.0.6)
29
+ activesupport (= 5.0.6)
30
+ builder (~> 3.1)
31
+ erubis (~> 2.7.0)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
+ activejob (5.0.6)
35
+ activesupport (= 5.0.6)
36
+ globalid (>= 0.3.6)
37
+ activemodel (5.0.6)
38
+ activesupport (= 5.0.6)
39
+ activerecord (5.0.6)
40
+ activemodel (= 5.0.6)
41
+ activesupport (= 5.0.6)
42
+ arel (~> 7.0)
43
+ activesupport (5.0.6)
44
+ concurrent-ruby (~> 1.0, >= 1.0.2)
45
+ i18n (~> 0.7)
46
+ minitest (~> 5.1)
47
+ tzinfo (~> 1.1)
48
+ appraisal (2.2.0)
49
+ bundler
50
+ rake
51
+ thor (>= 0.14.0)
52
+ arel (7.1.4)
53
+ builder (3.2.3)
54
+ concurrent-ruby (1.1.4)
55
+ crass (1.0.4)
56
+ diff-lcs (1.3)
57
+ docile (1.3.1)
58
+ erubis (2.7.0)
59
+ factory_bot (4.11.1)
60
+ activesupport (>= 3.0.0)
61
+ globalid (0.4.1)
62
+ activesupport (>= 4.2.0)
63
+ i18n (0.9.5)
64
+ concurrent-ruby (~> 1.0)
65
+ json (2.1.0)
66
+ loofah (2.2.3)
67
+ crass (~> 1.0.2)
68
+ nokogiri (>= 1.5.9)
69
+ mail (2.7.1)
70
+ mini_mime (>= 0.1.1)
71
+ method_source (0.9.2)
72
+ mini_mime (1.0.1)
73
+ mini_portile2 (2.4.0)
74
+ minitest (5.11.3)
75
+ nio4r (2.3.1)
76
+ nokogiri (1.10.0)
77
+ mini_portile2 (~> 2.4.0)
78
+ rack (2.0.6)
79
+ rack-test (0.6.3)
80
+ rack (>= 1.0)
81
+ rails (5.0.6)
82
+ actioncable (= 5.0.6)
83
+ actionmailer (= 5.0.6)
84
+ actionpack (= 5.0.6)
85
+ actionview (= 5.0.6)
86
+ activejob (= 5.0.6)
87
+ activemodel (= 5.0.6)
88
+ activerecord (= 5.0.6)
89
+ activesupport (= 5.0.6)
90
+ bundler (>= 1.3.0)
91
+ railties (= 5.0.6)
92
+ sprockets-rails (>= 2.0.0)
93
+ rails-dom-testing (2.0.3)
94
+ activesupport (>= 4.2.0)
95
+ nokogiri (>= 1.6)
96
+ rails-html-sanitizer (1.0.4)
97
+ loofah (~> 2.2, >= 2.2.2)
98
+ railties (5.0.6)
99
+ actionpack (= 5.0.6)
100
+ activesupport (= 5.0.6)
101
+ method_source
102
+ rake (>= 0.8.7)
103
+ thor (>= 0.18.1, < 2.0)
104
+ rake (12.3.2)
105
+ rspec (3.8.0)
106
+ rspec-core (~> 3.8.0)
107
+ rspec-expectations (~> 3.8.0)
108
+ rspec-mocks (~> 3.8.0)
109
+ rspec-core (3.8.0)
110
+ rspec-support (~> 3.8.0)
111
+ rspec-expectations (3.8.2)
112
+ diff-lcs (>= 1.2.0, < 2.0)
113
+ rspec-support (~> 3.8.0)
114
+ rspec-mocks (3.8.0)
115
+ diff-lcs (>= 1.2.0, < 2.0)
116
+ rspec-support (~> 3.8.0)
117
+ rspec-support (3.8.0)
118
+ simplecov (0.16.1)
119
+ docile (~> 1.1)
120
+ json (>= 1.8, < 3)
121
+ simplecov-html (~> 0.10.0)
122
+ simplecov-html (0.10.2)
123
+ sprockets (3.7.2)
124
+ concurrent-ruby (~> 1.0)
125
+ rack (> 1, < 3)
126
+ sprockets-rails (3.2.1)
127
+ actionpack (>= 4.0)
128
+ activesupport (>= 4.0)
129
+ sprockets (>= 3.0.0)
130
+ sqlite3 (1.3.13)
131
+ thor (0.20.3)
132
+ thread_safe (0.3.6)
133
+ timecop (0.9.1)
134
+ tzinfo (1.2.5)
135
+ thread_safe (~> 0.1)
136
+ websocket-driver (0.6.5)
137
+ websocket-extensions (>= 0.1.0)
138
+ websocket-extensions (0.1.3)
139
+
140
+ PLATFORMS
141
+ ruby
142
+
143
+ DEPENDENCIES
144
+ activesupport (= 5.0.6)
145
+ appraisal
146
+ bundler (~> 1.16)
147
+ factory_bot_instrumentation!
148
+ rspec (~> 3.0)
149
+ simplecov (~> 0.15)
150
+ sqlite3
151
+ timecop (~> 0.9.1)
152
+
153
+ BUNDLED WITH
154
+ 1.17.2