venice-chr 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +20 -0
  3. data/Gemfile +40 -0
  4. data/Gemfile.lock +481 -0
  5. data/Procfile +1 -0
  6. data/README.md +62 -0
  7. data/Rakefile +8 -0
  8. data/app/assets/fonts/ProximaNovaRegular.eot +0 -0
  9. data/app/assets/fonts/ProximaNovaRegular.ttf +0 -0
  10. data/app/assets/fonts/ProximaNovaRegular.woff +0 -0
  11. data/app/assets/fonts/ProximaNovaSemibold.eot +0 -0
  12. data/app/assets/fonts/ProximaNovaSemibold.ttf +0 -0
  13. data/app/assets/fonts/ProximaNovaSemibold.woff +0 -0
  14. data/app/assets/images/.keep +0 -0
  15. data/app/assets/javascripts/admin/settings/config.coffee +9 -0
  16. data/app/assets/javascripts/admin/settings/general.coffee +52 -0
  17. data/app/assets/javascripts/admin.coffee +39 -0
  18. data/app/assets/javascripts/application.coffee +2 -0
  19. data/app/assets/stylesheets/admin.scss +50 -0
  20. data/app/assets/stylesheets/application.scss +4 -0
  21. data/app/assets/stylesheets/themes/venice/base.scss +163 -0
  22. data/app/assets/stylesheets/themes/venice/desktop.scss +132 -0
  23. data/app/assets/stylesheets/themes/venice/mobile.scss +95 -0
  24. data/app/assets/stylesheets/themes/venice.scss +12 -0
  25. data/app/controllers/admin/base_controller.rb +17 -0
  26. data/app/controllers/admin/devise_overrides/passwords_controller.rb +11 -0
  27. data/app/controllers/admin/devise_overrides/sessions_controller.rb +20 -0
  28. data/app/controllers/application_controller.rb +7 -0
  29. data/app/controllers/concerns/load_settings.rb +23 -0
  30. data/app/helpers/application_helper.rb +102 -0
  31. data/app/helpers/body_class_helper.rb +15 -0
  32. data/app/mailers/.keep +0 -0
  33. data/app/models/.keep +0 -0
  34. data/app/models/concerns/.keep +0 -0
  35. data/app/models/venice_settings.rb +2 -0
  36. data/app/views/admin/devise_overrides/passwords/edit.html.erb +31 -0
  37. data/app/views/admin/devise_overrides/passwords/new.html.erb +19 -0
  38. data/app/views/admin/devise_overrides/sessions/new.html.erb +29 -0
  39. data/app/views/admin/index.html.erb +5 -0
  40. data/app/views/application/_footer.html.erb +3 -0
  41. data/app/views/application/_header.html.erb +17 -0
  42. data/app/views/application/_javascript.html.erb +7 -0
  43. data/app/views/kaminari/_first_page.html.erb +15 -0
  44. data/app/views/kaminari/_gap.html.erb +8 -0
  45. data/app/views/kaminari/_last_page.html.erb +15 -0
  46. data/app/views/kaminari/_next_page.html.erb +15 -0
  47. data/app/views/kaminari/_page.html.erb +12 -0
  48. data/app/views/kaminari/_paginator.html.erb +23 -0
  49. data/app/views/kaminari/_prev_page.html.erb +15 -0
  50. data/app/views/layouts/admin.html.erb +21 -0
  51. data/app/views/layouts/application.html.erb +22 -0
  52. data/bin/bundle +3 -0
  53. data/bin/deploy-heroku +35 -0
  54. data/bin/rails +8 -0
  55. data/bin/rake +8 -0
  56. data/bin/setup +35 -0
  57. data/bin/spring +15 -0
  58. data/bin/venice +12 -0
  59. data/config/application.rb +40 -0
  60. data/config/boot.rb +3 -0
  61. data/config/environment.rb +5 -0
  62. data/config/environments/development.rb +40 -0
  63. data/config/environments/production.rb +96 -0
  64. data/config/environments/staging.rb +9 -0
  65. data/config/environments/test.rb +44 -0
  66. data/config/initializers/assets.rb +11 -0
  67. data/config/initializers/backtrace_silencers.rb +7 -0
  68. data/config/initializers/bypass_ssl_verification_for_open_uri.rb +1 -0
  69. data/config/initializers/carrierwave.rb +21 -0
  70. data/config/initializers/cookies_serializer.rb +3 -0
  71. data/config/initializers/devise.rb +262 -0
  72. data/config/initializers/errors.rb +34 -0
  73. data/config/initializers/filter_parameter_logging.rb +4 -0
  74. data/config/initializers/inflections.rb +16 -0
  75. data/config/initializers/json_encoding.rb +1 -0
  76. data/config/initializers/kaminari_config.rb +10 -0
  77. data/config/initializers/mime_types.rb +4 -0
  78. data/config/initializers/session_store.rb +3 -0
  79. data/config/initializers/wrap_parameters.rb +9 -0
  80. data/config/locales/devise.en.yml +60 -0
  81. data/config/locales/en.yml +23 -0
  82. data/config/mongoid.yml +106 -0
  83. data/config/routes.rb +35 -0
  84. data/config/secrets.yml +14 -0
  85. data/config/smtp.rb +9 -0
  86. data/config/unicorn.rb +17 -0
  87. data/config.ru +4 -0
  88. data/db/seeds.rb +10 -0
  89. data/lib/assets/.keep +0 -0
  90. data/lib/tasks/.keep +0 -0
  91. data/lib/venice/kit.rb +39 -0
  92. data/lib/venice/version.rb +3 -0
  93. data/lib/venice.rb +2 -0
  94. data/public/404.html +69 -0
  95. data/public/422.html +69 -0
  96. data/public/500.html +68 -0
  97. data/public/favicon.ico +0 -0
  98. data/public/robots.txt +5 -0
  99. data/vendor/assets/javascripts/.keep +0 -0
  100. data/vendor/assets/stylesheets/.keep +0 -0
  101. data/venice-chr.gemspec +23 -0
  102. metadata +187 -0
@@ -0,0 +1,11 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")
5
+
6
+ # Add additional assets to the asset load path
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+
9
+ # Precompile additional assets.
10
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11
+ Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1 @@
1
+ OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
@@ -0,0 +1,21 @@
1
+ CarrierWave.configure do |config|
2
+ config.storage = :file
3
+ config.cache_dir = "#{Rails.root}/public/uploads/tmp"
4
+
5
+ if Rails.env.test?
6
+ config.cache_dir = "#{Rails.root}/public/uploads/tmp/test"
7
+ config.enable_processing = false
8
+ end
9
+
10
+ if Rails.env.production? || Rails.env.staging?
11
+ if ENV.has_key? "FOG_DIRECTORY"
12
+ config.storage = :fog
13
+ config.fog_directory = ENV.fetch("FOG_DIRECTORY")
14
+ config.fog_credentials = {
15
+ provider: "AWS",
16
+ aws_access_key_id: ENV.fetch("AWS_ACCESS_KEY_ID"),
17
+ aws_secret_access_key: ENV.fetch("AWS_SECRET_ACCESS_KEY"),
18
+ }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,262 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ # The secret key used by Devise. Devise uses this key to generate
5
+ # random tokens. Changing this key will render invalid all existing
6
+ # confirmation, reset password and unlock tokens in the database.
7
+ # Devise will use the `secret_key_base` on Rails 4+ applications as its `secret_key`
8
+ # by default. You can change it below and use your own secret key.
9
+ # config.secret_key = 'ee42f2af11f26a2df49fc0213a5643c031680162ad3a4665df8921eef7ed1b6eb98ae9c89605e4d5085b9adfb2a47bf0edef36c661d46c1d602b59ce2475c38f'
10
+
11
+ # ==> Mailer Configuration
12
+ # Configure the e-mail address which will be shown in Devise::Mailer,
13
+ # note that it will be overwritten if you use your own mailer class
14
+ # with default "from" parameter.
15
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
16
+
17
+ # Configure the class responsible to send e-mails.
18
+ # config.mailer = 'Devise::Mailer'
19
+
20
+ # ==> ORM configuration
21
+ # Load and configure the ORM. Supports :active_record (default) and
22
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
23
+ # available as additional gems.
24
+ require 'devise/orm/mongoid'
25
+
26
+ # ==> Configuration for any authentication mechanism
27
+ # Configure which keys are used when authenticating a user. The default is
28
+ # just :email. You can configure it to use [:username, :subdomain], so for
29
+ # authenticating a user, both parameters are required. Remember that those
30
+ # parameters are used only when authenticating and not when retrieving from
31
+ # session. If you need permissions, you should implement that in a before filter.
32
+ # You can also supply a hash where the value is a boolean determining whether
33
+ # or not authentication should be aborted when the value is not present.
34
+ # config.authentication_keys = [:email]
35
+
36
+ # Configure parameters from the request object used for authentication. Each entry
37
+ # given should be a request method and it will automatically be passed to the
38
+ # find_for_authentication method and considered in your model lookup. For instance,
39
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
40
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
41
+ # config.request_keys = []
42
+
43
+ # Configure which authentication keys should be case-insensitive.
44
+ # These keys will be downcased upon creating or modifying a user and when used
45
+ # to authenticate or find a user. Default is :email.
46
+ config.case_insensitive_keys = [:email]
47
+
48
+ # Configure which authentication keys should have whitespace stripped.
49
+ # These keys will have whitespace before and after removed upon creating or
50
+ # modifying a user and when used to authenticate or find a user. Default is :email.
51
+ config.strip_whitespace_keys = [:email]
52
+
53
+ # Tell if authentication through request.params is enabled. True by default.
54
+ # It can be set to an array that will enable params authentication only for the
55
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
56
+ # enable it only for database (email + password) authentication.
57
+ # config.params_authenticatable = true
58
+
59
+ # Tell if authentication through HTTP Auth is enabled. False by default.
60
+ # It can be set to an array that will enable http authentication only for the
61
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
62
+ # enable it only for database authentication. The supported strategies are:
63
+ # :database = Support basic authentication with authentication key + password
64
+ # config.http_authenticatable = false
65
+
66
+ # If 401 status code should be returned for AJAX requests. True by default.
67
+ # config.http_authenticatable_on_xhr = true
68
+
69
+ # The realm used in Http Basic Authentication. 'Application' by default.
70
+ # config.http_authentication_realm = 'Application'
71
+
72
+ # It will change confirmation, password recovery and other workflows
73
+ # to behave the same regardless if the e-mail provided was right or wrong.
74
+ # Does not affect registerable.
75
+ # config.paranoid = true
76
+
77
+ # By default Devise will store the user in session. You can skip storage for
78
+ # particular strategies by setting this option.
79
+ # Notice that if you are skipping storage for all authentication paths, you
80
+ # may want to disable generating routes to Devise's sessions controller by
81
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
82
+ config.skip_session_storage = [:http_auth]
83
+
84
+ # By default, Devise cleans up the CSRF token on authentication to
85
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
86
+ # requests for sign in and sign up, you need to get a new CSRF token
87
+ # from the server. You can disable this option at your own risk.
88
+ # config.clean_up_csrf_token_on_authentication = true
89
+
90
+ # ==> Configuration for :database_authenticatable
91
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
92
+ # using other encryptors, it sets how many times you want the password re-encrypted.
93
+ #
94
+ # Limiting the stretches to just one in testing will increase the performance of
95
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
96
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
97
+ # encryptor), the cost increases exponentially with the number of stretches (e.g.
98
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
99
+ config.stretches = Rails.env.test? ? 1 : 10
100
+
101
+ # Setup a pepper to generate the encrypted password.
102
+ # config.pepper = 'dca0e105390ba0b2a8a04f9a1b79d819c9af20c54c995630843fbd47eda471e1298f1a10d627716bd3e31d0b023b35d78bc58582851affe1526504f76735195c'
103
+
104
+ # ==> Configuration for :confirmable
105
+ # A period that the user is allowed to access the website even without
106
+ # confirming their account. For instance, if set to 2.days, the user will be
107
+ # able to access the website for two days without confirming their account,
108
+ # access will be blocked just in the third day. Default is 0.days, meaning
109
+ # the user cannot access the website without confirming their account.
110
+ # config.allow_unconfirmed_access_for = 2.days
111
+
112
+ # A period that the user is allowed to confirm their account before their
113
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
114
+ # their account within 3 days after the mail was sent, but on the fourth day
115
+ # their account can't be confirmed with the token any more.
116
+ # Default is nil, meaning there is no restriction on how long a user can take
117
+ # before confirming their account.
118
+ # config.confirm_within = 3.days
119
+
120
+ # If true, requires any email changes to be confirmed (exactly the same way as
121
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
122
+ # db field (see migrations). Until confirmed, new email is stored in
123
+ # unconfirmed_email column, and copied to email column on successful confirmation.
124
+ config.reconfirmable = true
125
+
126
+ # Defines which key will be used when confirming an account
127
+ # config.confirmation_keys = [:email]
128
+
129
+ # ==> Configuration for :rememberable
130
+ # The time the user will be remembered without asking for credentials again.
131
+ # config.remember_for = 2.weeks
132
+
133
+ # Invalidates all the remember me tokens when the user signs out.
134
+ config.expire_all_remember_me_on_sign_out = true
135
+
136
+ # If true, extends the user's remember period when remembered via cookie.
137
+ # config.extend_remember_period = false
138
+
139
+ # Options to be passed to the created cookie. For instance, you can set
140
+ # secure: true in order to force SSL only cookies.
141
+ # config.rememberable_options = {}
142
+
143
+ # ==> Configuration for :validatable
144
+ # Range for password length.
145
+ config.password_length = 8..72
146
+
147
+ # Email regex used to validate email formats. It simply asserts that
148
+ # one (and only one) @ exists in the given string. This is mainly
149
+ # to give user feedback and not to assert the e-mail validity.
150
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
151
+
152
+ # ==> Configuration for :timeoutable
153
+ # The time you want to timeout the user session without activity. After this
154
+ # time the user will be asked for credentials again. Default is 30 minutes.
155
+ # config.timeout_in = 30.minutes
156
+
157
+ # ==> Configuration for :lockable
158
+ # Defines which strategy will be used to lock an account.
159
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
160
+ # :none = No lock strategy. You should handle locking by yourself.
161
+ # config.lock_strategy = :failed_attempts
162
+
163
+ # Defines which key will be used when locking and unlocking an account
164
+ # config.unlock_keys = [:email]
165
+
166
+ # Defines which strategy will be used to unlock an account.
167
+ # :email = Sends an unlock link to the user email
168
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
169
+ # :both = Enables both strategies
170
+ # :none = No unlock strategy. You should handle unlocking by yourself.
171
+ # config.unlock_strategy = :both
172
+
173
+ # Number of authentication tries before locking an account if lock_strategy
174
+ # is failed attempts.
175
+ # config.maximum_attempts = 20
176
+
177
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
178
+ # config.unlock_in = 1.hour
179
+
180
+ # Warn on the last attempt before the account is locked.
181
+ # config.last_attempt_warning = true
182
+
183
+ # ==> Configuration for :recoverable
184
+ #
185
+ # Defines which key will be used when recovering the password for an account
186
+ # config.reset_password_keys = [:email]
187
+
188
+ # Time interval you can reset your password with a reset password key.
189
+ # Don't put a too small interval or your users won't have the time to
190
+ # change their passwords.
191
+ config.reset_password_within = 6.hours
192
+
193
+ # When set to false, does not sign a user in automatically after their password is
194
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
195
+ # config.sign_in_after_reset_password = true
196
+
197
+ # ==> Configuration for :encryptable
198
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
199
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
200
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
201
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
202
+ # REST_AUTH_SITE_KEY to pepper).
203
+ #
204
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
205
+ # config.encryptor = :sha512
206
+
207
+ # ==> Scopes configuration
208
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
209
+ # "users/sessions/new". It's turned off by default because it's slower if you
210
+ # are using only default views.
211
+ config.scoped_views = true
212
+
213
+ # Configure the default scope given to Warden. By default it's the first
214
+ # devise role declared in your routes (usually :user).
215
+ # config.default_scope = :user
216
+
217
+ # Set this configuration to false if you want /users/sign_out to sign out
218
+ # only the current scope. By default, Devise signs out all scopes.
219
+ config.sign_out_all_scopes = false
220
+
221
+ # ==> Navigation configuration
222
+ # Lists the formats that should be treated as navigational. Formats like
223
+ # :html, should redirect to the sign in page when the user does not have
224
+ # access, but formats like :xml or :json, should return 401.
225
+ #
226
+ # If you have any extra navigational formats, like :iphone or :mobile, you
227
+ # should add them to the navigational formats lists.
228
+ #
229
+ # The "*/*" below is required to match Internet Explorer requests.
230
+ # config.navigational_formats = ['*/*', :html]
231
+
232
+ # The default HTTP method used to sign out a resource. Default is :delete.
233
+ config.sign_out_via = :delete
234
+
235
+ # ==> OmniAuth
236
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
237
+ # up on your models and hooks.
238
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
239
+
240
+ # ==> Warden configuration
241
+ # If you want to use other strategies, that are not supported by Devise, or
242
+ # change the failure app, you can configure them inside the config.warden block.
243
+ #
244
+ # config.warden do |manager|
245
+ # manager.intercept_401 = false
246
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
247
+ # end
248
+
249
+ # ==> Mountable engine configurations
250
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
251
+ # is mountable, there are some extra configurations to be taken into account.
252
+ # The following options are available, assuming the engine is mounted as:
253
+ #
254
+ # mount MyEngine, at: '/my_engine'
255
+ #
256
+ # The router that invoked `devise_for`, in the example above, would be:
257
+ # config.router_name = :my_engine
258
+ #
259
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
260
+ # so you need to do it manually. For the users scope, it would be:
261
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
262
+ end
@@ -0,0 +1,34 @@
1
+ require "net/http"
2
+ require "net/smtp"
3
+
4
+ # Example:
5
+ # begin
6
+ # some http call
7
+ # rescue *HTTP_ERRORS => error
8
+ # notify_hoptoad error
9
+ # end
10
+
11
+ HTTP_ERRORS = [
12
+ EOFError,
13
+ Errno::ECONNRESET,
14
+ Errno::EINVAL,
15
+ Net::HTTPBadResponse,
16
+ Net::HTTPHeaderSyntaxError,
17
+ Net::ProtocolError,
18
+ Timeout::Error
19
+ ]
20
+
21
+ SMTP_SERVER_ERRORS = [
22
+ IOError,
23
+ Net::SMTPAuthenticationError,
24
+ Net::SMTPServerBusy,
25
+ Net::SMTPUnknownError,
26
+ TimeoutError
27
+ ]
28
+
29
+ SMTP_CLIENT_ERRORS = [
30
+ Net::SMTPFatalError,
31
+ Net::SMTPSyntaxError
32
+ ]
33
+
34
+ SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1 @@
1
+ ActiveSupport::JSON::Encoding.time_precision = 0
@@ -0,0 +1,10 @@
1
+ Kaminari.configure do |config|
2
+ # config.default_per_page = 25
3
+ # config.max_per_page = nil
4
+ # config.window = 4
5
+ # config.outer_window = 0
6
+ # config.left = 0
7
+ # config.right = 0
8
+ # config.page_method_name = :page
9
+ # config.param_name = :page
10
+ end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_venice_session'
@@ -0,0 +1,9 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
@@ -0,0 +1,60 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address 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 %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} 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 email address 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 has been changed successfully. You are now signed in."
34
+ updated_not_active: "Your password has been changed successfully."
35
+ registrations:
36
+ destroyed: "Bye! Your account has been 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 follow 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 follow the confirm link to confirm your new email address."
42
+ updated: "Your account has been updated successfully."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ already_signed_out: "Signed out successfully."
47
+ unlocks:
48
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
49
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
50
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
51
+ errors:
52
+ messages:
53
+ already_confirmed: "was already confirmed, please try signing in"
54
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
55
+ expired: "has expired, please request a new one"
56
+ not_found: "not found"
57
+ not_locked: "was not locked"
58
+ not_saved:
59
+ one: "1 error prohibited this %{resource} from being saved:"
60
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,106 @@
1
+ development:
2
+ # Configure available database sessions. (required)
3
+ clients:
4
+ # Defines the default session. (required)
5
+ default:
6
+ # Defines the name of the default database that Mongoid can connect to.
7
+ # (required).
8
+ database: venice_development
9
+ # Provides the hosts the default session can connect to. Must be an array
10
+ # of host:port pairs. (required)
11
+ hosts:
12
+ - localhost:27017
13
+ options:
14
+ # Change the default write concern. (default = { w: 1 })
15
+ # write:
16
+ # w: 1
17
+
18
+ # Change the default consistency model to primary, secondary.
19
+ # 'secondary' will send reads to secondaries, 'primary' sends everything
20
+ # to master. (default: primary)
21
+ # read: secondary_preferred
22
+
23
+ # How many times Moped should attempt to retry an operation after
24
+ # failure. (default: The number of nodes in the cluster)
25
+ # max_retries: 20
26
+
27
+ # The time in seconds that Moped should wait before retrying an
28
+ # operation on failure. (default: 0.25)
29
+ # retry_interval: 0.25
30
+
31
+ # The connection pool size per-node. This should match or exceed the
32
+ # number of threads for a multi-threaded application. (default: 5)
33
+ # pool_size: 5
34
+
35
+ # The time in seconds that Moped should wait for the pool to provide
36
+ # an available connection. This number should probably remain at the
37
+ # default, unless for some reason you absolutely need to limit the
38
+ # pool_size, as this wait is only used when the pool is saturated.
39
+ # (default: 0.5)
40
+ # pool_timeout: 0.5
41
+
42
+ # The time in seconds before Moped will timeout connection and node
43
+ # operations. (default: 5)
44
+ # timeout: 5
45
+
46
+ # The amount of time in seconds between forced refreshes of node
47
+ # information including the discovery of new peers. (default: 300)
48
+ # refresh_interval: 300
49
+
50
+ # The amount of time in seconds that a node will be flagged as down.
51
+ # (default: 30)
52
+ # down_interval: 30
53
+
54
+ # Whether connections should use SSL. (default: nil/false)
55
+ # ssl: false
56
+
57
+ # Whether Moped will use the existing seeds/nodes to find other peers.
58
+ # (default: true)
59
+ # auto_discover: true
60
+
61
+
62
+ # Configure Mongoid specific options. (optional)
63
+ options:
64
+ # Includes the root model name in json serialization. (default: false)
65
+ # include_root_in_json: false
66
+
67
+ # Include the _type field in serialization. (default: false)
68
+ # include_type_for_serialization: false
69
+
70
+ # Preload all models in development, needed when models use
71
+ # inheritance. (default: false)
72
+ # preload_models: false
73
+
74
+ # Protect id and type from mass assignment. (default: true)
75
+ # protect_sensitive_fields: true
76
+
77
+ # Raise an error when performing a #find and the document is not found.
78
+ # (default: true)
79
+ # raise_not_found_error: true
80
+
81
+ # Raise an error when defining a scope with the same name as an
82
+ # existing method. (default: false)
83
+ # scope_overwrite_exception: false
84
+
85
+ # Use Active Support's time zone in conversions. (default: true)
86
+ # use_activesupport_time_zone: true
87
+
88
+ # Ensure all times are UTC in the app side. (default: false)
89
+ # use_utc: false
90
+ test:
91
+ clients:
92
+ default:
93
+ database: venice_test
94
+ hosts:
95
+ - localhost:27017
96
+ options:
97
+ read: primary
98
+ # In the test environment we lower the retries and retry interval to
99
+ # low amounts for fast failures.
100
+ max_retries: 1
101
+ retry_interval: 0
102
+
103
+ production:
104
+ clients:
105
+ default:
106
+ uri: <%= ENV['MONGODB_URI'] %>
data/config/routes.rb ADDED
@@ -0,0 +1,35 @@
1
+ Rails.application.routes.draw do
2
+ #----------------------------------------------------------------------------
3
+ # Admin
4
+ #----------------------------------------------------------------------------
5
+ devise_for :admin_users,
6
+ path: 'admin',
7
+ controllers: {
8
+ passwords: 'admin/devise_overrides/passwords',
9
+ sessions: 'admin/devise_overrides/sessions'
10
+ }
11
+
12
+ namespace :admin do
13
+ get '/' => 'base#index'
14
+ get '/bootstrap.json' => 'base#bootstrap_data'
15
+ mount_tape_subscriptions_crud
16
+ mount_tape_posts_crud
17
+ mount_journal_posts_crud
18
+ mount_journal_pages_crud
19
+ mount_journal_categories_crud
20
+ mount_loft_assets_crud
21
+ mount_ants_settings_crud
22
+ mount_ants_menus_crud
23
+ mount_ants_admin_users_crud
24
+ mount_ants_redirects_crud
25
+ end
26
+
27
+ #----------------------------------------------------------------------------
28
+ # Application
29
+ #----------------------------------------------------------------------------
30
+ root 'journal_posts#index'
31
+ mount_journal_categories
32
+ mount_journal_pages
33
+ mount_journal_posts
34
+ mount_ants_redirects
35
+ end
@@ -0,0 +1,14 @@
1
+ default: &default
2
+ secret_key_base: <%= ENV.fetch('SECRET_KEY_BASE', 'development_secret') %>
3
+
4
+ development:
5
+ <<: *default
6
+
7
+ test:
8
+ <<: *default
9
+
10
+ staging:
11
+ <<: *default
12
+
13
+ production:
14
+ <<: *default
data/config/smtp.rb ADDED
@@ -0,0 +1,9 @@
1
+ SMTP_SETTINGS = {
2
+ address: ENV.fetch("SMTP_ADDRESS"), # example: "smtp.sendgrid.net"
3
+ authentication: :plain,
4
+ domain: ENV.fetch("SMTP_DOMAIN"), # example: "heroku.com"
5
+ enable_starttls_auto: true,
6
+ password: ENV.fetch("SMTP_PASSWORD"),
7
+ port: "587",
8
+ user_name: ENV.fetch("SMTP_USERNAME")
9
+ }