roadie 3.0.5 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -7
- data/.travis.yml +1 -5
- data/Changelog.md +20 -1
- data/Guardfile +2 -1
- data/README.md +193 -53
- data/lib/roadie.rb +3 -2
- data/lib/roadie/asset_scanner.rb +30 -10
- data/lib/roadie/cached_provider.rb +77 -0
- data/lib/roadie/document.rb +29 -10
- data/lib/roadie/errors.rb +43 -1
- data/lib/roadie/filesystem_provider.rb +3 -1
- data/lib/roadie/inliner.rb +57 -27
- data/lib/roadie/markup_improver.rb +2 -1
- data/lib/roadie/net_http_provider.rb +70 -0
- data/lib/roadie/null_provider.rb +3 -0
- data/lib/roadie/path_rewriter_provider.rb +64 -0
- data/lib/roadie/provider_list.rb +19 -1
- data/lib/roadie/rspec.rb +1 -0
- data/lib/roadie/rspec/cache_store.rb +25 -0
- data/lib/roadie/stylesheet.rb +1 -0
- data/lib/roadie/url_generator.rb +2 -1
- data/lib/roadie/utils.rb +9 -0
- data/lib/roadie/version.rb +1 -1
- data/roadie.gemspec +2 -1
- data/spec/hash_as_cache_store_spec.rb +7 -0
- data/spec/integration_spec.rb +91 -0
- data/spec/lib/roadie/asset_scanner_spec.rb +79 -25
- data/spec/lib/roadie/cached_provider_spec.rb +52 -0
- data/spec/lib/roadie/document_spec.rb +43 -7
- data/spec/lib/roadie/filesystem_provider_spec.rb +5 -0
- data/spec/lib/roadie/inliner_spec.rb +72 -15
- data/spec/lib/roadie/net_http_provider_spec.rb +89 -0
- data/spec/lib/roadie/path_rewriter_provider_spec.rb +39 -0
- data/spec/lib/roadie/provider_list_spec.rb +31 -8
- data/spec/lib/roadie/stylesheet_spec.rb +14 -8
- data/spec/lib/roadie/utils_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/have_styling_matcher.rb +1 -0
- metadata +40 -9
- data/lib/roadie/upgrade_guide.rb +0 -36
@@ -24,4 +24,11 @@ module Roadie
|
|
24
24
|
expect("/").not_to be_absolute
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
describe Utils, "warn" do
|
29
|
+
it "passes the message on to Kernel.warn" do
|
30
|
+
expect(Kernel).to receive(:warn).with("Roadie: Hello from specs")
|
31
|
+
Utils.warn "Hello from specs"
|
32
|
+
end
|
33
|
+
end
|
27
34
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roadie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Magnus Bergmark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.5.0
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
22
|
+
version: 1.7.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.5.0
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
32
|
+
version: 1.7.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: css_parser
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +72,20 @@ dependencies:
|
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '1.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: webmock
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 1.21.0
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.21.0
|
69
89
|
description: Roadie tries to make sending HTML emails a little less painful by inlining
|
70
90
|
stylesheets and rewriting relative URLs for you.
|
71
91
|
email:
|
@@ -90,22 +110,25 @@ files:
|
|
90
110
|
- lib/roadie.rb
|
91
111
|
- lib/roadie/asset_provider.rb
|
92
112
|
- lib/roadie/asset_scanner.rb
|
113
|
+
- lib/roadie/cached_provider.rb
|
93
114
|
- lib/roadie/document.rb
|
94
115
|
- lib/roadie/errors.rb
|
95
116
|
- lib/roadie/filesystem_provider.rb
|
96
117
|
- lib/roadie/inliner.rb
|
97
118
|
- lib/roadie/markup_improver.rb
|
119
|
+
- lib/roadie/net_http_provider.rb
|
98
120
|
- lib/roadie/null_provider.rb
|
99
121
|
- lib/roadie/null_url_rewriter.rb
|
122
|
+
- lib/roadie/path_rewriter_provider.rb
|
100
123
|
- lib/roadie/provider_list.rb
|
101
124
|
- lib/roadie/rspec.rb
|
102
125
|
- lib/roadie/rspec/asset_provider.rb
|
126
|
+
- lib/roadie/rspec/cache_store.rb
|
103
127
|
- lib/roadie/selector.rb
|
104
128
|
- lib/roadie/style_attribute_builder.rb
|
105
129
|
- lib/roadie/style_block.rb
|
106
130
|
- lib/roadie/style_property.rb
|
107
131
|
- lib/roadie/stylesheet.rb
|
108
|
-
- lib/roadie/upgrade_guide.rb
|
109
132
|
- lib/roadie/url_generator.rb
|
110
133
|
- lib/roadie/url_rewriter.rb
|
111
134
|
- lib/roadie/utils.rb
|
@@ -113,15 +136,19 @@ files:
|
|
113
136
|
- roadie.gemspec
|
114
137
|
- spec/fixtures/big_em.css
|
115
138
|
- spec/fixtures/stylesheets/green.css
|
139
|
+
- spec/hash_as_cache_store_spec.rb
|
116
140
|
- spec/integration_spec.rb
|
117
141
|
- spec/lib/roadie/asset_scanner_spec.rb
|
142
|
+
- spec/lib/roadie/cached_provider_spec.rb
|
118
143
|
- spec/lib/roadie/css_not_found_spec.rb
|
119
144
|
- spec/lib/roadie/document_spec.rb
|
120
145
|
- spec/lib/roadie/filesystem_provider_spec.rb
|
121
146
|
- spec/lib/roadie/inliner_spec.rb
|
122
147
|
- spec/lib/roadie/markup_improver_spec.rb
|
148
|
+
- spec/lib/roadie/net_http_provider_spec.rb
|
123
149
|
- spec/lib/roadie/null_provider_spec.rb
|
124
150
|
- spec/lib/roadie/null_url_rewriter_spec.rb
|
151
|
+
- spec/lib/roadie/path_rewriter_provider_spec.rb
|
125
152
|
- spec/lib/roadie/provider_list_spec.rb
|
126
153
|
- spec/lib/roadie/selector_spec.rb
|
127
154
|
- spec/lib/roadie/style_attribute_builder_spec.rb
|
@@ -155,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
182
|
version: '1.9'
|
156
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
184
|
requirements:
|
158
|
-
- - "
|
185
|
+
- - ">"
|
159
186
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
187
|
+
version: 1.3.1
|
161
188
|
requirements: []
|
162
189
|
rubyforge_project:
|
163
190
|
rubygems_version: 2.4.6
|
@@ -167,15 +194,19 @@ summary: Making HTML emails comfortable for the Ruby rockstars
|
|
167
194
|
test_files:
|
168
195
|
- spec/fixtures/big_em.css
|
169
196
|
- spec/fixtures/stylesheets/green.css
|
197
|
+
- spec/hash_as_cache_store_spec.rb
|
170
198
|
- spec/integration_spec.rb
|
171
199
|
- spec/lib/roadie/asset_scanner_spec.rb
|
200
|
+
- spec/lib/roadie/cached_provider_spec.rb
|
172
201
|
- spec/lib/roadie/css_not_found_spec.rb
|
173
202
|
- spec/lib/roadie/document_spec.rb
|
174
203
|
- spec/lib/roadie/filesystem_provider_spec.rb
|
175
204
|
- spec/lib/roadie/inliner_spec.rb
|
176
205
|
- spec/lib/roadie/markup_improver_spec.rb
|
206
|
+
- spec/lib/roadie/net_http_provider_spec.rb
|
177
207
|
- spec/lib/roadie/null_provider_spec.rb
|
178
208
|
- spec/lib/roadie/null_url_rewriter_spec.rb
|
209
|
+
- spec/lib/roadie/path_rewriter_provider_spec.rb
|
179
210
|
- spec/lib/roadie/provider_list_spec.rb
|
180
211
|
- spec/lib/roadie/selector_spec.rb
|
181
212
|
- spec/lib/roadie/style_attribute_builder_spec.rb
|
data/lib/roadie/upgrade_guide.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Let the user know that they need to act to get Roadie compatible with their
|
3
|
-
# Rails apps if they might have upgraded from Roadie 2.
|
4
|
-
# TODO: Remove this file by the time of version 3.1.
|
5
|
-
#
|
6
|
-
|
7
|
-
if defined?(Rails) && !defined?(ROADIE_I_KNOW_ABOUT_VERSION_3)
|
8
|
-
begin
|
9
|
-
require 'roadie/rails'
|
10
|
-
rescue LoadError
|
11
|
-
warn <<-WARNING
|
12
|
-
Hey there! It looks like you might have tried to upgrade to Roadie 3 from Roadie 2.
|
13
|
-
|
14
|
-
Roadie 3 is a completely new version that is no longer interfacing with Rails
|
15
|
-
out-of-the-box. In order to use it you need to add the gem roadie-rails too.
|
16
|
-
|
17
|
-
You should really read the upgrade guide since the API have changed:
|
18
|
-
|
19
|
-
https://github.com/Mange/roadie-rails/blob/master/Upgrading.md#upgrading-from-roadie-2
|
20
|
-
|
21
|
-
I hope this new version will work better for you, but if you are not ready to
|
22
|
-
upgrade right now add a version specifier to your Gemfile:
|
23
|
-
|
24
|
-
gem 'roadie', '~> 2.4' # Support any minor version in the Roadie 2 series.
|
25
|
-
|
26
|
-
In case you have a need for Roadie without the default Rails integration you
|
27
|
-
can remove this warning by setting a constant:
|
28
|
-
|
29
|
-
# config/application.rb
|
30
|
-
ROADIE_I_KNOW_ABOUT_VERSION_3 = true # Remove after Roadie 3.1
|
31
|
-
|
32
|
-
Thank you for your attention.
|
33
|
-
WARNING
|
34
|
-
raise
|
35
|
-
end
|
36
|
-
end
|