contour 1.0.0.beta12 → 1.0.0.rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. data/CHANGELOG.rdoc +4 -0
  2. data/README.rdoc +83 -14
  3. data/app/assets/images/contour/ajax-loader.gif +0 -0
  4. data/app/assets/javascripts/contour/global.js.coffee +23 -2
  5. data/app/helpers/contour_helper.rb +18 -1
  6. data/app/views/contour/layouts/_per_page.html.erb +7 -0
  7. data/config/initializers/devise.rb +0 -29
  8. data/contour.gemspec +5 -5
  9. data/lib/contour/version.rb +1 -1
  10. data/lib/generators/contour/install/install_generator.rb +30 -0
  11. data/lib/generators/{templates → contour/install/templates}/README +9 -13
  12. data/lib/generators/{templates → contour/install/templates}/contour.rb +0 -0
  13. data/lib/generators/{templates → contour/install/templates}/omniauth.rb +0 -0
  14. data/lib/generators/contour/scaffold/USAGE +15 -0
  15. data/lib/generators/contour/scaffold/scaffold_generator.rb +58 -0
  16. data/lib/generators/contour/scaffold/templates/_form.html.erb +37 -0
  17. data/lib/generators/contour/scaffold/templates/_paginate.html.erb +30 -0
  18. data/lib/generators/contour/scaffold/templates/controller.rb +107 -0
  19. data/lib/generators/contour/scaffold/templates/edit.html.erb +3 -0
  20. data/lib/generators/contour/scaffold/templates/index.html.erb +21 -0
  21. data/lib/generators/contour/scaffold/templates/index.js.erb +1 -0
  22. data/lib/generators/contour/scaffold/templates/new.html.erb +3 -0
  23. data/lib/generators/contour/scaffold/templates/show.html.erb +23 -0
  24. data/test/dummy/config/initializers/devise.rb +14 -13
  25. data/test/dummy/db/test.sqlite3 +0 -0
  26. data/test/dummy/log/test.log +1574 -0
  27. metadata +53 -42
  28. data/lib/generators/contour/install_generator.rb +0 -46
  29. data/lib/generators/templates/devise.rb +0 -142
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contour
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta12
4
+ version: 1.0.0.rc
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-09 00:00:00.000000000 Z
12
+ date: 2012-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70199380143220 !ruby/object:Gem::Requirement
16
+ requirement: &70128809087060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70199380143220
24
+ version_requirements: *70128809087060
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &70199380142700 !ruby/object:Gem::Requirement
27
+ requirement: &70128809084580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: 2.0.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70199380142700
35
+ version_requirements: *70128809084580
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: devise
38
- requirement: &70199380139940 !ruby/object:Gem::Requirement
38
+ requirement: &70128809081660 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 2.1.0.rc
43
+ version: 2.1.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70199380139940
46
+ version_requirements: *70128809081660
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: omniauth
49
- requirement: &70199380139400 !ruby/object:Gem::Requirement
49
+ requirement: &70128809094240 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,76 +54,76 @@ dependencies:
54
54
  version: 1.1.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70199380139400
57
+ version_requirements: *70128809094240
58
58
  - !ruby/object:Gem::Dependency
59
- name: omniauth-openid
60
- requirement: &70199380138940 !ruby/object:Gem::Requirement
59
+ name: omniauth-cas
60
+ requirement: &70128809090620 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: 1.0.1
65
+ version: 0.0.7
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70199380138940
68
+ version_requirements: *70128809090620
69
69
  - !ruby/object:Gem::Dependency
70
- name: omniauth-ldap
71
- requirement: &70199380138220 !ruby/object:Gem::Requirement
70
+ name: omniauth-facebook
71
+ requirement: &70128809089920 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 1.0.2
76
+ version: 1.3.0
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70199380138220
79
+ version_requirements: *70128809089920
80
80
  - !ruby/object:Gem::Dependency
81
- name: omniauth-twitter
82
- requirement: &70199380137760 !ruby/object:Gem::Requirement
81
+ name: omniauth-ldap
82
+ requirement: &70128809111620 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
86
86
  - !ruby/object:Gem::Version
87
- version: 0.0.11
87
+ version: 1.0.2
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70199380137760
90
+ version_requirements: *70128809111620
91
91
  - !ruby/object:Gem::Dependency
92
- name: omniauth-facebook
93
- requirement: &70199380127940 !ruby/object:Gem::Requirement
92
+ name: omniauth-linkedin
93
+ requirement: &70128809108080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
97
97
  - !ruby/object:Gem::Version
98
- version: 1.3.0
98
+ version: 0.0.6
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70199380127940
101
+ version_requirements: *70128809108080
102
102
  - !ruby/object:Gem::Dependency
103
- name: omniauth-linkedin
104
- requirement: &70199380127020 !ruby/object:Gem::Requirement
103
+ name: omniauth-openid
104
+ requirement: &70128809162460 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
- version: 0.0.6
109
+ version: 1.0.1
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70199380127020
112
+ version_requirements: *70128809162460
113
113
  - !ruby/object:Gem::Dependency
114
- name: omniauth-cas
115
- requirement: &70199380126040 !ruby/object:Gem::Requirement
114
+ name: omniauth-twitter
115
+ requirement: &70128809155740 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
119
119
  - !ruby/object:Gem::Version
120
- version: 0.0.7
120
+ version: 0.0.11
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70199380126040
123
+ version_requirements: *70128809155740
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: sqlite3
126
- requirement: &70199380125540 !ruby/object:Gem::Requirement
126
+ requirement: &70128809189760 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,13 +131,14 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70199380125540
134
+ version_requirements: *70128809189760
135
135
  description: Basic Rails Framework files and assets for layout and authentication
136
136
  email: remosm@gmail.com
137
137
  executables: []
138
138
  extensions: []
139
139
  extra_rdoc_files: []
140
140
  files:
141
+ - app/assets/images/contour/ajax-loader.gif
141
142
  - app/assets/images/contour/cas_32.png
142
143
  - app/assets/images/contour/cas_64.png
143
144
  - app/assets/images/contour/facebook_32.png
@@ -452,6 +453,7 @@ files:
452
453
  - app/views/contour/confirmations/new.html.erb
453
454
  - app/views/contour/layouts/_latest_news.html.erb
454
455
  - app/views/contour/layouts/_menu.html.erb
456
+ - app/views/contour/layouts/_per_page.html.erb
455
457
  - app/views/contour/layouts/application.html.erb
456
458
  - app/views/contour/passwords/edit.html.erb
457
459
  - app/views/contour/passwords/new.html.erb
@@ -469,11 +471,20 @@ files:
469
471
  - lib/contour/fixes.rb
470
472
  - lib/contour/version.rb
471
473
  - lib/contour.rb
472
- - lib/generators/contour/install_generator.rb
473
- - lib/generators/templates/contour.rb
474
- - lib/generators/templates/devise.rb
475
- - lib/generators/templates/omniauth.rb
476
- - lib/generators/templates/README
474
+ - lib/generators/contour/install/install_generator.rb
475
+ - lib/generators/contour/install/templates/contour.rb
476
+ - lib/generators/contour/install/templates/omniauth.rb
477
+ - lib/generators/contour/install/templates/README
478
+ - lib/generators/contour/scaffold/scaffold_generator.rb
479
+ - lib/generators/contour/scaffold/templates/_form.html.erb
480
+ - lib/generators/contour/scaffold/templates/_paginate.html.erb
481
+ - lib/generators/contour/scaffold/templates/controller.rb
482
+ - lib/generators/contour/scaffold/templates/edit.html.erb
483
+ - lib/generators/contour/scaffold/templates/index.html.erb
484
+ - lib/generators/contour/scaffold/templates/index.js.erb
485
+ - lib/generators/contour/scaffold/templates/new.html.erb
486
+ - lib/generators/contour/scaffold/templates/show.html.erb
487
+ - lib/generators/contour/scaffold/USAGE
477
488
  - CHANGELOG.rdoc
478
489
  - contour.gemspec
479
490
  - LICENSE
@@ -1,46 +0,0 @@
1
- module Contour
2
- module Generators
3
- class InstallGenerator < Rails::Generators::Base
4
- source_root File.expand_path("../../templates", __FILE__)
5
-
6
- desc "Creates a Contour initializer"
7
- # class_option :orm
8
-
9
- def copy_initializer
10
- template "contour.rb", "config/initializers/contour.rb"
11
- end
12
-
13
- # def copy_devise
14
- # template "devise.rb", "config/initializers/devise.rb"
15
- # end
16
-
17
- def copy_omniauth
18
- template "omniauth.rb", "config/initializers/omniauth.rb"
19
- end
20
-
21
- def install_devise
22
- generate("devise:install")
23
- # model_name = ask("What would you like the user model to be called? [user]")
24
- # model_name = "user" if model_name.blank?
25
- model_name = "user"
26
- generate("devise", model_name)
27
- end
28
-
29
- def add_contour_devise_route
30
- route "devise_for :users, controllers: { registrations: 'contour/registrations', sessions: 'contour/sessions', passwords: 'contour/passwords', confirmations: 'contour/confirmations', unlocks: 'contour/unlocks' }, path_names: { sign_up: 'register', sign_in: 'login' }"
31
- end
32
-
33
- def show_readme
34
- readme "README" if behavior == :invoke
35
- end
36
-
37
- # def copy_locale
38
- # copy_file "../../../config/locales/en.yml", "config/locales/contour.en.yml"
39
- # end
40
- #
41
- # def show_readme
42
- # readme "README" if behavior == :invoke
43
- # end
44
- end
45
- end
46
- end
@@ -1,142 +0,0 @@
1
- # Use this hook to configure devise mailer, warden hooks and so forth. The first
2
- # four configuration values can also be set straight in your models.
3
- Devise.setup do |config|
4
- # ==> Mailer Configuration
5
- # Configure the e-mail address which will be shown in DeviseMailer.
6
- config.mailer_sender = "please-change-me@config-initializers-devise.com"
7
-
8
- # Configure the class responsible to send e-mails.
9
- # config.mailer = "Devise::Mailer"
10
-
11
- # ==> ORM configuration
12
- # Load and configure the ORM. Supports :active_record (default) and
13
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
14
- # available as additional gems.
15
- require 'devise/orm/active_record'
16
-
17
- # ==> Configuration for any authentication mechanism
18
- # Configure which keys are used when authenticating an user. By default is
19
- # just :email. You can configure it to use [:username, :subdomain], so for
20
- # authenticating an user, both parameters are required. Remember that those
21
- # parameters are used only when authenticating and not when retrieving from
22
- # session. If you need permissions, you should implement that in a before filter.
23
- # config.authentication_keys = [ :email ]
24
-
25
- # Tell if authentication through request.params is enabled. True by default.
26
- # config.params_authenticatable = true
27
-
28
- # Tell if authentication through HTTP Basic Auth is enabled. True by default.
29
- # config.http_authenticatable = true
30
-
31
- # Set this to true to use Basic Auth for AJAX requests. True by default.
32
- # config.http_authenticatable_on_xhr = true
33
-
34
- # The realm used in Http Basic Authentication
35
- # config.http_authentication_realm = "Application"
36
-
37
- # ==> Configuration for :database_authenticatable
38
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
39
- # using other encryptors, it sets how many times you want the password re-encrypted.
40
- config.stretches = Rails.env.test? ? 1 : 10
41
-
42
- # Define which will be the encryption algorithm. Devise also supports encryptors
43
- # from others authentication tools as :clearance_sha1, :authlogic_sha512 (then
44
- # you should set stretches above to 20 for default behavior) and :restful_authentication_sha1
45
- # (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
46
- config.encryptor = :bcrypt
47
-
48
- # Setup a pepper to generate the encrypted password.
49
- config.pepper = "c4ee59fb687661675e930b1394e179db1bbe9147766f161a450e5f6dcdd4110195c0496be28b5321f68a29a2c6fb5728db87b32779231dae57b4c93460406e16"
50
-
51
- # ==> Configuration for :confirmable
52
- # The time you want to give your user to confirm his account. During this time
53
- # he will be able to access your application without confirming. Default is nil.
54
- # When confirm_within is zero, the user won't be able to sign in without confirming.
55
- # You can use this to let your user access some features of your application
56
- # without confirming the account, but blocking it after a certain period
57
- # (ie 2 days).
58
- # config.confirm_within = 2.days
59
-
60
- # ==> Configuration for :rememberable
61
- # The time the user will be remembered without asking for credentials again.
62
- # config.remember_for = 2.weeks
63
-
64
- # If true, a valid remember token can be re-used between multiple browsers.
65
- # config.remember_across_browsers = true
66
-
67
- # If true, extends the user's remember period when remembered via cookie.
68
- # config.extend_remember_period = false
69
-
70
- # ==> Configuration for :validatable
71
- # Range for password length
72
- # config.password_length = 6..20
73
-
74
- # Regex to use to validate the email address
75
- # config.email_regexp = /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i
76
-
77
- # ==> Configuration for :timeoutable
78
- # The time you want to timeout the user session without activity. After this
79
- # time the user will be asked for credentials again.
80
- config.timeout_in = 8.hours
81
-
82
- # ==> Configuration for :lockable
83
- # Defines which strategy will be used to lock an account.
84
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
85
- # :none = No lock strategy. You should handle locking by yourself.
86
- # config.lock_strategy = :failed_attempts
87
-
88
- # Defines which strategy will be used to unlock an account.
89
- # :email = Sends an unlock link to the user email
90
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
91
- # :both = Enables both strategies
92
- # :none = No unlock strategy. You should handle unlocking by yourself.
93
- # config.unlock_strategy = :both
94
-
95
- # Number of authentication tries before locking an account if lock_strategy
96
- # is failed attempts.
97
- # config.maximum_attempts = 20
98
-
99
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
100
- # config.unlock_in = 1.hour
101
-
102
- # ==> Configuration for :token_authenticatable
103
- # Defines name of the authentication token params key
104
- # config.token_authentication_key = :auth_token
105
-
106
- # ==> Scopes configuration
107
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
108
- # "users/sessions/new". It's turned off by default because it's slower if you
109
- # are using only default views.
110
- # config.scoped_views = true
111
-
112
- # Configure the default scope given to Warden. By default it's the first
113
- # devise role declared in your routes.
114
- # config.default_scope = :user
115
-
116
- # Configure sign_out behavior.
117
- # By default sign_out is scoped (i.e. /users/sign_out affects only :user scope).
118
- # In case of sign_out_all_scopes set to true any logout action will sign out all active scopes.
119
- # config.sign_out_all_scopes = false
120
-
121
- # ==> Navigation configuration
122
- # Lists the formats that should be treated as navigational. Formats like
123
- # :html, should redirect to the sign in page when the user does not have
124
- # access, but formats like :xml or :json, should return 401.
125
- # If you have any extra navigational formats, like :iphone or :mobile, you
126
- # should add them to the navigational formats lists. Default is [:html]
127
- # config.navigational_formats = [:html, :iphone]
128
-
129
- # ==> Warden configuration
130
- # If you want to use other strategies, that are not (yet) supported by Devise,
131
- # you can configure them inside the config.warden block. The example below
132
- # allows you to setup OAuth, using http://github.com/roman/warden_oauth
133
- #
134
- # config.warden do |manager|
135
- # manager.oauth(:twitter) do |twitter|
136
- # twitter.consumer_secret = <YOUR CONSUMER SECRET>
137
- # twitter.consumer_key = <YOUR CONSUMER KEY>
138
- # twitter.options :site => 'http://twitter.com'
139
- # end
140
- # manager.default_strategies(:scope => :user).unshift :twitter_oauth
141
- # end
142
- end