ronin-grid 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -6,7 +6,7 @@ Ronin is a framework for creating responsive web designs with SASS.
6
6
 
7
7
  ## Installation
8
8
 
9
- ### Rails >= 3.1
9
+ ### Rails
10
10
 
11
11
  In your `Gemfile`:
12
12
 
@@ -14,26 +14,47 @@ In your `Gemfile`:
14
14
  gem 'ronin-grid'
15
15
  ```
16
16
 
17
+ Run the installer:
18
+
19
+ ```bash
20
+ rake ronin-grid:install
21
+ ```
22
+
23
+ We do not want Ronin's SASS files to be compiled, so remove the following line
24
+ from `app/assets/stylesheets/application.css`:
25
+
26
+ ```css
27
+ *= require_tree .
28
+ ```
29
+
17
30
  Import Ronin into your SASS stylesheets:
18
31
 
19
32
  ```scss
20
33
  @import 'ronin-grid';
21
34
  ```
22
35
 
23
- ### Rails < 3.0.x
24
-
25
- Install with Rake:
36
+ Customize:
26
37
 
27
- ```
28
- $ rake ronin-grid:install
38
+ ```bash
39
+ vim app/assets/stylesheets/ronin-grid/_setup.scss
29
40
  ```
30
41
 
31
- Import Ronin into your SASS stylesheets:
42
+ ### Non-Rails
32
43
 
33
- ```scss
34
- @import 'ronin-grid'
44
+ Use the binary:
45
+
46
+ ```bash
47
+ ronin-grid install
48
+ # Creates ronin-grid/lib/ronin-grid/...
35
49
  ```
36
50
 
51
+ or:
52
+
53
+ ```bash
54
+ ronin-grid install-bare
55
+ # Creates _ronin-grid.scss
56
+ # Creates ronin-grid/...
57
+ ```
37
58
  ---
38
59
 
39
60
  ## Usage
@@ -117,3 +138,4 @@ Released under a [modified MIT license][license]
117
138
 
118
139
  [twitter]: http://twitter.com/_clem
119
140
  [license]: http://github.com/jclem/ronin-grid/tree/master/LICENSE.md
141
+ [jonathan_clem]: http://jclem.net
@@ -9,6 +9,7 @@ module RoninGrid
9
9
  def run
10
10
  case @command
11
11
  when 'install'; install
12
+ when 'install-bare'; install(true)
12
13
  when 'update'; update
13
14
  when 'uninstall'; uninstall
14
15
  when '-v'; version
@@ -32,10 +33,11 @@ module RoninGrid
32
33
  end
33
34
  end
34
35
 
35
- def install
36
+ def install(bare = false)
36
37
  if ronin_installed?
37
38
  puts 'Ronin already installed, halting update.'
38
39
  else
40
+ @bare = bare ? true : false
39
41
  install_ronin
40
42
  puts 'Ronin installed into ronin-grid/'
41
43
  end
@@ -53,20 +55,20 @@ module RoninGrid
53
55
  private
54
56
 
55
57
  def ronin_installed?
56
- Dir.exist?('ronin_grid')
58
+ Dir.exist?('ronin-grid')
57
59
  end
58
60
 
59
61
  def install_ronin
60
- make_lib_directory
62
+ make_lib_directory unless @bare
61
63
  copy_sass_files
62
64
  end
63
65
 
64
66
  def remove_ronin_directory
65
- FileUtils.rm_rf('ronin_grid')
67
+ FileUtils.rm_rf('ronin-grid')
66
68
  end
67
69
 
68
70
  def copy_sass_files
69
- FileUtils.cp_r(all_sass_files, 'ronin_grid/')
71
+ FileUtils.cp_r(all_sass_files, install_dir)
70
72
  end
71
73
 
72
74
  def all_sass_files
@@ -74,7 +76,15 @@ module RoninGrid
74
76
  end
75
77
 
76
78
  def make_lib_directory
77
- FileUtils.mkdir_p('ronin_grid/lib/ronin_grid')
79
+ FileUtils.mkdir_p(lib_directory)
80
+ end
81
+
82
+ def lib_directory
83
+ 'ronin-grid/lib/ronin-grid'
84
+ end
85
+
86
+ def install_dir
87
+ @bare ? '.' : lib_directory
78
88
  end
79
89
 
80
90
  def sass_dir
@@ -1,3 +1,3 @@
1
1
  module RoninGrid
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/ronin-grid.rb CHANGED
@@ -7,12 +7,13 @@ module RoninGrid
7
7
  require 'ronin-grid/engine'
8
8
  end
9
9
 
10
- module Rails
11
- class Railtie < ::Rails::Railtie
12
- rake_tasks do
13
- load 'tasks/install.rake'
14
- end
15
- end
16
- end
10
+ # Pointless, as _setup.scss cannot be overridden.
11
+ # module Rails
12
+ # class Railtie < ::Rails::Railtie
13
+ # rake_tasks do
14
+ # load 'tasks/install.rake'
15
+ # end
16
+ # end
17
+ # end
17
18
  end
18
19
  end
@@ -2,10 +2,8 @@
2
2
  namespace :'ronin-grid' do
3
3
  desc "Install the Ronin files into the Rails assets directory"
4
4
  task :install, [:sass_path] do |t, args|
5
- args.with_defaults :sass_path => 'public/assets/stylesheets'
5
+ args.with_defaults :sass_path => 'app/assets/stylesheets'
6
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`
7
+ `cp -a #{source_root}/app/assets/stylesheets/* #{Rails.root}/#{args.sass_path}`
10
8
  end
11
9
  end
@@ -0,0 +1,13 @@
1
+ # Currently unusable, as it does not override existing file if ronin-grid is
2
+ # not explicitly installed via `rake ronin-grid:install`. Keeping around for
3
+ # future reference.
4
+ namespace :'ronin-grid' do
5
+ desc "Install the app/assets/stylesheets/ronin-grid/_setup.scss file."
6
+ task :setup, [:sass_path] do |t, args|
7
+ args.with_defaults :sass_path => 'app/assets/stylesheets'
8
+ source_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
9
+ `mkdir -p #{Rails.root}/#{args.sass_path}/ronin-grid`
10
+ `cp -a #{source_root}/app/assets/stylesheets/ronin-grid/_setup.scss #{Rails.root}/#{args.sass_path}/ronin-grid`
11
+ end
12
+ end
13
+
data/ronin-grid.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "ronin-grid"
7
7
  s.version = RoninGrid::VERSION
8
8
  s.authors = ["Jonathan Clem"]
9
- s.email = ["jclem@jclem.net"]
9
+ s.email = ["j@jclem.net"]
10
10
  s.homepage = "https://github.com/jclem/ronin-grid"
11
11
  s.summary = %q{Slice and dice content into a flexible, responsive grid with media queries.}
12
12
  s.description = <<-DESCRIPTION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-08 00:00:00.000000000 Z
12
+ date: 2012-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sass
16
- requirement: &70200859650660 !ruby/object:Gem::Requirement
16
+ requirement: &70241913499800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70200859650660
24
+ version_requirements: *70241913499800
25
25
  description: ! 'The objective of Ronin is to provide a framework for developing flexible,
26
26
  responsive web designs that are compatible back to IE7. Ronin aims to be somewhat
27
27
  of a "framework framework", meaning that it is column-count- and width-agnostic.
@@ -30,7 +30,7 @@ description: ! 'The objective of Ronin is to provide a framework for developing
30
30
 
31
31
  '
32
32
  email:
33
- - jclem@jclem.net
33
+ - j@jclem.net
34
34
  executables:
35
35
  - ronin-grid
36
36
  extensions: []
@@ -41,7 +41,7 @@ files:
41
41
  - LICENSE.md
42
42
  - README.md
43
43
  - Rakefile
44
- - app/assets/stylesheets/_ronin-grid.css.scss
44
+ - app/assets/stylesheets/_ronin-grid.scss
45
45
  - app/assets/stylesheets/ronin-grid/_classes.scss
46
46
  - app/assets/stylesheets/ronin-grid/_grid.scss
47
47
  - app/assets/stylesheets/ronin-grid/_pixel_mixins.scss
@@ -52,6 +52,7 @@ files:
52
52
  - lib/ronin-grid/generator.rb
53
53
  - lib/ronin-grid/version.rb
54
54
  - lib/tasks/install.rake
55
+ - lib/tasks/setup.rake
55
56
  - ronin-grid.gemspec
56
57
  homepage: https://github.com/jclem/ronin-grid
57
58
  licenses: []
@@ -78,4 +79,3 @@ signing_key:
78
79
  specification_version: 3
79
80
  summary: Slice and dice content into a flexible, responsive grid with media queries.
80
81
  test_files: []
81
- has_rdoc: