playmo 0.0.17 → 0.0.18
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/playmo.rb +2 -0
- data/lib/playmo/recipes/rspec_recipe.rb +2 -2
- data/lib/playmo/recipes/rvm_recipe.rb +3 -1
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/application.css.scss +1 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_buttons.css.scss +37 -0
- data/lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_forms.css.scss +3 -71
- data/lib/playmo/recipes/templates/thinking_sphinx_recipe/sphinx.yml +14 -0
- data/lib/playmo/recipes/templates/unicorn_recipe/unicorn.rb +38 -0
- data/lib/playmo/recipes/thinking_sphinx_recipe.rb +26 -0
- data/lib/playmo/recipes/unicorn_recipe.rb +20 -0
- data/lib/playmo/version.rb +1 -1
- metadata +16 -11
data/lib/playmo.rb
CHANGED
@@ -34,5 +34,5 @@ module Playmo
|
|
34
34
|
end
|
35
35
|
|
36
36
|
# Write down this recipe to our Cookbook if it's available
|
37
|
-
require File.dirname(__FILE__) + '/
|
38
|
-
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::
|
37
|
+
require File.dirname(__FILE__) + '/thinking_sphinx_recipe'
|
38
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::ThinkingSphinxRecipe, Playmo::Recipes::RspecRecipe) if defined?(Playmo::Cookbook)
|
@@ -15,6 +15,7 @@
|
|
15
15
|
// Or, you can import the "overrides" partial if
|
16
16
|
// you want more control over individual mixins
|
17
17
|
@import "partials/overrides";
|
18
|
+
@import "partials/buttons";
|
18
19
|
|
19
20
|
// Finally, put your own styles in these partials
|
20
21
|
// and add more as needed (i.e. forms, tables, nav)
|
@@ -0,0 +1,37 @@
|
|
1
|
+
@import "compass/css3/border-radius";
|
2
|
+
@import "compass/css3/box-shadow";
|
3
|
+
@import "compass/css3/gradient";
|
4
|
+
@import "compass/css3/inline-block";
|
5
|
+
|
6
|
+
/* clean gray
|
7
|
+
*******************************************************************************/
|
8
|
+
@mixin clean-gray {
|
9
|
+
@include linear-gradient(color-stops(#eee, #ccc));
|
10
|
+
@include inline-block;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-bottom: 1px solid #bbb;
|
13
|
+
@include border-radius(3px);
|
14
|
+
color: #333;
|
15
|
+
font: bold 100% "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
16
|
+
line-height: 1;
|
17
|
+
padding: 8px 20px;
|
18
|
+
text-align: center;
|
19
|
+
text-shadow: 0 1px 0 #eee;
|
20
|
+
text-decoration: none;
|
21
|
+
|
22
|
+
&:hover {
|
23
|
+
@include linear-gradient(color-stops(#ddd, #bbb));
|
24
|
+
border: 1px solid #bbb;
|
25
|
+
border-bottom: 1px solid #999;
|
26
|
+
cursor: pointer;
|
27
|
+
text-shadow: 0 1px 0 #ddd;
|
28
|
+
}
|
29
|
+
|
30
|
+
&:active {
|
31
|
+
border: 1px solid #aaa;
|
32
|
+
border-bottom: 1px solid #888;
|
33
|
+
@include single-box-shadow(inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
button.clean-gray, a.clean-gray { @include clean-gray; }
|
@@ -59,76 +59,8 @@ form {
|
|
59
59
|
|
60
60
|
// Buttons
|
61
61
|
input[type=submit],
|
62
|
-
input[type=button]
|
63
|
-
|
64
|
-
|
65
|
-
border: 1px solid #ddd;
|
66
|
-
border-right: 1px solid #bbb;
|
67
|
-
-moz-border-radius: 4px;
|
68
|
-
-webkit-border-radius: 4px;
|
69
|
-
border-radius: 4px;
|
70
|
-
background: #EEEEEE;
|
71
|
-
background: -moz-linear-gradient(top, #EEEEEE 0%, #D5D5D5 100%);
|
72
|
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#EEEEEE), color-stop(100%,#D5D5D5));
|
73
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#EEEEEE', endColorstr='#D5D5D5',GradientType=0 );
|
74
|
-
color: #333;
|
75
|
-
text-shadow: 0 1px 1 #fff;
|
76
|
-
cursor: hand;
|
77
|
-
cursor: pointer;
|
78
|
-
box-shadow: inset 0 1px 10px 1px #ddd,
|
79
|
-
0px 1px 0 #ddd,
|
80
|
-
0 3px 0px #bbb,
|
81
|
-
0 3px 1px 0 #000;
|
82
|
-
|
83
|
-
-webkit-box-shadow: inset 0 1px 10px 1px #ddd,
|
84
|
-
0px 1px 0 #ddd,
|
85
|
-
0 3px 0px #bbb,
|
86
|
-
0 3px 1px 0 #000;
|
87
|
-
-moz-box-shadow: inset 0 1px 10px 1px #ddd,
|
88
|
-
0px 1px 0 #ddd,
|
89
|
-
0 3px 0px #bbb,
|
90
|
-
0 3px 1px 0 #000;
|
91
|
-
|
92
|
-
|
93
|
-
margin: -2px 0 10px 0;
|
94
|
-
outline: none;
|
95
|
-
-moz-outline: none;
|
96
|
-
}
|
97
|
-
|
98
|
-
input[type=submit]:hover,
|
99
|
-
input[type=submit]:focus,
|
100
|
-
input[type=button]:hover,
|
101
|
-
input[type=button]:focus {
|
102
|
-
border: 1px solid #50B7D1;
|
103
|
-
border-right: 1px solid #286DA3;
|
104
|
-
background: #50B7D1;
|
105
|
-
background: -moz-linear-gradient(top, #50B7D1 0%, #286DA3 100%);
|
106
|
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#50B7D1), color-stop(100%,#286DA3));
|
107
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#50B7D1', endColorstr='#286DA3',GradientType=0 );
|
108
|
-
color: #fff;
|
109
|
-
text-shadow: -1px -1px 0 #333;
|
110
|
-
box-shadow: inset 0 1px 10px 1px #50B7D1,
|
111
|
-
0px 1px 0 #367B8C,
|
112
|
-
0 3px 0px #286DA3,
|
113
|
-
0 3px 1px 0 #000;
|
114
|
-
-webkit-box-shadow: inset 0 1px 10px 1px #50B7D1,
|
115
|
-
0px 1px 0 #367B8C,
|
116
|
-
0 3px 0px #286DA3,
|
117
|
-
0 3px 1px 0 #000;
|
118
|
-
-moz-box-shadow: inset 0 1px 10px 1px #50B7D1,
|
119
|
-
0px 1px 0 #367B8C,
|
120
|
-
0 3px 0px #286DA3,
|
121
|
-
0 3px 1px 0 #000;
|
122
|
-
}
|
123
|
-
|
124
|
-
input[type=submit]:active,
|
125
|
-
input[type=button]:active {
|
126
|
-
border: 1px solid #286DA3;
|
127
|
-
border-right: 1px solid #50B7D1;
|
128
|
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#286DA3', endColorstr='#50B7D1',GradientType=0 );
|
129
|
-
box-shadow: -1px -1px 0 #225C8A;
|
130
|
-
-webkit-box-shadow: -1px -1px 0 #225C8A;
|
131
|
-
-moz-box-shadow: -1px -1px 0 #225C8A;
|
132
|
-
margin: 0 0 8px 0;
|
62
|
+
input[type=button],
|
63
|
+
button {
|
64
|
+
@include clean-gray;
|
133
65
|
}
|
134
66
|
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
production:
|
2
|
+
min_prefix_len: 2
|
3
|
+
enable_star: 1
|
4
|
+
morphology: "stem_ru, stem_en"
|
5
|
+
pid_file: /home/<%= application_name %>/htdocs/shared/pids/searchd.pid
|
6
|
+
searchd_file_path: /home/<%= application_name %>/htdocs/shared/db/sphinx
|
7
|
+
development:
|
8
|
+
min_prefix_len: 2
|
9
|
+
enable_star: 1
|
10
|
+
morphology: "stem_ru, stem_en"
|
11
|
+
test:
|
12
|
+
min_prefix_len: 2
|
13
|
+
enable_star: 1
|
14
|
+
morphology: "stem_ru, stem_en"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
deploy_to = "/home/<%= application_name %>/htdocs"
|
2
|
+
rails_root = "#{deploy_to}/current"
|
3
|
+
pid_file = "#{deploy_to}/shared/pids/unicorn.pid"
|
4
|
+
socket_file = "#{deploy_to}/shared/sockets/unicorn.sock"
|
5
|
+
log_file = "#{rails_root}/log/unicorn.log"
|
6
|
+
err_log = "#{rails_root}/log/unicorn_error.log"
|
7
|
+
old_pid = pid_file + '.oldbin'
|
8
|
+
|
9
|
+
timeout 30
|
10
|
+
worker_processes 2
|
11
|
+
listen socket_file, :backlog => 1024
|
12
|
+
pid pid_file
|
13
|
+
stderr_path err_log
|
14
|
+
stdout_path log_file
|
15
|
+
preload_app true
|
16
|
+
|
17
|
+
GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=)
|
18
|
+
|
19
|
+
before_exec do |server|
|
20
|
+
ENV["BUNDLE_GEMFILE"] = "#{rails_root}/Gemfile"
|
21
|
+
end
|
22
|
+
|
23
|
+
before_fork do |server, worker|
|
24
|
+
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
|
25
|
+
|
26
|
+
if File.exists?(old_pid) && server.pid != old_pid
|
27
|
+
begin
|
28
|
+
Process.kill("QUIT", File.read(old_pid).to_i)
|
29
|
+
rescue Errno::ENOENT, Errno::ESRCH
|
30
|
+
# someone else did our job for us
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
after_fork do |server, worker|
|
36
|
+
defined?(ActiveRecord::Base) and
|
37
|
+
ActiveRecord::Base.establish_connection
|
38
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Playmo
|
2
|
+
module Recipes
|
3
|
+
class ThinkingSphinxRecipe < Playmo::Recipe
|
4
|
+
source_root File.expand_path('../templates/thinking_sphinx_recipe', __FILE__)
|
5
|
+
|
6
|
+
def setup
|
7
|
+
question "Would you like to use Thinking Sphinx in this project?" => :install_ts
|
8
|
+
end
|
9
|
+
|
10
|
+
protected
|
11
|
+
|
12
|
+
def install_ts
|
13
|
+
gem 'thinking-sphinx', '~> 2.0.10'
|
14
|
+
|
15
|
+
# TODO Add Whenever integration (see https://github.com/nesquena/cap-recipes)
|
16
|
+
Event.events.listen(:after_install) do |event_data|
|
17
|
+
template 'sphinx.yml', 'config/sphinx.yml'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Write down this recipe to our Cookbook if it's available
|
25
|
+
require File.dirname(__FILE__) + '/unicorn_recipe'
|
26
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::UnicornRecipe, Playmo::Recipes::ThinkingSphinxRecipe) if defined?(Playmo::Cookbook)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Playmo
|
2
|
+
module Recipes
|
3
|
+
class UnicornRecipe < Playmo::Recipe
|
4
|
+
source_root File.expand_path('../templates/unicorn_recipe', __FILE__)
|
5
|
+
|
6
|
+
def setup
|
7
|
+
question "Would you like to use Unicorn as web server in production?" => :install_compass
|
8
|
+
end
|
9
|
+
|
10
|
+
def install_compass
|
11
|
+
gem "unicorn", :group => :production
|
12
|
+
template "unicorn.rb", "config/unicorn.rb"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Write down this recipe to our Cookbook if it's available
|
19
|
+
require File.dirname(__FILE__) + '/application_helper_recipe'
|
20
|
+
Playmo::Cookbook.instance.insert_after(Playmo::Recipes::ApplicationHelperRecipe, Playmo::Recipes::UnicornRecipe) if defined?(Playmo::Cookbook)
|
data/lib/playmo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playmo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-25 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &69235940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *69235940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: ruby_events
|
27
|
-
requirement: &
|
27
|
+
requirement: &69235500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *69235500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: haml2slim
|
38
|
-
requirement: &
|
38
|
+
requirement: &69234980 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - =
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.4.6
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *69234980
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: haml
|
49
|
-
requirement: &
|
49
|
+
requirement: &69234560 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - =
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 3.1.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *69234560
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec-rails
|
60
|
-
requirement: &
|
60
|
+
requirement: &69234260 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '2.5'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *69234260
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- andrew@tanraya.com
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/playmo/recipes/templates/assets_recipe/images/input-bg.gif
|
128
128
|
- lib/playmo/recipes/templates/assets_recipe/stylesheets/application.css.scss
|
129
129
|
- lib/playmo/recipes/templates/assets_recipe/stylesheets/media.css.scss
|
130
|
+
- lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_buttons.css.scss
|
130
131
|
- lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_constants.css.scss
|
131
132
|
- lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_forms.css.scss
|
132
133
|
- lib/playmo/recipes/templates/assets_recipe/stylesheets/partials/_html5-boilerplate.css.scss
|
@@ -146,6 +147,10 @@ files:
|
|
146
147
|
- lib/playmo/recipes/templates/layout_recipe/application.html.erb
|
147
148
|
- lib/playmo/recipes/templates/rspec_recipe/.gitkeep
|
148
149
|
- lib/playmo/recipes/templates/rvm_recipe/.gitkeep
|
150
|
+
- lib/playmo/recipes/templates/thinking_sphinx_recipe/sphinx.yml
|
151
|
+
- lib/playmo/recipes/templates/unicorn_recipe/unicorn.rb
|
152
|
+
- lib/playmo/recipes/thinking_sphinx_recipe.rb
|
153
|
+
- lib/playmo/recipes/unicorn_recipe.rb
|
149
154
|
- lib/playmo/silent.rb
|
150
155
|
- lib/playmo/version.rb
|
151
156
|
- playmo.gemspec
|