include_media_rails 1.4.2.1 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b71bfe5f01712b5d6de5127dc455b316c043c708
4
- data.tar.gz: 8ad807e26631312f59ae43077956e345415e9f6f
3
+ metadata.gz: 8234824ad76d0d573c82d48825238d1439f1ad44
4
+ data.tar.gz: 3ae3bbf3bbc60caf97ce4fac394621666b143563
5
5
  SHA512:
6
- metadata.gz: 806a16f212b5ac3f7b0a237041a07b3628f3972c08d9789deec08edf34824fcabd26443be1d205a4115518bc51af8ccdc327a842a28236e484d463618ee2e333
7
- data.tar.gz: 5ce38c9027e100cb002855650696f945b3b8d98e2560d3cc69b0f1d8fa735e40e784ca3402ea1da6fb77bc3cb676a7ab7b1aaeb4f404e78bfdc183e044dc57f6
6
+ metadata.gz: bf255486cc5d58a71ab03172cfdc0919873543045936b56744e0793d30f818e1c1fe7535a7aea88b1b6fea32bed2e952d0e161431c862e3bd81fabca25d6b818
7
+ data.tar.gz: 717cea2ab07d7f1bae806f3b96273b4d0f8578557288b886ae5469cd32e58d50c3e59a75bb65c02cfcc27af7c8a68e0b4cf337ff46a4b1ec7c78650d669d72c4
data/README.md CHANGED
@@ -1,15 +1,21 @@
1
- # IncludeMediaRails
1
+ # Include Media Rails
2
+ [![Travis CI Build Badge](https://travis-ci.org/KaoruDev/include_media_rails.svg?branch=master)](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
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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 https://github.com/[USERNAME]/include_media_rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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
@@ -1,3 +1,3 @@
1
1
  module IncludeMediaRails
2
- VERSION = "1.4.2.1"
2
+ VERSION = "1.4.3"
3
3
  end
@@ -8,7 +8,7 @@
8
8
  // |_|_| |_|\___|_|\__,_|\__,_|\___| |_| |_| |_|\___|\__,_|_|\__,_|
9
9
  //
10
10
  // Simple, elegant and maintainable media queries in Sass
11
- // v1.4.2
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: str-slice($value, 1, 1) == '-';
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 if($minus, 2, 1) through str-length($value) {
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.2.1
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-04-15 00:00:00.000000000 Z
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.6.3
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