quke_demo_app 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +68 -0
  3. data/Rakefile +34 -0
  4. data/bin/console +13 -0
  5. data/bin/setup +8 -0
  6. data/exe/quke_demo_app +43 -0
  7. data/lib/quke.rb +7 -0
  8. data/lib/quke/demo_app.rb +11 -0
  9. data/lib/quke/demo_app/app.rb +79 -0
  10. data/lib/quke/demo_app/cli.rb +19 -0
  11. data/lib/quke/demo_app/concerns/can_have_search_results.rb +33 -0
  12. data/lib/quke/demo_app/public/assets/css/bootstrap.min.css +6 -0
  13. data/lib/quke/demo_app/public/assets/css/custom.css +3 -0
  14. data/lib/quke/demo_app/public/assets/css/ie10-viewport-bug-workaround.css +15 -0
  15. data/lib/quke/demo_app/public/assets/images/favicon.ico +0 -0
  16. data/lib/quke/demo_app/public/assets/images/quke.png +0 -0
  17. data/lib/quke/demo_app/public/assets/javascript/bootstrap.min.js +7 -0
  18. data/lib/quke/demo_app/public/assets/javascript/ie10-viewport-bug-workaround.js +23 -0
  19. data/lib/quke/demo_app/public/assets/javascript/jquery.min.js +6 -0
  20. data/lib/quke/demo_app/version.rb +7 -0
  21. data/lib/quke/demo_app/views/_partial_example.erb +5 -0
  22. data/lib/quke/demo_app/views/about.erb +2 -0
  23. data/lib/quke/demo_app/views/contact.erb +2 -0
  24. data/lib/quke/demo_app/views/css_selector.erb +67 -0
  25. data/lib/quke/demo_app/views/index.erb +17 -0
  26. data/lib/quke/demo_app/views/javascript_error.erb +19 -0
  27. data/lib/quke/demo_app/views/layout.erb +71 -0
  28. data/lib/quke/demo_app/views/radio_button.erb +55 -0
  29. data/lib/quke/demo_app/views/request.erb +20 -0
  30. data/lib/quke/demo_app/views/search.erb +39 -0
  31. data/spec/quke/demo_app/app_spec.rb +153 -0
  32. data/spec/quke/demo_app/cli_spec.rb +35 -0
  33. data/spec/quke/demo_app_spec.rb +12 -0
  34. data/spec/spec_helper.rb +83 -0
  35. data/spec/support/aruba.rb +3 -0
  36. data/spec/support/pry.rb +7 -0
  37. data/spec/support/quke_demo_app.rb +4 -0
  38. data/spec/support/rack_test.rb +22 -0
  39. data/spec/support/simplecov.rb +17 -0
  40. metadata +250 -0
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "aruba/rspec"
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Support debugging in the tests. Add `binding.pry` wherever you want execution
4
+ # to stop and the debugger to kick in.
5
+ # Details on the debugging commands can be found here
6
+ # https://github.com/deivid-rodriguez/pry-byebug#commands
7
+ require "pry-byebug"
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Need to require our actual code files.
4
+ require "quke/demo_app"
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Details for this file taken from Sinatra docs
4
+ # http://recipes.sinatrarb.com/p/testing/rspec?#label-RSpec
5
+ #
6
+ # Plus a blog post
7
+ # https://rubyplus.com/articles/1831-Sinatra-Basics-Testing-using-RSpec-for-Modular-Sinatra-Application
8
+
9
+ require "rack/test"
10
+ require "rspec"
11
+
12
+ ENV["RACK_ENV"] = "test"
13
+
14
+ module RSpecMixin
15
+ include Rack::Test::Methods
16
+
17
+ def app
18
+ described_class
19
+ end
20
+ end
21
+
22
+ RSpec.configure { |c| c.include RSpecMixin }
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "simplecov"
4
+
5
+ # We start it with the rails param to ensure it includes coverage for all code
6
+ # started by the rails app, and not just the files touched by our unit tests.
7
+ # This gives us the most accurate assessment of our unit test coverage
8
+ # https://github.com/colszowka/simplecov#getting-started
9
+ SimpleCov.start do
10
+ # We filter the spec folder, mainly to ensure that any dummy apps don't get
11
+ # included in the coverage report. However our intent is that nothing in the
12
+ # spec folder should be included
13
+ add_filter "/spec/"
14
+ # The version file is simply just that, so we do not feel the need to ensure
15
+ # we have a test for it
16
+ add_filter "lib/quke/demo_app/version"
17
+ end
metadata ADDED
@@ -0,0 +1,250 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: quke_demo_app
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Defra
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sinatra
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: thor
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: aruba
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: cucumber
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: defra_ruby_style
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
+ - !ruby/object:Gem::Dependency
84
+ name: github_changelog_generator
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack-test
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '3.0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '3.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simplecov
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: A Sinatra web app packaged as a gem that is used to demonstrate https://github/DEFRA/quke
168
+ email:
169
+ - alan.cruikshanks@environment-agency.gov.uk
170
+ executables:
171
+ - quke_demo_app
172
+ extensions: []
173
+ extra_rdoc_files: []
174
+ files:
175
+ - README.md
176
+ - Rakefile
177
+ - bin/console
178
+ - bin/setup
179
+ - exe/quke_demo_app
180
+ - lib/quke.rb
181
+ - lib/quke/demo_app.rb
182
+ - lib/quke/demo_app/app.rb
183
+ - lib/quke/demo_app/cli.rb
184
+ - lib/quke/demo_app/concerns/can_have_search_results.rb
185
+ - lib/quke/demo_app/public/assets/css/bootstrap.min.css
186
+ - lib/quke/demo_app/public/assets/css/custom.css
187
+ - lib/quke/demo_app/public/assets/css/ie10-viewport-bug-workaround.css
188
+ - lib/quke/demo_app/public/assets/images/favicon.ico
189
+ - lib/quke/demo_app/public/assets/images/quke.png
190
+ - lib/quke/demo_app/public/assets/javascript/bootstrap.min.js
191
+ - lib/quke/demo_app/public/assets/javascript/ie10-viewport-bug-workaround.js
192
+ - lib/quke/demo_app/public/assets/javascript/jquery.min.js
193
+ - lib/quke/demo_app/version.rb
194
+ - lib/quke/demo_app/views/_partial_example.erb
195
+ - lib/quke/demo_app/views/about.erb
196
+ - lib/quke/demo_app/views/contact.erb
197
+ - lib/quke/demo_app/views/css_selector.erb
198
+ - lib/quke/demo_app/views/index.erb
199
+ - lib/quke/demo_app/views/javascript_error.erb
200
+ - lib/quke/demo_app/views/layout.erb
201
+ - lib/quke/demo_app/views/radio_button.erb
202
+ - lib/quke/demo_app/views/request.erb
203
+ - lib/quke/demo_app/views/search.erb
204
+ - spec/quke/demo_app/app_spec.rb
205
+ - spec/quke/demo_app/cli_spec.rb
206
+ - spec/quke/demo_app_spec.rb
207
+ - spec/spec_helper.rb
208
+ - spec/support/aruba.rb
209
+ - spec/support/pry.rb
210
+ - spec/support/quke_demo_app.rb
211
+ - spec/support/rack_test.rb
212
+ - spec/support/simplecov.rb
213
+ homepage: https://github.com/DEFRA/quke-demo-app
214
+ licenses:
215
+ - The Open Government Licence (OGL) Version 3
216
+ metadata:
217
+ allowed_push_host: https://rubygems.org
218
+ homepage_uri: https://github.com/DEFRA/quke-demo-app
219
+ source_code_uri: https://github.com/Cruikshanks/quke-demo-app
220
+ changelog_uri: https://github.com/Cruikshanks/quke-demo-app/blob/master/CHANGELOG.md
221
+ post_install_message:
222
+ rdoc_options: []
223
+ require_paths:
224
+ - lib
225
+ required_ruby_version: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ required_rubygems_version: !ruby/object:Gem::Requirement
231
+ requirements:
232
+ - - ">="
233
+ - !ruby/object:Gem::Version
234
+ version: '0'
235
+ requirements: []
236
+ rubyforge_project:
237
+ rubygems_version: 2.7.7
238
+ signing_key:
239
+ specification_version: 4
240
+ summary: A web app used to demo Quke functionality.
241
+ test_files:
242
+ - spec/spec_helper.rb
243
+ - spec/support/pry.rb
244
+ - spec/support/quke_demo_app.rb
245
+ - spec/support/simplecov.rb
246
+ - spec/support/rack_test.rb
247
+ - spec/support/aruba.rb
248
+ - spec/quke/demo_app_spec.rb
249
+ - spec/quke/demo_app/app_spec.rb
250
+ - spec/quke/demo_app/cli_spec.rb