sections_rails 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/sections_rails/partial_parser.rb +2 -9
- data/lib/sections_rails/version.rb +1 -1
- data/spec/dummy/log/test.log +864 -442
- data/spec/dummy/tmp/cache/assets/test/sprockets/07debd2f5bdd0945f151e2b19446f044 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/08f27e536dfd0bf16e287507b2acf9cd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0fca8ebe3afdfe78547af6286f823282 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1b3072864335229a30962921e232e038 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1e3b95f4fb7349356a18d5d6c25a03c5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1ef0ad5f3bf9347ff721cc9adb7ac475 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/22ca9b4c7a72cecb6e5bd86aeb2cbe1a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/23a710a5152e77b9f6093d0ff6132cbb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2760c50c86bfb006436f3b08f7f86d50 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/27cd0623d0c7bf548c06891f9ff3a7fe +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2883d6642cddc16b7cbec8a10d604e1f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/43f23e226a6cf9111462a1de5a4141c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4469f565cbeb63b8a9dd57c772a0063f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4bfa702f177bb40d4add4fa2cdc56290 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/620334e6045e81791d00cfc3d5880e99 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/778cbfb3c3494e0a1bff25acec1acb41 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/88172c7017f9d54036e04229e5aeb7a9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9f1946f74976325823cd17e3344ac99e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a1675ac0cfcd39baa9de6cd3800ed7d8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a5d83488b94f2eb72952aead38dff3e3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a6fce1b02a415f12102f90ede73a4466 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ab9a16c02e5840aa2caa410053c6d992 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ad63aa5b66774feeab4dc6bcf5cd62ba +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b4e4bd3378cc31d280c2f1e817d7e563 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b55f94acb73aef21cd0314d38e7154d1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b71f97c2f9217932f4105b67a6888f8c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bb6a12b80c6bb08c7943f43676e3c85b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c427bfd8150de82240a0e21a09f2555b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c6e5bc7bd239a1911ec2e68129e3de64 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dca0e46db52c9d8f506520eb6da852d5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dfca15e755e57d8cc860d77b907d39f1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e96fdb62e07b19eed5b0da3f39778ad8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ea32dd93eace3bc52cef33158a05dff0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ee731240c77f9d385c44692245a14659 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f05f533e9d84fde309ea83909d9ce528 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f4e42345683e627f5c3ddbed7b0f3003 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f5d263c951494ab0fb39fe65f211ea9d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fb9a65051eb9d735f3634545d153a9eb +0 -0
- data/spec/sections_rails/partial_parser_spec.rb +4 -0
- data/spec/sections_rails/section_spec.rb +24 -24
- metadata +2 -22
- data/spec/dummy/tmp/cache/assets/test/sprockets/bfc23365a5a3cb4ce2a38dd7b50abeca +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dd2347a11d964f59eb8abcf66b424f31 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e872fbd8d31bbedfb2ecc12112c87f20 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 701f05ca90b48ee3281f13858a0d4b9b0fc2604f
|
4
|
+
data.tar.gz: 352a3794b55b195c17ab9b0163339092064d70af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341048451b7e57337a7a55cf4cbdab7ba7dd5a44d087c0eb4c4ddb9276831d72d38a5f3878154814d6863191ba4c4c0115bdcaef13debedb552583707deafe4b
|
7
|
+
data.tar.gz: 5315a2ab2021a0c88d69faa0085430c995bf1c68de859ee5344840f1ba95202e2b527bf7b2484a0e373c20a9a6e66f95e36cf22b99f2485830edab8a1ac693c1
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
# Sections for Rails
|
1
|
+
# Sections for Rails
|
2
|
+
[![Build Status](https://travis-ci.org/kevgo/sections_rails.svg?branch=master)](https://travis-ci.org/kevgo/sections_rails)
|
3
|
+
[![Code Climate](https://codeclimate.com/github/kevgo/sections_rails.svg)](https://codeclimate.com/github/kevgo/sections_rails)
|
4
|
+
[![Coverage Status](https://img.shields.io/coveralls/kevgo/sections_rails.svg)](https://coveralls.io/r/kevgo/sections_rails?branch=master)
|
5
|
+
[![Dependency Status](https://gemnasium.com/kevgo/sections_rails.svg)](https://gemnasium.com/kevgo/sections_rails)
|
2
6
|
|
3
7
|
_A component-oriented infrastructure for the view layer of Ruby on Rails applications._
|
4
8
|
|
@@ -1,20 +1,13 @@
|
|
1
1
|
module SectionsRails
|
2
2
|
module PartialParser
|
3
|
-
|
3
|
+
|
4
4
|
# Returns a list of all section names in the given text.
|
5
5
|
#
|
6
6
|
# @param [ String ] text
|
7
7
|
# @return [ Array<String> ]
|
8
8
|
def self.find_sections text
|
9
9
|
return [] if text.blank?
|
10
|
-
|
11
|
-
# Find sections in ERB templates.
|
12
|
-
result = text.scan(/<%=\s*section\s+['":]([^'",\s]+)/).flatten.sort.uniq
|
13
|
-
|
14
|
-
# Find sections in HAML templates.
|
15
|
-
result.concat text.scan(/^\s*\=\s*section\s+['":]([^'",\s]+)/).flatten.sort.uniq
|
16
|
-
|
17
|
-
result
|
10
|
+
text.scan(/=\s*section\s+['":]([^'",\s]+)/).flatten.sort.uniq
|
18
11
|
end
|
19
12
|
end
|
20
13
|
end
|