casein 5.0.1.0 → 5.1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b74cfa7fbe0270c2cc2ce110b4e7fb71e904dcf
4
- data.tar.gz: dc5f86e1a0c1d67deddb67d56128282c4ff932b5
3
+ metadata.gz: 9ba7770489c1f7bb3656bb6bac034ce469ad6701
4
+ data.tar.gz: 51f79ca93f5d7ceb85974e7d47a5b520679743a1
5
5
  SHA512:
6
- metadata.gz: dc100ed3cb97892ae21a54240d3d6c41277ccd265642712575100803634c7ae1035eca0e3932bbcf548eab553c4c07cfcd06de41a7c6135a5a77c9e2c419c4e5
7
- data.tar.gz: eeeffc3ee03e64422e8820b0628818328f3e6007a1dda4562212b4b9ef9e41236dbf126e4326e153f28081ca4ac78b0491cdbea4647c0e762caa05297674fb91
6
+ metadata.gz: 408ddcb64313158e13d030a34dc5f0e3f482fdeeffa5c28c4fe631dd9dd7c35ee6125ec114588f79b7dd8ba77aae261ec138add0fa2c5bc7413cdd4010121b01
7
+ data.tar.gz: a4ae1d0e0f6ea91e4e06362c1ad9b45465ac54f24cf15f8c42cf87eed781bdbc1ae264094a0ed38a30dc3b245ca7423d99b3bfb6a09200ad514430f1e92e3635
data/LICENSE CHANGED
@@ -26,221 +26,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26
26
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
27
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28
28
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
-
30
- - - -
31
-
32
- Casein uses Bootstrap and Glyphicons.
33
-
34
- Bootstrap is copyright (c) 2014 Twitter and is used under the Apache 2.0 license.
35
- http://getbootstrap.com
36
-
37
- Glyphicons is an extensive glyph library created by Jan Kovařík and made available for Bootstrap under the same Apache 2.0 license.
38
- http://glyphicons.com
39
-
40
- Bootstrap-glyphicons is copyright (c) 2014 Mark Otto and is used under the MIT License.
41
- http://glyphicons.getbootstrap.com
42
-
43
- - - -
44
-
45
- Bootstrap and Glyphicons license:
46
-
47
- Apache License
48
- Version 2.0, January 2004
49
- http://www.apache.org/licenses/
50
-
51
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
52
-
53
- 1. Definitions.
54
-
55
- "License" shall mean the terms and conditions for use, reproduction,
56
- and distribution as defined by Sections 1 through 9 of this document.
57
-
58
- "Licensor" shall mean the copyright owner or entity authorized by
59
- the copyright owner that is granting the License.
60
-
61
- "Legal Entity" shall mean the union of the acting entity and all
62
- other entities that control, are controlled by, or are under common
63
- control with that entity. For the purposes of this definition,
64
- "control" means (i) the power, direct or indirect, to cause the
65
- direction or management of such entity, whether by contract or
66
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
67
- outstanding shares, or (iii) beneficial ownership of such entity.
68
-
69
- "You" (or "Your") shall mean an individual or Legal Entity
70
- exercising permissions granted by this License.
71
-
72
- "Source" form shall mean the preferred form for making modifications,
73
- including but not limited to software source code, documentation
74
- source, and configuration files.
75
-
76
- "Object" form shall mean any form resulting from mechanical
77
- transformation or translation of a Source form, including but
78
- not limited to compiled object code, generated documentation,
79
- and conversions to other media types.
80
-
81
- "Work" shall mean the work of authorship, whether in Source or
82
- Object form, made available under the License, as indicated by a
83
- copyright notice that is included in or attached to the work
84
- (an example is provided in the Appendix below).
85
-
86
- "Derivative Works" shall mean any work, whether in Source or Object
87
- form, that is based on (or derived from) the Work and for which the
88
- editorial revisions, annotations, elaborations, or other modifications
89
- represent, as a whole, an original work of authorship. For the purposes
90
- of this License, Derivative Works shall not include works that remain
91
- separable from, or merely link (or bind by name) to the interfaces of,
92
- the Work and Derivative Works thereof.
93
-
94
- "Contribution" shall mean any work of authorship, including
95
- the original version of the Work and any modifications or additions
96
- to that Work or Derivative Works thereof, that is intentionally
97
- submitted to Licensor for inclusion in the Work by the copyright owner
98
- or by an individual or Legal Entity authorized to submit on behalf of
99
- the copyright owner. For the purposes of this definition, "submitted"
100
- means any form of electronic, verbal, or written communication sent
101
- to the Licensor or its representatives, including but not limited to
102
- communication on electronic mailing lists, source code control systems,
103
- and issue tracking systems that are managed by, or on behalf of, the
104
- Licensor for the purpose of discussing and improving the Work, but
105
- excluding communication that is conspicuously marked or otherwise
106
- designated in writing by the copyright owner as "Not a Contribution."
107
-
108
- "Contributor" shall mean Licensor and any individual or Legal Entity
109
- on behalf of whom a Contribution has been received by Licensor and
110
- subsequently incorporated within the Work.
111
-
112
- 2. Grant of Copyright License. Subject to the terms and conditions of
113
- this License, each Contributor hereby grants to You a perpetual,
114
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
115
- copyright license to reproduce, prepare Derivative Works of,
116
- publicly display, publicly perform, sublicense, and distribute the
117
- Work and such Derivative Works in Source or Object form.
118
-
119
- 3. Grant of Patent License. Subject to the terms and conditions of
120
- this License, each Contributor hereby grants to You a perpetual,
121
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
122
- (except as stated in this section) patent license to make, have made,
123
- use, offer to sell, sell, import, and otherwise transfer the Work,
124
- where such license applies only to those patent claims licensable
125
- by such Contributor that are necessarily infringed by their
126
- Contribution(s) alone or by combination of their Contribution(s)
127
- with the Work to which such Contribution(s) was submitted. If You
128
- institute patent litigation against any entity (including a
129
- cross-claim or counterclaim in a lawsuit) alleging that the Work
130
- or a Contribution incorporated within the Work constitutes direct
131
- or contributory patent infringement, then any patent licenses
132
- granted to You under this License for that Work shall terminate
133
- as of the date such litigation is filed.
134
-
135
- 4. Redistribution. You may reproduce and distribute copies of the
136
- Work or Derivative Works thereof in any medium, with or without
137
- modifications, and in Source or Object form, provided that You
138
- meet the following conditions:
139
-
140
- (a) You must give any other recipients of the Work or
141
- Derivative Works a copy of this License; and
142
-
143
- (b) You must cause any modified files to carry prominent notices
144
- stating that You changed the files; and
145
-
146
- (c) You must retain, in the Source form of any Derivative Works
147
- that You distribute, all copyright, patent, trademark, and
148
- attribution notices from the Source form of the Work,
149
- excluding those notices that do not pertain to any part of
150
- the Derivative Works; and
151
-
152
- (d) If the Work includes a "NOTICE" text file as part of its
153
- distribution, then any Derivative Works that You distribute must
154
- include a readable copy of the attribution notices contained
155
- within such NOTICE file, excluding those notices that do not
156
- pertain to any part of the Derivative Works, in at least one
157
- of the following places: within a NOTICE text file distributed
158
- as part of the Derivative Works; within the Source form or
159
- documentation, if provided along with the Derivative Works; or,
160
- within a display generated by the Derivative Works, if and
161
- wherever such third-party notices normally appear. The contents
162
- of the NOTICE file are for informational purposes only and
163
- do not modify the License. You may add Your own attribution
164
- notices within Derivative Works that You distribute, alongside
165
- or as an addendum to the NOTICE text from the Work, provided
166
- that such additional attribution notices cannot be construed
167
- as modifying the License.
168
-
169
- You may add Your own copyright statement to Your modifications and
170
- may provide additional or different license terms and conditions
171
- for use, reproduction, or distribution of Your modifications, or
172
- for any such Derivative Works as a whole, provided Your use,
173
- reproduction, and distribution of the Work otherwise complies with
174
- the conditions stated in this License.
175
-
176
- 5. Submission of Contributions. Unless You explicitly state otherwise,
177
- any Contribution intentionally submitted for inclusion in the Work
178
- by You to the Licensor shall be under the terms and conditions of
179
- this License, without any additional terms or conditions.
180
- Notwithstanding the above, nothing herein shall supersede or modify
181
- the terms of any separate license agreement you may have executed
182
- with Licensor regarding such Contributions.
183
-
184
- 6. Trademarks. This License does not grant permission to use the trade
185
- names, trademarks, service marks, or product names of the Licensor,
186
- except as required for reasonable and customary use in describing the
187
- origin of the Work and reproducing the content of the NOTICE file.
188
-
189
- 7. Disclaimer of Warranty. Unless required by applicable law or
190
- agreed to in writing, Licensor provides the Work (and each
191
- Contributor provides its Contributions) on an "AS IS" BASIS,
192
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
193
- implied, including, without limitation, any warranties or conditions
194
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
195
- PARTICULAR PURPOSE. You are solely responsible for determining the
196
- appropriateness of using or redistributing the Work and assume any
197
- risks associated with Your exercise of permissions under this License.
198
-
199
- 8. Limitation of Liability. In no event and under no legal theory,
200
- whether in tort (including negligence), contract, or otherwise,
201
- unless required by applicable law (such as deliberate and grossly
202
- negligent acts) or agreed to in writing, shall any Contributor be
203
- liable to You for damages, including any direct, indirect, special,
204
- incidental, or consequential damages of any character arising as a
205
- result of this License or out of the use or inability to use the
206
- Work (including but not limited to damages for loss of goodwill,
207
- work stoppage, computer failure or malfunction, or any and all
208
- other commercial damages or losses), even if such Contributor
209
- has been advised of the possibility of such damages.
210
-
211
- 9. Accepting Warranty or Additional Liability. While redistributing
212
- the Work or Derivative Works thereof, You may choose to offer,
213
- and charge a fee for, acceptance of support, warranty, indemnity,
214
- or other liability obligations and/or rights consistent with this
215
- License. However, in accepting such obligations, You may act only
216
- on Your own behalf and on Your sole responsibility, not on behalf
217
- of any other Contributor, and only if You agree to indemnify,
218
- defend, and hold each Contributor harmless for any liability
219
- incurred by, or claims asserted against, such Contributor by reason
220
- of your accepting any such warranty or additional liability.
221
-
222
- END OF TERMS AND CONDITIONS
223
-
224
- - - -
225
-
226
- Bootstrap-glyphicons license:
227
-
228
- Copyright (c) 2014 Mark Otto
229
-
230
- Permission is hereby granted, free of charge, to any person obtaining a copy
231
- of this software and associated documentation files (the "Software"), to deal
232
- in the Software without restriction, including without limitation the rights
233
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
234
- copies of the Software, and to permit persons to whom the Software is
235
- furnished to do so, subject to the following conditions:
236
-
237
- The above copyright notice and this permission notice shall be included in
238
- all copies or substantial portions of the Software.
239
-
240
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
241
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
242
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
243
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
245
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
246
- THE SOFTWARE.
@@ -1,4 +1,4 @@
1
1
  major: 5
2
- minor: 0
3
- patch: 1
2
+ minor: 1
3
+ patch: 0
4
4
  build: 0
@@ -1,10 +1,10 @@
1
1
  =Casein - a lightweight CMS toolkit for Ruby on Rails, based on Bootstrap
2
2
 
3
- ** ALL-NEW CASEIN 5.0.0 — featuring new responsive UI based on Bootstrap 3! **
3
+ ** ALL-NEW CASEIN 5.1.0 — featuring new responsive UI based on Bootstrap 3.3! **
4
4
 
5
5
  Casein is a Rails 4.x gem that provides scaffolding generators and helper functions to quickly create a clean and minimal CRUD interface for your data.
6
6
 
7
- It comes with a pre-rolled user-authentication system, supports user-based timezones, and is mobile-ready.
7
+ It comes with a pre-rolled user-authentication system, supports user-based timezones, and is mobile ready.
8
8
 
9
9
  As Casein is completely decoupled from the front end, it can be added to new or existing Rails projects, or used as a standalone CMS to drive platforms built on other technologies.
10
10
 
@@ -17,18 +17,22 @@ This version of Casein is designed for Ruby on Rails 4.x and Ruby 2.x.
17
17
  Legacy versions:
18
18
 
19
19
  Rails 3.x: http://github.com/spoiledmilk/casein3
20
-
21
20
  Rails 2.x: http://github.com/spoiledmilk/casein
22
21
 
23
- ==Disclaimer
22
+ ==What’s New in 5.1
24
23
 
25
- Casein was created and is maintained by Russell Quinn. http://www.russellquinn.com
24
+ Casein 5.1 has the following updates:
26
25
 
27
- Casein is available to use under the terms of the MIT License. See the LICENSE file for more details.
26
+ * Finally updated to Boostrap 3.3 (all bundled Bootstrap files removed in favor of bootstrap-sass gem)
27
+ * Rake task to create admin user now takes an optional password
28
+ * Authlogic version bumped to 3.4
29
+ * UI tweaks
28
30
 
29
- ==What’s New
31
+ Version 5.1 should be a drop-in replacement for 5.0.
30
32
 
31
- Casein 5.x is built for Ruby on Rails 4.x and has the following major updates:
33
+ Thanks to @bunnymatic for help with this release.
34
+
35
+ ==What Was New in 5.0
32
36
 
33
37
  * Now based on Bootstrap 3
34
38
  * Complete UI overhaul, now mobile-first
@@ -37,15 +41,13 @@ Casein 5.x is built for Ruby on Rails 4.x and has the following major updates:
37
41
  * Rails 4 compatibility fixes
38
42
  * Many other tweaks and improvements over Casein 3.x and 4.x
39
43
 
40
- There is no real upgrade path from previous versions of Casein, including v4.x. It’s recommended to only use Casein v5.x on new projects.
41
-
42
44
  ==Installation
43
45
 
44
46
  — Create a new Rails project (or use an existing one) and enter the project directory from a terminal prompt.
45
47
 
46
48
  — Add the Casein gem to your Gemfile:
47
49
 
48
- gem 'casein', '5.0.0'
50
+ gem 'casein', '~>5.1.0'
49
51
 
50
52
  — Then use bundler to install Casein and its dependencies:
51
53
 
@@ -64,9 +66,9 @@ There is no real upgrade path from previous versions of Casein, including v4.x.
64
66
  rake db:create (if needed)
65
67
  rake db:migrate
66
68
 
67
- — Run the following Rake task to set up an initial user. The default username and a random password will be displayed once the task has completed. You should specify your email address. If you've set up an SMTP server in your Rails environment then you’ll also receive an email notification about the new account.
69
+ — Run the following Rake task to set up an initial user. The default username and a random password will be displayed once the task has completed. You should specify your email address and password. (Or omit the password parameter to have a random password assigned.) If you've set up an SMTP server in your Rails environment then you’ll also receive an email notification about the new account.
68
70
 
69
- rake casein:users:create_admin email=you@yourdomain.com
71
+ rake casein:users:create_admin email=you@yourdomain.com [password=your_password]
70
72
 
71
73
  — Run your app! (rebooting the web server if applicable)
72
74
 
@@ -95,16 +97,16 @@ Where:
95
97
 
96
98
  e.g. a typical scaffolding command might look like:
97
99
 
98
- rails g casein:scaffold Customer name:string age:integer date_of_birth:date is_male:boolean
100
+ rails g casein:scaffold Customer name:string age:integer date_of_birth:date has_paid:boolean
99
101
 
100
102
  By default the scaffold generator expects the model and database migration to already exist. This is because you typically won't want all of your model attributes to be editable in Casein. So you'd set up your model and migration the usual way, then run the Casein scaffold generator just for the appropriate attributes. However, you can add --create-model-and-migration to the generator to also create these files at the same time.
101
103
 
102
104
 
103
- Command-line options that can be added to the end of the generate command:
105
+ Command-line options that can be added to the end of the scaffold generate command:
104
106
 
105
107
  --create-model-and-migration = Also creates a model and migration.
106
108
  --read-only = Creates scaffolding to view model data only (you will not be able to edit, create, or delete records). This is useful if you want to create a read-only viewer of data that's generated elsewhere.
107
- --no-index = Excludes the index view and does not add to the model to the navigation. The _table partial is still generated. This is useful generating has/belongs relationships.
109
+ --no-index = Excludes the index view and does not add the model to the navigation. The _table partial is still generated. This is useful when generating has/belongs relationships.
108
110
 
109
111
  Once the command has been executed, the generator will:
110
112
 
@@ -189,8 +191,6 @@ The Casein Rake tasks are all namespaced with ‘casein:’
189
191
 
190
192
  Casein is now based on Bootstrap (http://getbootstrap.com) and jQuery. Bootstrap offers a wealth of UI components, CSS styles, and JavaScript plugins. See the Bootstrap website for full details.
191
193
 
192
- Note that Casein runs from the shortlived Bootstrap v3.0.0 beta and hasn't yet been updated to Bootstrap v3.1.x. Some of the Bootstrap syntax might be different if you're used to 3.1.x. (Update coming soon!)
193
-
194
194
  ===Changing form elements / other helpers
195
195
 
196
196
  Casein will insert form elements suitable for the field types you specified in the command line. However, you may wish to customise these, e.g. swap a text field for a password field, swap an integer field for a select dropdown, or swap a date field for a full calendar picker, etc.
@@ -209,7 +209,7 @@ All of the standard Rails form helpers are available, but the Casein versions ar
209
209
  casein_radio_button_group form, obj, radio_buttons = {}
210
210
  casein_select form, obj, attribute, option_tags, options = {}
211
211
  casein_time_zone_select form, obj, attribute, option_tags, options = {}
212
- casein_collection_select form, obj, object, attribute, collection, value_method, text_method, options = {}
212
+ casein_collection_select form, obj, object_name, attribute, collection, value_method, text_method, options = {}
213
213
  casein_date_select form, obj, attribute, options = {}
214
214
  casein_time_select form, obj, attribute, options = {}
215
215
  casein_datetime_select form, obj, attribute, options = {}
@@ -220,6 +220,7 @@ All of the standard Rails form helpers are available, but the Casein versions ar
220
220
  For more information on each function, check the app/helpers/casein/casein_helper.rb file within the project. The method parameters are typically the same as the Rails form tag helpers. There are some extra Casein options that can be passed through as part of the options hash:
221
221
 
222
222
  :casein_label – by default the humanized version of the database field name is used as the label, but this will override it with a string of your choice.
223
+ :casein_sublabel — add a smaller, clarrifying label to the right of the main label
223
224
  :casein_button_label – available in casein_radio_button and casein_check_box. Used to give individual buttons their labels.
224
225
  :casein_truncate - may be passed into casein_table_cell_link along with a maximum length to automatically truncate strings and suffix with '...'
225
226
 
@@ -251,12 +252,8 @@ e.g.
251
252
 
252
253
  Every Casein user can set their own timezone via their profile. To change the default timezone for new users, set config.time_zone in your app.
253
254
 
254
- ===Acknowledgements
255
-
256
- Casein uses Bootstrap and Glyphicons.
257
-
258
- Bootstrap is copyright (c) 2014 Twitter and is used under the MIT license. http://getbootstrap.com
255
+ ==Disclaimer
259
256
 
260
- Glyphicons is an extensive glyph library created by Jan Kovařík and made available for Bootstrap under the same Apache 2.0 license. http://glyphicons.com
257
+ Casein was created and is maintained by Russell Quinn. http://www.russellquinn.com
261
258
 
262
- Bootstrap-glyphicons is copyright (c) 2013 Mark Otto and is used under the MIT License. http://glyphicons.getbootstrap.com
259
+ Casein is available to use under the terms of the MIT License. See the LICENSE file for more details.
data/Rakefile CHANGED
@@ -34,8 +34,10 @@ begin
34
34
  gem.license = "MIT"
35
35
  gem.homepage = "http://www.caseincms.com"
36
36
  gem.add_dependency("will_paginate", ["3.0.7"])
37
- gem.add_dependency("authlogic", ["3.4.2"])
37
+ gem.add_dependency("authlogic", ["3.4.3"])
38
38
  gem.add_dependency("scrypt", ["1.2.1"])
39
+ gem.add_dependency("bootstrap-sass", ["3.3.1"])
40
+ gem.add_dependency("sass-rails")
39
41
  gem.add_dependency("jquery-rails")
40
42
  end
41
43
  rescue
@@ -1,6 +1,6 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
- //= require ./bootstrap.js
3
+ //= require bootstrap
4
4
 
5
5
  jQuery(document).ready(function() {
6
6
 
@@ -1,23 +1,25 @@
1
1
  /* BOOTSTRAP OVERRIDES */
2
2
 
3
+ @import 'bootstrap/variables';
4
+
3
5
  .alert {
4
6
  line-height: 22px;
5
7
  padding: 10px 15px 10px 15px;
6
8
  }
7
9
 
8
- .navbar-toggle {
9
- top: 54px;
10
- left: 15px;
10
+ .container-navbar-brand {
11
+ margin-bottom: 15px;
11
12
  }
12
13
 
13
14
  .navbar-brand {
14
15
  padding-top: 10px;
15
16
  padding-bottom: 25px;
17
+ padding-left: 10px;
16
18
  }
17
19
 
18
20
  .navbar-nav > li > a:hover,
19
21
  .navbar-nav > li > a:focus {
20
- color: #000000;
22
+ color: #000000;
21
23
  border: 1px solid #cdcdcd;
22
24
  padding: 14px 9px 14px 9px;
23
25
  }
@@ -41,12 +43,26 @@
41
43
  margin: 10px 0px 0px 0px;
42
44
  }
43
45
 
46
+ @media screen and (max-width: 767px) {
47
+ #navbar.collapse, #navbar.collapsing {
48
+ padding-left: 5%;
49
+ padding-right: 5%;
50
+ }
51
+ }
52
+
44
53
  @media screen and (min-width: 768px) {
45
54
 
55
+ .container-navbar-brand {
56
+ margin-bottom: 0px;
57
+ }
58
+
59
+ .navbar-collapse {
60
+ padding-left: 0px;
61
+ padding-right: 0px;
62
+ }
63
+
46
64
  .navbar-brand {
47
- padding-top: 5px;
48
- padding-bottom: 5px;
49
- margin-left: 1px;
65
+ padding-left: 20px;
50
66
  }
51
67
 
52
68
  .navbar-nav {