comfy-admin-constructor 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,29 +1,77 @@
1
- # Comfy::Admin::Constructor
1
+ # ComfyAdminConstructor
2
2
 
3
- TODO: Write a gem description
3
+ **ComfyAdminConstructor** allows you to quickly and easily build basic admin interfaces in [ComfortableMexicanSofa](https://github.com/comfy/comfortable-mexican-sofa).
4
4
 
5
- ## Installation
5
+ Installation
6
+ ------------
6
7
 
7
- Add this line to your application's Gemfile:
8
+ Add gem definition to your **Gemfile**:
8
9
 
9
- gem 'comfy-admin-constructor'
10
+ gem 'comfy-admin-constructor'
10
11
 
11
- And then execute:
12
+ Then, from the Rails project's root run:
12
13
 
13
- $ bundle
14
+ bundle install
14
15
 
15
- Or install it yourself as:
16
+ Requirements
17
+ ------------
16
18
 
17
- $ gem install comfy-admin-constructor
19
+ There are plans to make CAC more flexible in the future, but right now it assumes a few things about your CMS install:
18
20
 
19
- ## Usage
21
+ * You access CMS at **/admin** and not /cms-admin
22
+ * You use HAML and SASS
23
+ * You don't store your models in sub-directories
24
+ * Your admin controllers and views are stored in **controllers/admin** and **views/admin**, respectively
25
+ * Your CMS initializer will need to specify a custom navigation template at **views/admin/_navigation.html.haml***
20
26
 
21
- TODO: Write usage instructions here
27
+ Planned Features
28
+ ----------------
22
29
 
23
- ## Contributing
30
+ * More flexibility in where/how things are created
31
+ * Basic passing tests
24
32
 
25
- 1. Fork it
26
- 2. Create your feature branch (`git checkout -b my-new-feature`)
27
- 3. Commit your changes (`git commit -am 'Added some feature'`)
28
- 4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
33
+ Quick Start Guide
34
+ -----------------
35
+
36
+ **Before proceeding make sure you have CMS up and running, taking into account the requirements above.** Make sure you've created your first site.
37
+
38
+ All done? Good. Let's walk through creating your first admin interface using CAC.
39
+
40
+ Let's say my application needs a way to create/edit event listings. Some of the fields we might need include:
41
+
42
+ * Event title
43
+ * Start date/time
44
+ * End date/time
45
+ * Description
46
+ * Location
47
+
48
+ With CAC, this is easy. In the root of the Rails project, we simply type:
49
+
50
+ rails g cms_admin EventListing title:string starts_at:datetime ends_at:datetime description:text location:string
51
+
52
+ CAC will automatically generate a bunch of files for us:
53
+
54
+ create app/models/event_listing.rb
55
+ create db/migrate/20120721145844_create_event_listings.rb
56
+ create app/controllers/admin/event_listings_controller.rb
57
+ create app/views/admin/event_listings/_form.html.haml
58
+ create app/views/admin/event_listings/edit.html.haml
59
+ create app/views/admin/event_listings/index.html.haml
60
+ create app/views/admin/event_listings/new.html.haml
61
+ route namespace(:admin){ resources :event_listings, :except => [:show] }
62
+
63
+ So, what happened there?
64
+
65
+ * The EventListing model was generated, with basic **:presence => :true** validation for all attributes
66
+ * A migration was generated to create the necessary table for our database (Note: Migrations are **never** run automatically. That's on you.)
67
+ * A controller, complete with ActiveRecord rescues, success/failure flash messages, and more.
68
+ * Views for all the operations we'll need, along with a form.
69
+ * Added a new route
70
+ * Appended a new link to the navigation template
71
+
72
+ That's it! CAC gives you all the basics. If you need to do something a little more complicated, it's easy to make any changes you like.
73
+
74
+ ---
75
+
76
+ ComfortableMexicanSofa is released under the [MIT license](https://github.com/bgilham/comfy-admin-constructor/blob/master/LICENSE)
77
+ Copyright 2012 Brian Gilham, [The Working Group Inc](http://www.twg.ca)
@@ -4,8 +4,8 @@ require File.expand_path('../lib/comfy-admin-constructor/version', __FILE__)
4
4
  Gem::Specification.new do |gem|
5
5
  gem.authors = ["Brian Gilham"]
6
6
  gem.email = ["me@briangilham.com"]
7
- gem.description = "Generate a new CMS admin section by providing a model name, along with attributes. ***NOT READY FOR USE***"
8
- gem.summary = "Comfy Admin Constructor - Create CMS admin sections in one line ***NOT READY FOR USE***"
7
+ gem.description = "ComfyAdminConstructor allows you to quickly and easily build basic admin interfaces in ComfortableMexicanSofa."
8
+ gem.summary = "Comfy Admin Constructor - Create CMS admin sections in one line"
9
9
  gem.homepage = "https://github.com/bgilham/comfy-admin-constructor"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
@@ -1,7 +1,7 @@
1
1
  module Comfy
2
2
  module Admin
3
3
  module Constructor
4
- VERSION = "0.1.18"
4
+ VERSION = "0.1.19"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfy-admin-constructor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,8 +11,8 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-07-21 00:00:00.000000000Z
13
13
  dependencies: []
14
- description: Generate a new CMS admin section by providing a model name, along with
15
- attributes. ***NOT READY FOR USE***
14
+ description: ComfyAdminConstructor allows you to quickly and easily build basic admin
15
+ interfaces in ComfortableMexicanSofa.
16
16
  email:
17
17
  - me@briangilham.com
18
18
  executables: []
@@ -69,6 +69,5 @@ rubyforge_project:
69
69
  rubygems_version: 1.8.17
70
70
  signing_key:
71
71
  specification_version: 3
72
- summary: Comfy Admin Constructor - Create CMS admin sections in one line ***NOT READY
73
- FOR USE***
72
+ summary: Comfy Admin Constructor - Create CMS admin sections in one line
74
73
  test_files: []