less-rails 2.7.0 → 2.7.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/lib/less/rails/railtie.rb +2 -2
- data/lib/less/rails/version.rb +1 -1
- data/test/cases/helpers_spec.rb +5 -4
- data/test/dummy_app/init.rb +1 -0
- data/test/spec_helper.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e54779fecc277d32f1b4f70d5e10da49fe0a59ca
|
4
|
+
data.tar.gz: 3d4cd5d479f4e8a9c37979da4d18e666dd7f42cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7330b4e045a050f50d2377b36b37f856c96e9a312737ec0a1343e4efce30faa33a2cb6a44e22409785f35e63a25cdbe5dc8717c5bde82e4f7e75c819fa247087
|
7
|
+
data.tar.gz: 82ebd9522014b036bbb32c1f1261bc8d3b1439831bfbeeafda8115d4a813781473cb628661c62a4fd189e7e07b0afc4183671a544a0b33d3af239321da02440b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# The dynamic stylesheet language for the Rails asset pipeline.
|
1
|
+
# The dynamic stylesheet language for the Rails 4+ asset pipeline.
|
2
2
|
|
3
3
|
This gem provides integration for Rails projects using the Less stylesheet language in the asset pipeline.
|
4
4
|
|
@@ -115,7 +115,7 @@ We also have a generator for rails scaffold CSS. Just like the Sass gem, we simp
|
|
115
115
|
|
116
116
|
## Contributing
|
117
117
|
|
118
|
-
This gem is fully tested from Rails
|
118
|
+
This gem is fully tested from Rails 4.0 to Rails 4.2. We run our tests on [Travis CI](http://travis-ci.org/metaskills/less-rails) in both Ruby 1.9, 2.0, and jRuby 1.9 mode. If you detect a problem, open up a github issue or fork the repo and help out. After you fork or clone the repository, the following commands will get you up and running on the test suite.
|
119
119
|
|
120
120
|
```shell
|
121
121
|
$ bundle install
|
@@ -123,10 +123,10 @@ $ bundle exec rake appraisal:setup
|
|
123
123
|
$ bundle exec rake appraisal test
|
124
124
|
```
|
125
125
|
|
126
|
-
We use the [appraisal](https://github.com/thoughtbot/appraisal) gem from Thoughtbot to help us generate the individual gemfiles for each Rails version and to run the tests locally against each generated Gemfile. The `rake appraisal test` command actually runs our test suite against all Rails versions in our `Appraisal` file. If you want to run the tests for a specific Rails version, use `rake -T` for a list. For example, the following command will run the tests for Rails
|
126
|
+
We use the [appraisal](https://github.com/thoughtbot/appraisal) gem from Thoughtbot to help us generate the individual gemfiles for each Rails version and to run the tests locally against each generated Gemfile. The `rake appraisal test` command actually runs our test suite against all Rails versions in our `Appraisal` file. If you want to run the tests for a specific Rails version, use `rake -T` for a list. For example, the following command will run the tests for Rails 4.0 only.
|
127
127
|
|
128
128
|
```shell
|
129
|
-
$ bundle exec rake appraisal:
|
129
|
+
$ bundle exec rake appraisal:rails40 test
|
130
130
|
```
|
131
131
|
|
132
132
|
Our current build status is:
|
data/lib/less/rails/railtie.rb
CHANGED
@@ -16,8 +16,8 @@ module Less
|
|
16
16
|
end
|
17
17
|
|
18
18
|
initializer 'less-rails.before.load_config_initializers', :before => :load_config_initializers, :group => :all do |app|
|
19
|
-
app.assets
|
20
|
-
|
19
|
+
sprockets_env = app.assets || Sprockets
|
20
|
+
sprockets_env.register_preprocessor 'text/css', ImportProcessor
|
21
21
|
|
22
22
|
config.assets.configure do |env|
|
23
23
|
env.context_class.class_eval do
|
data/lib/less/rails/version.rb
CHANGED
data/test/cases/helpers_spec.rb
CHANGED
@@ -7,10 +7,11 @@ class HelpersSpec < Less::Rails::Spec
|
|
7
7
|
let(:helpers) { dummy_asset('helpers') }
|
8
8
|
|
9
9
|
it 'parse asset paths' do
|
10
|
-
|
11
|
-
line_for_helper('asset-
|
12
|
-
line_for_helper('
|
13
|
-
line_for_helper('image-
|
10
|
+
_digest = Rails.application.assets['rails.png'].digest
|
11
|
+
line_for_helper('asset-path').must_equal "asset-path: \"/assets/rails-#{_digest}.png\";"
|
12
|
+
line_for_helper('asset-url').must_equal "asset-url: url(/assets/rails-#{_digest}.png);"
|
13
|
+
line_for_helper('image-path').must_equal "image-path: \"/assets/rails-#{_digest}.png\";"
|
14
|
+
line_for_helper('image-url').must_equal "image-url: url(/assets/rails-#{_digest}.png);"
|
14
15
|
line_for_helper('video-path').must_equal 'video-path: "/videos/rails.mp4";'
|
15
16
|
line_for_helper('video-url').must_equal "video-url: url(/videos/rails.mp4);"
|
16
17
|
line_for_helper('audio-path').must_equal 'audio-path: "/audios/rails.mp3";'
|
data/test/dummy_app/init.rb
CHANGED
data/test/spec_helper.rb
CHANGED
@@ -54,7 +54,7 @@ module Less
|
|
54
54
|
dummy_config.assets.version = version
|
55
55
|
dummy_assets.version = version
|
56
56
|
cache = dummy_assets.cache
|
57
|
-
cache.respond_to?(:clear) ? cache.clear :
|
57
|
+
cache.respond_to?(:clear) ? cache.clear : rm_rf("#{dummy_tmp}/cache/assets")
|
58
58
|
end
|
59
59
|
|
60
60
|
def prepare_cache_dir
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: less-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Collins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: less
|
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
version: '0'
|
208
208
|
requirements: []
|
209
209
|
rubyforge_project:
|
210
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.5.1
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: The dynamic stylesheet language for the Rails asset pipeline.
|