thesilverspoon 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,136 @@
1
+
2
+ #The Gem is still under development.We recommend please do not download it yet.
3
+ # The Silver Spoon
4
+
5
+ Let your Rails App be born with a silver spoon in its mouth.
6
+
7
+ This gem preps a new Rails app with some of the best Rails gems and Jquery sweetness available:
8
+
9
+ * <b>Rails Admin</b> for System Management : https://github.com/sferik/rails_admin
10
+ * <b>Devise</b> for Authentication : https://github.com/plataformatec/devise
11
+ * <b>Cancan</b> for Authorization : https://github.com/ryanb/cancan
12
+ * <b>Bootstrapped</b> and <b>NiftyGenerators</b> for Interface Design : https://github.com/entropillc/bootstrapped and https://github.com/ryanb/nifty-generators
13
+ * <b>Gritter</b> for Notifications : https://github.com/RobinBrouwer/gritter
14
+ * <b>Carrierwave</b> for File Uploading : https://github.com/jnicklas/carrierwave
15
+ * <b>Spreadsheet</b> for Excel File Handling : http://spreadsheet.rubyforge.org/
16
+
17
+
18
+ The Silver Spoon takes care of the installation of these gems, and basic implementations of the functionalities. As long as you can live with the conventional defaults specified for these gems, you will be ready to go. If you need customization, you would need to understand the usage of each of these gems individually, which you will find at the respective gem homepages.
19
+
20
+ Apart from this, The Silver Spoon also extends the scaffolding in your app.
21
+ * It uses a combination of the Twitter-Bootstrap and Nifty-Generators to give aesthetically improved and more usable view templates.
22
+ * Apart from the standard scaffold views, it also creates an AJAX driven integrated view which combines all the standard views into one.
23
+ * It also adds schema stubs and standard validation options (uncomment these to use) to your models.
24
+
25
+ ## Installation
26
+
27
+ The Silver Spoon works best if you use it in a new empty Rails App. It requires anything Rails 3.1.3 onwards.
28
+
29
+ You can install it by simply adding the following line to your Gemfile and running bundle install:
30
+
31
+ ```console
32
+ gem 'thesilverspoon'
33
+
34
+ ```
35
+
36
+ After you have installed The Silver Spoon, you need to run the generator:
37
+
38
+ ```console
39
+ rails generate thesilverspoon:install
40
+ ```
41
+
42
+ ## Setup
43
+
44
+ Post installation, your app will have the following:
45
+
46
+ * All the gems mentioned above with standard configurations initialized.
47
+ * A model called _'User'_ and views (in the devise directory) for you to customize
48
+ * An Ability model to enable *cancan* for your authorization. You also get a admin user (email:admin@tss.com | password: secret) with administrative rights to the system. Remember to change the password before you deploy the app.
49
+ * An Uploader Model in a uploaders directory and an uploading repository in /public to enable CarrierWave. You might need to install ImageMagick on your system to use photo manipulation with this feature though.
50
+ * A Rails Admin interface at /administration. Use the admin user credentials to use this section
51
+ * A set of basic image assets which you can replace to quickly start off your app.
52
+
53
+ ## Usage
54
+
55
+ Naturally, you have access all the features that are available in each of the included gems. We recommend that you go through the documentation of the included gems to fully realize the amazing power these put into your hands.
56
+
57
+ ### Layouts
58
+ The app has been started off with the standard Rails layout. The Silver Spoon allows you to manipulate layouts with the following commands:
59
+
60
+ * To use the Nifty Generators style layout
61
+
62
+ ```console
63
+ rails generate nifty:layout
64
+ ```
65
+
66
+ * To use the the Bootstrapped layout
67
+
68
+ ```console
69
+ rails generate bootstrapped:layout
70
+ ```
71
+
72
+ * To revert back to the default Rails layout
73
+
74
+ ```console
75
+ rails generate revert:layout
76
+ ```
77
+
78
+ ### Scaffolds
79
+
80
+ The Silver Spoon gives you the option of four scaffold styles:
81
+
82
+ * To use The Silver Spoon scaffold
83
+
84
+ ```console
85
+ rails generate everything:scaffold Model [parameters]
86
+ ```
87
+
88
+ * To use the Nifty Generators scaffold
89
+
90
+ ```console
91
+ rails generate nifty:scaffold Model [parameters]
92
+ ```
93
+
94
+ * To use the the Bootstrapped scaffold
95
+
96
+ ```console
97
+ rails generate bootstrapped:scaffold Model [parameters]
98
+ ```
99
+
100
+ * To use the default Rails scaffold
101
+
102
+ ```console
103
+ rails generate scaffold Model [parameters]
104
+ ```
105
+
106
+
107
+ ## Additional Information
108
+
109
+ ### Bug reports
110
+
111
+ If you discover a problem with The Silver Spoon, we would like to know about it. However, please do *NOT* use the GitHub issue tracker. Send an email to the maintainers listed at the bottom of the README.
112
+
113
+ ### Starting with Rails?
114
+
115
+ If you are building your first Rails application, we recommend you to *not* use The Silver Spoon. The Silver Spoon is an aggregation of a set of gems which require a good understanding of the Rails Framework. In such cases, we advise you to build everything from scratch, using the constituent gems of The Silver Spoon one at a time, to better understand their functions and super-powers.
116
+
117
+ Once you have solidified your understanding of Rails and the Gems included here, we believe you will find that The Silver Spoon is a good starting point for new apps.
118
+
119
+ ### Ackowledgement and Disclaimer
120
+
121
+ We stake no claim to having built or modified any of the Gems included in this package. They are included on an as-is-where-is basis and are subject to their own individual licenses, terms of usage, copyrights and disclaimers. We are not legal experts, so if we are treading on anybody's toes, please let us know and we will remove any components you have an objection to.
122
+
123
+ Moreover, if you like The Silver Spoon, please consider leaving comments and compliments at the co-ordinates of the original Gem authors, for as they say, if we appear tall it is because we are standing on the shoulder of giants.
124
+
125
+ Also, wanted to recommend the JetBrains RubyMine IDE, which we are in no way affiliated to, but which has been critical in our Rails learning path.
126
+
127
+ ### Maintainers
128
+
129
+ * Rushabh Hathi (rushabh@ptotem.com)
130
+ * Arijit Lahiri (arijit@ptotem.com)
131
+
132
+
133
+ ## License
134
+
135
+ MIT License. Copyright 2012 Ptotem Learning Projects LLP. http://www.ptotem.com
136
+
data/README.md~ ADDED
@@ -0,0 +1,135 @@
1
+
2
+ # The Silver Spoon
3
+
4
+ Let your Rails App be born with a silver spoon in its mouth.
5
+
6
+ This gem preps a new Rails app with some of the best Rails gems and Jquery sweetness available:
7
+
8
+ * <b>Rails Admin</b> for System Management : https://github.com/sferik/rails_admin
9
+ * <b>Devise</b> for Authentication : https://github.com/plataformatec/devise
10
+ * <b>Cancan</b> for Authorization : https://github.com/ryanb/cancan
11
+ * <b>Bootstrapped</b> and <b>NiftyGenerators</b> for Interface Design : https://github.com/entropillc/bootstrapped and https://github.com/ryanb/nifty-generators
12
+ * <b>Gritter</b> for Notifications : https://github.com/RobinBrouwer/gritter
13
+ * <b>Carrierwave</b> for File Uploading : https://github.com/jnicklas/carrierwave
14
+ * <b>Spreadsheet</b> for Excel File Handling : http://spreadsheet.rubyforge.org/
15
+
16
+
17
+ The Silver Spoon takes care of the installation of these gems, and basic implementations of the functionalities. As long as you can live with the conventional defaults specified for these gems, you will be ready to go. If you need customization, you would need to understand the usage of each of these gems individually, which you will find at the respective gem homepages.
18
+
19
+ Apart from this, The Silver Spoon also extends the scaffolding in your app.
20
+ * It uses a combination of the Twitter-Bootstrap and Nifty-Generators to give aesthetically improved and more usable view templates.
21
+ * Apart from the standard scaffold views, it also creates an AJAX driven integrated view which combines all the standard views into one.
22
+ * It also adds schema stubs and standard validation options (uncomment these to use) to your models.
23
+
24
+ ## Installation
25
+
26
+ The Silver Spoon works best if you use it in a new empty Rails App. It requires anything Rails 3.1.3 onwards.
27
+
28
+ You can install it by simply adding the following line to your Gemfile and running bundle install:
29
+
30
+ ```console
31
+ gem 'thesilverspoon'
32
+
33
+ ```
34
+
35
+ After you have installed The Silver Spoon, you need to run the generator:
36
+
37
+ ```console
38
+ rails generate thesilverspoon:install
39
+ ```
40
+
41
+ ## Setup
42
+
43
+ Post installation, your app will have the following:
44
+
45
+ * All the gems mentioned above with standard configurations initialized.
46
+ * A model called _'User'_ and views (in the devise directory) for you to customize
47
+ * An Ability model to enable *cancan* for your authorization. You also get a admin user (email:admin@tss.com | password: secret) with administrative rights to the system. Remember to change the password before you deploy the app.
48
+ * An Uploader Model in a uploaders directory and an uploading repository in /public to enable CarrierWave. You might need to install ImageMagick on your system to use photo manipulation with this feature though.
49
+ * A Rails Admin interface at /administration. Use the admin user credentials to use this section
50
+ * A set of basic image assets which you can replace to quickly start off your app.
51
+
52
+ ## Usage
53
+
54
+ Naturally, you have access all the features that are available in each of the included gems. We recommend that you go through the documentation of the included gems to fully realize the amazing power these put into your hands.
55
+
56
+ ### Layouts
57
+ The app has been started off with the standard Rails layout. The Silver Spoon allows you to manipulate layouts with the following commands:
58
+
59
+ * To use the Nifty Generators style layout
60
+
61
+ ```console
62
+ rails generate nifty:layout
63
+ ```
64
+
65
+ * To use the the Bootstrapped layout
66
+
67
+ ```console
68
+ rails generate bootstrapped:layout
69
+ ```
70
+
71
+ * To revert back to the default Rails layout
72
+
73
+ ```console
74
+ rails generate revert:layout
75
+ ```
76
+
77
+ ### Scaffolds
78
+
79
+ The Silver Spoon gives you the option of four scaffold styles:
80
+
81
+ * To use The Silver Spoon scaffold
82
+
83
+ ```console
84
+ rails generate everything:scaffold Model [parameters]
85
+ ```
86
+
87
+ * To use the Nifty Generators scaffold
88
+
89
+ ```console
90
+ rails generate nifty:scaffold Model [parameters]
91
+ ```
92
+
93
+ * To use the the Bootstrapped scaffold
94
+
95
+ ```console
96
+ rails generate bootstrapped:scaffold Model [parameters]
97
+ ```
98
+
99
+ * To use the default Rails scaffold
100
+
101
+ ```console
102
+ rails generate scaffold Model [parameters]
103
+ ```
104
+
105
+
106
+ ## Additional Information
107
+
108
+ ### Bug reports
109
+
110
+ If you discover a problem with The Silver Spoon, we would like to know about it. However, please do *NOT* use the GitHub issue tracker. Send an email to the maintainers listed at the bottom of the README.
111
+
112
+ ### Starting with Rails?
113
+
114
+ If you are building your first Rails application, we recommend you to *not* use The Silver Spoon. The Silver Spoon is an aggregation of a set of gems which require a good understanding of the Rails Framework. In such cases, we advise you to build everything from scratch, using the constituent gems of The Silver Spoon one at a time, to better understand their functions and super-powers.
115
+
116
+ Once you have solidified your understanding of Rails and the Gems included here, we believe you will find that The Silver Spoon is a good starting point for new apps.
117
+
118
+ ### Ackowledgement and Disclaimer
119
+
120
+ We stake no claim to having built or modified any of the Gems included in this package. They are included on an as-is-where-is basis and are subject to their own individual licenses, terms of usage, copyrights and disclaimers. We are not legal experts, so if we are treading on anybody's toes, please let us know and we will remove any components you have an objection to.
121
+
122
+ Moreover, if you like The Silver Spoon, please consider leaving comments and compliments at the co-ordinates of the original Gem authors, for as they say, if we appear tall it is because we are standing on the shoulder of giants.
123
+
124
+ Also, wanted to recommend the JetBrains RubyMine IDE, which we are in no way affiliated to, but which has been critical in our Rails learning path.
125
+
126
+ ### Maintainers
127
+
128
+ * Rushabh Hathi (rushabh@ptotem.com)
129
+ * Arijit Lahiri (arijit@ptotem.com)
130
+
131
+
132
+ ## License
133
+
134
+ MIT License. Copyright 2012 Ptotem Learning Projects LLP. http://www.ptotem.com
135
+
@@ -228,6 +228,13 @@ module Thesilverspoon
228
228
  Rails::Generators.invoke('devise', ["user"])
229
229
  Rails::Generators.invoke('devise:views')
230
230
  Rails::Generators.invoke('cancan:ability')
231
+ Rails::Generators.invoke('rails_admin:install')
232
+ Rails::Generators.invoke('migration',["add_role_to_user",["admin:boolean"]])
233
+ end
234
+ def create_new_user
235
+ s="\nUser.create!(:email=>'admin@tss.com',:password=>'secret',:password_confirmation=>'secret',:admin=>true)"
236
+ append_to_file "db/seeds.rb",s
237
+
231
238
  end
232
239
 
233
240
  def create_appplication_helper
@@ -309,10 +316,10 @@ module Thesilverspoon
309
316
  def insert_devise_code
310
317
  inject_into_file "config/application.rb", 'require "devise"', :after=>"require File.expand_path('../boot', __FILE__)\n"
311
318
  inject_into_file "config/application.rb", "require 'bootstrap-sass'\n", :after=>"require File.expand_path('../boot', __FILE__)\n"
312
- inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require 'rails/all'\n"
313
-
314
- inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/"
315
319
 
320
+ inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require 'rails/all'\n"
321
+ inject_into_file "config/application.rb", "require 'bootstrapped'\n", :after=>"require 'rails/all'\n"
322
+ inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/"
316
323
  append_to_file "app/assets/javascripts/application.js", '//= require bootstrap'
317
324
  inject_into_file "app/controllers/application_controller.rb", "before_filter :authenticate_user!\n", :after=>" protect_from_forgery\n"
318
325
 
@@ -228,6 +228,13 @@ module Thesilverspoon
228
228
  Rails::Generators.invoke('devise', ["user"])
229
229
  Rails::Generators.invoke('devise:views')
230
230
  Rails::Generators.invoke('cancan:ability')
231
+ Rails::Generators.invoke('rails_admin:install')
232
+ Rails::Generators.invoke('migration',["add_role_to_user",["admin:boolean"]])
233
+ end
234
+ def create_new_user
235
+ s="\nUser.create!(:email=>'admin@tss.com',:password=>'secret',:password_confirmation=>'secret',:admin=>true)"
236
+ append_to_file "db/seeds.rb",s
237
+
231
238
  end
232
239
 
233
240
  def create_appplication_helper
@@ -309,10 +316,10 @@ module Thesilverspoon
309
316
  def insert_devise_code
310
317
  inject_into_file "config/application.rb", 'require "devise"', :after=>"require File.expand_path('../boot', __FILE__)\n"
311
318
  inject_into_file "config/application.rb", "require 'bootstrap-sass'\n", :after=>"require File.expand_path('../boot', __FILE__)\n"
312
- inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require File.expand_path('../boot', __FILE__)\n"
313
-
314
- inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/"
315
319
 
320
+ inject_into_file "config/application.rb", "require 'gritter'\n", :after=>"require 'rails/all'\n"
321
+ inject_into_file "config/application.rb", "require 'bootstrapped'\n", :after=>"require 'rails/all'\n"
322
+ inject_into_file "app/assets/stylesheets/application.css", '*=require_directory', :before=>"*/"
316
323
  append_to_file "app/assets/javascripts/application.js", '//= require bootstrap'
317
324
  inject_into_file "app/controllers/application_controller.rb", "before_filter :authenticate_user!\n", :after=>" protect_from_forgery\n"
318
325
 
@@ -1,3 +1,3 @@
1
1
  module Thesilverspoon
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -1,3 +1,3 @@
1
1
  module Thesilverspoon
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
@@ -23,13 +23,16 @@ Gem::Specification.new do |s|
23
23
  # s.add_runtime_dependency "rest-client"
24
24
 
25
25
  s.add_dependency 'railties', '3.1.3'
26
- s.add_dependency 'bootstrap-sass'
26
+ s.add_dependency 'bootstrapped'
27
27
  s.add_dependency 'gritter'
28
28
  s.add_dependency 'spreadsheet'
29
29
  s.add_dependency 'carrierwave'
30
30
  s.add_dependency 'devise'
31
31
  s.add_dependency 'cancan'
32
- s.add_dependency 'bootstrap-sass'
32
+ s.add_dependency 'rails_admin'
33
+
34
+
35
+
33
36
 
34
37
 
35
38
  end
@@ -23,13 +23,16 @@ Gem::Specification.new do |s|
23
23
  # s.add_runtime_dependency "rest-client"
24
24
 
25
25
  s.add_dependency 'railties', '3.1.3'
26
- s.add_dependency 'bootstrap-sass'
26
+ s.add_dependency 'bootstrapped'
27
27
  s.add_dependency 'gritter'
28
28
  s.add_dependency 'spreadsheet'
29
29
  s.add_dependency 'carrierwave'
30
30
  s.add_dependency 'devise'
31
31
  s.add_dependency 'cancan'
32
- s.add_dependency 'bootstrap-sass'
32
+ s.add_dependency 'rails_admin'
33
+
34
+
35
+ s.executables = ['bundle']
33
36
 
34
37
 
35
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thesilverspoon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &79599250 !ruby/object:Gem::Requirement
16
+ requirement: &87092430 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *79599250
24
+ version_requirements: *87092430
25
25
  - !ruby/object:Gem::Dependency
26
- name: bootstrap-sass
27
- requirement: &79592660 !ruby/object:Gem::Requirement
26
+ name: bootstrapped
27
+ requirement: &87092040 !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: *79592660
35
+ version_requirements: *87092040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gritter
38
- requirement: &79583280 !ruby/object:Gem::Requirement
38
+ requirement: &87091280 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *79583280
46
+ version_requirements: *87091280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: spreadsheet
49
- requirement: &79573190 !ruby/object:Gem::Requirement
49
+ requirement: &87090860 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *79573190
57
+ version_requirements: *87090860
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: carrierwave
60
- requirement: &79558260 !ruby/object:Gem::Requirement
60
+ requirement: &87090590 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *79558260
68
+ version_requirements: *87090590
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: devise
71
- requirement: &79556660 !ruby/object:Gem::Requirement
71
+ requirement: &87090010 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *79556660
79
+ version_requirements: *87090010
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: cancan
82
- requirement: &79553970 !ruby/object:Gem::Requirement
82
+ requirement: &87080540 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *79553970
90
+ version_requirements: *87080540
91
91
  - !ruby/object:Gem::Dependency
92
- name: bootstrap-sass
93
- requirement: &79469660 !ruby/object:Gem::Requirement
92
+ name: rails_admin
93
+ requirement: &87079630 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *79469660
101
+ version_requirements: *87079630
102
102
  description: This gem preps a new Rails app with some of the best Rails gems and Jquery
103
103
  sweetness available( Twitter-Bootstrap, Devise, CanCan, Rails Admin, Spreadsheet,
104
104
  ) Not only does it takes care of the installation of these gems, it also extends
@@ -116,6 +116,8 @@ files:
116
116
  - .gitignore~
117
117
  - Gemfile
118
118
  - Gemfile~
119
+ - README.md
120
+ - README.md~
119
121
  - README.rdoc
120
122
  - Rakefile
121
123
  - doc/<.html