europeana-feedback-button 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -2
- data/.rubocop.yml +249 -0
- data/.travis.yml +17 -0
- data/Gemfile +4 -3
- data/README.md +3 -1
- data/Rakefile +2 -1
- data/app/controllers/europeana/feedback_button/application_controller.rb +1 -0
- data/app/helpers/europeana/feedback_button/application_helper.rb +1 -0
- data/app/helpers/europeana/feedback_button/feedback_helper.rb +0 -1
- data/app/mailers/europeana/feedback_button/feedback_mailer.rb +1 -1
- data/app/views/concerns/europeana/feedback_button/feedbackable_view.rb +4 -4
- data/bin/rails +1 -0
- data/config/initializers/action_mailer.rb +1 -0
- data/config/routes.rb +1 -0
- data/europeana-feedback-button.gemspec +13 -10
- data/lib/europeana/feedback_button.rb +2 -1
- data/lib/europeana/feedback_button/engine.rb +1 -0
- data/lib/europeana/feedback_button/version.rb +2 -1
- data/lib/tasks/europeana_feedback_button_tasks.rake +1 -0
- data/spec/controllers/feedback_controller_spec.rb +5 -4
- data/spec/dummy/Rakefile +1 -0
- data/spec/dummy/app/controllers/application_controller.rb +1 -0
- data/spec/dummy/app/controllers/welcome_controller.rb +1 -3
- data/spec/dummy/app/helpers/application_helper.rb +1 -0
- data/spec/dummy/app/mailers/application_mailer.rb +1 -0
- data/spec/dummy/bin/bundle +1 -0
- data/spec/dummy/bin/rails +1 -0
- data/spec/dummy/bin/rake +1 -0
- data/spec/dummy/bin/setup +9 -8
- data/spec/dummy/config.ru +1 -0
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/config/boot.rb +1 -0
- data/spec/dummy/config/environment.rb +1 -0
- data/spec/dummy/config/environments/development.rb +1 -0
- data/spec/dummy/config/environments/production.rb +1 -0
- data/spec/dummy/config/environments/test.rb +1 -0
- data/spec/dummy/config/initializers/assets.rb +1 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +1 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +1 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +1 -0
- data/spec/dummy/config/initializers/mime_types.rb +1 -0
- data/spec/dummy/config/initializers/session_store.rb +1 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +1 -0
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/spec_helper.rb +6 -3
- metadata +6 -6
- data/Gemfile.lock +0 -174
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 113b65138abc0cf99712cea95a0e75f29c7be998
|
4
|
+
data.tar.gz: 3f940b87272c66151d47e5a0aaa78a28dbe62d8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32d4bc1d1cb4d428e9ef0a884be44abbfbebc4feee682336df84e4cb3c6d06c139acb0f57d5f348840429d8389b14b6e7d4c511c4ba4732c04ad37415471385d
|
7
|
+
data.tar.gz: ce1250b90c213203a3293a13814d6d2082ed67b70ce182a4ab047cef8d50a0b7f2bf69d72f820c8f4e7a712e7d6987fc6a4473c5fbd68749802054c481624bf1
|
data/.gitignore
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
.bundle/
|
2
2
|
.idea/
|
3
|
+
coverage/*
|
3
4
|
log/*.log
|
4
5
|
pkg/
|
5
6
|
spec/dummy/log*/log
|
@@ -8,6 +9,7 @@ spec/dummy/db/*.sqlite3-journal
|
|
8
9
|
spec/dummy/log/*.log
|
9
10
|
spec/dummy/tmp/
|
10
11
|
spec/dummy/.sass-cache
|
11
|
-
|
12
|
+
.ruby-version
|
12
13
|
europeana-feedback-button-*.gem
|
13
|
-
.env
|
14
|
+
.env
|
15
|
+
/Gemfile.lock
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,249 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "vendor/**/*"
|
4
|
+
- "db/schema.rb"
|
5
|
+
UseCache: false
|
6
|
+
TargetRubyVersion: 2.4
|
7
|
+
Style/CollectionMethods:
|
8
|
+
Description: Preferred collection methods.
|
9
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
10
|
+
Enabled: true
|
11
|
+
PreferredMethods:
|
12
|
+
collect: map
|
13
|
+
collect!: map!
|
14
|
+
find: detect
|
15
|
+
find_all: select
|
16
|
+
reduce: inject
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- 'Rakefile'
|
20
|
+
- '**/*.rake'
|
21
|
+
- 'spec/**/*.rb'
|
22
|
+
Layout/DotPosition:
|
23
|
+
Description: Checks the position of the dot in multi-line method calls.
|
24
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
25
|
+
Enabled: true
|
26
|
+
EnforcedStyle: trailing
|
27
|
+
SupportedStyles:
|
28
|
+
- leading
|
29
|
+
- trailing
|
30
|
+
Naming/FileName:
|
31
|
+
Description: Use snake_case for source file names.
|
32
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
33
|
+
Enabled: false
|
34
|
+
Exclude: []
|
35
|
+
Style/GuardClause:
|
36
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
37
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
38
|
+
Enabled: false
|
39
|
+
MinBodyLength: 1
|
40
|
+
Style/IfUnlessModifier:
|
41
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
42
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
43
|
+
Enabled: false
|
44
|
+
MaxLineLength: 80
|
45
|
+
Style/OptionHash:
|
46
|
+
Description: Don't use option hashes when you can use keyword arguments.
|
47
|
+
Enabled: false
|
48
|
+
Style/PercentLiteralDelimiters:
|
49
|
+
Description: Use `%`-literal delimiters consistently
|
50
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
51
|
+
Enabled: false
|
52
|
+
PreferredDelimiters:
|
53
|
+
"%": "()"
|
54
|
+
"%i": "()"
|
55
|
+
"%q": "()"
|
56
|
+
"%Q": "()"
|
57
|
+
"%r": "{}"
|
58
|
+
"%s": "()"
|
59
|
+
"%w": "()"
|
60
|
+
"%W": "()"
|
61
|
+
"%x": "()"
|
62
|
+
Naming/PredicateName:
|
63
|
+
Description: Check the names of predicate methods.
|
64
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
65
|
+
Enabled: true
|
66
|
+
NamePrefix:
|
67
|
+
- is_
|
68
|
+
- has_
|
69
|
+
- have_
|
70
|
+
NamePrefixBlacklist:
|
71
|
+
- is_
|
72
|
+
Exclude:
|
73
|
+
- spec/**/*
|
74
|
+
Style/RaiseArgs:
|
75
|
+
Description: Checks the arguments passed to raise/fail.
|
76
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
77
|
+
Enabled: false
|
78
|
+
EnforcedStyle: exploded
|
79
|
+
SupportedStyles:
|
80
|
+
- compact
|
81
|
+
- exploded
|
82
|
+
Style/SignalException:
|
83
|
+
Description: Checks for proper usage of fail and raise.
|
84
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
85
|
+
Enabled: false
|
86
|
+
EnforcedStyle: semantic
|
87
|
+
SupportedStyles:
|
88
|
+
- only_raise
|
89
|
+
- only_fail
|
90
|
+
- semantic
|
91
|
+
Style/SingleLineBlockParams:
|
92
|
+
Description: Enforces the names of some block params.
|
93
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
94
|
+
Enabled: false
|
95
|
+
Methods:
|
96
|
+
- reduce:
|
97
|
+
- a
|
98
|
+
- e
|
99
|
+
- inject:
|
100
|
+
- a
|
101
|
+
- e
|
102
|
+
Style/SingleLineMethods:
|
103
|
+
Description: Avoid single-line methods.
|
104
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
105
|
+
Enabled: false
|
106
|
+
AllowIfMethodIsEmpty: true
|
107
|
+
Style/StringLiterals:
|
108
|
+
Description: Checks if uses of quotes match the configured preference.
|
109
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
110
|
+
Enabled: true
|
111
|
+
EnforcedStyle: single_quotes
|
112
|
+
SupportedStyles:
|
113
|
+
- single_quotes
|
114
|
+
- double_quotes
|
115
|
+
Style/StringLiteralsInInterpolation:
|
116
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
117
|
+
match the configured preference.
|
118
|
+
Enabled: true
|
119
|
+
EnforcedStyle: single_quotes
|
120
|
+
SupportedStyles:
|
121
|
+
- single_quotes
|
122
|
+
- double_quotes
|
123
|
+
Style/TrailingCommaInArguments:
|
124
|
+
Description: 'Checks for trailing comma in argument lists.'
|
125
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
126
|
+
Enabled: false
|
127
|
+
EnforcedStyleForMultiline: no_comma
|
128
|
+
Style/TrailingCommaInLiteral:
|
129
|
+
Description: 'Checks for trailing comma in array and hash literals.'
|
130
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
131
|
+
Enabled: false
|
132
|
+
EnforcedStyleForMultiline: no_comma
|
133
|
+
Metrics/AbcSize:
|
134
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
135
|
+
conditions.
|
136
|
+
Enabled: false
|
137
|
+
Max: 15
|
138
|
+
Metrics/ClassLength:
|
139
|
+
Description: Avoid classes longer than 100 lines of code.
|
140
|
+
Enabled: false
|
141
|
+
CountComments: false
|
142
|
+
Max: 100
|
143
|
+
Metrics/LineLength:
|
144
|
+
Description: Limit lines to max 140 characters
|
145
|
+
Max: 140
|
146
|
+
AllowHeredoc: true
|
147
|
+
AllowURI: true
|
148
|
+
URISchemes:
|
149
|
+
- http
|
150
|
+
- https
|
151
|
+
Metrics/ModuleLength:
|
152
|
+
CountComments: false
|
153
|
+
Max: 100
|
154
|
+
Description: Avoid modules longer than 100 lines of code.
|
155
|
+
Enabled: false
|
156
|
+
Metrics/CyclomaticComplexity:
|
157
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
158
|
+
cases needed to validate a method.
|
159
|
+
Enabled: false
|
160
|
+
Max: 6
|
161
|
+
Metrics/MethodLength:
|
162
|
+
Description: Avoid methods longer than 10 lines of code.
|
163
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
164
|
+
Enabled: false
|
165
|
+
CountComments: false
|
166
|
+
Max: 10
|
167
|
+
Metrics/ParameterLists:
|
168
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
169
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
170
|
+
Enabled: false
|
171
|
+
Max: 5
|
172
|
+
CountKeywordArgs: true
|
173
|
+
Metrics/PerceivedComplexity:
|
174
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
175
|
+
reader.
|
176
|
+
Enabled: false
|
177
|
+
Max: 7
|
178
|
+
Lint/AssignmentInCondition:
|
179
|
+
Description: Don't use assignment in conditions.
|
180
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
181
|
+
Enabled: false
|
182
|
+
AllowSafeAssignment: true
|
183
|
+
Style/InlineComment:
|
184
|
+
Description: Avoid inline comments.
|
185
|
+
Enabled: false
|
186
|
+
Naming/AccessorMethodName:
|
187
|
+
Description: Check the naming of accessor methods for get_/set_.
|
188
|
+
Enabled: false
|
189
|
+
Style/Alias:
|
190
|
+
Description: Use alias_method instead of alias.
|
191
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
192
|
+
Enabled: false
|
193
|
+
Style/Documentation:
|
194
|
+
Description: Document classes and non-namespace modules.
|
195
|
+
Enabled: false
|
196
|
+
Style/DoubleNegation:
|
197
|
+
Description: Checks for uses of double negation (!!).
|
198
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
199
|
+
Enabled: false
|
200
|
+
Style/EachWithObject:
|
201
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
202
|
+
Enabled: false
|
203
|
+
Style/EmptyLiteral:
|
204
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
205
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
206
|
+
Enabled: false
|
207
|
+
Style/ModuleFunction:
|
208
|
+
Description: Checks for usage of `extend self` in modules.
|
209
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
210
|
+
Enabled: false
|
211
|
+
Style/OneLineConditional:
|
212
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
213
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
214
|
+
Enabled: false
|
215
|
+
Style/PerlBackrefs:
|
216
|
+
Description: Avoid Perl-style regex back references.
|
217
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
218
|
+
Enabled: false
|
219
|
+
Style/Send:
|
220
|
+
Description: Prefer `Object#__send__` or `Object#public_send` to `send`, as `send`
|
221
|
+
may overlap with existing methods.
|
222
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#prefer-public-send
|
223
|
+
Enabled: false
|
224
|
+
Style/SpecialGlobalVars:
|
225
|
+
Description: Avoid Perl-style global variables.
|
226
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
227
|
+
Enabled: false
|
228
|
+
Style/VariableInterpolation:
|
229
|
+
Description: Don't interpolate global, instance and class variables directly in
|
230
|
+
strings.
|
231
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
232
|
+
Enabled: false
|
233
|
+
Style/WhenThen:
|
234
|
+
Description: Use when x then ... for one-line cases.
|
235
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
236
|
+
Enabled: false
|
237
|
+
Lint/EachWithObjectArgument:
|
238
|
+
Description: Check for immutable argument given to each_with_object.
|
239
|
+
Enabled: true
|
240
|
+
Lint/HandleExceptions:
|
241
|
+
Description: Don't suppress exception.
|
242
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
243
|
+
Enabled: false
|
244
|
+
Lint/LiteralInCondition:
|
245
|
+
Description: Checks of literals used in conditions.
|
246
|
+
Enabled: false
|
247
|
+
Lint/LiteralInInterpolation:
|
248
|
+
Description: Checks for literals used in interpolation.
|
249
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.2.1
|
4
|
+
- 2.3.1
|
5
|
+
notifications:
|
6
|
+
email: false
|
7
|
+
sudo: false
|
8
|
+
cache:
|
9
|
+
bundler: true
|
10
|
+
before_script:
|
11
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
12
|
+
- chmod +x ./cc-test-reporter
|
13
|
+
- ./cc-test-reporter before-build
|
14
|
+
script:
|
15
|
+
- bundle exec rspec
|
16
|
+
after_script:
|
17
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/Gemfile
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
source 'https://rubygems.org'
|
2
3
|
|
3
4
|
# Specify your gem's dependencies in europeana-blacklight.gemspec
|
4
5
|
gemspec
|
5
6
|
|
6
7
|
group :test do
|
7
|
-
gem '
|
8
|
+
gem 'simplecov', require: false
|
8
9
|
end
|
9
10
|
|
10
11
|
group :test, :develop do
|
11
12
|
gem 'sqlite3'
|
12
|
-
gem 'rubocop',
|
13
|
-
end
|
13
|
+
gem 'rubocop', require: false
|
14
|
+
end
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Europeana::FeedbackButton
|
2
2
|
|
3
|
+
[](https://travis-ci.org/europeana/europeana-feedback-button) [](https://coveralls.io/github/europeana/europeana-feedback-button?branch=develop) [](https://hakiri.io/github/europeana/europeana-feedback-button/develop) [](https://gemnasium.com/europeana/europeana-feedback-button)
|
4
|
+
|
3
5
|
Ruby gem providing feedback buttons for europeana pages.
|
4
6
|
|
5
7
|
## Usage
|
@@ -16,4 +18,4 @@ The following options can be configured in your .env file
|
|
16
18
|
|
17
19
|
## License
|
18
20
|
|
19
|
-
See the [License](License.md).
|
21
|
+
See the [License](License.md).
|
data/Rakefile
CHANGED
@@ -11,11 +11,11 @@ module Europeana
|
|
11
11
|
def feedback
|
12
12
|
return nil unless feedback_enabled?
|
13
13
|
{
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
form_action: europeana_feedback_button.feedback_path,
|
15
|
+
maxlength: 400,
|
16
|
+
minwords: 5
|
17
17
|
}
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
data/bin/rails
CHANGED
data/config/routes.rb
CHANGED
@@ -1,24 +1,27 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# lib = File.expand_path('../lib', __FILE__)
|
3
|
+
# $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
4
|
|
4
|
-
$:.push File.expand_path(
|
5
|
+
$:.push File.expand_path('../lib', __FILE__)
|
5
6
|
|
6
|
-
require
|
7
|
+
require 'europeana/feedback_button/version'
|
7
8
|
|
8
9
|
Gem::Specification.new do |s|
|
9
|
-
s.name =
|
10
|
+
s.name = 'europeana-feedback-button'
|
10
11
|
s.version = Europeana::FeedbackButton::VERSION
|
11
|
-
s.authors = [
|
12
|
-
s.email = [
|
13
|
-
s.homepage =
|
14
|
-
s.summary =
|
15
|
-
s.description =
|
12
|
+
s.authors = ['Lutz Biedinger']
|
13
|
+
s.email = ['lutz.biedinger@gmail.com']
|
14
|
+
s.homepage = 'http://github.org/europeana/europeana-feedback-button'
|
15
|
+
s.summary = 'Europeana Feedback Button.'
|
16
|
+
s.description = 'An engine which allows the Europeana Feedback Button to be displayed.'
|
16
17
|
s.license = 'EUPL-1.1'
|
17
18
|
|
18
19
|
s.files = `git ls-files -z`.split("\x0")
|
19
20
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
21
|
s.require_paths = ['lib']
|
21
22
|
|
23
|
+
s.required_ruby_version = '>= 2.0.0'
|
24
|
+
|
22
25
|
s.add_dependency 'rails', '~> 4.2', '>= 4.2.7.1'
|
23
26
|
|
24
27
|
s.add_development_dependency 'bundler', '~> 1.8'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
RSpec.describe Europeana::FeedbackButton::FeedbackController do
|
2
3
|
def main_app
|
3
4
|
Rails.application.class.routes.url_helpers
|
@@ -14,16 +15,16 @@ RSpec.describe Europeana::FeedbackButton::FeedbackController do
|
|
14
15
|
Rails.application.config.x.feedback_mail_to = 'feedback@example.com'
|
15
16
|
end
|
16
17
|
|
17
|
-
it
|
18
|
+
it 'should queue an email job' do
|
18
19
|
expect { subject }.to change(ActionMailer::Base.deliveries, :length)
|
19
20
|
end
|
20
|
-
#it '' do
|
21
|
+
# it '' do
|
21
22
|
# message_delivery = instance_double(ActionMailer::MessageDelivery)
|
22
23
|
# expect(ServiceMailer).to receive(:new_user).with(@user).and_return(message_delivery)
|
23
24
|
# expect(message_delivery).to receive(:deliver_later)
|
24
25
|
# subject
|
25
|
-
|
26
|
-
#end
|
26
|
+
# expect { subject }.to change { Delayed::Job.where("handler LIKE '%FeedbackMailer%'").count }.by(1)
|
27
|
+
# end
|
27
28
|
end
|
28
29
|
|
29
30
|
context 'without recipient configured' do
|
data/spec/dummy/Rakefile
CHANGED
data/spec/dummy/bin/bundle
CHANGED
data/spec/dummy/bin/rails
CHANGED
data/spec/dummy/bin/rake
CHANGED
data/spec/dummy/bin/setup
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
require 'pathname'
|
3
4
|
|
4
5
|
# path to your application root.
|
5
|
-
APP_ROOT = Pathname.new File.expand_path('../../',
|
6
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
7
|
|
7
8
|
Dir.chdir APP_ROOT do
|
8
9
|
# This script is a starting point to setup your application.
|
9
10
|
# Add necessary setup steps to this file:
|
10
11
|
|
11
|
-
puts
|
12
|
-
system
|
13
|
-
system
|
12
|
+
puts '== Installing dependencies =='
|
13
|
+
system 'gem install bundler --conservative'
|
14
|
+
system 'bundle check || bundle install'
|
14
15
|
|
15
16
|
# puts "\n== Copying sample files =="
|
16
17
|
# unless File.exist?("config/database.yml")
|
@@ -18,12 +19,12 @@ Dir.chdir APP_ROOT do
|
|
18
19
|
# end
|
19
20
|
|
20
21
|
puts "\n== Preparing database =="
|
21
|
-
system
|
22
|
+
system 'bin/rake db:setup'
|
22
23
|
|
23
24
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system
|
25
|
+
system 'rm -f log/*'
|
26
|
+
system 'rm -rf tmp/cache'
|
26
27
|
|
27
28
|
puts "\n== Restarting application server =="
|
28
|
-
system
|
29
|
+
system 'touch tmp/restart.txt'
|
29
30
|
end
|
data/spec/dummy/config.ru
CHANGED
data/spec/dummy/config/boot.rb
CHANGED
data/spec/dummy/config/routes.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
Rails.application.routes.draw do
|
2
3
|
# The priority is based upon order of creation: first created -> highest priority.
|
3
4
|
# See how all your routes lay out with "rake routes".
|
@@ -7,7 +8,7 @@ Rails.application.routes.draw do
|
|
7
8
|
|
8
9
|
root 'welcome#index'
|
9
10
|
|
10
|
-
mount Europeana::FeedbackButton::Engine, at:
|
11
|
+
mount Europeana::FeedbackButton::Engine, at: '/'
|
11
12
|
|
12
13
|
# Example of regular route:
|
13
14
|
# get 'products/:id' => 'catalog#view'
|
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
ENV['RAILS_ENV'] ||= 'test'
|
2
3
|
|
3
|
-
require '
|
4
|
-
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
# Generate Simplecov report
|
7
|
+
SimpleCov.start
|
5
8
|
|
6
9
|
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
7
10
|
require 'rspec/rails'
|
@@ -19,4 +22,4 @@ RSpec.configure do |config|
|
|
19
22
|
config.expect_with :rspec do |c|
|
20
23
|
c.syntax = :expect
|
21
24
|
end
|
22
|
-
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: europeana-feedback-button
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lutz Biedinger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -109,8 +109,9 @@ extra_rdoc_files: []
|
|
109
109
|
files:
|
110
110
|
- ".gitignore"
|
111
111
|
- ".rspec"
|
112
|
+
- ".rubocop.yml"
|
113
|
+
- ".travis.yml"
|
112
114
|
- Gemfile
|
113
|
-
- Gemfile.lock
|
114
115
|
- LICENSE.md
|
115
116
|
- QUICKSTART.md
|
116
117
|
- README.md
|
@@ -194,7 +195,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
195
|
requirements:
|
195
196
|
- - ">="
|
196
197
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
198
|
+
version: 2.0.0
|
198
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
200
|
requirements:
|
200
201
|
- - ">="
|
@@ -202,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
203
|
version: '0'
|
203
204
|
requirements: []
|
204
205
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.
|
206
|
+
rubygems_version: 2.6.12
|
206
207
|
signing_key:
|
207
208
|
specification_version: 4
|
208
209
|
summary: Europeana Feedback Button.
|
@@ -254,4 +255,3 @@ test_files:
|
|
254
255
|
- spec/dummy/public/favicon.ico
|
255
256
|
- spec/helpers/feedback_helper_spec.rb
|
256
257
|
- spec/spec_helper.rb
|
257
|
-
has_rdoc:
|
data/Gemfile.lock
DELETED
@@ -1,174 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
europeana-feedback-button (0.0.2)
|
5
|
-
rails (~> 4.2, >= 4.2.7.1)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actionmailer (4.2.7.1)
|
11
|
-
actionpack (= 4.2.7.1)
|
12
|
-
actionview (= 4.2.7.1)
|
13
|
-
activejob (= 4.2.7.1)
|
14
|
-
mail (~> 2.5, >= 2.5.4)
|
15
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
-
actionpack (4.2.7.1)
|
17
|
-
actionview (= 4.2.7.1)
|
18
|
-
activesupport (= 4.2.7.1)
|
19
|
-
rack (~> 1.6)
|
20
|
-
rack-test (~> 0.6.2)
|
21
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
23
|
-
actionview (4.2.7.1)
|
24
|
-
activesupport (= 4.2.7.1)
|
25
|
-
builder (~> 3.1)
|
26
|
-
erubis (~> 2.7.0)
|
27
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
-
activejob (4.2.7.1)
|
30
|
-
activesupport (= 4.2.7.1)
|
31
|
-
globalid (>= 0.3.0)
|
32
|
-
activemodel (4.2.7.1)
|
33
|
-
activesupport (= 4.2.7.1)
|
34
|
-
builder (~> 3.1)
|
35
|
-
activerecord (4.2.7.1)
|
36
|
-
activemodel (= 4.2.7.1)
|
37
|
-
activesupport (= 4.2.7.1)
|
38
|
-
arel (~> 6.0)
|
39
|
-
activesupport (4.2.7.1)
|
40
|
-
i18n (~> 0.7)
|
41
|
-
json (~> 1.7, >= 1.7.7)
|
42
|
-
minitest (~> 5.1)
|
43
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
44
|
-
tzinfo (~> 1.1)
|
45
|
-
arel (6.0.3)
|
46
|
-
ast (2.3.0)
|
47
|
-
builder (3.2.2)
|
48
|
-
concurrent-ruby (1.0.2)
|
49
|
-
coveralls (0.8.15)
|
50
|
-
json (>= 1.8, < 3)
|
51
|
-
simplecov (~> 0.12.0)
|
52
|
-
term-ansicolor (~> 1.3)
|
53
|
-
thor (~> 0.19.1)
|
54
|
-
tins (>= 1.6.0, < 2)
|
55
|
-
diff-lcs (1.2.5)
|
56
|
-
docile (1.1.5)
|
57
|
-
dotenv (2.1.1)
|
58
|
-
dotenv-rails (2.1.1)
|
59
|
-
dotenv (= 2.1.1)
|
60
|
-
railties (>= 4.0, < 5.1)
|
61
|
-
erubis (2.7.0)
|
62
|
-
globalid (0.3.7)
|
63
|
-
activesupport (>= 4.1.0)
|
64
|
-
i18n (0.7.0)
|
65
|
-
json (1.8.3)
|
66
|
-
loofah (2.0.3)
|
67
|
-
nokogiri (>= 1.5.9)
|
68
|
-
mail (2.6.4)
|
69
|
-
mime-types (>= 1.16, < 4)
|
70
|
-
mime-types (3.1)
|
71
|
-
mime-types-data (~> 3.2015)
|
72
|
-
mime-types-data (3.2016.0521)
|
73
|
-
mini_portile2 (2.1.0)
|
74
|
-
minitest (5.9.0)
|
75
|
-
nokogiri (1.6.8)
|
76
|
-
mini_portile2 (~> 2.1.0)
|
77
|
-
pkg-config (~> 1.1.7)
|
78
|
-
parser (2.3.1.2)
|
79
|
-
ast (~> 2.2)
|
80
|
-
pkg-config (1.1.7)
|
81
|
-
powerpack (0.1.1)
|
82
|
-
rack (1.6.4)
|
83
|
-
rack-test (0.6.3)
|
84
|
-
rack (>= 1.0)
|
85
|
-
rails (4.2.7.1)
|
86
|
-
actionmailer (= 4.2.7.1)
|
87
|
-
actionpack (= 4.2.7.1)
|
88
|
-
actionview (= 4.2.7.1)
|
89
|
-
activejob (= 4.2.7.1)
|
90
|
-
activemodel (= 4.2.7.1)
|
91
|
-
activerecord (= 4.2.7.1)
|
92
|
-
activesupport (= 4.2.7.1)
|
93
|
-
bundler (>= 1.3.0, < 2.0)
|
94
|
-
railties (= 4.2.7.1)
|
95
|
-
sprockets-rails
|
96
|
-
rails-deprecated_sanitizer (1.0.3)
|
97
|
-
activesupport (>= 4.2.0.alpha)
|
98
|
-
rails-dom-testing (1.0.7)
|
99
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
100
|
-
nokogiri (~> 1.6.0)
|
101
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
102
|
-
rails-html-sanitizer (1.0.3)
|
103
|
-
loofah (~> 2.0)
|
104
|
-
railties (4.2.7.1)
|
105
|
-
actionpack (= 4.2.7.1)
|
106
|
-
activesupport (= 4.2.7.1)
|
107
|
-
rake (>= 0.8.7)
|
108
|
-
thor (>= 0.18.1, < 2.0)
|
109
|
-
rainbow (2.1.0)
|
110
|
-
rake (11.2.2)
|
111
|
-
rspec-core (3.5.3)
|
112
|
-
rspec-support (~> 3.5.0)
|
113
|
-
rspec-expectations (3.5.0)
|
114
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
115
|
-
rspec-support (~> 3.5.0)
|
116
|
-
rspec-mocks (3.5.0)
|
117
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
118
|
-
rspec-support (~> 3.5.0)
|
119
|
-
rspec-rails (3.5.2)
|
120
|
-
actionpack (>= 3.0)
|
121
|
-
activesupport (>= 3.0)
|
122
|
-
railties (>= 3.0)
|
123
|
-
rspec-core (~> 3.5.0)
|
124
|
-
rspec-expectations (~> 3.5.0)
|
125
|
-
rspec-mocks (~> 3.5.0)
|
126
|
-
rspec-support (~> 3.5.0)
|
127
|
-
rspec-support (3.5.0)
|
128
|
-
rubocop (0.39.0)
|
129
|
-
parser (>= 2.3.0.7, < 3.0)
|
130
|
-
powerpack (~> 0.1)
|
131
|
-
rainbow (>= 1.99.1, < 3.0)
|
132
|
-
ruby-progressbar (~> 1.7)
|
133
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
134
|
-
ruby-progressbar (1.8.1)
|
135
|
-
shoulda-matchers (2.8.0)
|
136
|
-
activesupport (>= 3.0.0)
|
137
|
-
simplecov (0.12.0)
|
138
|
-
docile (~> 1.1.0)
|
139
|
-
json (>= 1.8, < 3)
|
140
|
-
simplecov-html (~> 0.10.0)
|
141
|
-
simplecov-html (0.10.0)
|
142
|
-
sprockets (3.7.0)
|
143
|
-
concurrent-ruby (~> 1.0)
|
144
|
-
rack (> 1, < 3)
|
145
|
-
sprockets-rails (3.2.0)
|
146
|
-
actionpack (>= 4.0)
|
147
|
-
activesupport (>= 4.0)
|
148
|
-
sprockets (>= 3.0.0)
|
149
|
-
sqlite3 (1.3.11)
|
150
|
-
term-ansicolor (1.3.2)
|
151
|
-
tins (~> 1.0)
|
152
|
-
thor (0.19.1)
|
153
|
-
thread_safe (0.3.5)
|
154
|
-
tins (1.12.0)
|
155
|
-
tzinfo (1.2.2)
|
156
|
-
thread_safe (~> 0.1)
|
157
|
-
unicode-display_width (1.1.0)
|
158
|
-
|
159
|
-
PLATFORMS
|
160
|
-
ruby
|
161
|
-
|
162
|
-
DEPENDENCIES
|
163
|
-
bundler (~> 1.8)
|
164
|
-
coveralls
|
165
|
-
dotenv-rails (~> 2.1)
|
166
|
-
europeana-feedback-button!
|
167
|
-
rake (~> 11.0)
|
168
|
-
rspec-rails (~> 3.0)
|
169
|
-
rubocop (= 0.39.0)
|
170
|
-
shoulda-matchers (~> 2.8)
|
171
|
-
sqlite3
|
172
|
-
|
173
|
-
BUNDLED WITH
|
174
|
-
1.12.5
|