marilyn 0.0.2 → 0.0.3
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/lib/generators/marilyn/fish/app/assets/stylesheets/application.css +8 -0
- data/lib/generators/marilyn/fish/app/assets/stylesheets/reset.css +250 -0
- data/lib/generators/marilyn/fish/app/views/layouts/application.html.erb +4 -2
- data/lib/generators/marilyn/fish/db/migrate/add_default_user.rb +18 -0
- data/lib/generators/marilyn/fish/fish_generator.rb +33 -8
- data/lib/generators/marilyn/fish/lib/templates/erb/controller/view.html.erb +4 -0
- data/lib/marilyn/version.rb +1 -1
- data/marilyn.gemspec +2 -2
- metadata +12 -22
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require reset
|
6
|
+
*= require_self
|
7
|
+
*= require_tree .
|
8
|
+
*/
|
@@ -0,0 +1,250 @@
|
|
1
|
+
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
2
|
+
abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
|
3
|
+
small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
|
4
|
+
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
|
5
|
+
article, aside, canvas, details, figcaption, figure, footer, header, hgroup,
|
6
|
+
menu, nav, section, summary, time, mark, audio, video {
|
7
|
+
margin: 0;
|
8
|
+
padding: 0;
|
9
|
+
border: 0;
|
10
|
+
outline: 0;
|
11
|
+
font-size: 100%;
|
12
|
+
vertical-align: baseline;
|
13
|
+
background: transparent;
|
14
|
+
}
|
15
|
+
|
16
|
+
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
17
|
+
display: block;
|
18
|
+
}
|
19
|
+
|
20
|
+
nav ul {
|
21
|
+
list-style: none;
|
22
|
+
}
|
23
|
+
|
24
|
+
blockquote, q {
|
25
|
+
quotes: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
blockquote:before, blockquote:after,
|
29
|
+
q:before, q:after {
|
30
|
+
content: '';
|
31
|
+
content: none;
|
32
|
+
}
|
33
|
+
|
34
|
+
a {
|
35
|
+
margin: 0;
|
36
|
+
padding: 0;
|
37
|
+
font-size: 100%;
|
38
|
+
vertical-align: baseline;
|
39
|
+
background: transparent;
|
40
|
+
}
|
41
|
+
|
42
|
+
ins {
|
43
|
+
background-color: #ff9;
|
44
|
+
color: #000;
|
45
|
+
text-decoration: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
mark {
|
49
|
+
background-color: #ff9;
|
50
|
+
color: #000;
|
51
|
+
font-style: italic;
|
52
|
+
font-weight: bold;
|
53
|
+
}
|
54
|
+
|
55
|
+
del {
|
56
|
+
text-decoration: line-through;
|
57
|
+
}
|
58
|
+
|
59
|
+
abbr[title], dfn[title] {
|
60
|
+
border-bottom: 1px dotted;
|
61
|
+
cursor: help;
|
62
|
+
}
|
63
|
+
|
64
|
+
table {
|
65
|
+
border-collapse: collapse;
|
66
|
+
border-spacing: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
hr {
|
70
|
+
display: block;
|
71
|
+
height: 1px;
|
72
|
+
border: 0;
|
73
|
+
border-top: 1px solid #ccc;
|
74
|
+
margin: 1em 0;
|
75
|
+
padding: 0;
|
76
|
+
}
|
77
|
+
|
78
|
+
input, select {
|
79
|
+
vertical-align: middle;
|
80
|
+
}
|
81
|
+
|
82
|
+
pre, code, kbd, samp {
|
83
|
+
font-family: monospace, sans-serif;
|
84
|
+
}
|
85
|
+
|
86
|
+
h1, h2, h3, h4, h5, h6 {
|
87
|
+
font-weight: normal;
|
88
|
+
}
|
89
|
+
|
90
|
+
html {
|
91
|
+
overflow-y: scroll;
|
92
|
+
}
|
93
|
+
|
94
|
+
ul, ol {
|
95
|
+
margin-left: 1.25em;
|
96
|
+
}
|
97
|
+
|
98
|
+
ol {
|
99
|
+
list-style-type: decimal;
|
100
|
+
}
|
101
|
+
|
102
|
+
a:active {
|
103
|
+
outline: none;
|
104
|
+
}
|
105
|
+
|
106
|
+
nav ul, nav li {
|
107
|
+
margin: 0;
|
108
|
+
}
|
109
|
+
|
110
|
+
small {
|
111
|
+
font-size: 85%;
|
112
|
+
}
|
113
|
+
|
114
|
+
strong, th {
|
115
|
+
font-weight: bold;
|
116
|
+
}
|
117
|
+
|
118
|
+
td, td img {
|
119
|
+
vertical-align: top;
|
120
|
+
}
|
121
|
+
|
122
|
+
sub {
|
123
|
+
vertical-align: sub;
|
124
|
+
font-size: smaller;
|
125
|
+
}
|
126
|
+
|
127
|
+
sup {
|
128
|
+
vertical-align: super;
|
129
|
+
font-size: smaller;
|
130
|
+
}
|
131
|
+
|
132
|
+
pre {
|
133
|
+
padding: 15px;
|
134
|
+
white-space: pre;
|
135
|
+
white-space: pre-wrap;
|
136
|
+
white-space: pre-line;
|
137
|
+
word-wrap: break-word;
|
138
|
+
}
|
139
|
+
|
140
|
+
textarea {
|
141
|
+
overflow: auto;
|
142
|
+
}
|
143
|
+
|
144
|
+
.ie6 legend, .ie7 legend {
|
145
|
+
margin-left: -7px;
|
146
|
+
}
|
147
|
+
|
148
|
+
input[type="radio"] {
|
149
|
+
margin-right: 2px;
|
150
|
+
vertical-align: text-bottom;
|
151
|
+
}
|
152
|
+
|
153
|
+
input[type="checkbox"] {
|
154
|
+
margin-right: 2px;
|
155
|
+
vertical-align: bottom;
|
156
|
+
}
|
157
|
+
|
158
|
+
.ie7 input[type="checkbox"] {
|
159
|
+
vertical-align: baseline;
|
160
|
+
}
|
161
|
+
|
162
|
+
.ie6 input {
|
163
|
+
vertical-align: text-bottom;
|
164
|
+
}
|
165
|
+
|
166
|
+
label, input[type="button"], input[type="submit"], button {
|
167
|
+
cursor: pointer;
|
168
|
+
}
|
169
|
+
|
170
|
+
button, input, select, textarea {
|
171
|
+
margin: 0;
|
172
|
+
}
|
173
|
+
|
174
|
+
input:valid, textarea:valid {
|
175
|
+
}
|
176
|
+
|
177
|
+
input:invalid, textarea:invalid {
|
178
|
+
border-radius: 1px;
|
179
|
+
-moz-box-shadow: 0 0 5px red;
|
180
|
+
-webkit-box-shadow: 0 0 5px red;
|
181
|
+
box-shadow: 0 0 5px red;
|
182
|
+
}
|
183
|
+
|
184
|
+
.no-boxshadow input:invalid,
|
185
|
+
.no-boxshadow textarea:invalid {
|
186
|
+
background-color: #f0dddd;
|
187
|
+
}
|
188
|
+
|
189
|
+
button {
|
190
|
+
width: auto;
|
191
|
+
overflow: visible;
|
192
|
+
}
|
193
|
+
|
194
|
+
.ie7 img {
|
195
|
+
-ms-interpolation-mode: bicubic;
|
196
|
+
}
|
197
|
+
|
198
|
+
.g-ir {
|
199
|
+
display: block;
|
200
|
+
text-indent: -999em;
|
201
|
+
overflow: hidden;
|
202
|
+
background-repeat: no-repeat;
|
203
|
+
text-align: left;
|
204
|
+
direction: ltr;
|
205
|
+
}
|
206
|
+
|
207
|
+
.g-hidden {
|
208
|
+
display: none;
|
209
|
+
visibility: hidden;
|
210
|
+
}
|
211
|
+
|
212
|
+
.g-visuallyhidden {
|
213
|
+
position: absolute !important;
|
214
|
+
clip: rect(1px 1px 1px 1px);
|
215
|
+
clip: rect(1px, 1px, 1px, 1px);
|
216
|
+
}
|
217
|
+
|
218
|
+
.g-invisible {
|
219
|
+
visibility: hidden;
|
220
|
+
}
|
221
|
+
|
222
|
+
.g-clearfix:before, .g-clearfix:after {
|
223
|
+
content: "\0020";
|
224
|
+
display: block;
|
225
|
+
height: 0;
|
226
|
+
visibility: hidden;
|
227
|
+
}
|
228
|
+
|
229
|
+
.g-clearfix:after {
|
230
|
+
clear: both;
|
231
|
+
}
|
232
|
+
|
233
|
+
.g-clearfix {
|
234
|
+
zoom: 1;
|
235
|
+
}
|
236
|
+
|
237
|
+
.g-clear {
|
238
|
+
clear: both;
|
239
|
+
display: block;
|
240
|
+
height: 0;
|
241
|
+
visibility: hidden;
|
242
|
+
width: 100%;
|
243
|
+
}
|
244
|
+
|
245
|
+
/* Overrides extra padding in Firefox */
|
246
|
+
button::-moz-focus-inner,
|
247
|
+
input[type="submit"]::-moz-focus-inner {
|
248
|
+
padding: 0;
|
249
|
+
border: none;
|
250
|
+
}
|
@@ -2,9 +2,11 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%= yield(:title).blank? ? '' : "#{yield(:title)} :: " %><%= t('site_name') %></title>
|
5
|
-
<%= stylesheet_link_tag :
|
6
|
-
<%= javascript_include_tag :
|
5
|
+
<%= stylesheet_link_tag :application %>
|
6
|
+
<%= javascript_include_tag :application %>
|
7
7
|
<%= csrf_meta_tag %>
|
8
|
+
|
9
|
+
<%= yield(:head) %>
|
8
10
|
</head>
|
9
11
|
<body>
|
10
12
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class AddDefaultUser < ActiveRecord::Migration
|
2
|
+
DEFAULT_ADMIN_EMAIL = 'admin@black-sheep.ru'
|
3
|
+
DEFAULT_ADMIN_PASSWORD = 'admin_,tt'
|
4
|
+
|
5
|
+
def self.up
|
6
|
+
return if User.find_by_email(DEFAULT_ADMIN_EMAIL)
|
7
|
+
|
8
|
+
admin = User.create(:email => DEFAULT_ADMIN_EMAIL,
|
9
|
+
:password => DEFAULT_ADMIN_PASSWORD)
|
10
|
+
admin.save
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
admin = User.find_by_email(DEFAULT_ADMIN_EMAIL)
|
15
|
+
admin.delete if admin
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rails/generators/base'
|
2
2
|
require 'devise'
|
3
|
-
require 'jquery-rails'
|
3
|
+
#require 'jquery-rails'
|
4
4
|
|
5
5
|
module Marilyn
|
6
6
|
module Generators
|
@@ -26,7 +26,7 @@ module Marilyn
|
|
26
26
|
copy_file('app/views/shared/_error_messages.html.erb')
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def copy_locales
|
30
30
|
en_locale_file = 'config/locales/en.yml'
|
31
31
|
copy_file(en_locale_file, :force => force_change?(en_locale_file))
|
32
32
|
copy_file('config/locales/ru.yml')
|
@@ -37,6 +37,12 @@ module Marilyn
|
|
37
37
|
invoke('marilyn:stars_form')
|
38
38
|
end
|
39
39
|
|
40
|
+
def copy_reset_css
|
41
|
+
application_css_file = 'app/assets/stylesheets/application.css'
|
42
|
+
copy_file(application_css_file, :force => force_change?(application_css_file))
|
43
|
+
copy_file('app/assets/stylesheets/reset.css')
|
44
|
+
end
|
45
|
+
|
40
46
|
def invoke_welcome_controller_generator
|
41
47
|
log :invoke, 'marilyn:welcome'
|
42
48
|
invoke('marilyn:welcome')
|
@@ -46,17 +52,32 @@ module Marilyn
|
|
46
52
|
install_gem_into_gemfile('russian')
|
47
53
|
end
|
48
54
|
|
49
|
-
def invoke_jquery_rails
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
end
|
55
|
+
#def invoke_jquery_rails
|
56
|
+
# log :invoke, 'jquery:install'
|
57
|
+
# invoke('jquery:install', [], :ui => true)
|
58
|
+
# install_gem_into_gemfile('jquery-rails')
|
59
|
+
#end
|
54
60
|
|
55
|
-
def
|
61
|
+
def install_devise
|
56
62
|
log :invoke, 'devise'
|
57
63
|
invoke('devise:install')
|
58
64
|
invoke('devise', ['User'])
|
59
65
|
install_gem_into_gemfile('devise')
|
66
|
+
|
67
|
+
last_line_regexp = /config\.assets\.debug = true\n/
|
68
|
+
inject_into_file('config/environments/development.rb', action_mailer_str('localhost:3000'),
|
69
|
+
:after => last_line_regexp)
|
70
|
+
|
71
|
+
last_line_regexp = /config\.active_support\.deprecation = :notify\n/
|
72
|
+
inject_into_file('config/environments/production.rb', action_mailer_str('black-sheep.ru'),
|
73
|
+
:after => last_line_regexp)
|
74
|
+
end
|
75
|
+
|
76
|
+
def copy_default_user_migration
|
77
|
+
migration_path = 'db/migrate/'
|
78
|
+
migration_file = 'add_default_user.rb'
|
79
|
+
copy_file("#{migration_path}#{migration_file}",
|
80
|
+
"#{migration_path}#{Time.now.strftime('%Y%m%d%H%M%S')}_#{migration_file}")
|
60
81
|
end
|
61
82
|
|
62
83
|
def invoke_cancan_ability
|
@@ -81,6 +102,10 @@ module Marilyn
|
|
81
102
|
marilyn_gem_regexp = /gem..marilyn..*\n/
|
82
103
|
inject_into_file('Gemfile', "gem '#{gem_name}'\n", :after => marilyn_gem_regexp)
|
83
104
|
end
|
105
|
+
|
106
|
+
def action_mailer_str(host)
|
107
|
+
"\n config.action_mailer.default_url_options = { :host => '#{host}' }\n"
|
108
|
+
end
|
84
109
|
end
|
85
110
|
end
|
86
111
|
end
|
data/lib/marilyn/version.rb
CHANGED
data/marilyn.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.add_dependency 'cancan'
|
23
23
|
s.add_dependency 'devise'
|
24
|
-
s.add_dependency 'jquery-rails'
|
25
|
-
s.add_dependency 'railties', '>= 3.
|
24
|
+
#s.add_dependency 'jquery-rails'
|
25
|
+
s.add_dependency 'railties', '>= 3.1.0'
|
26
26
|
|
27
27
|
# specify any dependencies here; for example:
|
28
28
|
# s.add_development_dependency "rspec"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marilyn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Gleb Averchuk
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08
|
18
|
+
date: 2011-09-08 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: cancan
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
type: :runtime
|
47
47
|
version_requirements: *id002
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
49
|
+
name: railties
|
50
50
|
prerelease: false
|
51
51
|
requirement: &id003 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
@@ -55,26 +55,12 @@ dependencies:
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
hash: 3
|
57
57
|
segments:
|
58
|
-
- 0
|
59
|
-
version: "0"
|
60
|
-
type: :runtime
|
61
|
-
version_requirements: *id003
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: railties
|
64
|
-
prerelease: false
|
65
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
hash: 7
|
71
|
-
segments:
|
72
58
|
- 3
|
59
|
+
- 1
|
73
60
|
- 0
|
74
|
-
|
75
|
-
version: 3.0.0
|
61
|
+
version: 3.1.0
|
76
62
|
type: :runtime
|
77
|
-
version_requirements: *
|
63
|
+
version_requirements: *id003
|
78
64
|
description: Provides a good templates for the generators instead of the Rails standard, as well as some minimal required files.
|
79
65
|
email:
|
80
66
|
- altermn@gmail.com
|
@@ -91,12 +77,16 @@ files:
|
|
91
77
|
- Rakefile
|
92
78
|
- lib/generators/marilyn/email_validator/email_validator_generator.rb
|
93
79
|
- lib/generators/marilyn/email_validator/lib/email_format_validator.rb
|
80
|
+
- lib/generators/marilyn/fish/app/assets/stylesheets/application.css
|
81
|
+
- lib/generators/marilyn/fish/app/assets/stylesheets/reset.css
|
94
82
|
- lib/generators/marilyn/fish/app/helpers/application_helper.rb
|
95
83
|
- lib/generators/marilyn/fish/app/views/layouts/application.html.erb
|
96
84
|
- lib/generators/marilyn/fish/app/views/shared/_error_messages.html.erb
|
97
85
|
- lib/generators/marilyn/fish/config/locales/en.yml
|
98
86
|
- lib/generators/marilyn/fish/config/locales/ru.yml
|
87
|
+
- lib/generators/marilyn/fish/db/migrate/add_default_user.rb
|
99
88
|
- lib/generators/marilyn/fish/fish_generator.rb
|
89
|
+
- lib/generators/marilyn/fish/lib/templates/erb/controller/view.html.erb
|
100
90
|
- lib/generators/marilyn/fish/lib/templates/erb/scaffold/_form.html.erb
|
101
91
|
- lib/generators/marilyn/fish/lib/templates/erb/scaffold/edit.html.erb
|
102
92
|
- lib/generators/marilyn/fish/lib/templates/erb/scaffold/index.html.erb
|