pug-rails 2.0.3 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +32 -13
  3. data/Appraisals +33 -11
  4. data/Gemfile +6 -6
  5. data/Gemfile.lock +70 -67
  6. data/{vendor/assets/javascripts/pug/LICENCE → LICENSE} +7 -5
  7. data/README.md +5 -5
  8. data/Rakefile +3 -8
  9. data/gemfiles/{rails_3.gemfile → rails_3.1.gemfile} +2 -2
  10. data/gemfiles/{rails_3.gemfile.lock → rails_3.1.gemfile.lock} +11 -11
  11. data/gemfiles/rails_3.2.gemfile +9 -0
  12. data/gemfiles/rails_3.2.gemfile.lock +124 -0
  13. data/gemfiles/rails_4.1_with_sprockets_2.gemfile +9 -0
  14. data/gemfiles/rails_4.1_with_sprockets_2.gemfile.lock +140 -0
  15. data/gemfiles/{rails_4_with_sprockets_3.gemfile → rails_4.1_with_sprockets_3.gemfile} +2 -2
  16. data/gemfiles/{rails_4_with_sprockets_3.gemfile.lock → rails_4.1_with_sprockets_3.gemfile.lock} +46 -48
  17. data/gemfiles/rails_4.2_with_sprockets_2.gemfile +9 -0
  18. data/gemfiles/rails_4.2_with_sprockets_2.gemfile.lock +140 -0
  19. data/gemfiles/{rails_4_with_sprockets_2.gemfile → rails_4.2_with_sprockets_3.gemfile} +2 -2
  20. data/gemfiles/{rails_4_with_sprockets_2.gemfile.lock → rails_4.2_with_sprockets_3.gemfile.lock} +46 -48
  21. data/gemfiles/{rails_5.gemfile → rails_5.0.gemfile} +2 -2
  22. data/gemfiles/{rails_5.gemfile.lock → rails_5.0.gemfile.lock} +59 -59
  23. data/gemfiles/rails_5.1.gemfile +9 -0
  24. data/gemfiles/rails_5.1.gemfile.lock +142 -0
  25. data/lib/jade-rails/railtie.rb +14 -14
  26. data/lib/jade-rails/sprockets/transformer.rb +28 -4
  27. data/lib/pug-rails.rb +8 -23
  28. data/lib/pug-rails/railtie.rb +14 -14
  29. data/lib/pug-rails/sprockets/transformer.rb +28 -4
  30. data/lib/pug-rails/version.rb +1 -0
  31. data/pug-rails.gemspec +18 -16
  32. data/test/fixtures/javascripts/{application.js → application-1.js} +0 -0
  33. data/test/fixtures/javascripts/application-1.js.expected +10 -0
  34. data/test/fixtures/javascripts/application-2.js +2 -0
  35. data/test/test-helper.rb +62 -0
  36. data/test/test-pug-rails.rb +21 -76
  37. metadata +33 -21
  38. data/vendor/assets/javascripts/jade/LICENCE +0 -22
  39. data/vendor/assets/javascripts/jade/runtime.js +0 -252
  40. data/vendor/assets/javascripts/pug/runtime.js +0 -259
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f22db2f0a3f3e3488c24ff348cdc55925e257e14
4
- data.tar.gz: a687ba7f44b1894c3ff0151845b22cb0abdba137
3
+ metadata.gz: 70ce5b720ce6fcf9c79f2dd3596fb929f35b53fa
4
+ data.tar.gz: fa8616ee5ebc02ec00599cf3f0e65e99455e1942
5
5
  SHA512:
6
- metadata.gz: c3129e80b3d2ebede514ebaa752210e1c0afafd26bf25560a1d32e1537bc052c788deced12fa3a802d5ce7a71a49c745d34245d929f2d824290ca2530b38e0e1
7
- data.tar.gz: 46c470daf526b2f14b169c2b16b33e2c5be978aebd19ace057751a7fcc822f7f684d15b89579097106f1aeed7d14a66fd4cb0c2a039abd08cbb0b9db20fde628
6
+ metadata.gz: 765266102854ec5a2126f635f4eb44039210c76dce86fadf1e8924025ce58262c6b8242e9f7955f3b4d45c2c8c1095e16bd69ac59bedd661bfa579b8852a990a
7
+ data.tar.gz: dc0b51a30a494b0b30cc5338f1a98b539ec0150c3fa83d781570af768dec99728ae2c964313354705d2d886a19e0752f18eae5f5062a022d6c2448491097031c
@@ -1,23 +1,42 @@
1
1
  language: ruby
2
2
 
3
- rvm:
4
- - 2.1.10
5
- - 2.2.5
6
- - 2.3.1
7
-
8
3
  cache: bundler
9
4
 
5
+ rvm:
6
+ - 2.1
7
+ - 2.2
8
+ - 2.3
9
+ - 2.4
10
+
10
11
  gemfile:
11
- - gemfiles/rails_3.gemfile
12
- - gemfiles/rails_4_with_sprockets_2.gemfile
13
- - gemfiles/rails_4_with_sprockets_3.gemfile
14
- - gemfiles/rails_5.gemfile
12
+ - gemfiles/rails_3.1.gemfile
13
+ - gemfiles/rails_3.2.gemfile
14
+ - gemfiles/rails_4.1_with_sprockets_2.gemfile
15
+ - gemfiles/rails_4.1_with_sprockets_3.gemfile
16
+ - gemfiles/rails_4.2_with_sprockets_2.gemfile
17
+ - gemfiles/rails_4.2_with_sprockets_3.gemfile
18
+ - gemfiles/rails_5.0.gemfile
19
+ - gemfiles/rails_5.1.gemfile
15
20
 
16
21
  matrix:
17
22
  exclude:
18
- - rvm: 2.1.10
19
- gemfile: gemfiles/rails_5.gemfile
23
+ - rvm: 2.1
24
+ gemfile: gemfiles/rails_5.0.gemfile
25
+ - rvm: 2.1
26
+ gemfile: gemfiles/rails_5.1.gemfile
27
+
28
+ env:
29
+ - RAKE_ENV=test RAILS_ENV=test BUNDLE_PATH=vendor/bundle
20
30
 
21
31
  before_install:
22
- - npm install --global jade
23
- - npm install --global pug-cli
32
+ - . $HOME/.nvm/nvm.sh
33
+ - nvm install stable
34
+ - nvm use stable
35
+ - npm install --global jade pug
36
+ - gem install bundler
37
+
38
+ install:
39
+ - bundle install
40
+
41
+ script:
42
+ - bundle exec rake test
data/Appraisals CHANGED
@@ -1,18 +1,40 @@
1
- appraise 'rails-3' do
2
- gem 'rails', '~> 3'
3
- gem 'sprockets', '~> 2'
1
+ # encoding: UTF-8
2
+ # frozen_string_literal: true
3
+
4
+ appraise "rails-3.1" do
5
+ gem "rails", "~> 3.1"
6
+ gem "sprockets", "~> 2"
7
+ end
8
+
9
+ appraise "rails-3.2" do
10
+ gem "rails", "~> 3.2"
11
+ gem "sprockets", "~> 2"
12
+ end
13
+
14
+ appraise "rails-4.1-with-sprockets-2" do
15
+ gem "rails", "~> 4"
16
+ gem "sprockets", "~> 2"
17
+ end
18
+
19
+ appraise "rails-4.1-with-sprockets-3" do
20
+ gem "rails", "~> 4.1"
21
+ gem "sprockets", "~> 3"
22
+ end
23
+
24
+ appraise "rails-4.2-with-sprockets-2" do
25
+ gem "rails", "~> 4.2"
26
+ gem "sprockets", "~> 2"
4
27
  end
5
28
 
6
- appraise 'rails-4-with-sprockets-2' do
7
- gem 'rails', '~> 4'
8
- gem 'sprockets', '~> 3'
29
+ appraise "rails-4.2-with-sprockets-3" do
30
+ gem "rails", "~> 4.2"
31
+ gem "sprockets", "~> 3"
9
32
  end
10
33
 
11
- appraise 'rails-4-with-sprockets-3' do
12
- gem 'rails', '~> 4'
13
- gem 'sprockets', '~> 3'
34
+ appraise "rails-5.0" do
35
+ gem "rails", "~> 5.0"
14
36
  end
15
37
 
16
- appraise 'rails-5' do
17
- gem 'rails', '~> 5'
38
+ appraise "rails-5.1" do
39
+ gem "rails", "~> 5.1"
18
40
  end
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
- # encoding: utf-8
1
+ # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
- source 'https://rubygems.org'
5
- gemspec
4
+ source "https://rubygems.org"
5
+
6
+ gem "rails", "~> 5"
7
+ gem "pry-byebug"
6
8
 
7
- gem 'rails', '~> 4'
8
- gem 'sprockets', '~> 3'
9
- gem 'pry-byebug'
9
+ gemspec
@@ -7,68 +7,70 @@ PATH
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.7.1)
11
- actionpack (= 4.2.7.1)
12
- actionview (= 4.2.7.1)
13
- activejob (= 4.2.7.1)
10
+ actioncable (5.1.2)
11
+ actionpack (= 5.1.2)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (~> 0.6.1)
14
+ actionmailer (5.1.2)
15
+ actionpack (= 5.1.2)
16
+ actionview (= 5.1.2)
17
+ activejob (= 5.1.2)
14
18
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.7.1)
17
- actionview (= 4.2.7.1)
18
- activesupport (= 4.2.7.1)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.1.2)
21
+ actionview (= 5.1.2)
22
+ activesupport (= 5.1.2)
23
+ rack (~> 2.0)
24
+ rack-test (~> 0.6.3)
25
+ rails-dom-testing (~> 2.0)
22
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.7.1)
24
- activesupport (= 4.2.7.1)
27
+ actionview (5.1.2)
28
+ activesupport (= 5.1.2)
25
29
  builder (~> 3.1)
26
- erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.7.1)
30
- activesupport (= 4.2.7.1)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.7.1)
33
- activesupport (= 4.2.7.1)
34
- builder (~> 3.1)
35
- activerecord (4.2.7.1)
36
- activemodel (= 4.2.7.1)
37
- activesupport (= 4.2.7.1)
38
- arel (~> 6.0)
39
- activesupport (4.2.7.1)
30
+ erubi (~> 1.4)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.1.2)
34
+ activesupport (= 5.1.2)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.1.2)
37
+ activesupport (= 5.1.2)
38
+ activerecord (5.1.2)
39
+ activemodel (= 5.1.2)
40
+ activesupport (= 5.1.2)
41
+ arel (~> 8.0)
42
+ activesupport (5.1.2)
43
+ concurrent-ruby (~> 1.0, >= 1.0.2)
40
44
  i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
42
45
  minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
46
  tzinfo (~> 1.1)
45
- appraisal (2.1.0)
47
+ appraisal (2.2.0)
46
48
  bundler
47
49
  rake
48
50
  thor (>= 0.14.0)
49
- arel (6.0.4)
50
- builder (3.2.2)
51
+ arel (8.0.0)
52
+ builder (3.2.3)
51
53
  byebug (9.0.6)
52
54
  coderay (1.1.1)
53
- concurrent-ruby (1.0.4)
54
- erubis (2.7.0)
55
- globalid (0.3.7)
56
- activesupport (>= 4.1.0)
57
- i18n (0.7.0)
58
- json (1.8.3)
55
+ concurrent-ruby (1.0.5)
56
+ erubi (1.6.1)
57
+ globalid (0.4.0)
58
+ activesupport (>= 4.2.0)
59
+ i18n (0.8.6)
59
60
  loofah (2.0.3)
60
61
  nokogiri (>= 1.5.9)
61
- mail (2.6.4)
62
+ mail (2.6.6)
62
63
  mime-types (>= 1.16, < 4)
63
64
  method_source (0.8.2)
64
65
  mime-types (3.1)
65
66
  mime-types-data (~> 3.2015)
66
67
  mime-types-data (3.2016.0521)
67
68
  mini_portile2 (2.1.0)
68
- minitest (5.10.1)
69
+ minitest (5.10.3)
70
+ nio4r (2.1.0)
69
71
  nokogiri (1.6.8.1)
70
72
  mini_portile2 (~> 2.1.0)
71
- power_assert (0.4.1)
73
+ power_assert (1.0.2)
72
74
  pry (0.10.4)
73
75
  coderay (~> 1.1.0)
74
76
  method_source (~> 0.8.1)
@@ -77,31 +79,30 @@ GEM
77
79
  byebug (~> 9.0)
78
80
  pry (~> 0.10)
79
81
  pug-ruby (1.0.2)
80
- rack (1.6.5)
82
+ rack (2.0.3)
81
83
  rack-test (0.6.3)
82
84
  rack (>= 1.0)
83
- rails (4.2.7.1)
84
- actionmailer (= 4.2.7.1)
85
- actionpack (= 4.2.7.1)
86
- actionview (= 4.2.7.1)
87
- activejob (= 4.2.7.1)
88
- activemodel (= 4.2.7.1)
89
- activerecord (= 4.2.7.1)
90
- activesupport (= 4.2.7.1)
85
+ rails (5.1.2)
86
+ actioncable (= 5.1.2)
87
+ actionmailer (= 5.1.2)
88
+ actionpack (= 5.1.2)
89
+ actionview (= 5.1.2)
90
+ activejob (= 5.1.2)
91
+ activemodel (= 5.1.2)
92
+ activerecord (= 5.1.2)
93
+ activesupport (= 5.1.2)
91
94
  bundler (>= 1.3.0, < 2.0)
92
- railties (= 4.2.7.1)
93
- sprockets-rails
94
- rails-deprecated_sanitizer (1.0.3)
95
- activesupport (>= 4.2.0.alpha)
96
- rails-dom-testing (1.0.8)
97
- activesupport (>= 4.2.0.beta, < 5.0)
98
- nokogiri (~> 1.6)
99
- rails-deprecated_sanitizer (>= 1.0.1)
95
+ railties (= 5.1.2)
96
+ sprockets-rails (>= 2.0.0)
97
+ rails-dom-testing (2.0.3)
98
+ activesupport (>= 4.2.0)
99
+ nokogiri (>= 1.6)
100
100
  rails-html-sanitizer (1.0.3)
101
101
  loofah (~> 2.0)
102
- railties (4.2.7.1)
103
- actionpack (= 4.2.7.1)
104
- activesupport (= 4.2.7.1)
102
+ railties (5.1.2)
103
+ actionpack (= 5.1.2)
104
+ activesupport (= 5.1.2)
105
+ method_source
105
106
  rake (>= 0.8.7)
106
107
  thor (>= 0.18.1, < 2.0)
107
108
  rake (10.5.0)
@@ -113,12 +114,15 @@ GEM
113
114
  actionpack (>= 4.0)
114
115
  activesupport (>= 4.0)
115
116
  sprockets (>= 3.0.0)
116
- test-unit (3.2.3)
117
+ test-unit (3.2.5)
117
118
  power_assert
118
119
  thor (0.19.4)
119
- thread_safe (0.3.5)
120
- tzinfo (1.2.2)
120
+ thread_safe (0.3.6)
121
+ tzinfo (1.2.3)
121
122
  thread_safe (~> 0.1)
123
+ websocket-driver (0.6.5)
124
+ websocket-extensions (>= 0.1.0)
125
+ websocket-extensions (0.1.2)
122
126
 
123
127
  PLATFORMS
124
128
  ruby
@@ -129,10 +133,9 @@ DEPENDENCIES
129
133
  nokogiri (~> 1.6, < 1.7)
130
134
  pry-byebug
131
135
  pug-rails!
132
- rails (~> 4)
136
+ rails (~> 5)
133
137
  rake (~> 10.0)
134
- sprockets (~> 3)
135
138
  test-unit (~> 3.1)
136
139
 
137
140
  BUNDLED WITH
138
- 1.13.2
141
+ 1.15.3
@@ -1,4 +1,6 @@
1
- Copyright (c) 2014 Forbes Lindesay
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Yaroslav Konoplov
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
6
  of this software and associated documentation files (the "Software"), to deal
@@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
9
  copies of the Software, and to permit persons to whom the Software is
8
10
  furnished to do so, subject to the following conditions:
9
11
 
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
12
14
 
13
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -61,23 +61,23 @@ Personally I prefer to put templates in `app/assets/templates`:
61
61
  Rails.application.config.assets.paths << Rails.root.join('app/assets/templates')
62
62
  ```
63
63
 
64
- ## Running Tests
64
+ ## Running tests
65
65
  Install bundler:
66
66
  ```bash
67
67
  gem install bundler
68
68
  ```
69
69
 
70
- Install dependencies:
70
+ Install gem dependencies:
71
71
  ```bash
72
- cd pug-rails && bundle && appraisal install
72
+ cd pug-rails && bundle install && bundle exec appraisal install
73
73
  ```
74
74
 
75
75
  Run tests:
76
76
  ```bash
77
- cd pug-rails && appraisal rake test
77
+ cd pug-rails && bundle exec appraisal rake test
78
78
  ```
79
79
 
80
80
  To test `pug-ruby` — refer to [pug-ruby](https://github.com/yivo/pug-ruby)
81
81
 
82
82
  ## Versioning
83
- Prior to version 2.0 version of the gem was the same as the version of the Jade runtime that it contains.
83
+ Prior to 2.0 the version of the gem was the same as the version of the Jade runtime that it contained.
data/Rakefile CHANGED
@@ -1,11 +1,6 @@
1
- # encoding: utf-8
1
+ # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'bundler'
5
- require 'bundler/setup'
6
- require 'json'
7
- require 'rake/testtask'
4
+ require "rake/testtask"
8
5
 
9
- Rake::TestTask.new { |t| t.libs << 'test' }
10
-
11
- task default: :test
6
+ Rake::TestTask.new { |t| t.libs << "test" }
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 3"
5
+ gem "rails", "~> 3.1"
6
6
  gem "sprockets", "~> 2"
7
7
  gem "pry-byebug"
8
8
 
9
- gemspec :path => "../"
9
+ gemspec path: "../"
@@ -1,5 +1,5 @@
1
1
  PATH
2
- remote: ../
2
+ remote: ..
3
3
  specs:
4
4
  pug-rails (2.0.3)
5
5
  pug-ruby (~> 1.0)
@@ -34,7 +34,7 @@ GEM
34
34
  activesupport (3.2.22.5)
35
35
  i18n (~> 0.6, >= 0.6.4)
36
36
  multi_json (~> 1.0)
37
- appraisal (2.1.0)
37
+ appraisal (2.2.0)
38
38
  bundler
39
39
  rake
40
40
  thor (>= 0.14.0)
@@ -44,10 +44,10 @@ GEM
44
44
  coderay (1.1.1)
45
45
  erubis (2.7.0)
46
46
  hike (1.2.3)
47
- i18n (0.7.0)
47
+ i18n (0.8.6)
48
48
  journey (1.0.4)
49
- json (1.8.3)
50
- mail (2.5.4)
49
+ json (1.8.6)
50
+ mail (2.5.5)
51
51
  mime-types (~> 1.16)
52
52
  treetop (~> 1.4.8)
53
53
  method_source (0.8.2)
@@ -57,7 +57,7 @@ GEM
57
57
  nokogiri (1.6.8.1)
58
58
  mini_portile2 (~> 2.1.0)
59
59
  polyglot (0.3.5)
60
- power_assert (0.4.1)
60
+ power_assert (1.0.2)
61
61
  pry (0.10.4)
62
62
  coderay (~> 1.1.0)
63
63
  method_source (~> 0.8.1)
@@ -67,7 +67,7 @@ GEM
67
67
  pry (~> 0.10)
68
68
  pug-ruby (1.0.2)
69
69
  rack (1.4.7)
70
- rack-cache (1.6.1)
70
+ rack-cache (1.7.0)
71
71
  rack (>= 0.4)
72
72
  rack-ssl (1.3.4)
73
73
  rack
@@ -97,14 +97,14 @@ GEM
97
97
  multi_json (~> 1.0)
98
98
  rack (~> 1.0)
99
99
  tilt (~> 1.1, != 1.3.0)
100
- test-unit (3.2.3)
100
+ test-unit (3.2.5)
101
101
  power_assert
102
102
  thor (0.19.4)
103
103
  tilt (1.4.1)
104
104
  treetop (1.4.15)
105
105
  polyglot
106
106
  polyglot (>= 0.3.1)
107
- tzinfo (0.3.52)
107
+ tzinfo (0.3.53)
108
108
 
109
109
  PLATFORMS
110
110
  ruby
@@ -115,10 +115,10 @@ DEPENDENCIES
115
115
  nokogiri (~> 1.6, < 1.7)
116
116
  pry-byebug
117
117
  pug-rails!
118
- rails (~> 3)
118
+ rails (~> 3.1)
119
119
  rake (~> 10.0)
120
120
  sprockets (~> 2)
121
121
  test-unit (~> 3.1)
122
122
 
123
123
  BUNDLED WITH
124
- 1.13.2
124
+ 1.15.3