md-roadie 2.4.2.md.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.autotest +10 -0
  2. data/.gitignore +12 -0
  3. data/.travis.yml +22 -0
  4. data/.yardopts +1 -0
  5. data/Appraisals +15 -0
  6. data/Changelog.md +185 -0
  7. data/Gemfile +11 -0
  8. data/Guardfile +8 -0
  9. data/MIT-LICENSE +20 -0
  10. data/README.md +310 -0
  11. data/Rakefile +30 -0
  12. data/autotest/discover.rb +1 -0
  13. data/gemfiles/rails_3.0.gemfile +7 -0
  14. data/gemfiles/rails_3.0.gemfile.lock +123 -0
  15. data/gemfiles/rails_3.1.gemfile +7 -0
  16. data/gemfiles/rails_3.1.gemfile.lock +126 -0
  17. data/gemfiles/rails_3.2.gemfile +7 -0
  18. data/gemfiles/rails_3.2.gemfile.lock +124 -0
  19. data/gemfiles/rails_4.0.gemfile +7 -0
  20. data/gemfiles/rails_4.0.gemfile.lock +119 -0
  21. data/lib/roadie.rb +79 -0
  22. data/lib/roadie/action_mailer_extensions.rb +95 -0
  23. data/lib/roadie/asset_pipeline_provider.rb +28 -0
  24. data/lib/roadie/asset_provider.rb +62 -0
  25. data/lib/roadie/css_file_not_found.rb +22 -0
  26. data/lib/roadie/filesystem_provider.rb +74 -0
  27. data/lib/roadie/inliner.rb +251 -0
  28. data/lib/roadie/railtie.rb +39 -0
  29. data/lib/roadie/selector.rb +50 -0
  30. data/lib/roadie/style_declaration.rb +42 -0
  31. data/lib/roadie/version.rb +3 -0
  32. data/md-roadie.gemspec +36 -0
  33. data/spec/fixtures/app/assets/stylesheets/integration.css +10 -0
  34. data/spec/fixtures/public/stylesheets/integration.css +10 -0
  35. data/spec/fixtures/views/integration_mailer/marketing.html.erb +2 -0
  36. data/spec/fixtures/views/integration_mailer/notification.html.erb +8 -0
  37. data/spec/fixtures/views/integration_mailer/notification.text.erb +6 -0
  38. data/spec/integration_spec.rb +110 -0
  39. data/spec/lib/roadie/action_mailer_extensions_spec.rb +227 -0
  40. data/spec/lib/roadie/asset_pipeline_provider_spec.rb +65 -0
  41. data/spec/lib/roadie/css_file_not_found_spec.rb +29 -0
  42. data/spec/lib/roadie/filesystem_provider_spec.rb +94 -0
  43. data/spec/lib/roadie/inliner_spec.rb +591 -0
  44. data/spec/lib/roadie/selector_spec.rb +55 -0
  45. data/spec/lib/roadie/style_declaration_spec.rb +49 -0
  46. data/spec/lib/roadie_spec.rb +101 -0
  47. data/spec/shared_examples/asset_provider_examples.rb +11 -0
  48. data/spec/spec_helper.rb +69 -0
  49. data/spec/support/anonymous_mailer.rb +21 -0
  50. data/spec/support/change_url_options.rb +5 -0
  51. data/spec/support/have_attribute_matcher.rb +28 -0
  52. data/spec/support/have_node_matcher.rb +19 -0
  53. data/spec/support/have_selector_matcher.rb +6 -0
  54. data/spec/support/have_styling_matcher.rb +25 -0
  55. data/spec/support/parse_styling.rb +25 -0
  56. metadata +318 -0
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ require 'bundler/setup'
3
+ require 'special_delivery/gem_tasks'
4
+ require 'appraisal'
5
+
6
+ Bundler::GemHelper.install_tasks
7
+
8
+ begin
9
+ require 'rspec'
10
+ rescue Bundler::BundlerError => e
11
+ $stderr.puts e.message
12
+ $stderr.puts "Run `bundle install` to install missing gems"
13
+ exit e.status_code
14
+ end
15
+
16
+ require 'rspec/core/rake_task'
17
+
18
+ desc "Run specs"
19
+ RSpec::Core::RakeTask.new('spec') do |t|
20
+ t.pattern = 'spec/**/*_spec.rb'
21
+ t.rspec_opts = ["-c"]
22
+ end
23
+
24
+ desc "Default: Run specs"
25
+ task :default => :spec
26
+
27
+ namespace :spec do
28
+ desc 'Run specs against all supported versions of Rails'
29
+ task :all => ["appraisal:install", "appraisal", "spec"]
30
+ end
@@ -0,0 +1 @@
1
+ Autotest.add_discovery { 'rspec2' }
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.0.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,123 @@
1
+ PATH
2
+ remote: /Users/mange/Projects/roadie
3
+ specs:
4
+ roadie (2.4.2)
5
+ actionmailer (> 3.0.0, < 5.0.0)
6
+ css_parser (~> 1.3.4)
7
+ nokogiri (> 1.5.0)
8
+ sprockets
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ abstract (1.0.0)
14
+ actionmailer (3.0.17)
15
+ actionpack (= 3.0.17)
16
+ mail (~> 2.2.19)
17
+ actionpack (3.0.17)
18
+ activemodel (= 3.0.17)
19
+ activesupport (= 3.0.17)
20
+ builder (~> 2.1.2)
21
+ erubis (~> 2.6.6)
22
+ i18n (~> 0.5.0)
23
+ rack (~> 1.2.5)
24
+ rack-mount (~> 0.6.14)
25
+ rack-test (~> 0.5.7)
26
+ tzinfo (~> 0.3.23)
27
+ activemodel (3.0.17)
28
+ activesupport (= 3.0.17)
29
+ builder (~> 2.1.2)
30
+ i18n (~> 0.5.0)
31
+ activerecord (3.0.17)
32
+ activemodel (= 3.0.17)
33
+ activesupport (= 3.0.17)
34
+ arel (~> 2.0.10)
35
+ tzinfo (~> 0.3.23)
36
+ activeresource (3.0.17)
37
+ activemodel (= 3.0.17)
38
+ activesupport (= 3.0.17)
39
+ activesupport (3.0.17)
40
+ addressable (2.3.5)
41
+ appraisal (0.5.2)
42
+ bundler
43
+ rake
44
+ arel (2.0.10)
45
+ builder (2.1.2)
46
+ css_parser (1.3.5)
47
+ addressable
48
+ diff-lcs (1.2.4)
49
+ erubis (2.6.6)
50
+ abstract (>= 1.0.0)
51
+ hike (1.2.3)
52
+ i18n (0.5.0)
53
+ json (1.7.5)
54
+ mail (2.2.19)
55
+ activesupport (>= 2.3.6)
56
+ i18n (>= 0.4.0)
57
+ mime-types (~> 1.16)
58
+ treetop (~> 1.4.8)
59
+ mime-types (1.19)
60
+ mini_portile (0.5.1)
61
+ multi_json (1.8.0)
62
+ nokogiri (1.6.0)
63
+ mini_portile (~> 0.5.0)
64
+ polyglot (0.3.3)
65
+ rack (1.2.5)
66
+ rack-mount (0.6.14)
67
+ rack (>= 1.0.0)
68
+ rack-test (0.5.7)
69
+ rack (>= 1.0)
70
+ rails (3.0.17)
71
+ actionmailer (= 3.0.17)
72
+ actionpack (= 3.0.17)
73
+ activerecord (= 3.0.17)
74
+ activeresource (= 3.0.17)
75
+ activesupport (= 3.0.17)
76
+ bundler (~> 1.0)
77
+ railties (= 3.0.17)
78
+ railties (3.0.17)
79
+ actionpack (= 3.0.17)
80
+ activesupport (= 3.0.17)
81
+ rake (>= 0.8.7)
82
+ rdoc (~> 3.4)
83
+ thor (~> 0.14.4)
84
+ rake (10.0.2)
85
+ rdoc (3.12)
86
+ json (~> 1.4)
87
+ rspec (2.14.1)
88
+ rspec-core (~> 2.14.0)
89
+ rspec-expectations (~> 2.14.0)
90
+ rspec-mocks (~> 2.14.0)
91
+ rspec-core (2.14.5)
92
+ rspec-expectations (2.14.3)
93
+ diff-lcs (>= 1.1.3, < 2.0)
94
+ rspec-mocks (2.14.3)
95
+ rspec-rails (2.14.0)
96
+ actionpack (>= 3.0)
97
+ activesupport (>= 3.0)
98
+ railties (>= 3.0)
99
+ rspec-core (~> 2.14.0)
100
+ rspec-expectations (~> 2.14.0)
101
+ rspec-mocks (~> 2.14.0)
102
+ sprockets (2.10.0)
103
+ hike (~> 1.2)
104
+ multi_json (~> 1.0)
105
+ rack (~> 1.0)
106
+ tilt (~> 1.1, != 1.3.0)
107
+ thor (0.14.6)
108
+ tilt (1.4.1)
109
+ treetop (1.4.12)
110
+ polyglot
111
+ polyglot (>= 0.3.1)
112
+ tzinfo (0.3.35)
113
+
114
+ PLATFORMS
115
+ ruby
116
+
117
+ DEPENDENCIES
118
+ appraisal
119
+ rails (~> 3.0.0)
120
+ rake
121
+ roadie!
122
+ rspec
123
+ rspec-rails
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.1.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,126 @@
1
+ PATH
2
+ remote: /Users/mange/Projects/roadie
3
+ specs:
4
+ roadie (2.4.2)
5
+ actionmailer (> 3.0.0, < 5.0.0)
6
+ css_parser (~> 1.3.4)
7
+ nokogiri (> 1.5.0)
8
+ sprockets
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionmailer (3.1.4)
14
+ actionpack (= 3.1.4)
15
+ mail (~> 2.3.0)
16
+ actionpack (3.1.4)
17
+ activemodel (= 3.1.4)
18
+ activesupport (= 3.1.4)
19
+ builder (~> 3.0.0)
20
+ erubis (~> 2.7.0)
21
+ i18n (~> 0.6)
22
+ rack (~> 1.3.6)
23
+ rack-cache (~> 1.1)
24
+ rack-mount (~> 0.8.2)
25
+ rack-test (~> 0.6.1)
26
+ sprockets (~> 2.0.3)
27
+ activemodel (3.1.4)
28
+ activesupport (= 3.1.4)
29
+ builder (~> 3.0.0)
30
+ i18n (~> 0.6)
31
+ activerecord (3.1.4)
32
+ activemodel (= 3.1.4)
33
+ activesupport (= 3.1.4)
34
+ arel (~> 2.2.3)
35
+ tzinfo (~> 0.3.29)
36
+ activeresource (3.1.4)
37
+ activemodel (= 3.1.4)
38
+ activesupport (= 3.1.4)
39
+ activesupport (3.1.4)
40
+ multi_json (~> 1.0)
41
+ addressable (2.3.5)
42
+ appraisal (0.5.2)
43
+ bundler
44
+ rake
45
+ arel (2.2.3)
46
+ builder (3.0.0)
47
+ css_parser (1.3.5)
48
+ addressable
49
+ diff-lcs (1.2.4)
50
+ erubis (2.7.0)
51
+ hike (1.2.1)
52
+ i18n (0.6.1)
53
+ json (1.7.5)
54
+ mail (2.3.3)
55
+ i18n (>= 0.4.0)
56
+ mime-types (~> 1.16)
57
+ treetop (~> 1.4.8)
58
+ mime-types (1.19)
59
+ mini_portile (0.5.1)
60
+ multi_json (1.4.0)
61
+ nokogiri (1.6.0)
62
+ mini_portile (~> 0.5.0)
63
+ polyglot (0.3.3)
64
+ rack (1.3.6)
65
+ rack-cache (1.2)
66
+ rack (>= 0.4)
67
+ rack-mount (0.8.3)
68
+ rack (>= 1.0.0)
69
+ rack-ssl (1.3.2)
70
+ rack
71
+ rack-test (0.6.2)
72
+ rack (>= 1.0)
73
+ rails (3.1.4)
74
+ actionmailer (= 3.1.4)
75
+ actionpack (= 3.1.4)
76
+ activerecord (= 3.1.4)
77
+ activeresource (= 3.1.4)
78
+ activesupport (= 3.1.4)
79
+ bundler (~> 1.0)
80
+ railties (= 3.1.4)
81
+ railties (3.1.4)
82
+ actionpack (= 3.1.4)
83
+ activesupport (= 3.1.4)
84
+ rack-ssl (~> 1.3.2)
85
+ rake (>= 0.8.7)
86
+ rdoc (~> 3.4)
87
+ thor (~> 0.14.6)
88
+ rake (10.0.2)
89
+ rdoc (3.12)
90
+ json (~> 1.4)
91
+ rspec (2.14.1)
92
+ rspec-core (~> 2.14.0)
93
+ rspec-expectations (~> 2.14.0)
94
+ rspec-mocks (~> 2.14.0)
95
+ rspec-core (2.14.5)
96
+ rspec-expectations (2.14.3)
97
+ diff-lcs (>= 1.1.3, < 2.0)
98
+ rspec-mocks (2.14.3)
99
+ rspec-rails (2.14.0)
100
+ actionpack (>= 3.0)
101
+ activesupport (>= 3.0)
102
+ railties (>= 3.0)
103
+ rspec-core (~> 2.14.0)
104
+ rspec-expectations (~> 2.14.0)
105
+ rspec-mocks (~> 2.14.0)
106
+ sprockets (2.0.3)
107
+ hike (~> 1.2)
108
+ rack (~> 1.0)
109
+ tilt (~> 1.1, != 1.3.0)
110
+ thor (0.14.6)
111
+ tilt (1.3.3)
112
+ treetop (1.4.12)
113
+ polyglot
114
+ polyglot (>= 0.3.1)
115
+ tzinfo (0.3.35)
116
+
117
+ PLATFORMS
118
+ ruby
119
+
120
+ DEPENDENCIES
121
+ appraisal
122
+ rails (~> 3.1.0)
123
+ rake
124
+ roadie!
125
+ rspec
126
+ rspec-rails
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,124 @@
1
+ PATH
2
+ remote: /Users/mange/Projects/roadie
3
+ specs:
4
+ roadie (2.4.2)
5
+ actionmailer (> 3.0.0, < 5.0.0)
6
+ css_parser (~> 1.3.4)
7
+ nokogiri (> 1.5.0)
8
+ sprockets
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionmailer (3.2.2)
14
+ actionpack (= 3.2.2)
15
+ mail (~> 2.4.0)
16
+ actionpack (3.2.2)
17
+ activemodel (= 3.2.2)
18
+ activesupport (= 3.2.2)
19
+ builder (~> 3.0.0)
20
+ erubis (~> 2.7.0)
21
+ journey (~> 1.0.1)
22
+ rack (~> 1.4.0)
23
+ rack-cache (~> 1.1)
24
+ rack-test (~> 0.6.1)
25
+ sprockets (~> 2.1.2)
26
+ activemodel (3.2.2)
27
+ activesupport (= 3.2.2)
28
+ builder (~> 3.0.0)
29
+ activerecord (3.2.2)
30
+ activemodel (= 3.2.2)
31
+ activesupport (= 3.2.2)
32
+ arel (~> 3.0.2)
33
+ tzinfo (~> 0.3.29)
34
+ activeresource (3.2.2)
35
+ activemodel (= 3.2.2)
36
+ activesupport (= 3.2.2)
37
+ activesupport (3.2.2)
38
+ i18n (~> 0.6)
39
+ multi_json (~> 1.0)
40
+ addressable (2.3.5)
41
+ appraisal (0.5.2)
42
+ bundler
43
+ rake
44
+ arel (3.0.2)
45
+ builder (3.0.0)
46
+ css_parser (1.3.5)
47
+ addressable
48
+ diff-lcs (1.2.4)
49
+ erubis (2.7.0)
50
+ hike (1.2.1)
51
+ i18n (0.6.1)
52
+ journey (1.0.4)
53
+ json (1.7.5)
54
+ mail (2.4.4)
55
+ i18n (>= 0.4.0)
56
+ mime-types (~> 1.16)
57
+ treetop (~> 1.4.8)
58
+ mime-types (1.19)
59
+ mini_portile (0.5.1)
60
+ multi_json (1.4.0)
61
+ nokogiri (1.6.0)
62
+ mini_portile (~> 0.5.0)
63
+ polyglot (0.3.3)
64
+ rack (1.4.1)
65
+ rack-cache (1.2)
66
+ rack (>= 0.4)
67
+ rack-ssl (1.3.2)
68
+ rack
69
+ rack-test (0.6.2)
70
+ rack (>= 1.0)
71
+ rails (3.2.2)
72
+ actionmailer (= 3.2.2)
73
+ actionpack (= 3.2.2)
74
+ activerecord (= 3.2.2)
75
+ activeresource (= 3.2.2)
76
+ activesupport (= 3.2.2)
77
+ bundler (~> 1.0)
78
+ railties (= 3.2.2)
79
+ railties (3.2.2)
80
+ actionpack (= 3.2.2)
81
+ activesupport (= 3.2.2)
82
+ rack-ssl (~> 1.3.2)
83
+ rake (>= 0.8.7)
84
+ rdoc (~> 3.4)
85
+ thor (~> 0.14.6)
86
+ rake (10.0.2)
87
+ rdoc (3.12)
88
+ json (~> 1.4)
89
+ rspec (2.14.1)
90
+ rspec-core (~> 2.14.0)
91
+ rspec-expectations (~> 2.14.0)
92
+ rspec-mocks (~> 2.14.0)
93
+ rspec-core (2.14.5)
94
+ rspec-expectations (2.14.3)
95
+ diff-lcs (>= 1.1.3, < 2.0)
96
+ rspec-mocks (2.14.3)
97
+ rspec-rails (2.14.0)
98
+ actionpack (>= 3.0)
99
+ activesupport (>= 3.0)
100
+ railties (>= 3.0)
101
+ rspec-core (~> 2.14.0)
102
+ rspec-expectations (~> 2.14.0)
103
+ rspec-mocks (~> 2.14.0)
104
+ sprockets (2.1.2)
105
+ hike (~> 1.2)
106
+ rack (~> 1.0)
107
+ tilt (~> 1.1, != 1.3.0)
108
+ thor (0.14.6)
109
+ tilt (1.3.3)
110
+ treetop (1.4.12)
111
+ polyglot
112
+ polyglot (>= 0.3.1)
113
+ tzinfo (0.3.35)
114
+
115
+ PLATFORMS
116
+ ruby
117
+
118
+ DEPENDENCIES
119
+ appraisal
120
+ rails (~> 3.2.0)
121
+ rake
122
+ roadie!
123
+ rspec
124
+ rspec-rails
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.0"
6
+
7
+ gemspec :path=>"../"
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: /Users/mange/Projects/roadie
3
+ specs:
4
+ roadie (2.4.2)
5
+ actionmailer (> 3.0.0, < 5.0.0)
6
+ css_parser (~> 1.3.4)
7
+ nokogiri (> 1.5.0)
8
+ sprockets
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionmailer (4.0.0)
14
+ actionpack (= 4.0.0)
15
+ mail (~> 2.5.3)
16
+ actionpack (4.0.0)
17
+ activesupport (= 4.0.0)
18
+ builder (~> 3.1.0)
19
+ erubis (~> 2.7.0)
20
+ rack (~> 1.5.2)
21
+ rack-test (~> 0.6.2)
22
+ activemodel (4.0.0)
23
+ activesupport (= 4.0.0)
24
+ builder (~> 3.1.0)
25
+ activerecord (4.0.0)
26
+ activemodel (= 4.0.0)
27
+ activerecord-deprecated_finders (~> 1.0.2)
28
+ activesupport (= 4.0.0)
29
+ arel (~> 4.0.0)
30
+ activerecord-deprecated_finders (1.0.3)
31
+ activesupport (4.0.0)
32
+ i18n (~> 0.6, >= 0.6.4)
33
+ minitest (~> 4.2)
34
+ multi_json (~> 1.3)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 0.3.37)
37
+ addressable (2.3.5)
38
+ appraisal (0.5.2)
39
+ bundler
40
+ rake
41
+ arel (4.0.0)
42
+ atomic (1.1.10)
43
+ builder (3.1.4)
44
+ css_parser (1.3.5)
45
+ addressable
46
+ diff-lcs (1.2.4)
47
+ erubis (2.7.0)
48
+ hike (1.2.3)
49
+ i18n (0.6.4)
50
+ mail (2.5.4)
51
+ mime-types (~> 1.16)
52
+ treetop (~> 1.4.8)
53
+ mime-types (1.23)
54
+ mini_portile (0.5.1)
55
+ minitest (4.7.5)
56
+ multi_json (1.7.7)
57
+ nokogiri (1.6.0)
58
+ mini_portile (~> 0.5.0)
59
+ polyglot (0.3.3)
60
+ rack (1.5.2)
61
+ rack-test (0.6.2)
62
+ rack (>= 1.0)
63
+ rails (4.0.0)
64
+ actionmailer (= 4.0.0)
65
+ actionpack (= 4.0.0)
66
+ activerecord (= 4.0.0)
67
+ activesupport (= 4.0.0)
68
+ bundler (>= 1.3.0, < 2.0)
69
+ railties (= 4.0.0)
70
+ sprockets-rails (~> 2.0.0)
71
+ railties (4.0.0)
72
+ actionpack (= 4.0.0)
73
+ activesupport (= 4.0.0)
74
+ rake (>= 0.8.7)
75
+ thor (>= 0.18.1, < 2.0)
76
+ rake (10.1.0)
77
+ rspec (2.14.1)
78
+ rspec-core (~> 2.14.0)
79
+ rspec-expectations (~> 2.14.0)
80
+ rspec-mocks (~> 2.14.0)
81
+ rspec-core (2.14.5)
82
+ rspec-expectations (2.14.3)
83
+ diff-lcs (>= 1.1.3, < 2.0)
84
+ rspec-mocks (2.14.3)
85
+ rspec-rails (2.14.0)
86
+ actionpack (>= 3.0)
87
+ activesupport (>= 3.0)
88
+ railties (>= 3.0)
89
+ rspec-core (~> 2.14.0)
90
+ rspec-expectations (~> 2.14.0)
91
+ rspec-mocks (~> 2.14.0)
92
+ sprockets (2.10.0)
93
+ hike (~> 1.2)
94
+ multi_json (~> 1.0)
95
+ rack (~> 1.0)
96
+ tilt (~> 1.1, != 1.3.0)
97
+ sprockets-rails (2.0.0)
98
+ actionpack (>= 3.0)
99
+ activesupport (>= 3.0)
100
+ sprockets (~> 2.8)
101
+ thor (0.18.1)
102
+ thread_safe (0.1.0)
103
+ atomic
104
+ tilt (1.4.1)
105
+ treetop (1.4.14)
106
+ polyglot
107
+ polyglot (>= 0.3.1)
108
+ tzinfo (0.3.37)
109
+
110
+ PLATFORMS
111
+ ruby
112
+
113
+ DEPENDENCIES
114
+ appraisal
115
+ rails (~> 4.0)
116
+ rake
117
+ roadie!
118
+ rspec
119
+ rspec-rails