pug-rails 3.0.0.rc3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '09869b45ee66c7c589a626c068f13d23b9e95b40'
4
- data.tar.gz: 3fcb17af311585047c68b0fff4d972235529b65a
3
+ metadata.gz: 85a252d8c56e86330ef871cc9d83e9d400d6c400
4
+ data.tar.gz: 30b355bddca1607326b027278faf5def05ad6163
5
5
  SHA512:
6
- metadata.gz: ba54fe9bdb3dfc8a755826adaf4e71e5da504c81ddeaf00f460539f80d7b584019ac98f0856612127d34de1c9972a68805c6cba664a2cbf6e9da131da2b77cf6
7
- data.tar.gz: f358b10f430926524a3755ea7c8a1ce49620811e843cb06a4bfa56678891e2fe32f6599efc8e2ee3b4adfe6960e4502faa78ef3b533182585a1c932373b41744
6
+ metadata.gz: 6b82e5571ed4b8837ccd5a5bd621cfc3478c39ec0fe55787416e7a993a6e68361724df7d382d6cf51d1f831ee1b3e73a4369a9ddb8af5ba191e0da76d6d5e7df
7
+ data.tar.gz: 9291cf029a70cb21112fc7a40d754b78662094a65a9640a9e65b25f0856d674d7ea88337f78a20174b4630d1d5c6bc3bd3ae3abfaf34b969dedc88631614928d
data/.gitignore CHANGED
@@ -1,6 +1,6 @@
1
1
  *.gem
2
+ .rubocop-*
2
3
  .bundle
3
- .ruby-version
4
4
  pkg/
5
5
  tmp/
6
6
  /.idea/
@@ -0,0 +1,5 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/yivo/pug-ruby/master/.rubocop.yml
3
+
4
+ Layout/MultilineArrayBraceLayout:
5
+ Enabled: false
@@ -0,0 +1 @@
1
+ 2.4.2
data/Gemfile CHANGED
@@ -3,6 +3,11 @@
3
3
 
4
4
  source "https://rubygems.org"
5
5
 
6
- gem "rails", "~> 5"
7
-
8
6
  gemspec
7
+
8
+ gem "rails", "~> 5"
9
+ gem "rake", "~> 10.0"
10
+ gem "appraisal", "~> 2.1", require: false
11
+ gem "rubocop", "~> 0.51", require: false
12
+ gem "test-unit", "~> 3.1"
13
+ gem "nokogiri", "~> 1.6", "< 1.7"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pug-rails (3.0.0.rc3)
5
- pug-ruby (~> 2.0.0.rc3)
4
+ pug-rails (3.0.0)
5
+ pug-ruby (~> 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -49,39 +49,36 @@ GEM
49
49
  rake
50
50
  thor (>= 0.14.0)
51
51
  arel (8.0.0)
52
+ ast (2.3.0)
52
53
  builder (3.2.3)
53
- byebug (9.1.0)
54
- coderay (1.1.2)
55
54
  concurrent-ruby (1.0.5)
56
- erubi (1.6.1)
55
+ crass (1.0.2)
56
+ erubi (1.7.0)
57
57
  execjs (2.7.0)
58
- globalid (0.4.0)
58
+ globalid (0.4.1)
59
59
  activesupport (>= 4.2.0)
60
- i18n (0.8.6)
61
- loofah (2.0.3)
60
+ i18n (0.9.1)
61
+ concurrent-ruby (~> 1.0)
62
+ loofah (2.1.1)
63
+ crass (~> 1.0.2)
62
64
  nokogiri (>= 1.5.9)
63
- mail (2.6.6)
64
- mime-types (>= 1.16, < 4)
65
+ mail (2.7.0)
66
+ mini_mime (>= 0.1.1)
65
67
  memoist (0.16.0)
66
68
  method-not-implemented (1.0.1)
67
- method_source (0.8.2)
68
- mime-types (3.1)
69
- mime-types-data (~> 3.2015)
70
- mime-types-data (3.2016.0521)
69
+ method_source (0.9.0)
70
+ mini_mime (1.0.0)
71
71
  mini_portile2 (2.1.0)
72
72
  minitest (5.10.3)
73
73
  nio4r (2.1.0)
74
74
  nokogiri (1.6.8.1)
75
75
  mini_portile2 (~> 2.1.0)
76
- power_assert (1.1.0)
77
- pry (0.10.4)
78
- coderay (~> 1.1.0)
79
- method_source (~> 0.8.1)
80
- slop (~> 3.4)
81
- pry-byebug (3.5.0)
82
- byebug (~> 9.1)
83
- pry (~> 0.10)
84
- pug-ruby (2.0.0.rc3)
76
+ parallel (1.12.0)
77
+ parser (2.4.0.0)
78
+ ast (~> 2.2)
79
+ power_assert (1.1.1)
80
+ powerpack (0.1.1)
81
+ pug-ruby (2.0.0)
85
82
  execjs (~> 2.0)
86
83
  memoist (~> 0.15)
87
84
  method-not-implemented (~> 1.0, >= 1.0.1)
@@ -112,9 +109,18 @@ GEM
112
109
  method_source
113
110
  rake (>= 0.8.7)
114
111
  thor (>= 0.18.1, < 2.0)
112
+ rainbow (2.2.2)
113
+ rake
115
114
  rake (10.5.0)
116
115
  regexp-match-polyfill (1.0.2)
117
- slop (3.6.0)
116
+ rubocop (0.51.0)
117
+ parallel (~> 1.10)
118
+ parser (>= 2.3.3.1, < 3.0)
119
+ powerpack (~> 0.1)
120
+ rainbow (>= 2.2.2, < 3.0)
121
+ ruby-progressbar (~> 1.7)
122
+ unicode-display_width (~> 1.0, >= 1.0.1)
123
+ ruby-progressbar (1.9.0)
118
124
  sprockets (3.7.1)
119
125
  concurrent-ruby (~> 1.0)
120
126
  rack (> 1, < 3)
@@ -122,15 +128,16 @@ GEM
122
128
  actionpack (>= 4.0)
123
129
  activesupport (>= 4.0)
124
130
  sprockets (>= 3.0.0)
125
- test-unit (3.2.5)
131
+ test-unit (3.2.6)
126
132
  power_assert
127
133
  thor (0.20.0)
128
134
  thread_safe (0.3.6)
129
- tzinfo (1.2.3)
135
+ tzinfo (1.2.4)
130
136
  thread_safe (~> 0.1)
137
+ unicode-display_width (1.3.0)
131
138
  websocket-driver (0.6.5)
132
139
  websocket-extensions (>= 0.1.0)
133
- websocket-extensions (0.1.2)
140
+ websocket-extensions (0.1.3)
134
141
 
135
142
  PLATFORMS
136
143
  ruby
@@ -139,11 +146,11 @@ DEPENDENCIES
139
146
  appraisal (~> 2.1)
140
147
  bundler (~> 1.7)
141
148
  nokogiri (~> 1.6, < 1.7)
142
- pry-byebug
143
149
  pug-rails!
144
150
  rails (~> 5)
145
151
  rake (~> 10.0)
152
+ rubocop (~> 0.51)
146
153
  test-unit (~> 3.1)
147
154
 
148
155
  BUNDLED WITH
149
- 1.15.4
156
+ 1.16.0
data/README.md CHANGED
@@ -1,85 +1,82 @@
1
- ### This README is for 2.x. README for 3.x will be updated soon!
2
-
3
- ## Pug/Jade template engine integration with Rails asset pipeline
1
+ ## 👌 Make Jade and Pug play well with Sprockets
4
2
 
5
3
  [![Gem Version](https://badge.fury.io/rb/pug-rails.svg)](https://badge.fury.io/rb/pug-rails)
6
4
  [![Build Status](https://travis-ci.org/yivo/pug-rails.svg?branch=master)](https://travis-ci.org/yivo/pug-rails)
7
5
 
8
6
  ## About
9
- This gem uses [pug-ruby](https://github.com/yivo/pug-ruby) to compile Pug/Jade templates. Please refer to that gem if you want to use Pug/Jade compiler directly.
7
+
8
+ `pug-rails` is a gem that allows you to easily integrate Jade / Pug template engine with Rails asset packaging system known as Sprockets.
9
+
10
+ [pug-ruby](https://github.com/yivo/pug-ruby) is used under the hood. Please refer to the gem if you would like to use Jade / Pug compiler API directly.
10
11
 
11
12
  ## Installing gem
12
- Add to your Gemfile:
13
+
14
+ **RubyGems users**
15
+
16
+ 1. Run `gem install pug-rails --version "~> 3.0.0"`.
17
+ 2. Add `require "pug-rails"` to your code.
18
+
19
+ **Bundler users**
20
+
21
+ 1. Add to your Gemfile:
13
22
  ```ruby
14
- gem 'pug-rails', '~> 2.0'
23
+ gem "pug-rails", "~> 3.0.0"
15
24
  ```
25
+ 2. Run `bundle install`.
16
26
 
17
- ## Installing Jade
18
- Install Jade globally via npm:
19
- ```bash
20
- npm install --global jade
21
- ```
27
+ ## Installing Jade and Pug
28
+
29
+ See installation steps and notes at [pug-ruby](https://github.com/yivo/pug-ruby#installing-jade). You may not need to do this step.
22
30
 
23
- Require Jade runtime.js:
31
+ ## Requiring Jade runtime
32
+
33
+ Put the next line in your asset manifest:
24
34
  ```js
25
- //= require jade/runtime
35
+ //= require jade-runtime-1.11.0
26
36
  ```
27
37
 
38
+ You may change Jade runtime.js version depending on your scenario.
39
+
40
+ ## Naming Jade templates
41
+
28
42
  Use `.jst.jade` as extension of your Jade files.
29
43
 
30
- ## Installing Pug
31
- Install Pug globally via npm:
32
- ```bash
33
- npm install --global pug-cli
34
- ```
44
+ ## Requiring Pug runtime
35
45
 
36
- Require Pug runtime.js:
46
+ Put the next line in your asset manifest:
37
47
  ```js
38
- //= require pug/runtime
48
+ //= require pug-runtime-2.0.2
39
49
  ```
40
- NOTE: You don't need to do this if you are inlining Pug runtime functions in template. Please read about `inlineRuntimeFunctions` option at official website — [pugjs.org](http://pugjs.org).
50
+
51
+ You may change Pug runtime.js version depending on your scenario.
52
+
53
+ **IMPORTANT:** You don't need to do this if you have configured Pug compiler to inline runtime functions in template. Please read about `inlineRuntimeFunctions` option at official website: [pugjs.org](http://pugjs.org).
54
+
55
+ ## Naming Pug templates
41
56
 
42
57
  Use `.jst.pug` as extension of your Pug files.
43
58
 
44
- ## Configuring Pug and Jade
45
- Access Pug and Jade configurations directly:
46
- ```ruby
47
- Jade.config.compile_debug = false
48
- Pug.config.compile_debug = false
49
- ```
59
+ ## Configuring Jade / Pug
50
60
 
51
- Access Pug and Jade configurations through `Rails.application.config`:
52
- ```ruby
53
- Rails.application.config.jade.compile_debug = false
54
- Rails.application.config.pug.compile_debug = false
55
- ```
61
+ Configuration documentation is available at [pug-ruby](https://github.com/yivo/pug-ruby#configuring-jade--pug).
56
62
 
57
63
  ## Configuring asset lookup paths
58
- It doesn't matter where to put Pug/Jade files but don't forget to update asset lookup paths.
64
+
65
+ It doesn't matter where to put Jade / Pug files but don't forget to update asset lookup paths.
59
66
  Personally I prefer to put templates in `app/assets/templates`:
60
67
  ```ruby
61
- # Add app/assets/templates to asset lookup paths
62
- # Add this to your initializers or application.rb
63
- Rails.application.config.assets.paths << Rails.root.join('app/assets/templates')
68
+ # This will add app/assets/templates to asset lookup paths.
69
+ #
70
+ # Add the next line to your initializers or application.rb:
71
+ Rails.application.config.assets.paths << Rails.root.join("app/assets/templates")
64
72
  ```
65
73
 
66
74
  ## Running tests
67
- Install bundler:
68
- ```bash
69
- gem install bundler
70
- ```
71
-
72
- Install gem dependencies:
73
- ```bash
74
- cd pug-rails && bundle install && bundle exec appraisal install
75
- ```
76
75
 
77
- Run tests:
78
- ```bash
79
- cd pug-rails && bundle exec appraisal rake test
80
- ```
81
-
82
- To test `pug-ruby` — refer to [pug-ruby](https://github.com/yivo/pug-ruby)
76
+ 1. Install both Jade and Pug: `npm install --global jade pug`.
77
+ 2. Install gem dependencies: `bundle install`.
78
+ 3. Finally, run tests: `bundle exec appraisal rake test`.
83
79
 
84
80
  ## Versioning
81
+
85
82
  Prior to 2.0 the version of the gem was the same as the version of the Jade runtime that it contained.
@@ -3,6 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.1"
6
+ gem "rake", "~> 10.0"
7
+ gem "appraisal", "~> 2.1", require: false
8
+ gem "rubocop", "~> 0.51", require: false
9
+ gem "test-unit", "~> 3.1"
10
+ gem "nokogiri", "~> 1.6", "< 1.7"
6
11
  gem "sprockets", "~> 2"
7
12
 
8
13
  gemspec path: "../"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- pug-rails (3.0.0.rc3)
5
- pug-ruby (~> 2.0.0.rc3)
4
+ pug-rails (3.0.0)
5
+ pug-ruby (~> 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -39,11 +39,14 @@ GEM
39
39
  rake
40
40
  thor (>= 0.14.0)
41
41
  arel (3.0.3)
42
+ ast (2.3.0)
42
43
  builder (3.0.4)
44
+ concurrent-ruby (1.0.5)
43
45
  erubis (2.7.0)
44
46
  execjs (2.7.0)
45
47
  hike (1.2.3)
46
- i18n (0.8.6)
48
+ i18n (0.9.1)
49
+ concurrent-ruby (~> 1.0)
47
50
  journey (1.0.4)
48
51
  json (1.8.6)
49
52
  mail (2.5.5)
@@ -56,9 +59,13 @@ GEM
56
59
  multi_json (1.12.2)
57
60
  nokogiri (1.6.8.1)
58
61
  mini_portile2 (~> 2.1.0)
62
+ parallel (1.12.0)
63
+ parser (2.4.0.0)
64
+ ast (~> 2.2)
59
65
  polyglot (0.3.5)
60
- power_assert (1.1.0)
61
- pug-ruby (2.0.0.rc3)
66
+ power_assert (1.1.1)
67
+ powerpack (0.1.1)
68
+ pug-ruby (2.0.0)
62
69
  execjs (~> 2.0)
63
70
  memoist (~> 0.15)
64
71
  method-not-implemented (~> 1.0, >= 1.0.1)
@@ -85,16 +92,26 @@ GEM
85
92
  rake (>= 0.8.7)
86
93
  rdoc (~> 3.4)
87
94
  thor (>= 0.14.6, < 2.0)
95
+ rainbow (2.2.2)
96
+ rake
88
97
  rake (10.5.0)
89
98
  rdoc (3.12.2)
90
99
  json (~> 1.4)
91
100
  regexp-match-polyfill (1.0.2)
101
+ rubocop (0.51.0)
102
+ parallel (~> 1.10)
103
+ parser (>= 2.3.3.1, < 3.0)
104
+ powerpack (~> 0.1)
105
+ rainbow (>= 2.2.2, < 3.0)
106
+ ruby-progressbar (~> 1.7)
107
+ unicode-display_width (~> 1.0, >= 1.0.1)
108
+ ruby-progressbar (1.9.0)
92
109
  sprockets (2.2.3)
93
110
  hike (~> 1.2)
94
111
  multi_json (~> 1.0)
95
112
  rack (~> 1.0)
96
113
  tilt (~> 1.1, != 1.3.0)
97
- test-unit (3.2.5)
114
+ test-unit (3.2.6)
98
115
  power_assert
99
116
  thor (0.20.0)
100
117
  tilt (1.4.1)
@@ -102,6 +119,7 @@ GEM
102
119
  polyglot
103
120
  polyglot (>= 0.3.1)
104
121
  tzinfo (0.3.53)
122
+ unicode-display_width (1.3.0)
105
123
 
106
124
  PLATFORMS
107
125
  ruby
@@ -113,8 +131,9 @@ DEPENDENCIES
113
131
  pug-rails!
114
132
  rails (~> 3.1)
115
133
  rake (~> 10.0)
134
+ rubocop (~> 0.51)
116
135
  sprockets (~> 2)
117
136
  test-unit (~> 3.1)
118
137
 
119
138
  BUNDLED WITH
120
- 1.15.4
139
+ 1.16.0
@@ -3,6 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "rails", "~> 3.2"
6
+ gem "rake", "~> 10.0"
7
+ gem "appraisal", "~> 2.1", require: false
8
+ gem "rubocop", "~> 0.51", require: false
9
+ gem "test-unit", "~> 3.1"
10
+ gem "nokogiri", "~> 1.6", "< 1.7"
6
11
  gem "sprockets", "~> 2"
7
12
 
8
13
  gemspec path: "../"
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- pug-rails (3.0.0.rc3)
5
- pug-ruby (~> 2.0.0.rc3)
4
+ pug-rails (3.0.0)
5
+ pug-ruby (~> 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -39,11 +39,14 @@ GEM
39
39
  rake
40
40
  thor (>= 0.14.0)
41
41
  arel (3.0.3)
42
+ ast (2.3.0)
42
43
  builder (3.0.4)
44
+ concurrent-ruby (1.0.5)
43
45
  erubis (2.7.0)
44
46
  execjs (2.7.0)
45
47
  hike (1.2.3)
46
- i18n (0.8.6)
48
+ i18n (0.9.1)
49
+ concurrent-ruby (~> 1.0)
47
50
  journey (1.0.4)
48
51
  json (1.8.6)
49
52
  mail (2.5.5)
@@ -56,9 +59,13 @@ GEM
56
59
  multi_json (1.12.2)
57
60
  nokogiri (1.6.8.1)
58
61
  mini_portile2 (~> 2.1.0)
62
+ parallel (1.12.0)
63
+ parser (2.4.0.0)
64
+ ast (~> 2.2)
59
65
  polyglot (0.3.5)
60
- power_assert (1.1.0)
61
- pug-ruby (2.0.0.rc3)
66
+ power_assert (1.1.1)
67
+ powerpack (0.1.1)
68
+ pug-ruby (2.0.0)
62
69
  execjs (~> 2.0)
63
70
  memoist (~> 0.15)
64
71
  method-not-implemented (~> 1.0, >= 1.0.1)
@@ -85,16 +92,26 @@ GEM
85
92
  rake (>= 0.8.7)
86
93
  rdoc (~> 3.4)
87
94
  thor (>= 0.14.6, < 2.0)
95
+ rainbow (2.2.2)
96
+ rake
88
97
  rake (10.5.0)
89
98
  rdoc (3.12.2)
90
99
  json (~> 1.4)
91
100
  regexp-match-polyfill (1.0.2)
101
+ rubocop (0.51.0)
102
+ parallel (~> 1.10)
103
+ parser (>= 2.3.3.1, < 3.0)
104
+ powerpack (~> 0.1)
105
+ rainbow (>= 2.2.2, < 3.0)
106
+ ruby-progressbar (~> 1.7)
107
+ unicode-display_width (~> 1.0, >= 1.0.1)
108
+ ruby-progressbar (1.9.0)
92
109
  sprockets (2.2.3)
93
110
  hike (~> 1.2)
94
111
  multi_json (~> 1.0)
95
112
  rack (~> 1.0)
96
113
  tilt (~> 1.1, != 1.3.0)
97
- test-unit (3.2.5)
114
+ test-unit (3.2.6)
98
115
  power_assert
99
116
  thor (0.20.0)
100
117
  tilt (1.4.1)
@@ -102,6 +119,7 @@ GEM
102
119
  polyglot
103
120
  polyglot (>= 0.3.1)
104
121
  tzinfo (0.3.53)
122
+ unicode-display_width (1.3.0)
105
123
 
106
124
  PLATFORMS
107
125
  ruby
@@ -113,8 +131,9 @@ DEPENDENCIES
113
131
  pug-rails!
114
132
  rails (~> 3.2)
115
133
  rake (~> 10.0)
134
+ rubocop (~> 0.51)
116
135
  sprockets (~> 2)
117
136
  test-unit (~> 3.1)
118
137
 
119
138
  BUNDLED WITH
120
- 1.15.4
139
+ 1.16.0