works_cited 0.1.11 → 0.1.16
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/Gemfile +8 -8
- data/Gemfile.lock +9 -10
- data/README.md +27 -2
- data/VERSION +1 -1
- data/app/assets/javascripts/works_cited/addFields.js +44 -0
- data/app/assets/javascripts/works_cited/application.js +6 -1
- data/app/assets/javascripts/works_cited/loadPreview.js +45 -0
- data/app/assets/javascripts/works_cited/removeFields.js +37 -0
- data/app/assets/javascripts/works_cited/shared.js +59 -0
- data/app/assets/javascripts/works_cited/showFields.js +9 -0
- data/app/assets/javascripts/works_cited/submitForm.js +33 -0
- data/app/controllers/concerns/works_cited/params.rb +24 -0
- data/app/controllers/works_cited/citations_controller.rb +26 -13
- data/app/helpers/works_cited/application_helper.rb +46 -1
- data/app/models/works_cited/citation.rb +31 -31
- data/app/models/works_cited/contributor.rb +11 -28
- data/app/views/works_cited/citation_types/fields/_book.html.haml +1 -1
- data/app/views/works_cited/citation_types/fields/_electronic.html.haml +1 -1
- data/app/views/works_cited/citation_types/fields/_email.html.haml +1 -1
- data/app/views/works_cited/citation_types/fields/_interview.html.haml +1 -1
- data/app/views/works_cited/citation_types/fields/_periodical.html.haml +1 -1
- data/app/views/works_cited/citation_types/fields/_tweet.html.haml +1 -1
- data/app/views/works_cited/citations/_citation_fields.html.haml +28 -0
- data/app/views/works_cited/citations/_fields.html.haml +14 -0
- data/app/views/works_cited/citations/_form.html.haml +16 -53
- data/app/views/works_cited/citations/preview.html.haml +1 -1
- data/app/views/works_cited/contributors/_contributor_fields.html.haml +11 -0
- data/config/routes.rb +8 -2
- data/db/migrate/20210915160902_add_index_to_works_cited_contributors.rb +9 -0
- data/lib/works_cited/mixins/has_works_cited.rb +14 -1
- data/spec/dummy/app/controllers/doodads_controller.rb +2 -1
- data/spec/dummy/app/controllers/things_controller.rb +1 -1
- data/spec/dummy/app/views/doodads/_form.html.haml +2 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/{20210902202653_create_works_cited_citations.works_cited.rb → 20210915161011_create_works_cited_citations.works_cited.rb} +0 -0
- data/spec/dummy/db/migrate/{20210902202654_create_works_cited_contributors.works_cited.rb → 20210915161012_create_works_cited_contributors.works_cited.rb} +0 -0
- data/spec/dummy/db/migrate/20210915161013_add_index_to_works_cited_contributors.works_cited.rb +9 -0
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +27312 -15
- data/spec/dummy/log/test.log +29188 -0
- data/spec/factories/things.rb +8 -0
- data/spec/models/doodad_spec.rb +13 -1
- data/spec/models/thing_spec.rb +13 -1
- data/spec/models/works_cited/citation_spec.rb +12 -0
- data/spec/requests/works_cited/citations_spec.rb +10 -8
- data/spec/routing/works_cited/citations_routing_spec.rb +5 -1
- data/works_cited.gemspec +28 -16
- metadata +51 -15
- data/app/views/works_cited/contributors/_fields.html.haml +0 -9
data/spec/models/doodad_spec.rb
CHANGED
@@ -3,7 +3,19 @@
|
|
3
3
|
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe Doodad, type: :model do
|
6
|
-
describe '
|
6
|
+
describe 'Mixin functioning' do
|
7
7
|
it { should have_many(:works_cited_citations) }
|
8
8
|
end
|
9
|
+
describe 'WorksCited Methods' do
|
10
|
+
describe '#works_cited_citations_attributes=' do
|
11
|
+
let!(:doodad) { FactoryBot.create(:doodad) }
|
12
|
+
it 'saves the citations' do
|
13
|
+
expect do
|
14
|
+
citation_attributes = FactoryBot.build(:works_cited_citation).attributes
|
15
|
+
doodad.works_cited_citations_attributes = { "0" => citation_attributes }
|
16
|
+
doodad.save
|
17
|
+
end.to change { doodad.works_cited_citations.count }.by(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
9
21
|
end
|
data/spec/models/thing_spec.rb
CHANGED
@@ -3,7 +3,19 @@
|
|
3
3
|
require 'rails_helper'
|
4
4
|
|
5
5
|
RSpec.describe Thing, type: :model do
|
6
|
-
describe '
|
6
|
+
describe 'Mixin functioning' do
|
7
7
|
it { should have_many(:works_cited_citations) }
|
8
8
|
end
|
9
|
+
describe 'WorksCited Methods' do
|
10
|
+
describe '#works_cited_citations_attributes=' do
|
11
|
+
let!(:thing) { FactoryBot.create(:thing) }
|
12
|
+
it 'saves the citations' do
|
13
|
+
expect do
|
14
|
+
citation_attributes = FactoryBot.build(:works_cited_citation).attributes
|
15
|
+
thing.works_cited_citations_attributes = { "0" => citation_attributes }
|
16
|
+
thing.save
|
17
|
+
end.to change { thing.works_cited_citations.count }.by(1)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
9
21
|
end
|
@@ -19,6 +19,18 @@ RSpec.describe WorksCited::Citation, type: :model do
|
|
19
19
|
let(:electronic) { FactoryBot.create(:works_cited_citation, record: doodad, citation_type: 'electronic') }
|
20
20
|
let(:interview) { FactoryBot.create(:works_cited_citation, record: doodad, citation_type: 'interview') }
|
21
21
|
let(:email) { FactoryBot.create(:works_cited_citation, record: doodad, citation_type: 'email') }
|
22
|
+
describe '#works_cited_contributors_attributes=' do
|
23
|
+
before do
|
24
|
+
book.works_cited_contributors.destroy_all
|
25
|
+
end
|
26
|
+
it 'saves the contributors' do
|
27
|
+
expect do
|
28
|
+
contributor_attributes = FactoryBot.build(:works_cited_contributor).attributes
|
29
|
+
book.works_cited_contributors_attributes = { "0" => contributor_attributes }
|
30
|
+
book.save
|
31
|
+
end.to change { book.works_cited_contributors.count }.by(1)
|
32
|
+
end
|
33
|
+
end
|
22
34
|
describe '#book?' do
|
23
35
|
describe 'when true' do
|
24
36
|
subject { book.book? }
|
@@ -41,7 +41,7 @@ module WorksCited
|
|
41
41
|
|
42
42
|
describe 'GET /index' do
|
43
43
|
before do
|
44
|
-
|
44
|
+
citation
|
45
45
|
end
|
46
46
|
it 'disallows' do
|
47
47
|
expect { get citations_url }.to raise_error(CanCan::AccessDenied)
|
@@ -60,10 +60,11 @@ module WorksCited
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
describe '
|
63
|
+
describe 'POST /preview' do
|
64
64
|
it 'disallows' do
|
65
65
|
expect do
|
66
|
-
|
66
|
+
params = { citation: valid_attributes }
|
67
|
+
post preview_citations_url, params: JSON.parse(params.to_json), as: :json
|
67
68
|
end.to raise_error(CanCan::AccessDenied)
|
68
69
|
end
|
69
70
|
end
|
@@ -76,7 +77,7 @@ module WorksCited
|
|
76
77
|
|
77
78
|
describe 'PATCH /update' do
|
78
79
|
let(:new_attributes) do
|
79
|
-
{ citation_type: 'book', title: 'New Title',
|
80
|
+
{ citation_type: 'book', title: 'New Title', record: "Doodad:#{doodad.id}" }
|
80
81
|
end
|
81
82
|
it 'disallows' do
|
82
83
|
expect do
|
@@ -105,7 +106,7 @@ module WorksCited
|
|
105
106
|
|
106
107
|
describe 'GET /index' do
|
107
108
|
before do
|
108
|
-
|
109
|
+
citation
|
109
110
|
end
|
110
111
|
it 'renders a successful response when admin' do
|
111
112
|
get citations_url
|
@@ -127,10 +128,11 @@ module WorksCited
|
|
127
128
|
end
|
128
129
|
end
|
129
130
|
|
130
|
-
describe '
|
131
|
+
describe 'POST /preview' do
|
131
132
|
context 'with valid parameters' do
|
132
133
|
it 'previews the Citation' do
|
133
|
-
|
134
|
+
params = { citation: valid_attributes }
|
135
|
+
post preview_citations_url, params: JSON.parse(params.to_json), as: :json
|
134
136
|
expect(response).to be_successful
|
135
137
|
end
|
136
138
|
end
|
@@ -166,7 +168,7 @@ module WorksCited
|
|
166
168
|
|
167
169
|
describe 'PATCH /update' do
|
168
170
|
let(:new_attributes) do
|
169
|
-
{ citation_type: 'book', title: 'New Title',
|
171
|
+
{ citation_type: 'book', title: 'New Title', record: "Doodad:#{doodad.id}" }
|
170
172
|
end
|
171
173
|
context 'with valid parameters' do
|
172
174
|
it 'updates the requested citation' do
|
@@ -11,7 +11,11 @@ RSpec.describe WorksCited::CitationsController, type: :routing do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'routes to #preview' do
|
14
|
-
expect(
|
14
|
+
expect(post: '/citations/preview').to route_to('works_cited/citations#preview', format: :json)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'routes to #preview' do
|
18
|
+
expect(post: '/citations/1/preview').to route_to('works_cited/citations#preview', id: '1', format: :json)
|
15
19
|
end
|
16
20
|
|
17
21
|
it 'routes to #new' do
|
data/works_cited.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: works_cited 0.1.
|
5
|
+
# stub: works_cited 0.1.16 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "works_cited".freeze
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.16"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.metadata = { "source_code_uri" => "http://github.com/gemvein/works_cited" } if s.respond_to? :metadata=
|
13
13
|
s.require_paths = ["lib".freeze]
|
14
14
|
s.authors = ["Loren Lundgren".freeze]
|
15
|
-
s.date = "2021-09-
|
15
|
+
s.date = "2021-09-24"
|
16
16
|
s.description = "Works cited allows you to add a list of the works cited in ActiveRecord objects, to be formatted by a helper that can be added to relevant pages to format the citations like a bibliography.".freeze
|
17
17
|
s.email = "loren.lundgren@gmail.com".freeze
|
18
18
|
s.executables = ["rails".freeze]
|
@@ -31,8 +31,15 @@ Gem::Specification.new do |s|
|
|
31
31
|
"README.md",
|
32
32
|
"Rakefile",
|
33
33
|
"VERSION",
|
34
|
+
"app/assets/javascripts/works_cited/addFields.js",
|
34
35
|
"app/assets/javascripts/works_cited/application.js",
|
36
|
+
"app/assets/javascripts/works_cited/loadPreview.js",
|
37
|
+
"app/assets/javascripts/works_cited/removeFields.js",
|
38
|
+
"app/assets/javascripts/works_cited/shared.js",
|
39
|
+
"app/assets/javascripts/works_cited/showFields.js",
|
40
|
+
"app/assets/javascripts/works_cited/submitForm.js",
|
35
41
|
"app/assets/stylesheets/works_cited/application.scss",
|
42
|
+
"app/controllers/concerns/works_cited/params.rb",
|
36
43
|
"app/controllers/works_cited/citations_controller.rb",
|
37
44
|
"app/helpers/works_cited/application_helper.rb",
|
38
45
|
"app/models/works_cited/citation.rb",
|
@@ -51,6 +58,8 @@ Gem::Specification.new do |s|
|
|
51
58
|
"app/views/works_cited/citation_types/fields/_interview.html.haml",
|
52
59
|
"app/views/works_cited/citation_types/fields/_periodical.html.haml",
|
53
60
|
"app/views/works_cited/citation_types/fields/_tweet.html.haml",
|
61
|
+
"app/views/works_cited/citations/_citation_fields.html.haml",
|
62
|
+
"app/views/works_cited/citations/_fields.html.haml",
|
54
63
|
"app/views/works_cited/citations/_form.html.haml",
|
55
64
|
"app/views/works_cited/citations/_list.html.haml",
|
56
65
|
"app/views/works_cited/citations/edit.html.haml",
|
@@ -58,13 +67,14 @@ Gem::Specification.new do |s|
|
|
58
67
|
"app/views/works_cited/citations/new.html.haml",
|
59
68
|
"app/views/works_cited/citations/preview.html.haml",
|
60
69
|
"app/views/works_cited/citations/show.html.haml",
|
61
|
-
"app/views/works_cited/contributors/
|
70
|
+
"app/views/works_cited/contributors/_contributor_fields.html.haml",
|
62
71
|
"bin/rails",
|
63
72
|
"config/initializers/simple_form.rb",
|
64
73
|
"config/locales/simple_form.en.yml",
|
65
74
|
"config/routes.rb",
|
66
75
|
"db/migrate/20210830165845_create_works_cited_citations.works_cited.rb",
|
67
76
|
"db/migrate/20210831013102_create_works_cited_contributors.works_cited.rb",
|
77
|
+
"db/migrate/20210915160902_add_index_to_works_cited_contributors.rb",
|
68
78
|
"lib/tasks/works_cited_tasks.rake",
|
69
79
|
"lib/templates/haml/scaffold/_form.html.haml",
|
70
80
|
"lib/works_cited.rb",
|
@@ -143,9 +153,10 @@ Gem::Specification.new do |s|
|
|
143
153
|
"spec/dummy/db/development.sqlite3",
|
144
154
|
"spec/dummy/db/migrate/20210830171235_create_doodads.rb",
|
145
155
|
"spec/dummy/db/migrate/20210902150031_devise_create_users.rb",
|
146
|
-
"spec/dummy/db/migrate/20210902202653_create_works_cited_citations.works_cited.rb",
|
147
|
-
"spec/dummy/db/migrate/20210902202654_create_works_cited_contributors.works_cited.rb",
|
148
156
|
"spec/dummy/db/migrate/20210907170207_create_things.rb",
|
157
|
+
"spec/dummy/db/migrate/20210915161011_create_works_cited_citations.works_cited.rb",
|
158
|
+
"spec/dummy/db/migrate/20210915161012_create_works_cited_contributors.works_cited.rb",
|
159
|
+
"spec/dummy/db/migrate/20210915161013_add_index_to_works_cited_contributors.works_cited.rb",
|
149
160
|
"spec/dummy/db/schema.rb",
|
150
161
|
"spec/dummy/db/test.sqlite3",
|
151
162
|
"spec/dummy/lib/assets/.keep",
|
@@ -166,6 +177,7 @@ Gem::Specification.new do |s|
|
|
166
177
|
"spec/factories/citations.rb",
|
167
178
|
"spec/factories/contributors.rb",
|
168
179
|
"spec/factories/doodads.rb",
|
180
|
+
"spec/factories/things.rb",
|
169
181
|
"spec/factories/users.rb",
|
170
182
|
"spec/helpers/works_cited/application_helper_spec.rb",
|
171
183
|
"spec/models/doodad_spec.rb",
|
@@ -191,39 +203,39 @@ Gem::Specification.new do |s|
|
|
191
203
|
if s.respond_to? :add_runtime_dependency then
|
192
204
|
s.add_runtime_dependency(%q<rails>.freeze, [">= 6", "< 7"])
|
193
205
|
s.add_runtime_dependency(%q<haml-rails>.freeze, [">= 2.0", "< 3"])
|
194
|
-
s.add_runtime_dependency(%q<sass-rails>.freeze, [">=
|
206
|
+
s.add_runtime_dependency(%q<sass-rails>.freeze, [">= 5", "< 7"])
|
195
207
|
s.add_runtime_dependency(%q<cancancan>.freeze, [">= 3.3", "< 4"])
|
196
208
|
s.add_runtime_dependency(%q<simple_form>.freeze, [">= 5.1", "< 6"])
|
197
209
|
s.add_runtime_dependency(%q<vanilla_nested>.freeze, [">= 1.3", "< 2"])
|
198
210
|
s.add_runtime_dependency(%q<kaminari>.freeze, [">= 1.2.1", "< 2"])
|
199
211
|
s.add_development_dependency(%q<database_cleaner>.freeze, [">= 1.8", "< 2"])
|
200
212
|
s.add_development_dependency(%q<devise>.freeze, [">= 4.8", "< 5"])
|
201
|
-
s.add_development_dependency(%q<faker>.freeze, [">= 0"])
|
213
|
+
s.add_development_dependency(%q<faker>.freeze, [">= 0.2.19", "< 1"])
|
202
214
|
s.add_development_dependency(%q<sqlite3>.freeze, [">= 1.4.2", "< 2"])
|
203
215
|
s.add_development_dependency(%q<bundler>.freeze, [">= 2", "< 3"])
|
204
216
|
s.add_development_dependency(%q<factory_bot_rails>.freeze, [">= 5.1", "< 6"])
|
205
217
|
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
206
|
-
s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
|
207
|
-
s.add_development_dependency(%q<rubocop-rails>.freeze, [">=
|
208
|
-
s.add_development_dependency(%q<rubocop-rspec>.freeze, [">= 0"])
|
218
|
+
s.add_development_dependency(%q<rubocop>.freeze, [">= 1.2.0", "< 2"])
|
219
|
+
s.add_development_dependency(%q<rubocop-rails>.freeze, [">= 2.11.3", "< 3"])
|
220
|
+
s.add_development_dependency(%q<rubocop-rspec>.freeze, [">= 2.4.0", "< 3"])
|
209
221
|
else
|
210
222
|
s.add_dependency(%q<rails>.freeze, [">= 6", "< 7"])
|
211
223
|
s.add_dependency(%q<haml-rails>.freeze, [">= 2.0", "< 3"])
|
212
|
-
s.add_dependency(%q<sass-rails>.freeze, [">=
|
224
|
+
s.add_dependency(%q<sass-rails>.freeze, [">= 5", "< 7"])
|
213
225
|
s.add_dependency(%q<cancancan>.freeze, [">= 3.3", "< 4"])
|
214
226
|
s.add_dependency(%q<simple_form>.freeze, [">= 5.1", "< 6"])
|
215
227
|
s.add_dependency(%q<vanilla_nested>.freeze, [">= 1.3", "< 2"])
|
216
228
|
s.add_dependency(%q<kaminari>.freeze, [">= 1.2.1", "< 2"])
|
217
229
|
s.add_dependency(%q<database_cleaner>.freeze, [">= 1.8", "< 2"])
|
218
230
|
s.add_dependency(%q<devise>.freeze, [">= 4.8", "< 5"])
|
219
|
-
s.add_dependency(%q<faker>.freeze, [">= 0"])
|
231
|
+
s.add_dependency(%q<faker>.freeze, [">= 0.2.19", "< 1"])
|
220
232
|
s.add_dependency(%q<sqlite3>.freeze, [">= 1.4.2", "< 2"])
|
221
233
|
s.add_dependency(%q<bundler>.freeze, [">= 2", "< 3"])
|
222
234
|
s.add_dependency(%q<factory_bot_rails>.freeze, [">= 5.1", "< 6"])
|
223
235
|
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
224
|
-
s.add_dependency(%q<rubocop>.freeze, [">= 0"])
|
225
|
-
s.add_dependency(%q<rubocop-rails>.freeze, [">=
|
226
|
-
s.add_dependency(%q<rubocop-rspec>.freeze, [">= 0"])
|
236
|
+
s.add_dependency(%q<rubocop>.freeze, [">= 1.2.0", "< 2"])
|
237
|
+
s.add_dependency(%q<rubocop-rails>.freeze, [">= 2.11.3", "< 3"])
|
238
|
+
s.add_dependency(%q<rubocop-rspec>.freeze, [">= 2.4.0", "< 3"])
|
227
239
|
end
|
228
240
|
end
|
229
241
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: works_cited
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loren Lundgren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '
|
59
|
+
version: '5'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '7'
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '5'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '7'
|
@@ -196,14 +196,20 @@ dependencies:
|
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
199
|
+
version: 0.2.19
|
200
|
+
- - "<"
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '1'
|
200
203
|
type: :development
|
201
204
|
prerelease: false
|
202
205
|
version_requirements: !ruby/object:Gem::Requirement
|
203
206
|
requirements:
|
204
207
|
- - ">="
|
205
208
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
209
|
+
version: 0.2.19
|
210
|
+
- - "<"
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: '1'
|
207
213
|
- !ruby/object:Gem::Dependency
|
208
214
|
name: sqlite3
|
209
215
|
requirement: !ruby/object:Gem::Requirement
|
@@ -284,42 +290,60 @@ dependencies:
|
|
284
290
|
requirements:
|
285
291
|
- - ">="
|
286
292
|
- !ruby/object:Gem::Version
|
287
|
-
version:
|
293
|
+
version: 1.2.0
|
294
|
+
- - "<"
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
version: '2'
|
288
297
|
type: :development
|
289
298
|
prerelease: false
|
290
299
|
version_requirements: !ruby/object:Gem::Requirement
|
291
300
|
requirements:
|
292
301
|
- - ">="
|
293
302
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
303
|
+
version: 1.2.0
|
304
|
+
- - "<"
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: '2'
|
295
307
|
- !ruby/object:Gem::Dependency
|
296
308
|
name: rubocop-rails
|
297
309
|
requirement: !ruby/object:Gem::Requirement
|
298
310
|
requirements:
|
299
311
|
- - ">="
|
300
312
|
- !ruby/object:Gem::Version
|
301
|
-
version:
|
313
|
+
version: 2.11.3
|
314
|
+
- - "<"
|
315
|
+
- !ruby/object:Gem::Version
|
316
|
+
version: '3'
|
302
317
|
type: :development
|
303
318
|
prerelease: false
|
304
319
|
version_requirements: !ruby/object:Gem::Requirement
|
305
320
|
requirements:
|
306
321
|
- - ">="
|
307
322
|
- !ruby/object:Gem::Version
|
308
|
-
version:
|
323
|
+
version: 2.11.3
|
324
|
+
- - "<"
|
325
|
+
- !ruby/object:Gem::Version
|
326
|
+
version: '3'
|
309
327
|
- !ruby/object:Gem::Dependency
|
310
328
|
name: rubocop-rspec
|
311
329
|
requirement: !ruby/object:Gem::Requirement
|
312
330
|
requirements:
|
313
331
|
- - ">="
|
314
332
|
- !ruby/object:Gem::Version
|
315
|
-
version:
|
333
|
+
version: 2.4.0
|
334
|
+
- - "<"
|
335
|
+
- !ruby/object:Gem::Version
|
336
|
+
version: '3'
|
316
337
|
type: :development
|
317
338
|
prerelease: false
|
318
339
|
version_requirements: !ruby/object:Gem::Requirement
|
319
340
|
requirements:
|
320
341
|
- - ">="
|
321
342
|
- !ruby/object:Gem::Version
|
322
|
-
version:
|
343
|
+
version: 2.4.0
|
344
|
+
- - "<"
|
345
|
+
- !ruby/object:Gem::Version
|
346
|
+
version: '3'
|
323
347
|
description: Works cited allows you to add a list of the works cited in ActiveRecord
|
324
348
|
objects, to be formatted by a helper that can be added to relevant pages to format
|
325
349
|
the citations like a bibliography.
|
@@ -341,8 +365,15 @@ files:
|
|
341
365
|
- README.md
|
342
366
|
- Rakefile
|
343
367
|
- VERSION
|
368
|
+
- app/assets/javascripts/works_cited/addFields.js
|
344
369
|
- app/assets/javascripts/works_cited/application.js
|
370
|
+
- app/assets/javascripts/works_cited/loadPreview.js
|
371
|
+
- app/assets/javascripts/works_cited/removeFields.js
|
372
|
+
- app/assets/javascripts/works_cited/shared.js
|
373
|
+
- app/assets/javascripts/works_cited/showFields.js
|
374
|
+
- app/assets/javascripts/works_cited/submitForm.js
|
345
375
|
- app/assets/stylesheets/works_cited/application.scss
|
376
|
+
- app/controllers/concerns/works_cited/params.rb
|
346
377
|
- app/controllers/works_cited/citations_controller.rb
|
347
378
|
- app/helpers/works_cited/application_helper.rb
|
348
379
|
- app/models/works_cited/citation.rb
|
@@ -361,6 +392,8 @@ files:
|
|
361
392
|
- app/views/works_cited/citation_types/fields/_interview.html.haml
|
362
393
|
- app/views/works_cited/citation_types/fields/_periodical.html.haml
|
363
394
|
- app/views/works_cited/citation_types/fields/_tweet.html.haml
|
395
|
+
- app/views/works_cited/citations/_citation_fields.html.haml
|
396
|
+
- app/views/works_cited/citations/_fields.html.haml
|
364
397
|
- app/views/works_cited/citations/_form.html.haml
|
365
398
|
- app/views/works_cited/citations/_list.html.haml
|
366
399
|
- app/views/works_cited/citations/edit.html.haml
|
@@ -368,13 +401,14 @@ files:
|
|
368
401
|
- app/views/works_cited/citations/new.html.haml
|
369
402
|
- app/views/works_cited/citations/preview.html.haml
|
370
403
|
- app/views/works_cited/citations/show.html.haml
|
371
|
-
- app/views/works_cited/contributors/
|
404
|
+
- app/views/works_cited/contributors/_contributor_fields.html.haml
|
372
405
|
- bin/rails
|
373
406
|
- config/initializers/simple_form.rb
|
374
407
|
- config/locales/simple_form.en.yml
|
375
408
|
- config/routes.rb
|
376
409
|
- db/migrate/20210830165845_create_works_cited_citations.works_cited.rb
|
377
410
|
- db/migrate/20210831013102_create_works_cited_contributors.works_cited.rb
|
411
|
+
- db/migrate/20210915160902_add_index_to_works_cited_contributors.rb
|
378
412
|
- lib/tasks/works_cited_tasks.rake
|
379
413
|
- lib/templates/haml/scaffold/_form.html.haml
|
380
414
|
- lib/works_cited.rb
|
@@ -453,9 +487,10 @@ files:
|
|
453
487
|
- spec/dummy/db/development.sqlite3
|
454
488
|
- spec/dummy/db/migrate/20210830171235_create_doodads.rb
|
455
489
|
- spec/dummy/db/migrate/20210902150031_devise_create_users.rb
|
456
|
-
- spec/dummy/db/migrate/20210902202653_create_works_cited_citations.works_cited.rb
|
457
|
-
- spec/dummy/db/migrate/20210902202654_create_works_cited_contributors.works_cited.rb
|
458
490
|
- spec/dummy/db/migrate/20210907170207_create_things.rb
|
491
|
+
- spec/dummy/db/migrate/20210915161011_create_works_cited_citations.works_cited.rb
|
492
|
+
- spec/dummy/db/migrate/20210915161012_create_works_cited_contributors.works_cited.rb
|
493
|
+
- spec/dummy/db/migrate/20210915161013_add_index_to_works_cited_contributors.works_cited.rb
|
459
494
|
- spec/dummy/db/schema.rb
|
460
495
|
- spec/dummy/db/test.sqlite3
|
461
496
|
- spec/dummy/lib/assets/.keep
|
@@ -476,6 +511,7 @@ files:
|
|
476
511
|
- spec/factories/citations.rb
|
477
512
|
- spec/factories/contributors.rb
|
478
513
|
- spec/factories/doodads.rb
|
514
|
+
- spec/factories/things.rb
|
479
515
|
- spec/factories/users.rb
|
480
516
|
- spec/helpers/works_cited/application_helper_spec.rb
|
481
517
|
- spec/models/doodad_spec.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
%fieldset
|
2
|
-
%legend Contributor
|
3
|
-
= form.input :contributor_role, collection: WorksCited.configuration.valid_contributor_roles.map { |x| [x, x] }
|
4
|
-
= form.input :first
|
5
|
-
= form.input :middle, hint: 'Only the initial is used'
|
6
|
-
= form.input :last
|
7
|
-
= form.input :suffix
|
8
|
-
= form.input :handle
|
9
|
-
= link_to_remove_nested form, link_classes: 'button button-danger'
|