mongoid_scribe 0.1.0
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.
- checksums.yaml +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +53 -0
- data/app/controllers/mongoid/scribe/application_controller.rb +10 -0
- data/app/controllers/mongoid/scribe/documents_controller.rb +50 -0
- data/app/helpers/mongoid/scribe/documents_helper.rb +19 -0
- data/app/views/mongoid/scribe/documents/all.html.erb +22 -0
- data/app/views/mongoid/scribe/documents/edit.html.erb +22 -0
- data/app/views/mongoid/scribe/documents/index.html.erb +34 -0
- data/app/views/mongoid/scribe/documents/show.html.erb +25 -0
- data/app/views/mongoid/scribe/layouts/application.html.erb +14 -0
- data/config/routes.rb +10 -0
- data/lib/generators/mongoid_scribe/install_generator.rb +16 -0
- data/lib/generators/mongoid_scribe/templates/config/initializers/mongoid_scribe.rb +23 -0
- data/lib/mongoid/scribe/builders/field.rb +85 -0
- data/lib/mongoid/scribe/builders/relation.rb +40 -0
- data/lib/mongoid/scribe/builders/table.rb +26 -0
- data/lib/mongoid/scribe/configuration/form_configuration.rb +11 -0
- data/lib/mongoid/scribe/configuration/index_configuration.rb +11 -0
- data/lib/mongoid/scribe/configuration.rb +21 -0
- data/lib/mongoid/scribe/engine.rb +18 -0
- data/lib/mongoid/scribe/version.rb +5 -0
- data/lib/mongoid/scribe.rb +82 -0
- data/lib/mongoid_scribe.rb +1 -0
- data/mongoid_scribe.gemspec +33 -0
- data/vendor/assets/stylesheets/base/custom.css +22 -0
- data/vendor/assets/stylesheets/base/doc.css +170 -0
- data/vendor/assets/stylesheets/base/style.css +854 -0
- metadata +169 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'mongoid/scribe/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mongoid_scribe"
|
8
|
+
spec.version = Mongoid::Scribe::VERSION
|
9
|
+
spec.authors = ["Nick DeSteffen"]
|
10
|
+
spec.email = ["nick.desteffen@gmail.com"]
|
11
|
+
spec.description = %q{Write a gem description}
|
12
|
+
spec.summary = %q{Write a gem summary}
|
13
|
+
spec.homepage = "https://github.com/nick-desteffen/mongoid-scribe"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = Dir.glob("lib/**/*")
|
17
|
+
spec.files += Dir.glob("app/**/*")
|
18
|
+
spec.files += Dir.glob("config/**/*")
|
19
|
+
spec.files += Dir.glob("vendor/**/*")
|
20
|
+
spec.files += %w(README.md LICENSE.txt mongoid_scribe.gemspec)
|
21
|
+
|
22
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_dependency "rails", "~> 3.2.0"
|
26
|
+
spec.add_dependency "mongoid", "~> 3.1.0"
|
27
|
+
spec.add_dependency "strong_parameters"
|
28
|
+
spec.add_dependency "jquery-rails"
|
29
|
+
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
31
|
+
spec.add_development_dependency "rake"
|
32
|
+
spec.add_development_dependency "minitest"
|
33
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
label.stacked{
|
2
|
+
display: block;
|
3
|
+
margin-bottom: 3px;
|
4
|
+
font-weight: bold;
|
5
|
+
}
|
6
|
+
|
7
|
+
label span{
|
8
|
+
padding-left: 5px;
|
9
|
+
font-weight: normal;
|
10
|
+
}
|
11
|
+
|
12
|
+
.control-group{
|
13
|
+
margin: 10px 0;
|
14
|
+
}
|
15
|
+
|
16
|
+
.container table{
|
17
|
+
margin: 10px 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
.container table td.key{
|
21
|
+
font-weight: bold;
|
22
|
+
}
|
@@ -0,0 +1,170 @@
|
|
1
|
+
.header {
|
2
|
+
background-color: #e15a25;
|
3
|
+
margin-top: 30px;
|
4
|
+
margin-bottom: 10px;
|
5
|
+
padding-top: 10px;
|
6
|
+
padding-bottom: 7px;
|
7
|
+
}
|
8
|
+
h1, h2, h3, h4, .logo {
|
9
|
+
font-family: "Raleway", arial, sans-serif;
|
10
|
+
}
|
11
|
+
.logo {
|
12
|
+
color: #fff;
|
13
|
+
font-size: 32px;
|
14
|
+
font-size: 2rem;
|
15
|
+
line-height: normal;
|
16
|
+
font-weight: 900;
|
17
|
+
text-transform: uppercase;
|
18
|
+
text-decoration: none;
|
19
|
+
}
|
20
|
+
.logo:hover,
|
21
|
+
.logo:active {
|
22
|
+
color: #fff;
|
23
|
+
}
|
24
|
+
ol, ul, p {
|
25
|
+
line-height: 1.5;
|
26
|
+
}
|
27
|
+
.navigation {
|
28
|
+
font-size: 12px;
|
29
|
+
font-size: 0.75rem;
|
30
|
+
line-height: normal;
|
31
|
+
position: absolute;
|
32
|
+
top: 0;
|
33
|
+
left: 0;
|
34
|
+
z-index: 9999;
|
35
|
+
width: 100%;
|
36
|
+
background-color: #222;
|
37
|
+
}
|
38
|
+
.navigation ul {
|
39
|
+
line-height: normal;
|
40
|
+
list-style: none;
|
41
|
+
padding: 10px;
|
42
|
+
margin: 0;
|
43
|
+
}
|
44
|
+
.navigation ul li {
|
45
|
+
float: left;
|
46
|
+
margin-left: 20px;
|
47
|
+
}
|
48
|
+
.navigation ul li:first-child {
|
49
|
+
margin-left: 0;
|
50
|
+
}
|
51
|
+
.navigation ul li a {
|
52
|
+
text-decoration: none;
|
53
|
+
color: #fff;
|
54
|
+
}
|
55
|
+
.navigation ul li a.current,
|
56
|
+
.navigation ul li a:hover {
|
57
|
+
color: #fff9c3;
|
58
|
+
}
|
59
|
+
.navigation ul li a:active {
|
60
|
+
color: #fff;
|
61
|
+
}
|
62
|
+
.content-inner {
|
63
|
+
padding-top: 20px;
|
64
|
+
padding-bottom: 20px;
|
65
|
+
}
|
66
|
+
.row .col {
|
67
|
+
text-transform: uppercase;
|
68
|
+
font-weight: bold;
|
69
|
+
background: #ccc;
|
70
|
+
color: #111;
|
71
|
+
text-align: center;
|
72
|
+
padding-top: 4px;
|
73
|
+
padding-bottom: 4px;
|
74
|
+
font-size: 12px;
|
75
|
+
font-size: 0.75rem;
|
76
|
+
}
|
77
|
+
|
78
|
+
.intro {
|
79
|
+
font-family: "Raleway", arial, sans-serif;
|
80
|
+
font-weight: 200;
|
81
|
+
font-size: 24px;
|
82
|
+
font-size: 1.5rem;
|
83
|
+
line-height: normal;
|
84
|
+
color: #777;
|
85
|
+
}
|
86
|
+
pre {
|
87
|
+
padding: 0;
|
88
|
+
line-height: normal;
|
89
|
+
background-color: #fff1d5;
|
90
|
+
overflow-x: scroll;
|
91
|
+
overflow-y: none;
|
92
|
+
}
|
93
|
+
.line-number {
|
94
|
+
background-color: #222;
|
95
|
+
color: #fff;
|
96
|
+
padding: 4px;
|
97
|
+
width: 20px;
|
98
|
+
display: inline-block;
|
99
|
+
*display: inline;
|
100
|
+
*zoom: 1;
|
101
|
+
text-align: right;
|
102
|
+
}
|
103
|
+
@media only screen and (min-width: 720px) and (max-width: 979px) {
|
104
|
+
.navigation ul li {
|
105
|
+
margin-left: 5px;
|
106
|
+
}
|
107
|
+
.navigation ul li a {
|
108
|
+
padding: 10px 15px;
|
109
|
+
}
|
110
|
+
pre {
|
111
|
+
overflow-x: scroll;
|
112
|
+
overflow-y: none;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
@media only screen and (max-width: 719px) {
|
116
|
+
.header {
|
117
|
+
margin-top: 0;
|
118
|
+
margin-bottom: 0;
|
119
|
+
}
|
120
|
+
.nav-toggle {
|
121
|
+
display: block;
|
122
|
+
background-color: #222;
|
123
|
+
color: #fff;
|
124
|
+
padding: 10px 20px;
|
125
|
+
text-decoration: none;
|
126
|
+
}
|
127
|
+
.nav-toggle:hover,
|
128
|
+
.nav-toggle:active,
|
129
|
+
.nav-toggle.active {
|
130
|
+
background-color: #444;
|
131
|
+
color: #fff;
|
132
|
+
}
|
133
|
+
.navigation {
|
134
|
+
float: none;
|
135
|
+
position: static;
|
136
|
+
}
|
137
|
+
.navigation ul {
|
138
|
+
float: none;
|
139
|
+
margin: 0;
|
140
|
+
padding: 0;
|
141
|
+
}
|
142
|
+
.navigation ul li {
|
143
|
+
float: none;
|
144
|
+
margin-left: 0;
|
145
|
+
}
|
146
|
+
.navigation ul li a {
|
147
|
+
color: #fff;
|
148
|
+
padding: 10px 20px;
|
149
|
+
display: block;
|
150
|
+
text-transform: none;
|
151
|
+
background-color: #222;
|
152
|
+
}
|
153
|
+
.navigation ul li a:hover {
|
154
|
+
background-color: #444;
|
155
|
+
}
|
156
|
+
.menu {
|
157
|
+
list-style: none;
|
158
|
+
padding: 0;
|
159
|
+
margin: 0;
|
160
|
+
}
|
161
|
+
.showmobile.inline-block {
|
162
|
+
display: inline-block;
|
163
|
+
*zoom: 1;
|
164
|
+
*display: inline;
|
165
|
+
}
|
166
|
+
pre {
|
167
|
+
overflow-x: scroll;
|
168
|
+
overflow-y: none;
|
169
|
+
}
|
170
|
+
}
|