pwnstyles_rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.project ADDED
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>pwnstyles_rails</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>com.aptana.ruby.core.rubynature</nature>
16
+ </natures>
17
+ </projectDescription>
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ gem "haml", ">= 3.0.25"
5
+ gem "rails", ">= 3.0.0"
6
+
7
+ # Add dependencies to develop your gem here.
8
+ # Include everything needed to run rake, tests, features, etc.
9
+ group :development do
10
+ gem "shoulda", ">= 0"
11
+ gem "bundler", "~> 1.0.0"
12
+ gem "jeweler", "~> 1.5.2"
13
+ gem "rcov", ">= 0"
14
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,84 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionmailer (3.0.7)
6
+ actionpack (= 3.0.7)
7
+ mail (~> 2.2.15)
8
+ actionpack (3.0.7)
9
+ activemodel (= 3.0.7)
10
+ activesupport (= 3.0.7)
11
+ builder (~> 2.1.2)
12
+ erubis (~> 2.6.6)
13
+ i18n (~> 0.5.0)
14
+ rack (~> 1.2.1)
15
+ rack-mount (~> 0.6.14)
16
+ rack-test (~> 0.5.7)
17
+ tzinfo (~> 0.3.23)
18
+ activemodel (3.0.7)
19
+ activesupport (= 3.0.7)
20
+ builder (~> 2.1.2)
21
+ i18n (~> 0.5.0)
22
+ activerecord (3.0.7)
23
+ activemodel (= 3.0.7)
24
+ activesupport (= 3.0.7)
25
+ arel (~> 2.0.2)
26
+ tzinfo (~> 0.3.23)
27
+ activeresource (3.0.7)
28
+ activemodel (= 3.0.7)
29
+ activesupport (= 3.0.7)
30
+ activesupport (3.0.7)
31
+ arel (2.0.9)
32
+ builder (2.1.2)
33
+ erubis (2.6.6)
34
+ abstract (>= 1.0.0)
35
+ git (1.2.5)
36
+ haml (3.0.25)
37
+ i18n (0.5.0)
38
+ jeweler (1.5.2)
39
+ bundler (~> 1.0.0)
40
+ git (>= 1.2.5)
41
+ rake
42
+ mail (2.2.17)
43
+ activesupport (>= 2.3.6)
44
+ i18n (>= 0.4.0)
45
+ mime-types (~> 1.16)
46
+ treetop (~> 1.4.8)
47
+ mime-types (1.16)
48
+ polyglot (0.3.1)
49
+ rack (1.2.2)
50
+ rack-mount (0.6.14)
51
+ rack (>= 1.0.0)
52
+ rack-test (0.5.7)
53
+ rack (>= 1.0)
54
+ rails (3.0.7)
55
+ actionmailer (= 3.0.7)
56
+ actionpack (= 3.0.7)
57
+ activerecord (= 3.0.7)
58
+ activeresource (= 3.0.7)
59
+ activesupport (= 3.0.7)
60
+ bundler (~> 1.0)
61
+ railties (= 3.0.7)
62
+ railties (3.0.7)
63
+ actionpack (= 3.0.7)
64
+ activesupport (= 3.0.7)
65
+ rake (>= 0.8.7)
66
+ thor (~> 0.14.4)
67
+ rake (0.8.7)
68
+ rcov (0.9.9)
69
+ shoulda (2.11.3)
70
+ thor (0.14.6)
71
+ treetop (1.4.9)
72
+ polyglot (>= 0.3.1)
73
+ tzinfo (0.3.26)
74
+
75
+ PLATFORMS
76
+ ruby
77
+
78
+ DEPENDENCIES
79
+ bundler (~> 1.0.0)
80
+ haml (>= 3.0.25)
81
+ jeweler (~> 1.5.2)
82
+ rails (>= 3.0.0)
83
+ rcov
84
+ shoulda
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Victor Costan
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,27 @@
1
+ = pwnstyles_rails
2
+
3
+ Rails 3.0+ engine that ships default .scss style sheets and hooks them up into the application.
4
+
5
+ == Installation
6
+
7
+ Add the gem to your Gemfile
8
+
9
+ gem 'pwnstyles_rails'
10
+
11
+ Run a generator that will copy the stylesheets into the public/ directory.
12
+
13
+ rails g pwnstyles_rails:all
14
+
15
+ == Contributing to pwnstyles_rails
16
+
17
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
18
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
19
+ * Fork the project
20
+ * Start a feature/bugfix branch
21
+ * Commit and push until you are happy with your contribution
22
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
23
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
24
+
25
+ == Copyright
26
+
27
+ Copyright (c) 2011 Victor Costan. See LICENSE.txt for further details.
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "pwnstyles_rails"
16
+ gem.homepage = "http://github.com/pwnall/pwnstyles_rails"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{Rails 3 SCSS integration and non-trivial default style.}
19
+ gem.description = %Q{Included CSS was designed for reuse across pwnb.us apps.}
20
+ gem.email = "victor@costan.us"
21
+ gem.authors = ["Victor Costan"]
22
+ end
23
+ Jeweler::RubygemsDotOrgTasks.new
24
+
25
+ require 'rake/testtask'
26
+ Rake::TestTask.new(:test) do |test|
27
+ test.libs << 'lib' << 'test'
28
+ test.pattern = 'test/**/test_*.rb'
29
+ test.verbose = true
30
+ end
31
+
32
+ require 'rcov/rcovtask'
33
+ Rcov::RcovTask.new do |test|
34
+ test.libs << 'test'
35
+ test.pattern = 'test/**/test_*.rb'
36
+ test.verbose = true
37
+ end
38
+
39
+ task :default => :test
40
+
41
+ require 'rake/rdoctask'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "pwnstyles_rails #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,8 @@
1
+ require 'sass/plugin/rack'
2
+ Sass::Plugin.options[:style] = :compact
3
+ Sass::Plugin.add_template_location(
4
+ Rails.root.join('public', 'pwnstyles', 'stylesheets', 'scss').to_s,
5
+ Rails.root.join('public', 'pwnstyles', 'stylesheets').to_s)
6
+
7
+ ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :pwnstyles =>
8
+ [ '/pwnstyles/stylesheets/pwnstyles' ]
@@ -0,0 +1,22 @@
1
+ require 'rails'
2
+
3
+ # :nodoc: namespace
4
+ module PwnstylesRails
5
+
6
+
7
+ # Name chosen to get configvars_rails:all
8
+ class AllGenerator < Rails::Generators::Base
9
+ source_root File.expand_path("../templates", __FILE__)
10
+
11
+ def copy_stylesheets
12
+ dir = File.expand_path '../../public/stylesheets', File.dirname(__FILE__)
13
+ Dir.glob(File.join(dir, '**', '*')).each do |source|
14
+ next if File.directory?(source)
15
+ dest = Rails.root.join 'public', 'pwnstyles', 'stylesheets',
16
+ source[(dir.length + 1)..-1]
17
+ copy_file source, dest
18
+ end
19
+ end
20
+ end # class PwnstylesRails::AllGenerator
21
+
22
+ end # namespace PwnstylesRails
@@ -0,0 +1,13 @@
1
+ require 'pwnstyles_rails'
2
+ require 'rails'
3
+
4
+ # :nodoc: namespace
5
+ module AuthpwnRails
6
+
7
+ class Engine < Rails::Engine
8
+ generators do
9
+ require 'pwnstyles_rails/all_generator.rb'
10
+ end
11
+ end # class AuthpwnRails::Engine
12
+
13
+ end # namespace AuthpwnRails
@@ -0,0 +1,3 @@
1
+ if defined? Rails
2
+ require 'pwnstyles_rails/engine.rb'
3
+ end
@@ -0,0 +1,94 @@
1
+ html, body, div, span, object, iframe,
2
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
3
+ abbr, address, cite, code,
4
+ del, dfn, em, img, ins, kbd, q, samp,
5
+ small, strong, sub, sup, var,
6
+ dl, dt, dd, ol, ul, li,
7
+ fieldset, form, label, legend,
8
+ table, caption, tbody, tfoot, thead, tr, th, td,
9
+ article, aside, canvas, details, dialog, figcaption, figure,
10
+ footer, header, hgroup, menu, nav, section, summary,
11
+ time, mark, audio, video {
12
+ margin: 0;
13
+ padding: 0;
14
+ border: 0;
15
+ outline: 0;
16
+ font-size: 100%;
17
+ font: inherit;
18
+ vertical-align: baseline;
19
+ background: transparent;
20
+ }
21
+
22
+ body {
23
+ line-height: 1.2;
24
+ }
25
+
26
+ article, aside, details, figcaption, figure, dialog,
27
+ footer, header, hgroup, menu, nav, section {
28
+ display: block;
29
+ }
30
+
31
+ dl, ul, ol {
32
+ list-style: none;
33
+ }
34
+
35
+ blockquote, q {
36
+ quotes: none;
37
+ }
38
+
39
+ blockquote:before, blockquote:after,
40
+ q:before, q:after {
41
+ content: '';
42
+ content: none;
43
+ }
44
+
45
+ a {
46
+ margin: 0;
47
+ padding: 0;
48
+ font-size: 100%;
49
+ vertical-align: baseline;
50
+ background: transparent;
51
+ }
52
+ a img {
53
+ border: none;
54
+ }
55
+
56
+ ins {
57
+ background-color: #ff9;
58
+ color: #000;
59
+ text-decoration: none;
60
+ }
61
+
62
+ mark {
63
+ background-color: #ff9;
64
+ color: #000;
65
+ font-style: italic;
66
+ font-weight: bold;
67
+ }
68
+
69
+ del {
70
+ text-decoration: line-through;
71
+ }
72
+
73
+ abbr[title], dfn[title] {
74
+ border-bottom: 1px dotted;
75
+ cursor: help;
76
+ }
77
+
78
+ table {
79
+ border-collapse: collapse;
80
+ border-spacing: 0;
81
+ }
82
+
83
+ hr {
84
+ display: block;
85
+ height: 1px;
86
+ border: 0;
87
+ border-top: 1px solid #cccccc;
88
+ margin: 1em 0;
89
+ padding: 0;
90
+ }
91
+
92
+ input, select {
93
+ vertical-align: middle;
94
+ }
@@ -0,0 +1 @@
1
+ @import 'reset';
@@ -0,0 +1,75 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{pwnstyles_rails}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Victor Costan"]
12
+ s.date = %q{2011-04-24}
13
+ s.description = %q{Included CSS was designed for reuse across pwnb.us apps.}
14
+ s.email = %q{victor@costan.us}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".project",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "config/initializers/paths.rb",
29
+ "lib/pwnstyles_rails.rb",
30
+ "lib/pwnstyles_rails/all_generator.rb",
31
+ "lib/pwnstyles_rails/engine.rb",
32
+ "public/stylesheets/scss/_reset.scss",
33
+ "public/stylesheets/scss/pwnstyles.scss",
34
+ "pwnstyles_rails.gemspec",
35
+ "test/helper.rb",
36
+ "test/test_pwnstyles_rails.rb"
37
+ ]
38
+ s.homepage = %q{http://github.com/pwnall/pwnstyles_rails}
39
+ s.licenses = ["MIT"]
40
+ s.require_paths = ["lib"]
41
+ s.rubygems_version = %q{1.7.2}
42
+ s.summary = %q{Rails 3 SCSS integration and non-trivial default style.}
43
+ s.test_files = [
44
+ "test/helper.rb",
45
+ "test/test_pwnstyles_rails.rb"
46
+ ]
47
+
48
+ if s.respond_to? :specification_version then
49
+ s.specification_version = 3
50
+
51
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
52
+ s.add_runtime_dependency(%q<haml>, [">= 3.0.25"])
53
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
54
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
55
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
56
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
57
+ s.add_development_dependency(%q<rcov>, [">= 0"])
58
+ else
59
+ s.add_dependency(%q<haml>, [">= 3.0.25"])
60
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
61
+ s.add_dependency(%q<shoulda>, [">= 0"])
62
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
64
+ s.add_dependency(%q<rcov>, [">= 0"])
65
+ end
66
+ else
67
+ s.add_dependency(%q<haml>, [">= 3.0.25"])
68
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
69
+ s.add_dependency(%q<shoulda>, [">= 0"])
70
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
71
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
72
+ s.add_dependency(%q<rcov>, [">= 0"])
73
+ end
74
+ end
75
+
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'pwnstyles_rails'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestPwnstylesRails < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pwnstyles_rails
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Victor Costan
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-04-24 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ requirement: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ hash: 53
27
+ segments:
28
+ - 3
29
+ - 0
30
+ - 25
31
+ version: 3.0.25
32
+ version_requirements: *id001
33
+ name: haml
34
+ prerelease: false
35
+ type: :runtime
36
+ - !ruby/object:Gem::Dependency
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 7
43
+ segments:
44
+ - 3
45
+ - 0
46
+ - 0
47
+ version: 3.0.0
48
+ version_requirements: *id002
49
+ name: rails
50
+ prerelease: false
51
+ type: :runtime
52
+ - !ruby/object:Gem::Dependency
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ version_requirements: *id003
63
+ name: shoulda
64
+ prerelease: false
65
+ type: :development
66
+ - !ruby/object:Gem::Dependency
67
+ requirement: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ hash: 23
73
+ segments:
74
+ - 1
75
+ - 0
76
+ - 0
77
+ version: 1.0.0
78
+ version_requirements: *id004
79
+ name: bundler
80
+ prerelease: false
81
+ type: :development
82
+ - !ruby/object:Gem::Dependency
83
+ requirement: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ~>
87
+ - !ruby/object:Gem::Version
88
+ hash: 7
89
+ segments:
90
+ - 1
91
+ - 5
92
+ - 2
93
+ version: 1.5.2
94
+ version_requirements: *id005
95
+ name: jeweler
96
+ prerelease: false
97
+ type: :development
98
+ - !ruby/object:Gem::Dependency
99
+ requirement: &id006 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ hash: 3
105
+ segments:
106
+ - 0
107
+ version: "0"
108
+ version_requirements: *id006
109
+ name: rcov
110
+ prerelease: false
111
+ type: :development
112
+ description: Included CSS was designed for reuse across pwnb.us apps.
113
+ email: victor@costan.us
114
+ executables: []
115
+
116
+ extensions: []
117
+
118
+ extra_rdoc_files:
119
+ - LICENSE.txt
120
+ - README.rdoc
121
+ files:
122
+ - .document
123
+ - .project
124
+ - Gemfile
125
+ - Gemfile.lock
126
+ - LICENSE.txt
127
+ - README.rdoc
128
+ - Rakefile
129
+ - VERSION
130
+ - config/initializers/paths.rb
131
+ - lib/pwnstyles_rails.rb
132
+ - lib/pwnstyles_rails/all_generator.rb
133
+ - lib/pwnstyles_rails/engine.rb
134
+ - public/stylesheets/scss/_reset.scss
135
+ - public/stylesheets/scss/pwnstyles.scss
136
+ - pwnstyles_rails.gemspec
137
+ - test/helper.rb
138
+ - test/test_pwnstyles_rails.rb
139
+ homepage: http://github.com/pwnall/pwnstyles_rails
140
+ licenses:
141
+ - MIT
142
+ post_install_message:
143
+ rdoc_options: []
144
+
145
+ require_paths:
146
+ - lib
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ none: false
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ hash: 3
153
+ segments:
154
+ - 0
155
+ version: "0"
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ hash: 3
162
+ segments:
163
+ - 0
164
+ version: "0"
165
+ requirements: []
166
+
167
+ rubyforge_project:
168
+ rubygems_version: 1.7.2
169
+ signing_key:
170
+ specification_version: 3
171
+ summary: Rails 3 SCSS integration and non-trivial default style.
172
+ test_files:
173
+ - test/helper.rb
174
+ - test/test_pwnstyles_rails.rb