pageflow-chart 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdb34480835c65d6261ca16f43a071a5193f845ec3197b740b865dada7dc6564
4
- data.tar.gz: 9ab9abc09a7978accbaa498b5d5b632c64a740c24649d6c7dfa58a242f1b4748
3
+ metadata.gz: 37c0ed62a0b2f6cdc20c35554be884a13c8d784dee430b4f35d7844b3a350ef3
4
+ data.tar.gz: 4e003683b187ea0dd1b7df9a7a7e8408fe2ccb7997a23e052de3a8d8022d5ba1
5
5
  SHA512:
6
- metadata.gz: 5acc10a67b6dfe0528702deb6c20474c3ce4095cd45b47253cf84c53c2dbff9a86de620db4d50f44cecd06d51fbabe92ff0e99e5f2893189684ff217af0cb6a3
7
- data.tar.gz: 58afa64d961cbe7b66658043895cefccb4c6c725920a14f906f855b342c9c7d04d38cd7bcb0dc1339f5f55b830434ed9314baad040951a1ca370078189bb02c1
6
+ metadata.gz: 8bf0e9acaa44d3333ad97cd8c44a66d34f9d62c8e52b89e173f6ecbbb39697d460a9798a77aee5a684fb2eb1d7e96c6d699058f9b83dcee932e0dbc0519c3918
7
+ data.tar.gz: 9fa7d5e26a90167110a89601425e92ca21abf042c1bbe591f1d5a6f8b3718bca3ec7714eb089a1a5c8cb57887471018b1e3785e230385626f1608419f7a28dcd
@@ -1,5 +1,5 @@
1
1
  name: tests
2
- on: [push, pull_request]
2
+ on: [push, pull_request, workflow_dispatch]
3
3
 
4
4
  jobs:
5
5
  call-workflow:
data/CHANGELOG.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 2.5.0
3
+ ### Version 2.6.0
4
4
 
5
- 2022-12-28
5
+ 2024-01-15
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow-chart/compare/2-4-stable...v2.5.0)
7
+ [Compare changes](https://github.com/codevise/pageflow-chart/compare/2-5-stable...v2.6.0)
8
8
 
9
- - Add support for Pageflow 16
10
- ([#62](https://github.com/codevise/pageflow-chart/pull/62))
9
+ - Support Pageflow 17
10
+ ([#64](https://github.com/codevise/pageflow-chart/pull/64),
11
+ [#63](https://github.com/codevise/pageflow-chart/pull/63))
11
12
 
12
13
  See
13
- [2-4-stable branch](https://github.com/codevise/pageflow-chart/blob/2-4-stable/CHANGELOG.md)
14
+ [2-5-stable branch](https://github.com/codevise/pageflow-chart/blob/2-5-stable/CHANGELOG.md)
14
15
  for previous changes.
data/Gemfile CHANGED
@@ -2,3 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in chart.gemspec
4
4
  gemspec
5
+
6
+ if ENV['PAGEFLOW_DEPENDENCIES'] == 'experimental'
7
+ git 'https://github.com/codevise/pageflow', branch: 'edge', glob: '**/*.gemspec' do
8
+ gem 'pageflow'
9
+ gem 'pageflow-support'
10
+ end
11
+ end
data/chart.gemspec CHANGED
@@ -16,17 +16,17 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.required_ruby_version = '~> 2.1'
19
+ spec.required_ruby_version = '>= 2.1'
20
20
 
21
- spec.add_runtime_dependency 'pageflow', ['>= 15.7', '< 17']
21
+ spec.add_runtime_dependency 'pageflow', ['>= 15.7', '< 18']
22
22
  spec.add_runtime_dependency 'nokogiri', '~> 1.0'
23
23
  spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
24
24
 
25
- spec.add_development_dependency 'pageflow-support', ['>= 15.0', '< 17']
26
25
  spec.add_development_dependency 'bundler', ['>= 1.0', '< 3']
27
- spec.add_development_dependency 'rake', '~> 12.0'
28
- spec.add_development_dependency 'rspec-rails', '~> 3.0'
29
26
  spec.add_development_dependency 'factory_bot_rails', '~> 4.8'
27
+ spec.add_development_dependency 'pageflow-support', ['>= 15.0', '< 18']
28
+ spec.add_development_dependency 'rake', '~> 12.0'
29
+ spec.add_development_dependency 'rspec-rails', '~> 6.0'
30
30
  spec.add_development_dependency 'webmock', '~> 3.0'
31
31
 
32
32
  # Semantic versioning rake tasks
@@ -13,7 +13,7 @@ module Pageflow
13
13
  end
14
14
 
15
15
  def load(url, raise_on_http_error: false)
16
- file = open(make_absolute(url))
16
+ file = make_absolute(url).open
17
17
  yield(file)
18
18
  rescue OpenURI::HTTPError => exception
19
19
  Rails.logger.error "Exception loading url #{url}: #{exception.message}"
@@ -1,11 +1,28 @@
1
1
  require 'pageflow-public-i18n'
2
+ require 'sprockets/rails'
2
3
 
3
4
  module Pageflow
4
5
  module Chart
5
6
  class Engine < Rails::Engine
6
7
  isolate_namespace Pageflow::Chart
7
8
 
8
- config.paths.add('lib', eager_load: true)
9
+ if Rails.respond_to?(:autoloaders)
10
+ lib = root.join('lib')
11
+
12
+ config.autoload_paths << lib
13
+ config.eager_load_paths << lib
14
+
15
+ initializer 'pageflow_chart.autoloading' do
16
+ Rails.autoloaders.main.ignore(
17
+ lib.join('generators'),
18
+ lib.join('pageflow/chart/configuration.rb'),
19
+ lib.join('pageflow/chart/version.rb')
20
+ )
21
+ end
22
+ else
23
+ config.autoload_paths << File.join(config.root, 'lib')
24
+ end
25
+
9
26
  config.assets.precompile += ['pageflow/chart/custom.css', 'pageflow/chart/transparent_background.css']
10
27
  config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.yml').to_s]
11
28
 
@@ -8,7 +8,7 @@ module Pageflow
8
8
  end
9
9
 
10
10
  def json_seed_template
11
- 'pageflow/chart/page_type.json.jbuilder'
11
+ 'pageflow/chart/page_type'
12
12
  end
13
13
 
14
14
  def file_types
@@ -10,7 +10,7 @@ module Pageflow
10
10
  class NoUrlInRefreshMetaTag < StandardError; end
11
11
 
12
12
  def load_following_refresh_tags(url, options = {}, redirect_count = 0, &block)
13
- load(url, options) do |file|
13
+ load(url, **options) do |file|
14
14
  if (redirect_url = find_refresh_meta_tag_url(file.read))
15
15
  if redirect_count >= MAX_REDIRECT_COUNT
16
16
  raise TooManyRedirects, 'Too many redirects via refresh meta tags.'
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module Chart
3
- VERSION = '2.5.0'.freeze
3
+ VERSION = '2.6.0'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,6 @@
1
1
  require 'pageflow/chart/engine'
2
+ require 'pageflow/chart/configuration'
3
+ require 'pageflow/chart/version'
2
4
 
3
5
  module Pageflow
4
6
  module Chart
@@ -17,7 +17,7 @@ module Pageflow
17
17
  result = ''
18
18
 
19
19
  allow(downloader).to receive(:load)
20
- .with(original_url, {})
20
+ .with(original_url, any_args)
21
21
  .and_yield(StringIO.new(chart_html))
22
22
 
23
23
  refresh_tag_following_downloader.load_following_refresh_tags(original_url) do |file|
@@ -57,11 +57,11 @@ module Pageflow
57
57
  result = ''
58
58
 
59
59
  allow(downloader).to receive(:load)
60
- .with(original_url, {})
60
+ .with(original_url, any_args)
61
61
  .and_yield(StringIO.new(redirect_html))
62
62
 
63
63
  allow(downloader).to receive(:load)
64
- .with(target_url, {})
64
+ .with(target_url, any_args)
65
65
  .and_yield(StringIO.new(chart_html))
66
66
 
67
67
  refresh_tag_following_downloader.load_following_refresh_tags(original_url) do |file|
@@ -88,11 +88,11 @@ module Pageflow
88
88
  result = ''
89
89
 
90
90
  allow(downloader).to receive(:load)
91
- .with(original_url, {})
91
+ .with(original_url, any_args)
92
92
  .and_yield(StringIO.new(redirect_html))
93
93
 
94
94
  allow(downloader).to receive(:load)
95
- .with(target_url, {})
95
+ .with(target_url, any_args)
96
96
  .and_yield(StringIO.new(chart_html))
97
97
 
98
98
  refresh_tag_following_downloader.load_following_refresh_tags(original_url) do |file|
@@ -119,11 +119,11 @@ module Pageflow
119
119
  result = ''
120
120
 
121
121
  allow(downloader).to receive(:load)
122
- .with(original_url, {})
122
+ .with(original_url, any_args)
123
123
  .and_yield(StringIO.new(redirect_html))
124
124
 
125
125
  allow(downloader).to receive(:load)
126
- .with(target_url, {})
126
+ .with(target_url, any_args)
127
127
  .and_yield(StringIO.new(chart_html))
128
128
 
129
129
  refresh_tag_following_downloader.load_following_refresh_tags(original_url) do |file|
@@ -143,7 +143,7 @@ module Pageflow
143
143
  <html><head><meta http-equiv="REFRESH" content="0; url=#{original_url}"></head></html>
144
144
  HTML
145
145
 
146
- allow(downloader).to receive(:load).with(original_url, {}) do |&block|
146
+ allow(downloader).to receive(:load).with(original_url, any_args) do |&block|
147
147
  block.call(StringIO.new(redirect_html))
148
148
  end
149
149
 
@@ -162,7 +162,7 @@ module Pageflow
162
162
  <html><head><meta http-equiv="REFRESH" content="something strange"></head></html>
163
163
  HTML
164
164
 
165
- allow(downloader).to receive(:load).with(original_url, {}).and_yield(StringIO.new(redirect_html))
165
+ allow(downloader).to receive(:load).with(original_url, any_args).and_yield(StringIO.new(redirect_html))
166
166
 
167
167
  expect {
168
168
  refresh_tag_following_downloader.load_following_refresh_tags(original_url)
@@ -179,7 +179,7 @@ module Pageflow
179
179
  <html><head><meta http-equiv="REFRESH"></head></html>
180
180
  HTML
181
181
 
182
- allow(downloader).to receive(:load).with(original_url, {}).and_yield(StringIO.new(redirect_html))
182
+ allow(downloader).to receive(:load).with(original_url, any_args).and_yield(StringIO.new(redirect_html))
183
183
 
184
184
  expect {
185
185
  refresh_tag_following_downloader.load_following_refresh_tags(original_url)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-chart
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-28 00:00:00.000000000 Z
11
+ date: 2024-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '15.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '17'
22
+ version: '18'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '15.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '17'
32
+ version: '18'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: nokogiri
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,45 +59,59 @@ dependencies:
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.0'
61
61
  - !ruby/object:Gem::Dependency
62
- name: pageflow-support
62
+ name: bundler
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '15.0'
67
+ version: '1.0'
68
68
  - - "<"
69
69
  - !ruby/object:Gem::Version
70
- version: '17'
70
+ version: '3'
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: '15.0'
77
+ version: '1.0'
78
78
  - - "<"
79
79
  - !ruby/object:Gem::Version
80
- version: '17'
80
+ version: '3'
81
81
  - !ruby/object:Gem::Dependency
82
- name: bundler
82
+ name: factory_bot_rails
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '4.8'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: '4.8'
95
+ - !ruby/object:Gem::Dependency
96
+ name: pageflow-support
83
97
  requirement: !ruby/object:Gem::Requirement
84
98
  requirements:
85
99
  - - ">="
86
100
  - !ruby/object:Gem::Version
87
- version: '1.0'
101
+ version: '15.0'
88
102
  - - "<"
89
103
  - !ruby/object:Gem::Version
90
- version: '3'
104
+ version: '18'
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - ">="
96
110
  - !ruby/object:Gem::Version
97
- version: '1.0'
111
+ version: '15.0'
98
112
  - - "<"
99
113
  - !ruby/object:Gem::Version
100
- version: '3'
114
+ version: '18'
101
115
  - !ruby/object:Gem::Dependency
102
116
  name: rake
103
117
  requirement: !ruby/object:Gem::Requirement
@@ -118,28 +132,14 @@ dependencies:
118
132
  requirements:
119
133
  - - "~>"
120
134
  - !ruby/object:Gem::Version
121
- version: '3.0'
135
+ version: '6.0'
122
136
  type: :development
123
137
  prerelease: false
124
138
  version_requirements: !ruby/object:Gem::Requirement
125
139
  requirements:
126
140
  - - "~>"
127
141
  - !ruby/object:Gem::Version
128
- version: '3.0'
129
- - !ruby/object:Gem::Dependency
130
- name: factory_bot_rails
131
- requirement: !ruby/object:Gem::Requirement
132
- requirements:
133
- - - "~>"
134
- - !ruby/object:Gem::Version
135
- version: '4.8'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- requirements:
140
- - - "~>"
141
- - !ruby/object:Gem::Version
142
- version: '4.8'
142
+ version: '6.0'
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: webmock
145
145
  requirement: !ruby/object:Gem::Requirement
@@ -265,7 +265,7 @@ require_paths:
265
265
  - lib
266
266
  required_ruby_version: !ruby/object:Gem::Requirement
267
267
  requirements:
268
- - - "~>"
268
+ - - ">="
269
269
  - !ruby/object:Gem::Version
270
270
  version: '2.1'
271
271
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
274
  - !ruby/object:Gem::Version
275
275
  version: '0'
276
276
  requirements: []
277
- rubygems_version: 3.0.8
277
+ rubygems_version: 3.4.10
278
278
  signing_key:
279
279
  specification_version: 4
280
280
  summary: Pagetype for Embedded Datawrapper Charts