stones 0.1.4

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/.watchr ADDED
@@ -0,0 +1,52 @@
1
+ HH = '#' * 22 unless defined?(HH)
2
+ H = '#' * 5 unless defined?(H)
3
+
4
+ def usage
5
+ puts <<-EOS
6
+ Ctrl-\\ or ctrl-4 Running all tests
7
+ Ctrl-C Exit
8
+ EOS
9
+ end
10
+
11
+ def run(cmd)
12
+ puts "#{HH} #{Time.now} #{HH}"
13
+ puts "#{H} #{cmd}"
14
+ system "/usr/bin/time --format '#{HH} Elapsed time %E' #{cmd}"
15
+ end
16
+
17
+ def run_it(type, file)
18
+ case type
19
+ when 'test'; run %Q{ruby -I"lib:test" -rubygems #{file}}
20
+ when 'spec'; run %Q{rspec -X #{file}}
21
+ else; puts "#{H} unknown type: #{type}, file: #{file}"
22
+ end
23
+ end
24
+
25
+ def run_all_tests
26
+ puts "\n#{HH} Running all tests #{HH}\n"
27
+ %w{test spec}.each { |dir| run "rake #{dir}" if File.exists?(dir) }
28
+ end
29
+
30
+ def run_matching_files(base)
31
+ base = base.split('_').first
32
+ %w{test spec}.each { |type|
33
+ files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*\.rb/ }
34
+ run_it type, files.join(' ') unless files.empty?
35
+ }
36
+ end
37
+
38
+ %w{test spec}.each { |type|
39
+ watch("#{type}/#{type}_helper\.rb") { run_all_tests }
40
+ watch("#{type}/.*/*_#{type}\.rb") { |match| run_it type, match[0] }
41
+ }
42
+ %w{rb erb haml slim}.each { |type|
43
+ watch("app/.*/.*\.#{type}") { |m|
44
+ run_matching_files("#{m[0].split('/').at(2).split('.').first}")
45
+ }
46
+ }
47
+
48
+ # Ctrl-\ or ctrl-4
49
+ Signal.trap('QUIT') { run_all_tests }
50
+ # Ctrl-C
51
+ Signal.trap('INT') { abort("Interrupted\n") }
52
+ usage
data/Gemfile ADDED
@@ -0,0 +1,16 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rails'
4
+ #gem 'jquery-rails'
5
+ #gem 'rows_controller'
6
+
7
+ group :test do
8
+ gem "capybara"
9
+ gem 'rspec-rails'
10
+ end
11
+
12
+ group :development, :test do
13
+ gem "sqlite3"
14
+ gem 'watchr'
15
+ gem 'spork'
16
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,130 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.9)
5
+ actionpack (= 3.2.9)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.9)
8
+ activemodel (= 3.2.9)
9
+ activesupport (= 3.2.9)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.9)
18
+ activesupport (= 3.2.9)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.9)
21
+ activemodel (= 3.2.9)
22
+ activesupport (= 3.2.9)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.9)
26
+ activemodel (= 3.2.9)
27
+ activesupport (= 3.2.9)
28
+ activesupport (3.2.9)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ addressable (2.3.2)
32
+ arel (3.0.2)
33
+ builder (3.0.4)
34
+ capybara (2.0.1)
35
+ mime-types (>= 1.16)
36
+ nokogiri (>= 1.3.3)
37
+ rack (>= 1.0.0)
38
+ rack-test (>= 0.5.4)
39
+ selenium-webdriver (~> 2.0)
40
+ xpath (~> 1.0.0)
41
+ childprocess (0.3.6)
42
+ ffi (~> 1.0, >= 1.0.6)
43
+ diff-lcs (1.1.3)
44
+ erubis (2.7.0)
45
+ ffi (1.2.0)
46
+ hike (1.2.1)
47
+ i18n (0.6.1)
48
+ journey (1.0.4)
49
+ json (1.7.5)
50
+ libwebsocket (0.1.7.1)
51
+ addressable
52
+ websocket
53
+ mail (2.4.4)
54
+ i18n (>= 0.4.0)
55
+ mime-types (~> 1.16)
56
+ treetop (~> 1.4.8)
57
+ mime-types (1.19)
58
+ multi_json (1.4.0)
59
+ nokogiri (1.5.5)
60
+ polyglot (0.3.3)
61
+ rack (1.4.1)
62
+ rack-cache (1.2)
63
+ rack (>= 0.4)
64
+ rack-ssl (1.3.2)
65
+ rack
66
+ rack-test (0.6.2)
67
+ rack (>= 1.0)
68
+ rails (3.2.9)
69
+ actionmailer (= 3.2.9)
70
+ actionpack (= 3.2.9)
71
+ activerecord (= 3.2.9)
72
+ activeresource (= 3.2.9)
73
+ activesupport (= 3.2.9)
74
+ bundler (~> 1.0)
75
+ railties (= 3.2.9)
76
+ railties (3.2.9)
77
+ actionpack (= 3.2.9)
78
+ activesupport (= 3.2.9)
79
+ rack-ssl (~> 1.3.2)
80
+ rake (>= 0.8.7)
81
+ rdoc (~> 3.4)
82
+ thor (>= 0.14.6, < 2.0)
83
+ rake (10.0.2)
84
+ rdoc (3.12)
85
+ json (~> 1.4)
86
+ rspec-core (2.12.1)
87
+ rspec-expectations (2.12.0)
88
+ diff-lcs (~> 1.1.3)
89
+ rspec-mocks (2.12.0)
90
+ rspec-rails (2.12.0)
91
+ actionpack (>= 3.0)
92
+ activesupport (>= 3.0)
93
+ railties (>= 3.0)
94
+ rspec-core (~> 2.12.0)
95
+ rspec-expectations (~> 2.12.0)
96
+ rspec-mocks (~> 2.12.0)
97
+ rubyzip (0.9.9)
98
+ selenium-webdriver (2.26.0)
99
+ childprocess (>= 0.2.5)
100
+ libwebsocket (~> 0.1.3)
101
+ multi_json (~> 1.0)
102
+ rubyzip
103
+ spork (0.9.2)
104
+ sprockets (2.2.2)
105
+ hike (~> 1.2)
106
+ multi_json (~> 1.0)
107
+ rack (~> 1.0)
108
+ tilt (~> 1.1, != 1.3.0)
109
+ sqlite3 (1.3.6)
110
+ thor (0.16.0)
111
+ tilt (1.3.3)
112
+ treetop (1.4.12)
113
+ polyglot
114
+ polyglot (>= 0.3.1)
115
+ tzinfo (0.3.35)
116
+ watchr (0.7)
117
+ websocket (1.0.4)
118
+ xpath (1.0.0)
119
+ nokogiri (~> 1.3)
120
+
121
+ PLATFORMS
122
+ ruby
123
+
124
+ DEPENDENCIES
125
+ capybara
126
+ rails
127
+ rspec-rails
128
+ spork
129
+ sqlite3
130
+ watchr
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 Dittmar Krall - http://matique.de
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.md ADDED
@@ -0,0 +1,34 @@
1
+ Stones
2
+ ======
3
+
4
+ Each time I created a new Rails project these files are required.
5
+ I got tired of it and collected them in a gem.
6
+
7
+ Some files (e.g. reset.css) are overwritten by the corresponding ones fom the project.
8
+ Some files (e.g. .watchr) may be copied to your project.
9
+
10
+
11
+ Files:
12
+
13
+ app/assets/images/facebook_32.png
14
+ app/assets/images/github_32.png
15
+ app/assets/images/google_32.png
16
+ app/assets/images/matique.ico
17
+ app/assets/images/twitter_32.png
18
+ app/assets/stylesheets/print.css
19
+ app/assets/stylesheets/reset.css
20
+ app/views/layouts/application.html.erb
21
+ app/views/layouts/_body.slim
22
+ app/views/layouts/_flash.slim
23
+ app/views/layouts/_footer.slim
24
+ app/views/layouts/_html_head.slim
25
+ app/views/shared/_error_explanation.html.erb
26
+ config/initializers/concerns.rb
27
+
28
+
29
+ Recommended
30
+ ===========
31
+
32
+ - rvm
33
+ - ruby 1.9.3
34
+ - rails 3
data/Rakefile ADDED
@@ -0,0 +1,30 @@
1
+ # encoding: UTF-8
2
+
3
+ begin
4
+ require 'bundler'
5
+ require 'bundler/setup'
6
+ rescue LoadError
7
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
8
+ end
9
+
10
+ require 'rspec/core'
11
+ require 'rspec/core/rake_task'
12
+
13
+ Bundler::GemHelper.install_tasks
14
+ RSpec::Core::RakeTask.new(:spec)
15
+
16
+ task :default => :spec
17
+
18
+
19
+ desc "Clean automatically generated files"
20
+ task :clean do
21
+ FileUtils.rm_rf "pkg"
22
+ end
23
+
24
+ desc "Check syntax"
25
+ task :syntax do
26
+ Dir["**/*.rb"].each do |file|
27
+ print "#{file}: "
28
+ system("ruby -c #{file}")
29
+ end
30
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,60 @@
1
+ /* --------------------------------------------------------------
2
+
3
+ Hartija Css Print Framework
4
+ * Version: 0.8 (2008-03-10)
5
+
6
+ -------------------------------------------------------------- */
7
+
8
+ body {
9
+ width:100% !important;
10
+ margin:0 !important;
11
+ padding:0 !important;
12
+ xline-height: 1.4;
13
+ xword-spacing:1.1pt;
14
+ xletter-spacing:0.2pt;
15
+ xfont-family: Garamond,"Times New Roman", serif;
16
+ color: #000;
17
+ background: none;
18
+ font-size: 12pt;
19
+ }
20
+
21
+ /*Headings */
22
+ h1,h2,h3,h4,h5,h6 { font-family: Helvetica, Arial, sans-serif; }
23
+ h1{font-size:19pt;}
24
+ h2{font-size:17pt;}
25
+ h3{font-size:15pt;}
26
+ h4,h5,h6{font-size:12pt;}
27
+
28
+ code { font: 10pt Courier, monospace; }
29
+ blockquote { margin: 1.3em; padding: 1em; font-size: 10pt; }
30
+ hr { background-color: #ccc; }
31
+
32
+ /* Images */
33
+ img { float: left; margin: 1em 1.5em 1.5em 0; }
34
+ a img { border: none; }
35
+
36
+ /* Links */
37
+ a:link, a:visited { background: transparent; font-weight: 700; text-decoration: underline;color:#333; }
38
+ a:link[href^="http://"]:after, a[href^="http://"]:visited:after { content: " (" attr(href) ") "; font-size: 90%; }
39
+ a[href^="http://"] {color:#000; }
40
+
41
+ /* Table */
42
+ table { margin: 1px; text-align:left; }
43
+ th { border-bottom: 1px solid #333; font-weight: bold; }
44
+ td { border-bottom: 1px solid #333; }
45
+ th,td { padding: 4px 10px 4px 0; }
46
+ tfoot { font-style: italic; }
47
+ caption { background: #fff; margin-bottom:2em; text-align:left; }
48
+ thead {display: table-header-group;}
49
+ tr {page-break-inside: avoid;}
50
+
51
+ /*hide various parts from the site
52
+ #header, #footer, #navigation, #rightSideBar, #leftSideBar
53
+ {display:none;}
54
+ */
55
+
56
+ #wrapper { min-height: 200px; }
57
+ #header { display:none; }
58
+ footer table {
59
+ border-top: 0;
60
+ }
@@ -0,0 +1,55 @@
1
+ /* credits to Eric Meyer */
2
+
3
+ html, body, div, span, applet, object, iframe,
4
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
5
+ a, abbr, acronym, address, big, cite, code,
6
+ del, dfn, em, font, img, ins, kbd, q, s, samp,
7
+ small, strike, strong, sub, sup, tt, var,
8
+ dl, dt, dd, ol, ul, li,
9
+ fieldset, form, label, legend,
10
+ table, caption, tbody, tfoot, thead, tr, th, td, hr,
11
+ textarea {
12
+ margin: 0;
13
+ padding: 0;
14
+ border: 0;
15
+ outline: 0;
16
+ font-weight: inherit;
17
+ font-style: inherit;
18
+ font-size: 100%;
19
+ font-family: inherit;
20
+ vertical-align: baseline;
21
+ }
22
+
23
+ /* remember to define focus styles! */
24
+ :focus {
25
+ outline: 0;
26
+ }
27
+
28
+ body {
29
+ line-height: 1;
30
+ color: black;
31
+ background: white;
32
+ }
33
+
34
+ ol, ul {
35
+ list-style: none;
36
+ }
37
+
38
+ /* tables still need 'cellspacing="0"' in the markup */
39
+ table {
40
+ border-collapse: separate;
41
+ border-spacing: 0;
42
+ }
43
+
44
+ caption, th, td {
45
+ text-align: left;
46
+ font-weight: normal;
47
+ }
48
+
49
+ blockquote:before, blockquote:after, q:before, q:after {
50
+ content: "";
51
+ }
52
+
53
+ blockquote, q {
54
+ quotes: "" "";
55
+ }
@@ -0,0 +1,8 @@
1
+ div#wrapper
2
+ = render 'layouts/header'
3
+ = render 'layouts/flash', flash: flash
4
+ div#content
5
+ = yield :layout
6
+ div#push
7
+ footer
8
+ = render 'layouts/footer'
@@ -0,0 +1,5 @@
1
+ - (flash || {}).each do |key, value|
2
+ p(class="flash_#{key}") #{sanitize(value)}
3
+ - if key == :notice
4
+ script(type="text/javascript")
5
+ | $('.flash_notice').fadeOut(5000, function() { $(this).remove(); });
@@ -0,0 +1,6 @@
1
+ - str = "| #{APP.capitalize} #{VERSION} | Rails #{Rails.version} | #{STARTED_AT}"
2
+
3
+ table
4
+ tr
5
+ td
6
+ td(style="text-align:center") #{copyright} #{str}
@@ -0,0 +1,6 @@
1
+ title = (APP || 'app').capitalize
2
+ link rel='shortcut icon' href='/images/matique.ico'
3
+ = stylesheet_link_tag @stylesheet || 'application', media: 'all'
4
+ = stylesheet_link_tag 'print', media: 'print'
5
+ = javascript_include_tag 'application'
6
+ = csrf_meta_tags
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <!--[if lt IE 7]> <html class="lt-ie10 lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3
+ <!--[if IE 7]> <html class="lt-ie10 lt-ie9 lt-ie8 ie7"> <![endif]-->
4
+ <!--[if IE 8]> <html class="lt-ie10 lt-ie9 ie8"> <![endif]-->
5
+ <!--[if IE 9 ]> <html class="lt-ie10 ie9"> <![endif]-->
6
+ <!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
7
+ <head>
8
+ <%= render 'layouts/html_head' %>
9
+ </head>
10
+ <%= render 'layouts/body' %>
11
+ </html>
@@ -0,0 +1,14 @@
1
+ <%
2
+ # Requires resource
3
+ %>
4
+ <% if resource && resource.respond_to?(:errors) && resource.errors.any? %>
5
+ <div id="error_explanation">
6
+ <h2><%= pluralize(resource.errors.count, "error") %> prohibited this template from being saved:</h2>
7
+
8
+ <ul>
9
+ <% resource.errors.full_messages.each do |msg| %>
10
+ <li><%= msg %></li>
11
+ <% end %>
12
+ </ul>
13
+ </div>
14
+ <% end %>
@@ -0,0 +1,22 @@
1
+ class << ActiveRecord::Base
2
+
3
+ def concerned_with(*concerns)
4
+ concerns.each do |concern|
5
+ require_dependency "#{name.underscore}/#{concern}"
6
+ end
7
+ end
8
+
9
+ end
10
+
11
+
12
+ class << ActionController::Base
13
+
14
+ def concerned_with(*concerns)
15
+ concerns.each do |concern|
16
+ require_dependency "#{name.underscore}/#{concern}"
17
+ end
18
+ end
19
+
20
+ end
21
+
22
+
@@ -0,0 +1,4 @@
1
+ module Stones
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Stones
2
+ VERSION = '0.1.4'
3
+ end
data/lib/stones.rb ADDED
@@ -0,0 +1 @@
1
+ require 'stones/engine.rb'
data/stones.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
3
+
4
+ require 'stones/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "stones"
8
+ s.version = Stones::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.summary = "Stones contains some basic files."
11
+ s.description = "A collection of, hopefully, useful files."
12
+ s.authors = ['Dittmar Krall']
13
+ s.email = ['dittmar.krall@matique.de']
14
+ s.homepage = 'http://matique.de'
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ # specify any dependencies here; for example:
21
+ # s.add_development_dependency "rspec"
22
+ # s.add_runtime_dependency "rest-client"
23
+
24
+ # s.add_development_dependency "sqlite3" # for testing
25
+ # s.add_development_dependency "rspec-rails"
26
+ # s.add_development_dependency "capybara"
27
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: stones
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dittmar Krall
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: A collection of, hopefully, useful files.
15
+ email:
16
+ - dittmar.krall@matique.de
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .watchr
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - MIT-LICENSE
25
+ - README.md
26
+ - Rakefile
27
+ - app/assets/images/facebook_32.png
28
+ - app/assets/images/github_32.png
29
+ - app/assets/images/google_32.png
30
+ - app/assets/images/matique.ico
31
+ - app/assets/images/twitter_32.png
32
+ - app/assets/stylesheets/print.css
33
+ - app/assets/stylesheets/reset.css
34
+ - app/views/layouts/_body.slim
35
+ - app/views/layouts/_flash.slim
36
+ - app/views/layouts/_footer.slim
37
+ - app/views/layouts/_html_head.slim
38
+ - app/views/layouts/application.html.erb
39
+ - app/views/shared/_error_explanation.html.erb
40
+ - config/initializers/concerns.rb
41
+ - lib/stones.rb
42
+ - lib/stones/engine.rb
43
+ - lib/stones/version.rb
44
+ - stones.gemspec
45
+ homepage: http://matique.de
46
+ licenses: []
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 1.8.24
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Stones contains some basic files.
69
+ test_files: []