ronin-grid 1.0.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.
@@ -0,0 +1,13 @@
1
+ /* Ronin Setup
2
+ * These are the main configurable options for Ronin,
3
+ * but anything else can be changed by editing the Ronin
4
+ * source itself.
5
+ */
6
+
7
+ /* The following three values should all be unit-less. */
8
+ $container-width: 1140; /* The width of an element using the container mixin or the .r-container class. */
9
+ $num-columns: 12; /* The number of colums in the Ronin grid. */
10
+ $column-width: 62; /* The width of an individual column (the gutter width is based off of this). */
11
+
12
+ $column-bottom-margin: 2.75em; /* The margin applied to the bottom of any column element. */
13
+ $auto-respond: true; /* Include Ronin's default 1024px, 768px, 480px, and 479px breakpoints. */
data/bin/ronin-grid ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'ronin_grid'
4
+
5
+ RoninGrid::Generator.new(ARGV).run
@@ -0,0 +1,5 @@
1
+ module RoninGrid
2
+ class Engine < Rails::Engine
3
+ # http://api.rubyonrails.org/classes/Rails/Engine.html
4
+ end
5
+ end
@@ -0,0 +1,80 @@
1
+ require 'fileutils'
2
+
3
+ module RoninGrid
4
+ class Generator
5
+ def initialize(args)
6
+ @command = args.first
7
+ end
8
+
9
+ def run
10
+ case @command
11
+ when 'install'; install
12
+ when 'update'; update
13
+ when 'uninstall'; uninstall
14
+ end
15
+ end
16
+
17
+ def update
18
+ if ronin_installed?
19
+ remove_ronin_directory
20
+ install_ronin
21
+ puts 'Ronin updated.'
22
+ else
23
+ puts 'Ronin not found, halting update.'
24
+ end
25
+ end
26
+
27
+ def install
28
+ if ronin_installed?
29
+ puts 'Ronin already installed, halting update.'
30
+ else
31
+ install_ronin
32
+ puts 'Ronin installed into ronin-grid/'
33
+ end
34
+ end
35
+
36
+ def uninstall
37
+ if ronin_installed?
38
+ remove_ronin_directory
39
+ puts 'Ronin uninstalled.'
40
+ else
41
+ puts 'Ronin not installed.'
42
+ end
43
+ end
44
+
45
+ private
46
+
47
+ def ronin_installed?
48
+ Dir.exist?('ronin_grid')
49
+ end
50
+
51
+ def install_ronin
52
+ make_lib_directory
53
+ copy_sass_files
54
+ end
55
+
56
+ def remove_ronin_directory
57
+ FileUtils.rm_rf('ronin_grid')
58
+ end
59
+
60
+ def copy_sass_files
61
+ FileUtils.cp_r(all_sass_files, 'ronin_grid/')
62
+ end
63
+
64
+ def all_sass_files
65
+ Dir["#{sass_dir}/*"]
66
+ end
67
+
68
+ def make_lib_directory
69
+ FileUtils.mkdir_p('ronin_grid/lib/ronin_grid')
70
+ end
71
+
72
+ def sass_dir
73
+ File.join(top_level_directory, 'app', 'assets', 'stylesheets')
74
+ end
75
+
76
+ def top_level_directory
77
+ File.dirname(File.dirname(File.dirname(__FILE__)))
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,3 @@
1
+ module RoninGrid
2
+ VERSION = "1.0.0"
3
+ end
data/lib/ronin-grid.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'ronin-grid/version'
2
+ require 'ronin-grid/generator'
3
+
4
+ module RoninGrid
5
+ if defined?(Rails)
6
+ class Engine < ::Rails::Engine
7
+ require 'ronin-grid/engine'
8
+ end
9
+
10
+ module Rails
11
+ class Railtie < ::Rails::Railtie
12
+ rake_tasks do
13
+ load 'tasks/install.rake'
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,11 @@
1
+ # Rails < 3.1
2
+ namespace :'ronin-grid' do
3
+ desc "Install the Ronin files into the Rails assets directory"
4
+ task :install, [:sass_path] do |t, args|
5
+ args.with_defaults :sass_path => 'public/assets/stylesheets'
6
+ source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
7
+ `mkdir -p #{Rails.root}/#{args.sass_path}/ronin-grid`
8
+ `cp -a #{source_root}/app/assets/stylesheets/* #{Rails.root}/#{args.sass_path}/ronin-grid`
9
+ `find #{Rails.root}/#{args.sass_path}/ronin-grid -name "*.css.scss" | while read i; do mv "$i" "${i%.css.scss}.scss"; done`
10
+ end
11
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "ronin-grid/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "ronin-grid"
7
+ s.version = RoninGrid::VERSION
8
+ s.authors = ["Jonathan Clem"]
9
+ s.email = ["jclem@jclem.net"]
10
+ s.homepage = "https://github.com/jclem/ronin-grid"
11
+ s.summary = %q{Slice and dice content into a flexible, responsive grid with media queries.}
12
+ s.description = <<-DESCRIPTION
13
+ The objective of Ronin is to provide a framework for developing flexible, responsive web designs that are compatible back to IE7. Ronin aims to be somewhat of a "framework framework", meaning that it is column-count- and width-agnostic. It makes no assumptions about the preferred maximum width of a design or the number of columns.
14
+ DESCRIPTION
15
+
16
+ s.rubyforge_project = "ronin-grid"
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
+ s.require_paths = ["lib"]
22
+
23
+ s.add_dependency('sass', '>= 3.1')
24
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ronin-grid
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jonathan Clem
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sass
16
+ requirement: &70178454405720 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70178454405720
25
+ description: ! 'The objective of Ronin is to provide a framework for developing flexible,
26
+ responsive web designs that are compatible back to IE7. Ronin aims to be somewhat
27
+ of a "framework framework", meaning that it is column-count- and width-agnostic.
28
+ It makes no assumptions about the preferred maximum width of a design or the number
29
+ of columns.
30
+
31
+ '
32
+ email:
33
+ - jclem@jclem.net
34
+ executables:
35
+ - ronin-grid
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - .gitignore
40
+ - Gemfile
41
+ - LICENSE.md
42
+ - README.md
43
+ - Rakefile
44
+ - app/assets/stylesheets/_ronin-grid.css.scss
45
+ - app/assets/stylesheets/ronin-grid/_classes.scss
46
+ - app/assets/stylesheets/ronin-grid/_grid.scss
47
+ - app/assets/stylesheets/ronin-grid/_pixel_mixins.scss
48
+ - app/assets/stylesheets/ronin-grid/_setup.scss
49
+ - bin/ronin-grid
50
+ - lib/ronin-grid.rb
51
+ - lib/ronin-grid/engine.rb
52
+ - lib/ronin-grid/generator.rb
53
+ - lib/ronin-grid/version.rb
54
+ - lib/tasks/install.rake
55
+ - ronin-grid.gemspec
56
+ homepage: https://github.com/jclem/ronin-grid
57
+ licenses: []
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ requirements: []
75
+ rubyforge_project: ronin-grid
76
+ rubygems_version: 1.8.10
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: Slice and dice content into a flexible, responsive grid with media queries.
80
+ test_files: []
81
+ has_rdoc: