hands_engine 0.8.3 → 0.8.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/Gemfile +0 -5
- data/README.rdoc +4 -4
- data/Rakefile +1 -1
- data/hands_engine.gemspec +2 -2
- data/lib/hands_engine.rb +58 -94
- data/lib/hands_engine/version.rb +1 -1
- data/lib/{template → templates}/root/%underscored%.gemspec.tt +0 -0
- data/lib/templates/root/app/controllers/%underscored%/example_controller.rb.tt +4 -0
- data/lib/templates/root/app/helpers/%underscored%/example_helper.rb.tt +2 -0
- data/lib/templates/root/app/models/%underscored%/example.rb.tt +3 -0
- data/lib/templates/root/app/views/%underscored%/example/index.html.erb +1 -0
- data/lib/{template/root/app/views/layouts/%underscored%.html.erb.tt → templates/root/app/views/layouts/%underscored%.html.erb} +2 -2
- data/lib/templates/root/app/views/layouts/application.html.erb +12 -0
- data/lib/{template → templates}/root/config/locales/pt-BR.yml +0 -0
- data/lib/{template/rails/routes.rb → templates/root/config/routes.rb.tt} +1 -1
- data/lib/{template → templates}/root/lib/%underscored%.rb.tt +0 -0
- data/lib/{template/root/lib/%underscored%.tt/engine.rb → templates/root/lib/%underscored%/engine.rb.tt} +0 -0
- metadata +15 -26
- data/lib/template/gitignore +0 -6
- data/lib/template/rails/application.rb +0 -12
- data/lib/template/rails/boot.rb +0 -10
- data/lib/template/root/Gemfile.tt +0 -12
- data/lib/template/root/MIT-LICENSE.tt +0 -20
- data/lib/template/root/README.rdoc.tt +0 -3
- data/lib/template/root/Rakefile.tt +0 -10
- data/lib/template/root/public/stylesheets/android.css +0 -13
- data/lib/template/root/public/stylesheets/blackberry.css +0 -11
- data/lib/template/root/public/stylesheets/default.css +0 -213
- data/lib/template/root/public/stylesheets/iOS.css +0 -22
- data/lib/template/root/public/stylesheets/nokia.css +0 -30
- data/lib/template/root/public/stylesheets/plataforma.css +0 -262
- data/lib/template/spec/%underscored%_spec.rb.tt +0 -7
- data/lib/template/spec/integration/navigation_spec.tt +0 -9
- data/lib/template/spec/spec_helper.rb +0 -33
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
== Hands Engine
|
2
2
|
|
3
|
-
Hands Engine is a command line tool,
|
3
|
+
Hands Engine is a command line tool, which creates a Rails 3 Engine.
|
4
4
|
|
5
5
|
Engines will be available on Rails 3.1 as the new plugin generator and invoked as: "rails plugin new". The port to Rails was made by Piotr Sarnacki.
|
6
6
|
|
7
7
|
== Usage
|
8
8
|
|
9
|
-
$ hands ENGINE_NAME
|
9
|
+
$ hands path/ENGINE_NAME Ex: hands sites/vwvarejo
|
10
10
|
|
11
11
|
Give --help to see supported options.
|
12
12
|
|
13
13
|
== Bugs and Feedback
|
14
14
|
|
15
|
-
If you discover any bugs, feel free to send me a message
|
15
|
+
If you discover any bugs, feel free to send me a message:
|
16
16
|
|
17
|
-
|
17
|
+
mail_to: bruno.barros@hands.com.br
|
18
18
|
|
19
19
|
MIT License. Copyright 2010 Hands. http://www.hands.com.br
|
data/Rakefile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
require 'bundler'
|
2
|
-
Bundler::GemHelper.install_tasks
|
2
|
+
Bundler::GemHelper.install_tasks
|
data/hands_engine.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ["Bruno S. Barros (Hands Mobile)"]
|
10
10
|
s.email = ["bruno.barros@hands.com.br"]
|
11
11
|
s.homepage = ""
|
12
|
-
s.summary = %q{Create a site engine
|
13
|
-
s.description = %q{Create a site engine
|
12
|
+
s.summary = %q{Create a site engine template}
|
13
|
+
s.description = %q{Create a site engine template}
|
14
14
|
|
15
15
|
s.rubyforge_project = "hands_engine"
|
16
16
|
|
data/lib/hands_engine.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require "thor/group"
|
2
|
-
|
3
2
|
require "active_support"
|
4
3
|
require "active_support/version"
|
5
4
|
require "active_support/core_ext/string"
|
@@ -27,110 +26,75 @@ class HandsEngine < Thor::Group
|
|
27
26
|
|
28
27
|
argument :path, :type => :string, :desc => "Path to the engine to be created"
|
29
28
|
|
30
|
-
|
31
|
-
class_option :test_framework, :default => "rspec", :aliases => "-t", :desc => "Test framework to use. test_unit or rspec."
|
32
|
-
|
33
|
-
# case -theme off => default site , case -theme on => themes site
|
34
|
-
class_option :theme_mode, :default => "off", :aliases => "-theme", :desc => "Create theme skeleton. on or off."
|
29
|
+
desc "Creates a Rails 3 engine."
|
35
30
|
|
36
|
-
|
31
|
+
say_step "Vendoring Rails 3 application at #{name.underscore}"
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
set_accessors!
|
33
|
+
def invoke_rails_app_generator
|
34
|
+
invoke Rails::Generators::AppGenerator,
|
35
|
+
[ File.expand_path(path, destination_root) ]
|
36
|
+
end
|
43
37
|
|
44
|
-
|
45
|
-
|
38
|
+
say_step "Removing unneeded files"
|
39
|
+
|
40
|
+
def remove_uneeded_rails_files
|
41
|
+
inside path do
|
42
|
+
remove_file ".gitignore"
|
43
|
+
remove_file "config.ru"
|
44
|
+
remove_file "app/views/layouts/application.html.erb"
|
45
|
+
remove_file "app/mailers"
|
46
|
+
remove_file "config/environments"
|
47
|
+
remove_file "config/initializers"
|
48
|
+
remove_file "config/database.yml"
|
49
|
+
remove_file "config/routes.rb"
|
50
|
+
remove_file "config/environment.rb"
|
51
|
+
remove_file "db"
|
52
|
+
remove_file "doc"
|
53
|
+
remove_file "log"
|
54
|
+
remove_file "Gemfile"
|
55
|
+
remove_file "public/images/rails.png"
|
56
|
+
remove_file "public/index.html"
|
57
|
+
remove_file "public/robots.txt"
|
58
|
+
remove_file "public/javascripts/application.js"
|
59
|
+
remove_file "public/javascripts/controls.js"
|
60
|
+
remove_file "public/javascripts/dragdrop.js"
|
61
|
+
remove_file "public/javascripts/effects.js"
|
62
|
+
remove_file "public/javascripts/prototype.js"
|
63
|
+
remove_file "public/javascripts/rails.js"
|
64
|
+
remove_file "README"
|
65
|
+
remove_file "script"
|
66
|
+
remove_file "tmp"
|
67
|
+
remove_file "test"
|
68
|
+
remove_file "vendor"
|
46
69
|
end
|
70
|
+
end
|
47
71
|
|
48
|
-
|
49
|
-
directory test_path
|
50
|
-
end
|
72
|
+
say_step "Creating site engine #{name.underscore}"
|
51
73
|
|
52
|
-
|
53
|
-
|
54
|
-
|
74
|
+
def create_root
|
75
|
+
self.destination_root = File.expand_path(path, destination_root)
|
76
|
+
set_accessors!
|
55
77
|
|
56
|
-
|
78
|
+
directory "root", "."
|
79
|
+
FileUtils.cd(destination_root)
|
80
|
+
end
|
57
81
|
|
58
|
-
|
59
|
-
|
60
|
-
|
82
|
+
protected
|
83
|
+
# Cache accessors since we are changing the directory
|
84
|
+
def set_accessors!
|
85
|
+
self.name
|
86
|
+
self.class.source_root
|
61
87
|
end
|
62
88
|
|
63
|
-
|
64
|
-
|
65
|
-
def change_config_files
|
66
|
-
store_application_definition!
|
67
|
-
template "rails/boot.rb", "#{dummy_path}/config/boot.rb", :force => true
|
68
|
-
template "rails/application.rb", "#{dummy_path}/config/application.rb", :force => true
|
89
|
+
def name
|
90
|
+
@name ||= File.basename(destination_root)
|
69
91
|
end
|
70
92
|
|
71
|
-
|
72
|
-
|
73
|
-
def remove_uneeded_rails_files
|
74
|
-
inside dummy_path do
|
75
|
-
remove_file ".gitignore"
|
76
|
-
remove_file "db/seeds.rb"
|
77
|
-
remove_file "doc"
|
78
|
-
remove_file "Gemfile"
|
79
|
-
remove_file "lib/tasks"
|
80
|
-
remove_file "public/images/rails.png"
|
81
|
-
remove_file "public/index.html"
|
82
|
-
remove_file "public/robots.txt"
|
83
|
-
remove_file "README"
|
84
|
-
remove_file "test"
|
85
|
-
remove_file "vendor"
|
86
|
-
end
|
93
|
+
def camelized
|
94
|
+
@camelized ||= name.camelize
|
87
95
|
end
|
88
96
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
end
|
94
|
-
|
95
|
-
def test_unit?
|
96
|
-
options[:test_framework] == "test_unit"
|
97
|
-
end
|
98
|
-
|
99
|
-
def test_path
|
100
|
-
rspec? ? "spec" : "test"
|
101
|
-
end
|
102
|
-
|
103
|
-
def dummy_path
|
104
|
-
"#{test_path}/dummy"
|
105
|
-
end
|
106
|
-
|
107
|
-
def self.banner
|
108
|
-
self_task.formatted_usage(self, false)
|
109
|
-
end
|
110
|
-
|
111
|
-
def application_definition
|
112
|
-
@application_definition ||= begin
|
113
|
-
contents = File.read(File.expand_path("#{dummy_path}/config/application.rb", destination_root))
|
114
|
-
contents[(contents.index("module Dummy"))..-1]
|
115
|
-
end
|
116
|
-
end
|
117
|
-
alias :store_application_definition! :application_definition
|
118
|
-
|
119
|
-
# Cache accessors since we are changing the directory
|
120
|
-
def set_accessors!
|
121
|
-
self.name
|
122
|
-
self.class.source_root
|
123
|
-
end
|
124
|
-
|
125
|
-
def name
|
126
|
-
@name ||= File.basename(destination_root)
|
127
|
-
end
|
128
|
-
|
129
|
-
def camelized
|
130
|
-
@camelized ||= name.camelize
|
131
|
-
end
|
132
|
-
|
133
|
-
def underscored
|
134
|
-
@underscored ||= name.underscore
|
135
|
-
end
|
136
|
-
end
|
97
|
+
def underscored
|
98
|
+
@underscored ||= name.underscore
|
99
|
+
end
|
100
|
+
end
|
data/lib/hands_engine/version.rb
CHANGED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Hi, I'm a index!</h1>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<!
|
1
|
+
<!DOCTYPE html>
|
2
2
|
<!-- Conditional comment for mobile ie7 http://blogs.msdn.com/b/iemobile/ -->
|
3
3
|
<!-- Appcache Facts http://appcachefacts.info/ -->
|
4
4
|
<!--[if IEMobile 7 ]> <html class="no-js iem7" manifest="default.appcache?v=1"> <![endif]-->
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<head>
|
7
7
|
<meta charset="utf-8">
|
8
8
|
|
9
|
-
<title
|
9
|
+
<title>INSERT THE APP NAME HERE</title>
|
10
10
|
<meta name="description" content="">
|
11
11
|
<meta name="keywords" content="">
|
12
12
|
<meta name="author" content="Hands Awesome Mobile">
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: hands_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.8.
|
5
|
+
version: 0.8.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Bruno S. Barros (Hands Mobile)
|
@@ -10,11 +10,11 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-04 00:00:00 -03:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
17
|
-
description: Create a site engine
|
17
|
+
description: Create a site engine template
|
18
18
|
email:
|
19
19
|
- bruno.barros@hands.com.br
|
20
20
|
executables:
|
@@ -32,28 +32,17 @@ files:
|
|
32
32
|
- hands_engine.gemspec
|
33
33
|
- lib/hands_engine.rb
|
34
34
|
- lib/hands_engine/version.rb
|
35
|
-
- lib/
|
36
|
-
- lib/
|
37
|
-
- lib/
|
38
|
-
- lib/
|
39
|
-
- lib/
|
40
|
-
- lib/
|
41
|
-
- lib/
|
42
|
-
- lib/
|
43
|
-
- lib/
|
44
|
-
- lib/
|
45
|
-
- lib/
|
46
|
-
- lib/template/root/lib/%underscored%.rb.tt
|
47
|
-
- lib/template/root/lib/%underscored%.tt/engine.rb
|
48
|
-
- lib/template/root/public/stylesheets/android.css
|
49
|
-
- lib/template/root/public/stylesheets/blackberry.css
|
50
|
-
- lib/template/root/public/stylesheets/default.css
|
51
|
-
- lib/template/root/public/stylesheets/iOS.css
|
52
|
-
- lib/template/root/public/stylesheets/nokia.css
|
53
|
-
- lib/template/root/public/stylesheets/plataforma.css
|
54
|
-
- lib/template/spec/%underscored%_spec.rb.tt
|
55
|
-
- lib/template/spec/integration/navigation_spec.tt
|
56
|
-
- lib/template/spec/spec_helper.rb
|
35
|
+
- lib/templates/root/%underscored%.gemspec.tt
|
36
|
+
- lib/templates/root/app/controllers/%underscored%/example_controller.rb.tt
|
37
|
+
- lib/templates/root/app/helpers/%underscored%/example_helper.rb.tt
|
38
|
+
- lib/templates/root/app/models/%underscored%/example.rb.tt
|
39
|
+
- lib/templates/root/app/views/%underscored%/example/index.html.erb
|
40
|
+
- lib/templates/root/app/views/layouts/%underscored%.html.erb
|
41
|
+
- lib/templates/root/app/views/layouts/application.html.erb
|
42
|
+
- lib/templates/root/config/locales/pt-BR.yml
|
43
|
+
- lib/templates/root/config/routes.rb.tt
|
44
|
+
- lib/templates/root/lib/%underscored%.rb.tt
|
45
|
+
- lib/templates/root/lib/%underscored%/engine.rb.tt
|
57
46
|
has_rdoc: true
|
58
47
|
homepage: ""
|
59
48
|
licenses: []
|
@@ -81,6 +70,6 @@ rubyforge_project: hands_engine
|
|
81
70
|
rubygems_version: 1.5.0
|
82
71
|
signing_key:
|
83
72
|
specification_version: 3
|
84
|
-
summary: Create a site engine
|
73
|
+
summary: Create a site engine template
|
85
74
|
test_files: []
|
86
75
|
|
data/lib/template/gitignore
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require "active_model/railtie"
|
4
|
-
require "active_record/railtie"
|
5
|
-
require "action_controller/railtie"
|
6
|
-
require "action_view/railtie"
|
7
|
-
require "action_mailer/railtie"
|
8
|
-
|
9
|
-
Bundler.require
|
10
|
-
require "<%= underscored %>"
|
11
|
-
|
12
|
-
<%= application_definition %>
|
data/lib/template/rails/boot.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
|
3
|
-
gem "rails", "<%= ActiveSupport::VERSION::STRING %>"
|
4
|
-
gem "capybara", ">= 0.4.0"
|
5
|
-
gem "sqlite3"
|
6
|
-
<%- if rspec? %>
|
7
|
-
gem "rspec-rails", ">= 2.5.0"
|
8
|
-
<% end -%>
|
9
|
-
|
10
|
-
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
|
11
|
-
gem 'ruby-debug'
|
12
|
-
gem 'ruby-debug19'
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright <%= Date.today.year %> HANDS MOBILE
|
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.
|
@@ -1,10 +0,0 @@
|
|
1
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
|
-
|
4
|
-
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
|
-
|
7
|
-
<%= camelized %>::Application.load_tasks
|
8
|
-
|
9
|
-
require '<%= underscored %>/rake/tasks'
|
10
|
-
<%= camelized %>::Rake::Tasks.new
|
@@ -1,213 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* HTML5 ✰ Boilerplate
|
3
|
-
*
|
4
|
-
* style.css contains a reset, font normalization and some base styles.
|
5
|
-
*
|
6
|
-
* Credit is left where credit is due.
|
7
|
-
* Much inspiration was taken from these projects:
|
8
|
-
* - yui.yahooapis.com/2.8.1/build/base/base.css
|
9
|
-
* - camendesign.com/design/
|
10
|
-
* - praegnanz.de/weblog/htmlcssjs-kickstart
|
11
|
-
*/
|
12
|
-
|
13
|
-
|
14
|
-
/**
|
15
|
-
* html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
|
16
|
-
* v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
|
17
|
-
* html5doctor.com/html-5-reset-stylesheet/
|
18
|
-
*/
|
19
|
-
|
20
|
-
html, body, div, span, object, iframe,
|
21
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
22
|
-
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
|
23
|
-
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
|
24
|
-
fieldset, form, label, legend,
|
25
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
26
|
-
article, aside, canvas, details, figcaption, figure,
|
27
|
-
footer, header, hgroup, menu, nav, section, summary,
|
28
|
-
time, mark, audio, video {
|
29
|
-
margin: 0;
|
30
|
-
padding: 0;
|
31
|
-
border: 0;
|
32
|
-
font-size: 100%;
|
33
|
-
font: inherit;
|
34
|
-
vertical-align: baseline;
|
35
|
-
}
|
36
|
-
|
37
|
-
article, aside, details, figcaption, figure,
|
38
|
-
footer, header, hgroup, menu, nav, section {
|
39
|
-
display: block;
|
40
|
-
}
|
41
|
-
|
42
|
-
blockquote, q { quotes: none; }
|
43
|
-
|
44
|
-
blockquote:before, blockquote:after,
|
45
|
-
q:before, q:after { content: ""; content: none; }
|
46
|
-
|
47
|
-
ins { background-color: #ff9; color: #000; text-decoration: none; }
|
48
|
-
|
49
|
-
mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
|
50
|
-
|
51
|
-
del { text-decoration: line-through; }
|
52
|
-
|
53
|
-
abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
|
54
|
-
|
55
|
-
table { border-collapse: collapse; border-spacing: 0; }
|
56
|
-
|
57
|
-
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
|
58
|
-
|
59
|
-
input, select { vertical-align: middle; }
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
|
65
|
-
*/
|
66
|
-
|
67
|
-
|
68
|
-
body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
|
69
|
-
select, input, textarea, button { font:99% sans-serif; }
|
70
|
-
|
71
|
-
/* Normalize monospace sizing:
|
72
|
-
en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
|
73
|
-
pre, code, kbd, samp { font-family: monospace, sans-serif; }
|
74
|
-
|
75
|
-
|
76
|
-
/**
|
77
|
-
* Minimal base styles.
|
78
|
-
*/
|
79
|
-
|
80
|
-
/* Prevent mobile zooming while remain desktop zooming: github.com/shichuan/mobile-html5-boilerplate/issues/closed#issue/14 */
|
81
|
-
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
|
82
|
-
|
83
|
-
/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
|
84
|
-
a:hover, a:active { outline: none; }
|
85
|
-
|
86
|
-
ul, ol { margin-left: 2em; }
|
87
|
-
ol { list-style-type: decimal; }
|
88
|
-
|
89
|
-
/* Remove margins for navigation lists */
|
90
|
-
nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
|
91
|
-
|
92
|
-
small { font-size: 85%; }
|
93
|
-
strong, th { font-weight: bold; }
|
94
|
-
|
95
|
-
td { vertical-align: top; }
|
96
|
-
|
97
|
-
/* Set sub, sup without affecting line-height: gist.github.com/413930 */
|
98
|
-
sub, sup { font-size: 75%; line-height: 0; position: relative; }
|
99
|
-
sup { top: -0.5em; }
|
100
|
-
sub { bottom: -0.25em; }
|
101
|
-
|
102
|
-
pre {
|
103
|
-
/* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
|
104
|
-
white-space: pre; white-space: pre-wrap; word-wrap: break-word;
|
105
|
-
padding: 15px;
|
106
|
-
}
|
107
|
-
|
108
|
-
textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
|
109
|
-
|
110
|
-
.iem7 legend { margin-left: -7px; }
|
111
|
-
|
112
|
-
/* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
|
113
|
-
input[type="radio"] { vertical-align: text-bottom; }
|
114
|
-
input[type="checkbox"] { vertical-align: bottom; }
|
115
|
-
.iem7 input[type="checkbox"] { vertical-align: baseline; }
|
116
|
-
|
117
|
-
/* Hand cursor on clickable input elements */
|
118
|
-
label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
|
119
|
-
|
120
|
-
/* Webkit browsers add a 2px margin outside the chrome of form elements */
|
121
|
-
button, input, select, textarea { margin: 0; }
|
122
|
-
|
123
|
-
/* Colors for form validity */
|
124
|
-
input:valid, textarea:valid { }
|
125
|
-
input:invalid, textarea:invalid {
|
126
|
-
border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red;
|
127
|
-
}
|
128
|
-
.no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
|
129
|
-
|
130
|
-
|
131
|
-
/* These selection declarations have to be separate
|
132
|
-
No text-shadow: twitter.com/miketaylr/status/12228805301
|
133
|
-
Also: hot pink! */
|
134
|
-
::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
|
135
|
-
::selection { background:#FF5E99; color:#fff; text-shadow: none; }
|
136
|
-
|
137
|
-
/* j.mp/webkit-tap-highlight-color */
|
138
|
-
a:link { -webkit-tap-highlight-color: #0000df; }
|
139
|
-
|
140
|
-
/* Make buttons play nice in IE:
|
141
|
-
www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ */
|
142
|
-
button { width: auto; overflow: visible; }
|
143
|
-
|
144
|
-
/* Bicubic resizing for non-native sized IMG:
|
145
|
-
code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
|
146
|
-
.iem7 img { -ms-interpolation-mode: bicubic; }
|
147
|
-
|
148
|
-
|
149
|
-
/**
|
150
|
-
* You might tweak these..
|
151
|
-
*/
|
152
|
-
|
153
|
-
body, select, input, textarea {
|
154
|
-
/* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
|
155
|
-
color: #444;
|
156
|
-
/* Set your base font here, to apply evenly */
|
157
|
-
/* font-family: Georgia, serif; */
|
158
|
-
}
|
159
|
-
|
160
|
-
/* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */
|
161
|
-
h1, h2, h3, h4, h5, h6 { font-weight: bold; }
|
162
|
-
|
163
|
-
a, a:active, a:visited { color: #607890; }
|
164
|
-
a:hover { color: #036; }
|
165
|
-
|
166
|
-
|
167
|
-
/*
|
168
|
-
* Helper classes
|
169
|
-
*/
|
170
|
-
|
171
|
-
/* prevent callout */
|
172
|
-
.nocallout {-webkit-touch-callout: none;}
|
173
|
-
|
174
|
-
/* Text overflow with ellipsis */
|
175
|
-
.ellipsis {
|
176
|
-
text-overflow: ellipsis;
|
177
|
-
overflow: hidden;
|
178
|
-
white-space: nowrap;
|
179
|
-
}
|
180
|
-
|
181
|
-
/* A hack for HTML5 contenteditable attribute on mobile */
|
182
|
-
textarea.contenteditable {-webkit-appearance: none;}
|
183
|
-
|
184
|
-
/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if they have been set as display: none */
|
185
|
-
.gifhidden {position: absolute; left: -100%;}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
/* Primary Styles for mobile
|
190
|
-
Author:
|
191
|
-
*/
|
192
|
-
|
193
|
-
|
194
|
-
/*
|
195
|
-
* Media queries for responsive design https://github.com/shichuan/mobile-html5-boilerplate/wiki/The-Style
|
196
|
-
*/
|
197
|
-
|
198
|
-
|
199
|
-
/* Styles for desktop and large screen ----------- */
|
200
|
-
|
201
|
-
/*styles for 800px and up!*/
|
202
|
-
@media only screen and (min-width: 800px) {
|
203
|
-
/* Styles */
|
204
|
-
}/*/mediaquery*/
|
205
|
-
|
206
|
-
|
207
|
-
/* iPhone 4, Opera Mobile 11 and other high pixel ratio devices ----------- */
|
208
|
-
@media
|
209
|
-
only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
210
|
-
only screen and (-o-min-device-pixel-ratio: 3/2),
|
211
|
-
only screen and (min-device-pixel-ratio: 1.5) {
|
212
|
-
/* Styles */
|
213
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/* Stylesheet for iOS devices */
|
2
|
-
nav{
|
3
|
-
overflow: hidden;
|
4
|
-
}
|
5
|
-
nav .two-col li{
|
6
|
-
margin: .6%;
|
7
|
-
}
|
8
|
-
.pagination a{
|
9
|
-
margin: 0 -2px;
|
10
|
-
}
|
11
|
-
/* @media all and (orientation:portrait) { */
|
12
|
-
/* nav a{ */
|
13
|
-
/* width: 7.4em; */
|
14
|
-
/* width: 96px; */
|
15
|
-
/* } */
|
16
|
-
/* } */
|
17
|
-
/* @media all and (orientation:landscape) { */
|
18
|
-
/* nav a{ */
|
19
|
-
/* width: 11.55em; */
|
20
|
-
/* width: 150px; */
|
21
|
-
/* } */
|
22
|
-
/* } */
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/* Stylesheet for Nokia devices */
|
2
|
-
/* Nokia does not understand float numbers on % nor em */
|
3
|
-
|
4
|
-
nav .threeXthree li{
|
5
|
-
width: 31%;
|
6
|
-
margin: 1%;
|
7
|
-
}
|
8
|
-
.pagination a{
|
9
|
-
line-height: 49px;
|
10
|
-
margin: 0 -2px;
|
11
|
-
padding: 0 5px 8px;
|
12
|
-
}
|
13
|
-
#main h2{
|
14
|
-
font-size: 16px;
|
15
|
-
margin: 1em 0 0;
|
16
|
-
}
|
17
|
-
#main p img{
|
18
|
-
margin: 1em 1em 1em 0;
|
19
|
-
}
|
20
|
-
#main #author{
|
21
|
-
margin: 0 1em 1em 0;
|
22
|
-
}
|
23
|
-
#main #photo{
|
24
|
-
margin-left: 1em;
|
25
|
-
padding-left: 1em;
|
26
|
-
}
|
27
|
-
#main h3{
|
28
|
-
margin-right: 1em;
|
29
|
-
padding-right: 1em;
|
30
|
-
}
|
@@ -1,262 +0,0 @@
|
|
1
|
-
body{
|
2
|
-
background: #fff;
|
3
|
-
margin: 1%;
|
4
|
-
}
|
5
|
-
|
6
|
-
img, object, embed{
|
7
|
-
max-width: 100%;
|
8
|
-
}
|
9
|
-
|
10
|
-
a, a:active, a:visited{
|
11
|
-
color: #007BA8;
|
12
|
-
text-decoration: none;
|
13
|
-
}
|
14
|
-
|
15
|
-
a:hover{
|
16
|
-
color: #007BA8;
|
17
|
-
}
|
18
|
-
|
19
|
-
/* Header */
|
20
|
-
|
21
|
-
#logo{
|
22
|
-
margin: 2.5% 0 0 5%;
|
23
|
-
width: 50%;
|
24
|
-
}
|
25
|
-
|
26
|
-
nav ul{
|
27
|
-
overflow: hidden;
|
28
|
-
}
|
29
|
-
|
30
|
-
nav ul li{
|
31
|
-
float: left;
|
32
|
-
margin: .8%;
|
33
|
-
}
|
34
|
-
|
35
|
-
nav ul .first li:first-child, nav ul .last li:last-child{
|
36
|
-
width: 98.8%;
|
37
|
-
}
|
38
|
-
|
39
|
-
nav .two-col li{
|
40
|
-
width: 49%;
|
41
|
-
}
|
42
|
-
|
43
|
-
nav .three-col li{
|
44
|
-
width: 32%;
|
45
|
-
}
|
46
|
-
|
47
|
-
nav ul a{
|
48
|
-
background: #666;
|
49
|
-
color: #fff;
|
50
|
-
text-align: center;
|
51
|
-
text-shadow: #999 1px 1px 1px;
|
52
|
-
display: block;
|
53
|
-
vertical-align: middle;
|
54
|
-
padding-top: 10px;
|
55
|
-
height: 40px;
|
56
|
-
max-width: 100%;
|
57
|
-
text-decoration: none;
|
58
|
-
}
|
59
|
-
|
60
|
-
nav ul a.active{
|
61
|
-
background: #007BA8;
|
62
|
-
}
|
63
|
-
|
64
|
-
nav ul a, header ul a:active, nav ul a:visited{
|
65
|
-
color: #fff;
|
66
|
-
}
|
67
|
-
|
68
|
-
header select{
|
69
|
-
width: 100%;
|
70
|
-
font-size: 1.4em;
|
71
|
-
}
|
72
|
-
|
73
|
-
/* Content */
|
74
|
-
|
75
|
-
#main{
|
76
|
-
background: #fff;
|
77
|
-
overflow: hidden;
|
78
|
-
}
|
79
|
-
|
80
|
-
p{
|
81
|
-
clear: both;
|
82
|
-
margin: 1em 0;
|
83
|
-
}
|
84
|
-
|
85
|
-
p img{
|
86
|
-
float: left;
|
87
|
-
width: 50%;
|
88
|
-
margin: .5em .5em .5em 0;
|
89
|
-
}
|
90
|
-
|
91
|
-
h2{
|
92
|
-
color: #007BA8;
|
93
|
-
font-size: 1.4em;
|
94
|
-
margin: .8em 0 0;
|
95
|
-
}
|
96
|
-
|
97
|
-
#author{
|
98
|
-
margin: 0 .3em 1em 0;
|
99
|
-
font-weight: bold;
|
100
|
-
}
|
101
|
-
|
102
|
-
#photo{
|
103
|
-
border-left: 1px solid #666;
|
104
|
-
margin-left: .5em;
|
105
|
-
padding-left: .5em;
|
106
|
-
}
|
107
|
-
|
108
|
-
h3{
|
109
|
-
display: inline;
|
110
|
-
color: #691315;
|
111
|
-
border-right: 1px solid #666;
|
112
|
-
margin-right: .5em;
|
113
|
-
padding-right: .5em;
|
114
|
-
}
|
115
|
-
|
116
|
-
/* Submenu Box Template */
|
117
|
-
|
118
|
-
.submenu{
|
119
|
-
text-align: center;
|
120
|
-
padding: 1em 0;
|
121
|
-
}
|
122
|
-
|
123
|
-
.submenu select{
|
124
|
-
width: 100%;
|
125
|
-
}
|
126
|
-
|
127
|
-
/* news_block Box Template */
|
128
|
-
|
129
|
-
.news_block{
|
130
|
-
margin: .3em 0;
|
131
|
-
list-style-type: none;
|
132
|
-
}
|
133
|
-
|
134
|
-
.news_block h2{
|
135
|
-
font-family: Georgia, Serif;
|
136
|
-
margin-top: 0;
|
137
|
-
}
|
138
|
-
|
139
|
-
.news_block li{
|
140
|
-
overflow: hidden;
|
141
|
-
margin-bottom: .2em;
|
142
|
-
padding: .5em 1.5em .5em 0;
|
143
|
-
}
|
144
|
-
|
145
|
-
.news_block .even{
|
146
|
-
background: #fff;
|
147
|
-
}
|
148
|
-
|
149
|
-
.news_block .odd{
|
150
|
-
background: #ccc;
|
151
|
-
}
|
152
|
-
|
153
|
-
.news_block .img{
|
154
|
-
float: left;
|
155
|
-
width: 20%;
|
156
|
-
margin-right: .5em;
|
157
|
-
}
|
158
|
-
|
159
|
-
.news_block .img img{
|
160
|
-
width: 100%;
|
161
|
-
}
|
162
|
-
|
163
|
-
.news_block .time-ago{
|
164
|
-
color: #898989;
|
165
|
-
font-size: .6em;
|
166
|
-
}
|
167
|
-
|
168
|
-
/* news_show Box Template */
|
169
|
-
|
170
|
-
.news_show{
|
171
|
-
font-size: 1.2em;
|
172
|
-
}
|
173
|
-
|
174
|
-
.news_show h1{
|
175
|
-
font-size: 1.4em;
|
176
|
-
font-weight: bold;
|
177
|
-
color: #000;
|
178
|
-
margin: 1em 0 .2em;
|
179
|
-
}
|
180
|
-
|
181
|
-
.news_show .redacao{
|
182
|
-
font-size: .8em;
|
183
|
-
}
|
184
|
-
|
185
|
-
.news_show .redacao strong{
|
186
|
-
font-weight: normal;
|
187
|
-
}
|
188
|
-
|
189
|
-
/* Sub-categories */
|
190
|
-
|
191
|
-
.sub-categories{
|
192
|
-
list-style-type: none;
|
193
|
-
margin: 0;
|
194
|
-
}
|
195
|
-
.sub-categories h2{
|
196
|
-
font-family: Georgia, Serif;
|
197
|
-
margin: .8em 0 0;
|
198
|
-
}
|
199
|
-
.sub-categories h3{
|
200
|
-
display: block;
|
201
|
-
border-right: 0;
|
202
|
-
padding-right: 0;
|
203
|
-
margin-right: 0;
|
204
|
-
}
|
205
|
-
.sub-categories h2 a {
|
206
|
-
color: #9a4662;
|
207
|
-
}
|
208
|
-
.sub-categories li {
|
209
|
-
background: url(../img/high/arrow.png) no-repeat 98% center;
|
210
|
-
padding: 1em 0;
|
211
|
-
overflow: hidden;
|
212
|
-
border-bottom: 1px dotted #666;
|
213
|
-
}
|
214
|
-
.sub-categories img{
|
215
|
-
float: left;
|
216
|
-
width: 20%;
|
217
|
-
margin-right: .5em;
|
218
|
-
}
|
219
|
-
|
220
|
-
/* Paginator */
|
221
|
-
|
222
|
-
.pagination{
|
223
|
-
text-align: center;
|
224
|
-
margin: 5% auto;
|
225
|
-
overflow: hidden;
|
226
|
-
}
|
227
|
-
.pagination a{
|
228
|
-
background: url(../img/high/pag-bg.png) repeat-x;
|
229
|
-
display: inline-block;
|
230
|
-
font-size: 1.4em;
|
231
|
-
line-height: 52px;
|
232
|
-
padding: 0 .5em 1em;
|
233
|
-
}
|
234
|
-
.pagination .active{
|
235
|
-
text-decoration: underline;
|
236
|
-
}
|
237
|
-
.pagination .prev_page, .pagination .next_page{
|
238
|
-
text-indent: -15000px;
|
239
|
-
width: 58px;
|
240
|
-
padding: 0 0 10px;
|
241
|
-
}
|
242
|
-
.pagination .prev_page{
|
243
|
-
background: url(../img/high/pag-prev-next.png) no-repeat left center;
|
244
|
-
}
|
245
|
-
.pagination .next_page{
|
246
|
-
background: url(../img/high/pag-prev-next.png) no-repeat right center;
|
247
|
-
}
|
248
|
-
|
249
|
-
/* Rodapé Hands Subnavegacao */
|
250
|
-
|
251
|
-
.subnavegacao { height:42px; width:100%; background:#efefef; border-top:1px solid #ccc; padding:0; clear:both; margin:0; line-height:0; }
|
252
|
-
.subnavegacao_icone { width:50px; height:42px; background:#efefef; line-height:0; margin:0; float:left; }
|
253
|
-
.subnavegacao_texto { height:30px; padding:12px 0 0 0; background:#efefef; margin:0; }
|
254
|
-
.subnavegacao_texto a { font-size:medium; color:#333333; line-height:100%; }
|
255
|
-
#subnavegacao_topo { background:url(http://w.hands.com.br/images/subnavegacao_topo.gif) no-repeat center center; }
|
256
|
-
#subnavegacao_home { background:url(http://w.hands.com.br/images/subnavegacao_home.gif) no-repeat center center; }
|
257
|
-
#subnavegacao_voltar { background:url(http://w.hands.com.br/images/subnavegacao_voltar.gif) no-repeat center center; }
|
258
|
-
#subnavegacao_web { background:url(http://w.hands.com.br/images/subnavegacao_web.gif) no-repeat center center; }
|
259
|
-
.rodape { background:#999; padding:8px 0 8px 0; text-align:center; }
|
260
|
-
.rodape p { font-size:small; font-weight:bold; margin:0; }
|
261
|
-
.rodape a { color:#333; text-decoration:underline; }
|
262
|
-
.rodape img { display:block; }
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# Configure Rails Envinronment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
-
require "rails/test_help"
|
6
|
-
require "rspec/rails"
|
7
|
-
|
8
|
-
ActionMailer::Base.delivery_method = :test
|
9
|
-
ActionMailer::Base.perform_deliveries = true
|
10
|
-
ActionMailer::Base.default_url_options[:host] = "test.com"
|
11
|
-
|
12
|
-
Rails.backtrace_cleaner.remove_silencers!
|
13
|
-
|
14
|
-
# Configure capybara for integration testing
|
15
|
-
require "capybara/rails"
|
16
|
-
Capybara.default_driver = :rack_test
|
17
|
-
Capybara.default_selector = :css
|
18
|
-
|
19
|
-
# Run any available migration
|
20
|
-
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
21
|
-
|
22
|
-
# Load support files
|
23
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
24
|
-
|
25
|
-
RSpec.configure do |config|
|
26
|
-
# Remove this line if you don't want RSpec's should and should_not
|
27
|
-
# methods or matchers
|
28
|
-
require 'rspec/expectations'
|
29
|
-
config.include RSpec::Matchers
|
30
|
-
|
31
|
-
# == Mock Framework
|
32
|
-
config.mock_with :rspec
|
33
|
-
end
|