ggs-rails 0.1.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.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ Gemfile.lock
2
+ pkg/
data/.rvmrc ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
+ # development environment upon cd'ing into the directory
5
+
6
+ # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7
+ # Only full ruby name is supported here, for short names use:
8
+ # echo "rvm use 1.9.3" > .rvmrc
9
+ environment_id="ruby-1.9.3-p194@ggs-rails"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.10.3" # 1.10.1 seams as a safe start
13
+ # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
+ # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
+ # return 1
16
+ # }
17
+
18
+ # First we attempt to load the desired environment directly from the environment
19
+ # file. This is very fast and efficient compared to running through the entire
20
+ # CLI and selector. If you want feedback on which environment was used then
21
+ # insert the word 'use' after --create as this triggers verbose mode.
22
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23
+ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24
+ then
25
+ \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26
+ [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
27
+ \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
28
+ else
29
+ # If the environment file has not yet been created, use the RVM CLI to select.
30
+ rvm --create "$environment_id" || {
31
+ echo "Failed to create RVM environment '${environment_id}'."
32
+ return 1
33
+ }
34
+ fi
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ ruby '1.9.3'
4
+
5
+ gemspec
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ ggs-rails
2
+ =========
3
+
4
+ A collection of [SASS](http://sass-lang.com/) mixins for easy
5
+ implementation of the [Golden Grid System](http://goldengridsystem.com/).
6
+
7
+ Installation
8
+ ------------
9
+
10
+ Add `ggs-rails` to the `:assets` group of your Rails application.
11
+
12
+ group :assets do
13
+ gem 'ggs-rails'
14
+ end
15
+
16
+ Usage
17
+ -----
18
+
19
+ `ggs-rails` includes 2 main functions and 7 main mixins.
20
+
21
+ ### Functions ###
22
+
23
+ `ggs-column($multiplier, $out_of: 18)`: Returns a percentage that
24
+ represents the width of `$multiplier` columns on the page. Pass the
25
+ `$out_of` parameter in the case where an element is contained in a block
26
+ that does not span the entire width of the browser window.
27
+
28
+ `ggs-lineheight($multiplier)`: Returns an `em` value for `line-height`
29
+ times `$multiplier`. You must set two variables before this will work:
30
+
31
+ * `$ggs-line` Your base line-height
32
+ * `$ggs-font-size` Your base font size
33
+
34
+ ### Mixins ###
35
+
36
+ `ggs-width($num_columns: 1, $out_of: 18)`: Sets element `width` to
37
+ proper percentage.
38
+
39
+ `ggs-margin-width($num_columns_left: 1, $num_columns_right: 1)`: Sets
40
+ `margin-left` and `margin-right` to the appropriate number of columns
41
+
42
+ `ggs-margin-left($num_columns: 1)` and `ggs-margin-right($num_columns:
43
+ 1)`. Self explanatory.
44
+
45
+ `ggs-margin-height($top_multipler: 1, $bottom_multiplier: 0)`: Sets
46
+ `margin-top` and `margin-bottom` to the appropriate multplier of
47
+ `line-height`
48
+
49
+ `ggs-margin-top($multiplier: 1)` and `ggs-margin-bottom($multipler: 1)`.
50
+ Self explanatory.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ task default: [:build]
data/ggs-rails.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'ggs/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'ggs-rails'
6
+ s.version = GGS::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ['Ryan Ahearn']
9
+ s.email = ['ryan@coshx.com']
10
+ s.homepage = 'https://github.com/rahearn/ggs-rails'
11
+ s.summary = %q{SASS mixins for easy implementation of The Golden Grid System}
12
+ s.description = %q{SASS mixins for easy implementation of The Golden Grid System http://goldengridsystem.com/}
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename f }
17
+ s.require_paths = ['lib']
18
+
19
+ s.required_rubygems_version = '>= 1.3.6'
20
+
21
+ s.add_runtime_dependency 'rails', '~> 3.2'
22
+ s.add_runtime_dependency 'sass-rails', '~> 3.2'
23
+
24
+ s.add_development_dependency 'rake', '~> 0.9'
25
+ s.add_development_dependency 'bundler', '~> 1.2'
26
+ end
@@ -0,0 +1,17 @@
1
+ @function ggs-lineheight($multiplier) {
2
+ $base_em: $ggs-font-size * 1;
3
+ @return #{$ggs-line * $multiplier / $base_em}em;
4
+ }
5
+
6
+ @mixin ggs-margin-height($top_multiplier: 1, $bottom_multiplier: 0) {
7
+ @include ggs-margin-top($top_multiplier);
8
+ @include ggs-margin-bottom($bottom_multiplier);
9
+ }
10
+
11
+ @mixin ggs-margin-top($multiplier: 1) {
12
+ margin-top: ggs-lineheight($multiplier);
13
+ }
14
+
15
+ @mixin ggs-margin-bottom($multiplier: 1) {
16
+ margin-bottom: ggs-lineheight($multiplier);
17
+ }
@@ -0,0 +1,20 @@
1
+ @function ggs-column($multiplier, $out_of: 18) {
2
+ @return (100% * $multiplier / $out_of);
3
+ }
4
+
5
+ @mixin ggs-width($num_columns: 1, $out_of: 18) {
6
+ width: ggs-column($num_columns, $out_of);
7
+ }
8
+
9
+ @mixin ggs-margin-width($num_columns_left: 1, $num_columns_right: 1) {
10
+ @include ggs-margin-left($num_columns_left);
11
+ @include ggs-margin-right($num_columns_right);
12
+ }
13
+
14
+ @mixin ggs-margin-left($num_columns_left: 1) {
15
+ margin-left: ggs-column($num_columns_left);
16
+ }
17
+
18
+ @mixin ggs-margin-right($num_columns_right: 1) {
19
+ margin-right: ggs-column($num_columns_right);
20
+ }
@@ -0,0 +1,2 @@
1
+ @import "ggs/width";
2
+ @import "ggs/lineheight";
data/lib/ggs/rails.rb ADDED
@@ -0,0 +1,8 @@
1
+ module GGS
2
+ module Rails
3
+
4
+ class Engine < ::Rails::Engine
5
+ end
6
+
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ module GGS
2
+ VERSION = '0.1.0'
3
+ end
data/lib/ggs-rails.rb ADDED
@@ -0,0 +1 @@
1
+ require 'ggs/rails'
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ggs-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Ryan Ahearn
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: &70358892821640 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.2'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70358892821640
25
+ - !ruby/object:Gem::Dependency
26
+ name: sass-rails
27
+ requirement: &70358892820960 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '3.2'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *70358892820960
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &70358892820120 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: '0.9'
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70358892820120
47
+ - !ruby/object:Gem::Dependency
48
+ name: bundler
49
+ requirement: &70358892819380 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70358892819380
58
+ description: SASS mixins for easy implementation of The Golden Grid System http://goldengridsystem.com/
59
+ email:
60
+ - ryan@coshx.com
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - .gitignore
66
+ - .rvmrc
67
+ - Gemfile
68
+ - README.md
69
+ - Rakefile
70
+ - ggs-rails.gemspec
71
+ - lib/assets/stylesheets/ggs.scss
72
+ - lib/assets/stylesheets/ggs/lineheight.scss
73
+ - lib/assets/stylesheets/ggs/width.scss
74
+ - lib/ggs-rails.rb
75
+ - lib/ggs/rails.rb
76
+ - lib/ggs/version.rb
77
+ homepage: https://github.com/rahearn/ggs-rails
78
+ licenses: []
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ segments:
90
+ - 0
91
+ hash: 1759879847608307313
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: 1.3.6
98
+ requirements: []
99
+ rubyforge_project:
100
+ rubygems_version: 1.8.17
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: SASS mixins for easy implementation of The Golden Grid System
104
+ test_files: []