include_media_rails 1.4.2.1 → 1.4.3
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/README.md +43 -9
- data/lib/include_media_rails/version.rb +1 -1
- data/vendor/assets/stylesheets/include_media.scss +10 -4
- 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: 8234824ad76d0d573c82d48825238d1439f1ad44
|
|
4
|
+
data.tar.gz: 3ae3bbf3bbc60caf97ce4fac394621666b143563
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf255486cc5d58a71ab03172cfdc0919873543045936b56744e0793d30f818e1c1fe7535a7aea88b1b6fea32bed2e952d0e161431c862e3bd81fabca25d6b818
|
|
7
|
+
data.tar.gz: 717cea2ab07d7f1bae806f3b96273b4d0f8578557288b886ae5469cd32e58d50c3e59a75bb65c02cfcc27af7c8a68e0b4cf337ff46a4b1ec7c78650d669d72c4
|
data/README.md
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Include Media Rails
|
|
2
|
+
[](https://travis-ci.org/KaoruDev/include_media_rails)
|
|
2
3
|
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/include_media_rails`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A simple wrapper of [include_media](https://github.com/eduardoboucas/include-media)
|
|
6
|
+
by [Eduardo Bouças, @eduardoboucas](https://github.com/eduardoboucas) and [Hugo Giraudel,
|
|
7
|
+
@HugoGiraudel](https://github.com/HugoGiraudel).
|
|
8
|
+
|
|
9
|
+
Website and Docs: [http://include-media.com/](http://include-media.com/)
|
|
10
|
+
|
|
11
|
+
Repo: [https://github.com/eduardoboucas/include-media](https://github.com/eduardoboucas/include-media)
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
8
14
|
|
|
9
15
|
Add this line to your application's Gemfile:
|
|
10
16
|
|
|
11
17
|
```ruby
|
|
12
|
-
gem 'include_media_rails'
|
|
18
|
+
gem 'include_media_rails', '~> 1.4'
|
|
13
19
|
```
|
|
14
20
|
|
|
15
21
|
And then execute:
|
|
@@ -22,17 +28,45 @@ Or install it yourself as:
|
|
|
22
28
|
|
|
23
29
|
## Usage
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
in a `sass` file (`app/assets/stylsheets/application.scss` for example):
|
|
32
|
+
|
|
33
|
+
```sass
|
|
34
|
+
@import "include_media";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Dependencies
|
|
39
|
+
|
|
40
|
+
- Rails `>= 3.1` and `<5` (not tested)
|
|
41
|
+
- Sass `>=3.3` and `<4` (include_media requires `sass maps`)
|
|
26
42
|
|
|
27
|
-
## Development
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
## Versioning
|
|
45
|
+
|
|
46
|
+
`*.*.*` points to the `include_media` version. i.e. `v1.4.2` comes with
|
|
47
|
+
include_media's `v1.4.2`. **NOTE** I started this gem when
|
|
48
|
+
`include_media` was at `v1.4.2`. Earilier versions are _not_ currently supported.
|
|
49
|
+
|
|
50
|
+
The last number (`1.4.2.*` ) points to minor changes made to the gem itself.
|
|
51
|
+
|
|
52
|
+
Available versions:
|
|
53
|
+
```
|
|
54
|
+
1.4.2.1
|
|
55
|
+
1.4.3
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Development
|
|
30
59
|
|
|
31
|
-
|
|
60
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
|
61
|
+
Then, run `rake spec` to run the tests. You can also run `bin/console`
|
|
62
|
+
for an interactive prompt that will allow you to experiment.
|
|
32
63
|
|
|
33
64
|
## Contributing
|
|
34
65
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at
|
|
66
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
67
|
+
https://github.com/kaorudev/include_media_rails. This project is intended
|
|
68
|
+
to be a safe, welcoming space for collaboration, and contributors are
|
|
69
|
+
expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
|
36
70
|
|
|
37
71
|
|
|
38
72
|
## License
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// |_|_| |_|\___|_|\__,_|\__,_|\___| |_| |_| |_|\___|\__,_|_|\__,_|
|
|
9
9
|
//
|
|
10
10
|
// Simple, elegant and maintainable media queries in Sass
|
|
11
|
-
// v1.4.
|
|
11
|
+
// v1.4.3
|
|
12
12
|
//
|
|
13
13
|
// http://include-media.com
|
|
14
14
|
//
|
|
@@ -418,12 +418,18 @@ $im-no-media-expressions: ('screen', 'portrait', 'landscape') !default;
|
|
|
418
418
|
$_: log('Value for `to-number` should be a number or a string.');
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
+
$first-character: str-slice($value, 1, 1);
|
|
421
422
|
$result: 0;
|
|
422
423
|
$digits: 0;
|
|
423
|
-
$minus:
|
|
424
|
+
$minus: ($first-character == '-');
|
|
424
425
|
$numbers: ('0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9);
|
|
426
|
+
|
|
427
|
+
// Remove +/- sign if present at first character
|
|
428
|
+
@if ($first-character == '+' or $first-character == '-') {
|
|
429
|
+
$value: str-slice($value, 2);
|
|
430
|
+
}
|
|
425
431
|
|
|
426
|
-
@for $i from
|
|
432
|
+
@for $i from 1 through str-length($value) {
|
|
427
433
|
$character: str-slice($value, $i, $i);
|
|
428
434
|
|
|
429
435
|
@if not (index(map-keys($numbers), $character) or $character == '.') {
|
|
@@ -559,4 +565,4 @@ $im-no-media-expressions: ('screen', 'portrait', 'landscape') !default;
|
|
|
559
565
|
}
|
|
560
566
|
}
|
|
561
567
|
}
|
|
562
|
-
}
|
|
568
|
+
}
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: include_media_rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kaoru Kohashigawa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-06-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
155
155
|
version: '0'
|
|
156
156
|
requirements: []
|
|
157
157
|
rubyforge_project:
|
|
158
|
-
rubygems_version: 2.
|
|
158
|
+
rubygems_version: 2.5.1
|
|
159
159
|
signing_key:
|
|
160
160
|
specification_version: 4
|
|
161
161
|
summary: Use Include Media by Eduardo Bouças (@eduardoboucas) in any Rails > 3.1 project
|