activeportal 0.0.1.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a4fef94ae3a148e7104af51a893c4433ae39392f
4
+ data.tar.gz: fa6715860d520e8a0b23687b7fcf3d6c50972cb8
5
+ SHA512:
6
+ metadata.gz: 5089727da4e7a187a8aa763ca4c82a6d85a9598ab41f322d31637a11024b52006be01c31f52e6c9f6f6febaf1ac1b9eafadf23609dcec6e2e06c6f3f78eb1fc8
7
+ data.tar.gz: 767b7b65326abb3a8e881274468a1ab397c51e42f3058f2b7475138079faf50263e1766975969891b54a682761bd10b787104cba1f1efdef5a3431d14371b8aa
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2014 Jozsef Nyitrai
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'ActivePortal'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,25 @@
1
+ module ActivePortal
2
+ class ApplicationController < ActionController::Base
3
+ before_action :set_locale
4
+ # layout 'application'
5
+
6
+ def default_url_options(options = {})
7
+ options.merge(locale: I18n.locale)
8
+ end
9
+
10
+ protected
11
+
12
+ def set_locale
13
+ I18n.locale = I18n.default_locale
14
+ locale = params[:locale].to_sym if params[:locale]
15
+ if locale && I18n.available_locales.include?(locale)
16
+ logger.debug "#set_locale: Language detected from query string: ?locale=#{locale}"
17
+ I18n.locale = locale
18
+ elsif request.env['HTTP_ACCEPT_LANGUAGE']
19
+ logger.debug "#set_locale Accept-Language: #{request.env['HTTP_ACCEPT_LANGUAGE']}"
20
+ I18n.locale = http_accept_language.compatible_language_from(I18n.available_locales)
21
+ end
22
+ logger.debug "#set_locale Locale set to '#{I18n.locale}'"
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,4 @@
1
+ module ActivePortal
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ActivePortal
2
+ class User < ActiveRecord::Base
3
+ end
4
+ end
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>ActivePortal</title>
5
+ <%= stylesheet_link_tag "active_portal/application", media: "all" %>
6
+ <%= javascript_include_tag "active_portal/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+ <p class="notice"><%= notice %></p>
11
+ <p class="alert"><%= alert %></p>
12
+ <%= yield %>
13
+
14
+ </body>
15
+ </html>
@@ -0,0 +1,31 @@
1
+ sqlite: &sqlite
2
+ adapter: sqlite3
3
+ database: db/<%= Rails.env %>.sqlite3
4
+
5
+ mysql: &mysql
6
+ adapter: mysql2
7
+ username: root
8
+ password:
9
+ database: strano_<%= Rails.env %>
10
+
11
+ postgresql: &postgresql
12
+ adapter: postgresql
13
+ username: postgres
14
+ password:
15
+ database: strano_<%= Rails.env %>
16
+ min_messages: ERROR
17
+
18
+ defaults: &defaults
19
+ pool: 5
20
+ timeout: 5000
21
+ host: localhost
22
+ <<: *<%= ENV['DB'] || "postgresql" %>
23
+
24
+ development:
25
+ <<: *defaults
26
+
27
+ test:
28
+ <<: *defaults
29
+
30
+ production:
31
+ <<: *defaults
@@ -0,0 +1,11 @@
1
+ require 'devise'
2
+
3
+ Devise.setup do |config|
4
+ # It should be a symbol containing the name
5
+ # of the mountable engine's named-route set.
6
+ config.router_name = :active_portal
7
+
8
+ # You probably want Devise's controllers to inherit from your engine's
9
+ # controller and not the main controller.
10
+ config.parent_controller = 'ActivePortal::ApplicationController'
11
+ end
@@ -0,0 +1,59 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your account was successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid email or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account will be locked."
15
+ not_found_in_database: "Invalid email or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your account before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock Instructions"
26
+ omniauth_callbacks:
27
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
+ success: "Successfully authenticated from %{kind} account."
29
+ passwords:
30
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
32
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33
+ updated: "Your password was changed successfully. You are now signed in."
34
+ updated_not_active: "Your password was changed successfully."
35
+ registrations:
36
+ destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
37
+ signed_up: "Welcome! You have signed up successfully."
38
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
41
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
42
+ updated: "You updated your account successfully."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ unlocks:
47
+ send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
48
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
49
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50
+ errors:
51
+ messages:
52
+ already_confirmed: "was already confirmed, please try signing in"
53
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
54
+ expired: "has expired, please request a new one"
55
+ not_found: "not found"
56
+ not_locked: "was not locked"
57
+ not_saved:
58
+ one: "1 error prohibited this %{resource} from being saved:"
59
+ other: "%{count} errors prohibited this %{resource} from being saved:"
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ ActivePortal::Engine.routes.draw do
2
+ devise_for :users, class_name: 'ActivePortal::User', module: :devise
3
+ end
@@ -0,0 +1,41 @@
1
+ class DeviseCreateActivePortalUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:active_portal_users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, null: false, default: ''
6
+ t.string :encrypted_password, null: false, default: ''
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, default: 0, null: false
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ t.string :confirmation_token
24
+ t.datetime :confirmed_at
25
+ t.datetime :confirmation_sent_at
26
+ t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
30
+ t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ t.datetime :locked_at
32
+
33
+ t.timestamps
34
+ end
35
+
36
+ add_index :active_portal_users, :email, unique: true
37
+ add_index :active_portal_users, :reset_password_token, unique: true
38
+ add_index :active_portal_users, :confirmation_token, unique: true
39
+ # add_index :active_portal_users, :unlock_token, unique: true
40
+ end
41
+ end
@@ -0,0 +1,8 @@
1
+ require 'devise-i18n-bootstrap'
2
+ require 'devise'
3
+ require 'http_accept_language'
4
+ require 'active_portal/engine'
5
+ require 'active_portal/version'
6
+
7
+ module ActivePortal
8
+ end
@@ -0,0 +1,5 @@
1
+ module ActivePortal
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace ActivePortal
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module ActivePortal
2
+ VERSION = '0.0.1.beta1'.freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :active_portal do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activeportal
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.beta1
5
+ platform: ruby
6
+ authors:
7
+ - Jozsef Nyitrai
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 4.1.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 4.1.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: devise-i18n-bootstrap
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: devise
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: http_accept_language
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pg
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.0.beta
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.0.beta
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.0.0.beta
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.0.0.beta
111
+ - !ruby/object:Gem::Dependency
112
+ name: capybara
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: factory_girl_rails
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: database_cleaner
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: This gem make easier to building modern web 2.0 portals using Ruby on
154
+ Rails.
155
+ email:
156
+ - nyitrai.jozsef@gmail.com
157
+ executables: []
158
+ extensions: []
159
+ extra_rdoc_files: []
160
+ files:
161
+ - MIT-LICENSE
162
+ - Rakefile
163
+ - app/assets/javascripts/active_portal/application.js
164
+ - app/assets/stylesheets/active_portal/application.css
165
+ - app/controllers/active_portal/application_controller.rb
166
+ - app/helpers/active_portal/application_helper.rb
167
+ - app/models/active_portal/user.rb
168
+ - app/views/layouts/active_portal/application.html.erb
169
+ - config/database.travis.yml
170
+ - config/initializers/devise.rb
171
+ - config/locales/devise.en.yml
172
+ - config/routes.rb
173
+ - db/migrate/20140513204651_devise_create_active_portal_users.rb
174
+ - lib/active_portal.rb
175
+ - lib/active_portal/engine.rb
176
+ - lib/active_portal/version.rb
177
+ - lib/tasks/active_portal_tasks.rake
178
+ homepage: http://github.com/nyjt/activeportal
179
+ licenses:
180
+ - MIT
181
+ metadata: {}
182
+ post_install_message:
183
+ rdoc_options: []
184
+ require_paths:
185
+ - lib
186
+ required_ruby_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">"
194
+ - !ruby/object:Gem::Version
195
+ version: 1.3.1
196
+ requirements: []
197
+ rubyforge_project:
198
+ rubygems_version: 2.2.2
199
+ signing_key:
200
+ specification_version: 4
201
+ summary: Ruby on Rails portal gem
202
+ test_files: []