pageflow-localfocus 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6a7dd9a5f87f2f9508451d84662fa2a878193f26
4
+ data.tar.gz: 5544a4aaff0c0d8bd14ccc50efd641f8d2d4ae7e
5
+ SHA512:
6
+ metadata.gz: 7ee6ac8bb5cbfc63a7e5366d9be12dd86bbb4cfb8b33e814af4fb4b1b0b99bbf1d431e98ff0dd3ffdde3ed36961d24cb331d9f6e95f27e522c4e172151c9e945
7
+ data.tar.gz: ab3528a42ce55e87edcd9850b1b94c136e9ef03b4128eb8d66b8dc54829e781b0ba8f86ee87556e1aaf75f824f546633bd01f7da434fc22609508a96f62c54ea
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.16.0
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in pageflow-localfocus.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,356 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pageflow-localfocus (0.1.0)
5
+ pageflow (~> 12.x)
6
+ pageflow-public-i18n (~> 1.12.x)
7
+ rails
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actionmailer (4.2.10)
13
+ actionpack (= 4.2.10)
14
+ actionview (= 4.2.10)
15
+ activejob (= 4.2.10)
16
+ mail (~> 2.5, >= 2.5.4)
17
+ rails-dom-testing (~> 1.0, >= 1.0.5)
18
+ actionpack (4.2.10)
19
+ actionview (= 4.2.10)
20
+ activesupport (= 4.2.10)
21
+ rack (~> 1.6)
22
+ rack-test (~> 0.6.2)
23
+ rails-dom-testing (~> 1.0, >= 1.0.5)
24
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
25
+ actionview (4.2.10)
26
+ activesupport (= 4.2.10)
27
+ builder (~> 3.1)
28
+ erubis (~> 2.7.0)
29
+ rails-dom-testing (~> 1.0, >= 1.0.5)
30
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
31
+ activeadmin (1.0.0.pre4)
32
+ arbre (~> 1.0, >= 1.0.2)
33
+ bourbon
34
+ coffee-rails
35
+ formtastic (~> 3.1)
36
+ formtastic_i18n
37
+ inherited_resources (~> 1.6)
38
+ jquery-rails
39
+ jquery-ui-rails
40
+ kaminari (~> 0.15)
41
+ rails (>= 3.2, < 5.1)
42
+ ransack (~> 1.3)
43
+ sass-rails
44
+ sprockets (< 4)
45
+ activeadmin-searchable_select (1.0.0)
46
+ activeadmin (~> 1.x)
47
+ jquery-rails (>= 3.0, < 5)
48
+ select2-rails (~> 4.0)
49
+ activejob (4.2.10)
50
+ activesupport (= 4.2.10)
51
+ globalid (>= 0.3.0)
52
+ activemodel (4.2.10)
53
+ activesupport (= 4.2.10)
54
+ builder (~> 3.1)
55
+ activerecord (4.2.10)
56
+ activemodel (= 4.2.10)
57
+ activesupport (= 4.2.10)
58
+ arel (~> 6.0)
59
+ activesupport (4.2.10)
60
+ i18n (~> 0.7)
61
+ minitest (~> 5.1)
62
+ thread_safe (~> 0.3, >= 0.3.4)
63
+ tzinfo (~> 1.1)
64
+ ar_after_transaction (0.4.1)
65
+ activerecord (> 3.2.0, < 5.0)
66
+ arbre (1.1.1)
67
+ activesupport (>= 3.0.0)
68
+ arel (6.0.4)
69
+ aws-sdk (1.67.0)
70
+ aws-sdk-v1 (= 1.67.0)
71
+ aws-sdk-v1 (1.67.0)
72
+ json (~> 1.4)
73
+ nokogiri (~> 1)
74
+ babel-source (5.8.35)
75
+ babel-transpiler (0.7.0)
76
+ babel-source (>= 4.0, < 6)
77
+ execjs (~> 2.0)
78
+ backbone-rails (1.0.0.1)
79
+ rails (>= 3.0.0)
80
+ bcrypt (3.1.11)
81
+ bourbon (3.1.8)
82
+ sass (>= 3.2.0)
83
+ thor
84
+ builder (3.2.3)
85
+ cancancan (1.17.0)
86
+ climate_control (0.2.0)
87
+ cocaine (0.5.8)
88
+ climate_control (>= 0.0.3, < 1.0)
89
+ coffee-rails (4.2.2)
90
+ coffee-script (>= 2.2.0)
91
+ railties (>= 4.0.0)
92
+ coffee-script (2.4.1)
93
+ coffee-script-source
94
+ execjs
95
+ coffee-script-source (1.12.2)
96
+ concurrent-ruby (1.0.5)
97
+ connection_pool (2.2.1)
98
+ crass (1.0.3)
99
+ devise (3.5.10)
100
+ bcrypt (~> 3.0)
101
+ orm_adapter (~> 0.1)
102
+ railties (>= 3.2.6, < 5)
103
+ responders
104
+ thread_safe (~> 0.1)
105
+ warden (~> 1.2.3)
106
+ devise-async (0.9.0)
107
+ devise (~> 3.2)
108
+ diff-lcs (1.3)
109
+ ejs (1.1.1)
110
+ erubis (2.7.0)
111
+ execjs (2.7.0)
112
+ ffi (1.9.18)
113
+ formtastic (3.1.5)
114
+ actionpack (>= 3.2.13)
115
+ formtastic_i18n (0.6.0)
116
+ friendly_id (5.2.3)
117
+ activerecord (>= 4.0.0)
118
+ globalid (0.4.1)
119
+ activesupport (>= 4.2.0)
120
+ has_scope (0.7.1)
121
+ actionpack (>= 4.1, < 5.2)
122
+ activesupport (>= 4.1, < 5.2)
123
+ htmlentities (4.3.4)
124
+ http_accept_language (2.1.1)
125
+ i18n (0.9.1)
126
+ concurrent-ruby (~> 1.0)
127
+ i18n-js (2.1.2)
128
+ i18n
129
+ inherited_resources (1.7.2)
130
+ actionpack (>= 3.2, < 5.2.x)
131
+ has_scope (~> 0.6)
132
+ railties (>= 3.2, < 5.2.x)
133
+ responders
134
+ jbuilder (2.7.0)
135
+ activesupport (>= 4.2.0)
136
+ multi_json (>= 1.2)
137
+ jquery-fileupload-rails (0.4.1)
138
+ actionpack (>= 3.1)
139
+ railties (>= 3.1)
140
+ jquery-layout-rails (0.1.0)
141
+ jquery-rails
142
+ jquery-rails (3.1.4)
143
+ railties (>= 3.0, < 5.0)
144
+ thor (>= 0.14, < 2.0)
145
+ jquery-ui-rails (5.0.5)
146
+ railties (>= 3.2.16)
147
+ json (1.8.6)
148
+ kaminari (0.17.0)
149
+ actionpack (>= 3.0.0)
150
+ activesupport (>= 3.0.0)
151
+ kramdown (1.16.2)
152
+ loofah (2.1.1)
153
+ crass (~> 1.0.2)
154
+ nokogiri (>= 1.5.9)
155
+ mail (2.7.0)
156
+ mini_mime (>= 0.1.1)
157
+ marionette-rails (1.1.0)
158
+ rails (>= 3.1.0)
159
+ mime-types (3.1)
160
+ mime-types-data (~> 3.2015)
161
+ mime-types-data (3.2016.0521)
162
+ mini_mime (1.0.0)
163
+ mini_portile2 (2.3.0)
164
+ minitest (5.10.3)
165
+ mono_logger (1.1.0)
166
+ multi_json (1.12.2)
167
+ nokogiri (1.8.1)
168
+ mini_portile2 (~> 2.3.0)
169
+ orm_adapter (0.5.0)
170
+ pageflow (12.1.0)
171
+ activeadmin (= 1.0.0.pre4)
172
+ activeadmin-searchable_select (~> 1.0)
173
+ ar_after_transaction (~> 0.4.0)
174
+ aws-sdk (~> 1.60)
175
+ backbone-rails (~> 1.0.0)
176
+ bcrypt (~> 3.1.7)
177
+ bourbon (~> 3.1.8)
178
+ cancancan (~> 1.10)
179
+ devise (~> 3.5)
180
+ devise-async (~> 0.9.0)
181
+ ejs (~> 1.1)
182
+ friendly_id (~> 5.0)
183
+ htmlentities (~> 4.3)
184
+ http_accept_language (~> 2.0)
185
+ i18n-js (~> 2.1)
186
+ jbuilder (>= 1.5, < 3.0)
187
+ jquery-fileupload-rails (= 0.4.1)
188
+ jquery-layout-rails (~> 0.1.0)
189
+ jquery-rails (~> 3.0)
190
+ jquery-ui-rails (= 5.0.5)
191
+ kramdown (~> 1.5)
192
+ marionette-rails (~> 1.1.0)
193
+ pageflow-public-i18n (~> 1.11)
194
+ paperclip (~> 4.2.4)
195
+ rails (~> 4.2.6)
196
+ react-rails (~> 1.8)
197
+ redis (~> 3.0)
198
+ redis-namespace (~> 1.5)
199
+ resque (~> 1.25)
200
+ resque-logger (~> 0.2.0)
201
+ resque-scheduler (~> 2.5)
202
+ resque_mailer (~> 2.2)
203
+ sass (~> 3.4)
204
+ sass-rails (~> 5.0)
205
+ state_machine (~> 1.2)
206
+ state_machine_job (>= 0.2.0, < 2)
207
+ webvtt-ruby (~> 0.3.2)
208
+ wysihtml5x-rails (= 0.4.17)
209
+ yajl-ruby (~> 1.2)
210
+ zencoder (~> 2.5)
211
+ pageflow-public-i18n (1.12.0)
212
+ paperclip (4.2.4)
213
+ activemodel (>= 3.2.0)
214
+ activesupport (>= 3.2.0)
215
+ cocaine (~> 0.5.5)
216
+ mime-types
217
+ polyamorous (1.3.1)
218
+ activerecord (>= 3.0)
219
+ rack (1.6.8)
220
+ rack-protection (1.5.3)
221
+ rack
222
+ rack-test (0.6.3)
223
+ rack (>= 1.0)
224
+ rails (4.2.10)
225
+ actionmailer (= 4.2.10)
226
+ actionpack (= 4.2.10)
227
+ actionview (= 4.2.10)
228
+ activejob (= 4.2.10)
229
+ activemodel (= 4.2.10)
230
+ activerecord (= 4.2.10)
231
+ activesupport (= 4.2.10)
232
+ bundler (>= 1.3.0, < 2.0)
233
+ railties (= 4.2.10)
234
+ sprockets-rails
235
+ rails-deprecated_sanitizer (1.0.3)
236
+ activesupport (>= 4.2.0.alpha)
237
+ rails-dom-testing (1.0.8)
238
+ activesupport (>= 4.2.0.beta, < 5.0)
239
+ nokogiri (~> 1.6)
240
+ rails-deprecated_sanitizer (>= 1.0.1)
241
+ rails-html-sanitizer (1.0.3)
242
+ loofah (~> 2.0)
243
+ railties (4.2.10)
244
+ actionpack (= 4.2.10)
245
+ activesupport (= 4.2.10)
246
+ rake (>= 0.8.7)
247
+ thor (>= 0.18.1, < 2.0)
248
+ rake (10.5.0)
249
+ ransack (1.8.4)
250
+ actionpack (>= 3.0)
251
+ activerecord (>= 3.0)
252
+ activesupport (>= 3.0)
253
+ i18n
254
+ polyamorous (~> 1.3)
255
+ rb-fsevent (0.10.2)
256
+ rb-inotify (0.9.10)
257
+ ffi (>= 0.5.0, < 2)
258
+ react-rails (1.11.0)
259
+ babel-transpiler (>= 0.7.0)
260
+ connection_pool
261
+ execjs
262
+ railties (>= 3.2)
263
+ tilt
264
+ redis (3.0.7)
265
+ redis-namespace (1.6.0)
266
+ redis (>= 3.0.4)
267
+ responders (2.4.0)
268
+ actionpack (>= 4.2.0, < 5.3)
269
+ railties (>= 4.2.0, < 5.3)
270
+ resque (1.25.2)
271
+ mono_logger (~> 1.0)
272
+ multi_json (~> 1.0)
273
+ redis-namespace (~> 1.3)
274
+ sinatra (>= 0.9.2)
275
+ vegas (~> 0.1.2)
276
+ resque-logger (0.2.0)
277
+ resque
278
+ resque-scheduler (2.5.5)
279
+ mono_logger (~> 1.0)
280
+ redis (~> 3.0.4)
281
+ resque (~> 1.25.1)
282
+ rufus-scheduler (~> 2.0.24)
283
+ resque_mailer (2.4.3)
284
+ actionmailer (>= 3.0)
285
+ activesupport (>= 3.0)
286
+ rspec (3.7.0)
287
+ rspec-core (~> 3.7.0)
288
+ rspec-expectations (~> 3.7.0)
289
+ rspec-mocks (~> 3.7.0)
290
+ rspec-core (3.7.0)
291
+ rspec-support (~> 3.7.0)
292
+ rspec-expectations (3.7.0)
293
+ diff-lcs (>= 1.2.0, < 2.0)
294
+ rspec-support (~> 3.7.0)
295
+ rspec-mocks (3.7.0)
296
+ diff-lcs (>= 1.2.0, < 2.0)
297
+ rspec-support (~> 3.7.0)
298
+ rspec-support (3.7.0)
299
+ rufus-scheduler (2.0.24)
300
+ tzinfo (>= 0.3.22)
301
+ sass (3.5.3)
302
+ sass-listen (~> 4.0.0)
303
+ sass-listen (4.0.0)
304
+ rb-fsevent (~> 0.9, >= 0.9.4)
305
+ rb-inotify (~> 0.9, >= 0.9.7)
306
+ sass-rails (5.0.7)
307
+ railties (>= 4.0.0, < 6)
308
+ sass (~> 3.1)
309
+ sprockets (>= 2.8, < 4.0)
310
+ sprockets-rails (>= 2.0, < 4.0)
311
+ tilt (>= 1.1, < 3)
312
+ select2-rails (4.0.3)
313
+ thor (~> 0.14)
314
+ sinatra (1.4.8)
315
+ rack (~> 1.5)
316
+ rack-protection (~> 1.4)
317
+ tilt (>= 1.3, < 3)
318
+ sprockets (3.7.1)
319
+ concurrent-ruby (~> 1.0)
320
+ rack (> 1, < 3)
321
+ sprockets-rails (3.2.1)
322
+ actionpack (>= 4.0)
323
+ activesupport (>= 4.0)
324
+ sprockets (>= 3.0.0)
325
+ state_machine (1.2.0)
326
+ state_machine_job (1.0.0)
327
+ resque (~> 1.25)
328
+ resque-logger (~> 0.2.0)
329
+ state_machine (~> 1.2)
330
+ thor (0.20.0)
331
+ thread_safe (0.3.6)
332
+ tilt (2.0.8)
333
+ tzinfo (1.2.4)
334
+ thread_safe (~> 0.1)
335
+ vegas (0.1.11)
336
+ rack (>= 1.0.0)
337
+ warden (1.2.7)
338
+ rack (>= 1.0)
339
+ webvtt-ruby (0.3.2)
340
+ wysihtml5x-rails (0.4.17)
341
+ railties (>= 3.1.0)
342
+ yajl-ruby (1.3.1)
343
+ zencoder (2.5.1)
344
+ multi_json
345
+
346
+ PLATFORMS
347
+ ruby
348
+
349
+ DEPENDENCIES
350
+ bundler (~> 1.16)
351
+ pageflow-localfocus!
352
+ rake (~> 10.0)
353
+ rspec (~> 3.0)
354
+
355
+ BUNDLED WITH
356
+ 1.16.0
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Localfocus integration for Pageflow
2
+
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'pageflow-localfocus'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ ## Usage
17
+
18
+ TODO: Write usage instructions here
19
+
20
+ ## Development
21
+
22
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
23
+
24
+ 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).
25
+
26
+ ## Contributing
27
+
28
+ Bug reports and pull requests are welcome on GitHub at https://github.com/scrollytelling/pageflow-localfocus.
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
@@ -0,0 +1,5 @@
1
+ //= require_self
2
+
3
+ //= require ./localfocus/components
4
+
5
+ pageflow.localfocus = pageflow.localfocus || {};
@@ -0,0 +1,5 @@
1
+ //= require_self
2
+ //= require ./components/localfocus_iframe
3
+ //= require ./components/page
4
+
5
+ pageflow.localfocus = pageflow.localfocus || {};
@@ -0,0 +1,22 @@
1
+ (function() {
2
+ class LocalfocusIframe extends React.Component {
3
+ render() {
4
+ return (
5
+ <iframe
6
+ className="localfocusvisual"
7
+ scrolling="no"
8
+ frameborder="0"
9
+ style="width:100%;height:550px;overflow:hidden"
10
+ ref={iframe => this.iframe = iframe}
11
+ src="https://localfocus2.appspot.com/551a9626918b3?api=1">
12
+ </iframe>
13
+ )
14
+ }
15
+ }
16
+
17
+ const {connectInPage, combine} = pageflow.react;
18
+
19
+ pageflow.localfocus.LocalfocusIframe = connectInPage(combine({
20
+
21
+ }))(LocalfocusIframe);
22
+ }());
@@ -0,0 +1,37 @@
1
+ (function() {
2
+ const {
3
+ PageWrapper,
4
+ PageBackground, PageBackgroundImage, PageShadow,
5
+ PageContent, PageHeader, PageText
6
+ } = pageflow.react.components;
7
+
8
+ const {
9
+ LocalfocusIframe
10
+ } = pageflow.localfocus;
11
+
12
+ class Page extends React.Component {
13
+ render() {
14
+ return (
15
+ <PageWrapper>
16
+ <PageBackground>
17
+ </PageBackground>
18
+
19
+ <PageContent>
20
+ <LocalfocusIframe/>
21
+ </PageContent>
22
+ </PageWrapper>
23
+ )
24
+ }
25
+ }
26
+
27
+ const {registerPageType, connectInPage, combine} = pageflow.react;
28
+ const {pageAttributes} = pageflow.react.selectors;
29
+
30
+ registerPageType('localfocus', {
31
+ component: connectInPage(
32
+ combine({
33
+ page: pageAttributes()
34
+ })
35
+ )(Page)
36
+ });
37
+ }());
@@ -0,0 +1,8 @@
1
+ //= require_tree ./editor/
2
+ //= require_self
3
+
4
+ pageflow.localfocus = pageflow.localfocus || {};
5
+
6
+ pageflow.editor.pageTypes.register('localfocus', {
7
+ configurationEditorView: pageflow.localfocus.ConfigurationEditorView
8
+ });
@@ -0,0 +1,12 @@
1
+ <label>
2
+ <span class="name"></span>
3
+ <span class="inline_help"></span>
4
+ <input
5
+ type="url"
6
+ required pattern="https://localfocus2.appspot.com/.*"
7
+ title="Only localfocus URLs are allowed"
8
+ placeholder="https://localfocus2.appspot.com/551a9626918b3"
9
+ />
10
+ </label>
11
+ <div class="validation"></div>
12
+ <div class="status_container"></div>
@@ -0,0 +1,20 @@
1
+ pageflow.localfocus.ConfigurationEditorView = pageflow.ConfigurationEditorView.extend({
2
+ configure: function() {
3
+ this.tab('general', function() {
4
+ this.group('general');
5
+ });
6
+
7
+ this.tab('files', function() {
8
+ this.input('link', pageflow.localfocus.UrlInputView, {
9
+ required: true,
10
+ pattern: "https://localfocus2.appspot.com/.*", // I18n.t('pageflow.localfocus.placeholder', {locale: pageflow.entry.configuration.get('locale')})
11
+ title: "Only localfocus URLs are allowed",
12
+ placeholder: "https://localfocus2.appspot.com/551a9626918b3"
13
+ })
14
+ });
15
+
16
+ this.tab('options', function() {
17
+ this.group('options');
18
+ });
19
+ }
20
+ });
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Input view for an URL.
3
+ *
4
+ * @see {@link module:pageflow/ui.pageflow.inputView pageflow.inputView} for further options
5
+ * @class
6
+ * @memberof module:pageflow/localfocus
7
+ */
8
+ pageflow.localfocus.UrlInputView = Backbone.Marionette.ItemView.extend({
9
+ mixins: [pageflow.inputView],
10
+
11
+ template: 'pageflow/chart/editor/templates/url_input',
12
+
13
+ ui: {
14
+ input: 'input'
15
+ },
16
+
17
+ onRender: function() {
18
+ load();
19
+ },
20
+
21
+ onChange: function() {
22
+ save();
23
+ validate();
24
+ },
25
+
26
+ load: function() {
27
+ this.ui.input.val(this.model.get(this.options.propertyName));
28
+ this.listenTo(this.ui.input, 'input', this.onChange);
29
+ },
30
+
31
+ save: function() {
32
+ this.model.set(this.options.propertyName, this.ui.input.val());
33
+ },
34
+
35
+ validate: function() {
36
+ if (this.ui.input.validity.valid) {
37
+ this.resetValidationError();
38
+ }
39
+ else {
40
+ this.displayValidationError(I18n.t('pageflow.localfocus.views.inputs.text_input_view.required_field'));
41
+ }
42
+ },
43
+
44
+ displayValidationError: function(message) {
45
+ this.$el.addClass('invalid');
46
+ this.ui.input.attr('title', message);
47
+ },
48
+
49
+ resetValidationError: function(message) {
50
+ this.$el.removeClass('invalid');
51
+ this.ui.input.attr('title', '');
52
+ }
53
+ });
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pageflow/localfocus"
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(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,10 @@
1
+ en:
2
+ pageflow:
3
+ localfocus:
4
+ page_type_name: Localfocus
5
+ page_type_description: Embed a Localfocus chart
6
+ page_type_category_name: Data and Charts
7
+ help_entries:
8
+ page_type:
9
+ menu_item: Localfocus
10
+ text: Paste the localfocus URL in the field.
@@ -0,0 +1,13 @@
1
+ require 'pageflow/localfocus/engine'
2
+
3
+ module Pageflow
4
+ module Localfocus
5
+ def self.plugin
6
+ Plugin.new
7
+ end
8
+
9
+ def self.page_type
10
+ Pageflow::React.create_page_type('localfocus')
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ module Pageflow
2
+ module Localfocus
3
+ class Engine < Rails::Engine
4
+ isolate_namespace Pageflow::Localfocus
5
+
6
+ config.autoload_paths << File.join(config.root, 'lib')
7
+
8
+ # This has been fixed in newer versions of react-rails.
9
+ initializer "pageflow-localfocus.add_watchable_files", group: :all do |app|
10
+ app.config.watchable_files.concat Dir["#{config.root}/app/assets/javascripts/**/*.jsx*"]
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ module Pageflow
2
+ module Localfocus
3
+ class Plugin < Pageflow::Plugin
4
+ def configure(config)
5
+ config.page_types.register(Pageflow::Localfocus.page_type)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module Pageflow
2
+ module Localfocus
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,30 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "pageflow/localfocus/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pageflow-localfocus"
8
+ spec.version = Pageflow::Localfocus::VERSION
9
+ spec.authors = ["Joost Baaij"]
10
+ spec.email = ["joost@spacebabies.nl"]
11
+
12
+ spec.summary = "Localfocus charts integration for Pageflow"
13
+ spec.description = "Localfocus charts integration for Pageflow"
14
+ spec.homepage = "https://github.com/scrollytelling/pageflow-localfocus"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency 'pageflow', '~> 12.x'
24
+ spec.add_dependency 'pageflow-public-i18n', '~> 1.12.x'
25
+ spec.add_dependency 'rails'
26
+
27
+ spec.add_development_dependency "bundler", "~> 1.16"
28
+ spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rspec", "~> 3.0"
30
+ end
metadata ADDED
@@ -0,0 +1,150 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pageflow-localfocus
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Joost Baaij
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pageflow
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 12.x
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 12.x
27
+ - !ruby/object:Gem::Dependency
28
+ name: pageflow-public-i18n
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.12.x
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.12.x
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
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: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.16'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ description: Localfocus charts integration for Pageflow
98
+ email:
99
+ - joost@spacebabies.nl
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
107
+ - Gemfile
108
+ - Gemfile.lock
109
+ - README.md
110
+ - Rakefile
111
+ - app/assets/javascripts/pageflow/localfocus.js
112
+ - app/assets/javascripts/pageflow/localfocus/components.js
113
+ - app/assets/javascripts/pageflow/localfocus/components/localfocus_iframe.jsx
114
+ - app/assets/javascripts/pageflow/localfocus/components/page.jsx
115
+ - app/assets/javascripts/pageflow/localfocus/editor.js
116
+ - app/assets/javascripts/pageflow/localfocus/editor/templates/url_input.jst.ejs
117
+ - app/assets/javascripts/pageflow/localfocus/editor/views/configuration_editor_view.js
118
+ - app/assets/javascripts/pageflow/localfocus/editor/views/inputs/url_input_view.js
119
+ - bin/console
120
+ - bin/setup
121
+ - config/locales/en.yml
122
+ - lib/pageflow/localfocus.rb
123
+ - lib/pageflow/localfocus/engine.rb
124
+ - lib/pageflow/localfocus/plugin.rb
125
+ - lib/pageflow/localfocus/version.rb
126
+ - pageflow-localfocus.gemspec
127
+ homepage: https://github.com/scrollytelling/pageflow-localfocus
128
+ licenses: []
129
+ metadata: {}
130
+ post_install_message:
131
+ rdoc_options: []
132
+ require_paths:
133
+ - lib
134
+ required_ruby_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ version: '0'
144
+ requirements: []
145
+ rubyforge_project:
146
+ rubygems_version: 2.6.11
147
+ signing_key:
148
+ specification_version: 4
149
+ summary: Localfocus charts integration for Pageflow
150
+ test_files: []