citygate 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/javascripts/citygate/application.js +15 -0
  5. data/app/assets/stylesheets/citygate/application.css.scss +41 -0
  6. data/app/controllers/admin/application_controller.rb +4 -0
  7. data/app/controllers/admin/users_controller.rb +9 -0
  8. data/app/controllers/application_controller.rb +8 -0
  9. data/app/controllers/home_controller.rb +5 -0
  10. data/app/controllers/users/omniauth_callbacks_controller.rb +103 -0
  11. data/app/controllers/users/omniauth_dummy.rb +6 -0
  12. data/app/controllers/users/omniauth_interface.rb +6 -0
  13. data/app/controllers/users_controller.rb +8 -0
  14. data/app/helpers/citygate/application_helper.rb +4 -0
  15. data/app/models/authorization.rb +5 -0
  16. data/app/models/user.rb +12 -0
  17. data/app/views/admin/users/index.html.haml +4 -0
  18. data/app/views/devise/_links.erb +25 -0
  19. data/app/views/devise/registrations/edit.html.haml +31 -0
  20. data/app/views/devise/registrations/new.html.haml +21 -0
  21. data/app/views/home/index.html.haml +4 -0
  22. data/app/views/layouts/admin/application.html.haml +32 -0
  23. data/app/views/layouts/application.html.haml +22 -0
  24. data/app/views/shared/_navigation.html.erb +13 -0
  25. data/app/views/users/show.html.haml +4 -0
  26. data/config/cucumber.yml +8 -0
  27. data/config/initializers/devise-lol.rb +4 -0
  28. data/config/initializers/devise.rb +233 -0
  29. data/config/locales/devise.en.yml +57 -0
  30. data/config/locales/devise_invitable.en.yml +10 -0
  31. data/config/locales/en.yml +5 -0
  32. data/config/routes.rb +10 -0
  33. data/db/migrate/20120303195052_devise_create_users.rb +49 -0
  34. data/db/migrate/20120303195103_add_name_to_users.rb +6 -0
  35. data/db/migrate/20120303195111_add_confirmable_to_users.rb +12 -0
  36. data/db/migrate/20120303195145_devise_invitable_add_to_users.rb +23 -0
  37. data/db/migrate/20120507112430_add_omniauth_to_devise.rb +19 -0
  38. data/db/seeds.rb +10 -0
  39. data/lib/abstract_interface.rb +36 -0
  40. data/lib/citygate/engine.rb +6 -0
  41. data/lib/citygate/version.rb +3 -0
  42. data/lib/citygate.rb +4 -0
  43. data/lib/tasks/citygate_tasks.rake +4 -0
  44. data/test/citygate_test.rb +7 -0
  45. data/test/test_helper.rb +10 -0
  46. metadata +277 -0
@@ -0,0 +1,233 @@
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
+ # ==> Mailer Configuration
5
+ # Configure the e-mail address which will be shown in Devise::Mailer,
6
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
8
+
9
+ # Configure the class responsible to send e-mails.
10
+ # config.mailer = "Devise::Mailer"
11
+
12
+ # Automatically apply schema changes in tableless databases
13
+ config.apply_schema = false
14
+
15
+ # ==> ORM configuration
16
+ # Load and configure the ORM. Supports :active_record (default) and
17
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
18
+ # available as additional gems.
19
+ require 'devise/orm/active_record'
20
+
21
+ # ==> Configuration for any authentication mechanism
22
+ # Configure which keys are used when authenticating a user. The default is
23
+ # just :email. You can configure it to use [:username, :subdomain], so for
24
+ # authenticating a user, both parameters are required. Remember that those
25
+ # parameters are used only when authenticating and not when retrieving from
26
+ # session. If you need permissions, you should implement that in a before filter.
27
+ # You can also supply a hash where the value is a boolean determining whether
28
+ # or not authentication should be aborted when the value is not present.
29
+ # config.authentication_keys = [ :email ]
30
+
31
+ # Configure parameters from the request object used for authentication. Each entry
32
+ # given should be a request method and it will automatically be passed to the
33
+ # find_for_authentication method and considered in your model lookup. For instance,
34
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
35
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
36
+ # config.request_keys = []
37
+
38
+ # Configure which authentication keys should be case-insensitive.
39
+ # These keys will be downcased upon creating or modifying a user and when used
40
+ # to authenticate or find a user. Default is :email.
41
+ config.case_insensitive_keys = [ :email ]
42
+
43
+ # Configure which authentication keys should have whitespace stripped.
44
+ # These keys will have whitespace before and after removed upon creating or
45
+ # modifying a user and when used to authenticate or find a user. Default is :email.
46
+ config.strip_whitespace_keys = [ :email ]
47
+
48
+ # Tell if authentication through request.params is enabled. True by default.
49
+ # It can be set to an array that will enable params authentication only for the
50
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
51
+ # enable it only for database (email + password) authentication.
52
+ # config.params_authenticatable = true
53
+
54
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
55
+ # It can be set to an array that will enable http authentication only for the
56
+ # given strategies, for example, `config.http_authenticatable = [:token]` will
57
+ # enable it only for token authentication.
58
+ # config.http_authenticatable = false
59
+
60
+ # If http headers should be returned for AJAX requests. True by default.
61
+ # config.http_authenticatable_on_xhr = true
62
+
63
+ # The realm used in Http Basic Authentication. "Application" by default.
64
+ # config.http_authentication_realm = "Application"
65
+
66
+ # It will change confirmation, password recovery and other workflows
67
+ # to behave the same regardless if the e-mail provided was right or wrong.
68
+ # Does not affect registerable.
69
+ # config.paranoid = true
70
+
71
+ # By default Devise will store the user in session. You can skip storage for
72
+ # :http_auth and :token_auth by adding those symbols to the array below.
73
+ # Notice that if you are skipping storage for all authentication paths, you
74
+ # may want to disable generating routes to Devise's sessions controller by
75
+ # passing :skip => :sessions to `devise_for` in your config/routes.rb
76
+ config.skip_session_storage = [:http_auth]
77
+
78
+ # ==> Configuration for :database_authenticatable
79
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
80
+ # using other encryptors, it sets how many times you want the password re-encrypted.
81
+ #
82
+ # Limiting the stretches to just one in testing will increase the performance of
83
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
84
+ # a value less than 10 in other environments.
85
+ config.stretches = Rails.env.test? ? 1 : 10
86
+
87
+ # Setup a pepper to generate the encrypted password.
88
+ #config.pepper = <%= SecureRandom.hex(64).inspect %>
89
+
90
+ # ==> Configuration for :confirmable
91
+ # A period that the user is allowed to access the website even without
92
+ # confirming his account. For instance, if set to 2.days, the user will be
93
+ # able to access the website for two days without confirming his account,
94
+ # access will be blocked just in the third day. Default is 0.days, meaning
95
+ # the user cannot access the website without confirming his account.
96
+ # config.allow_unconfirmed_access_for = 2.days
97
+
98
+ # If true, requires any email changes to be confirmed (exctly the same way as
99
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
100
+ # db field (see migrations). Until confirmed new email is stored in
101
+ # unconfirmed email column, and copied to email column on successful confirmation.
102
+ config.reconfirmable = true
103
+
104
+ # Defines which key will be used when confirming an account
105
+ # config.confirmation_keys = [ :email ]
106
+
107
+ # ==> Configuration for :rememberable
108
+ # The time the user will be remembered without asking for credentials again.
109
+ # config.remember_for = 2.weeks
110
+
111
+ # If true, extends the user's remember period when remembered via cookie.
112
+ # config.extend_remember_period = false
113
+
114
+ # If true, uses the password salt as remember token. This should be turned
115
+ # to false if you are not using database authenticatable.
116
+ config.use_salt_as_remember_token = true
117
+
118
+ # Options to be passed to the created cookie. For instance, you can set
119
+ # :secure => true in order to force SSL only cookies.
120
+ # config.rememberable_options = {}
121
+
122
+ # ==> Configuration for :validatable
123
+ # Range for password length. Default is 6..128.
124
+ # config.password_length = 6..128
125
+
126
+ # Email regex used to validate email formats. It simply asserts that
127
+ # an one (and only one) @ exists in the given string. This is mainly
128
+ # to give user feedback and not to assert the e-mail validity.
129
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
130
+
131
+ # ==> Configuration for :timeoutable
132
+ # The time you want to timeout the user session without activity. After this
133
+ # time the user will be asked for credentials again. Default is 30 minutes.
134
+ # config.timeout_in = 30.minutes
135
+
136
+ # ==> Configuration for :lockable
137
+ # Defines which strategy will be used to lock an account.
138
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
139
+ # :none = No lock strategy. You should handle locking by yourself.
140
+ # config.lock_strategy = :failed_attempts
141
+
142
+ # Defines which key will be used when locking and unlocking an account
143
+ # config.unlock_keys = [ :email ]
144
+
145
+ # Defines which strategy will be used to unlock an account.
146
+ # :email = Sends an unlock link to the user email
147
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
148
+ # :both = Enables both strategies
149
+ # :none = No unlock strategy. You should handle unlocking by yourself.
150
+ # config.unlock_strategy = :both
151
+
152
+ # Number of authentication tries before locking an account if lock_strategy
153
+ # is failed attempts.
154
+ # config.maximum_attempts = 20
155
+
156
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
157
+ # config.unlock_in = 1.hour
158
+
159
+ # ==> Configuration for :recoverable
160
+ #
161
+ # Defines which key will be used when recovering the password for an account
162
+ # config.reset_password_keys = [ :email ]
163
+
164
+ # Time interval you can reset your password with a reset password key.
165
+ # Don't put a too small interval or your users won't have the time to
166
+ # change their passwords.
167
+ config.reset_password_within = 6.hours
168
+
169
+ # ==> Configuration for :encryptable
170
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
171
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
172
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
173
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
174
+ # REST_AUTH_SITE_KEY to pepper)
175
+ # config.encryptor = :sha512
176
+
177
+ # ==> Configuration for :token_authenticatable
178
+ # Defines name of the authentication token params key
179
+ # config.token_authentication_key = :auth_token
180
+
181
+ # ==> Scopes configuration
182
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
183
+ # "users/sessions/new". It's turned off by default because it's slower if you
184
+ # are using only default views.
185
+ # config.scoped_views = false
186
+
187
+ # Configure the default scope given to Warden. By default it's the first
188
+ # devise role declared in your routes (usually :user).
189
+ # config.default_scope = :user
190
+
191
+ # Configure sign_out behavior.
192
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
193
+ # The default is true, which means any logout action will sign out all active scopes.
194
+ # config.sign_out_all_scopes = true
195
+
196
+ # ==> Navigation configuration
197
+ # Lists the formats that should be treated as navigational. Formats like
198
+ # :html, should redirect to the sign in page when the user does not have
199
+ # access, but formats like :xml or :json, should return 401.
200
+ #
201
+ # If you have any extra navigational formats, like :iphone or :mobile, you
202
+ # should add them to the navigational formats lists.
203
+ #
204
+ # The "*/*" below is required to match Internet Explorer requests.
205
+ # config.navigational_formats = ["*/*", :html]
206
+
207
+ # The default HTTP method used to sign out a resource. Default is :delete.
208
+ config.sign_out_via = :delete
209
+
210
+ # ==> OmniAuth
211
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
212
+ # up on your models and hooks.
213
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
214
+ config.omniauth :facebook, "387891007905465", "0cb143f301a74968289daf606b29dbec",
215
+ { :scope => 'email, offline_access' }
216
+
217
+ require 'openid/store/filesystem'
218
+ config.omniauth :open_id,
219
+ :store => OpenID::Store::Filesystem.new('/tmp'),
220
+ :name => 'google',
221
+ :identifier => 'https://www.google.com/accounts/o8/id',
222
+ :require => 'omniauth-openid'
223
+
224
+
225
+ # ==> Warden configuration
226
+ # If you want to use other strategies, that are not supported by Devise, or
227
+ # change the failure app, you can configure them inside the config.warden block.
228
+ #
229
+ # config.warden do |manager|
230
+ # manager.intercept_401 = false
231
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
232
+ # end
233
+ end
@@ -0,0 +1,57 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ errors:
5
+ messages:
6
+ expired: "has expired, please request a new one"
7
+ not_found: "not found"
8
+ already_confirmed: "was already confirmed, please try signing in"
9
+ not_locked: "was not locked"
10
+ not_saved:
11
+ one: "1 error prohibited this %{resource} from being saved:"
12
+ other: "%{count} errors prohibited this %{resource} from being saved:"
13
+
14
+ devise:
15
+ failure:
16
+ already_authenticated: 'You are already signed in.'
17
+ unauthenticated: 'You need to sign in or sign up before continuing.'
18
+ unconfirmed: 'You have to confirm your account before continuing.'
19
+ locked: 'Your account is locked.'
20
+ invalid: 'Invalid email or password.'
21
+ invalid_token: 'Invalid authentication token.'
22
+ timeout: 'Your session expired, please sign in again to continue.'
23
+ inactive: 'Your account was not activated yet.'
24
+ sessions:
25
+ signed_in: 'Signed in successfully.'
26
+ signed_out: 'Signed out successfully.'
27
+ passwords:
28
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
29
+ updated: 'Your password was changed successfully. You are now signed in.'
30
+ updated_not_active: 'Your password was changed successfully.'
31
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
32
+ confirmations:
33
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
34
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
35
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
36
+ registrations:
37
+ signed_up: 'Welcome! You have signed up successfully.'
38
+ 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.'
39
+ signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
40
+ signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
41
+ updated: 'You updated your account successfully.'
42
+ 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."
43
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
44
+ unlocks:
45
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
46
+ unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
47
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
48
+ omniauth_callbacks:
49
+ success: 'Successfully authorized from %{kind} account.'
50
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
51
+ mailer:
52
+ confirmation_instructions:
53
+ subject: 'Confirmation instructions'
54
+ reset_password_instructions:
55
+ subject: 'Reset password instructions'
56
+ unlock_instructions:
57
+ subject: 'Unlock Instructions'
@@ -0,0 +1,10 @@
1
+ en:
2
+ devise:
3
+ invitations:
4
+ send_instructions: 'An invitation email has been sent to %{email}.'
5
+ invitation_token_invalid: 'The invitation token provided is not valid!'
6
+ updated: 'Your password was set successfully. You are now signed in.'
7
+ no_invitations_remaining: "No invitations remaining"
8
+ mailer:
9
+ invitation_instructions:
10
+ subject: 'Invitation instructions'
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
data/config/routes.rb ADDED
@@ -0,0 +1,10 @@
1
+ Rails.application.routes.draw do
2
+ root :to => "home#index"
3
+
4
+ devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
5
+
6
+ namespace "admin" do
7
+ resources :users
8
+ end
9
+
10
+ end
@@ -0,0 +1,49 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(: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
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
+ ## Encryptable
23
+ # t.string :password_salt
24
+
25
+ ## Confirmable
26
+ # t.string :confirmation_token
27
+ # t.datetime :confirmed_at
28
+ # t.datetime :confirmation_sent_at
29
+ # t.string :unconfirmed_email # Only if using reconfirmable
30
+
31
+ ## Lockable
32
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
33
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
34
+ # t.datetime :locked_at
35
+
36
+ ## Token authenticatable
37
+ # t.string :authentication_token
38
+
39
+
40
+ t.timestamps
41
+ end
42
+
43
+ add_index :users, :email, :unique => true
44
+ add_index :users, :reset_password_token, :unique => true
45
+ # add_index :users, :confirmation_token, :unique => true
46
+ # add_index :users, :unlock_token, :unique => true
47
+ # add_index :users, :authentication_token, :unique => true
48
+ end
49
+ end
@@ -0,0 +1,6 @@
1
+ class AddNameToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :name, :string
4
+
5
+ end
6
+ end
@@ -0,0 +1,12 @@
1
+ class AddConfirmableToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :confirmation_token, :string
4
+
5
+ add_column :users, :confirmed_at, :datetime
6
+
7
+ add_column :users, :confirmation_sent_at, :datetime
8
+
9
+ add_column :users, :unconfirmed_email, :string
10
+
11
+ end
12
+ end
@@ -0,0 +1,23 @@
1
+ class DeviseInvitableAddToUsers < ActiveRecord::Migration
2
+ def up
3
+ change_table :users do |t|
4
+ t.string :invitation_token, :limit => 60
5
+ t.datetime :invitation_sent_at
6
+ t.datetime :invitation_accepted_at
7
+ t.integer :invitation_limit
8
+ t.references :invited_by, :polymorphic => true
9
+ t.index :invitation_token # for invitable
10
+ t.index :invited_by_id
11
+ end
12
+
13
+ # And allow null encrypted_password and password_salt:
14
+ change_column_null :users, :encrypted_password, true
15
+ end
16
+
17
+ def down
18
+ change_table :users do |t|
19
+ t.remove_references :invited_by, :polymorphic => true
20
+ t.remove :invitation_limit, :invitation_sent_at, :invitation_accepted_at, :invitation_token
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,19 @@
1
+ class AddOmniauthToDevise < ActiveRecord::Migration
2
+ def change
3
+ add_index :users, :confirmation_token, :unique => true
4
+ add_column :users , :password_salt, :string
5
+
6
+ create_table :authorizations do |t|
7
+ t.string :provider
8
+ t.string :uid
9
+ t.integer :user_id
10
+ t.string :token
11
+ t.string :secret
12
+ t.string :name
13
+ t.string :link
14
+ t.string :image_url
15
+
16
+ t.timestamps
17
+ end
18
+ end
19
+ end
data/db/seeds.rb ADDED
@@ -0,0 +1,10 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
8
+ puts 'SETTING UP DEFAULT USER LOGIN'
9
+ user = User.create! :name => 'First User', :email => 'user@example.com', :password => 'please', :password_confirmation => 'please', :confirmed_at => DateTime.now
10
+ puts 'New user created: ' << user.name
@@ -0,0 +1,36 @@
1
+ module AbstractInterface
2
+
3
+ class InterfaceNotImplementedError < NoMethodError
4
+ end
5
+
6
+ def self.included(klass)
7
+ klass.send(:include, AbstractInterface::Methods)
8
+ klass.send(:extend, AbstractInterface::Methods)
9
+ klass.send(:extend, AbstractInterface::ClassMethods)
10
+ end
11
+
12
+ module Methods
13
+
14
+ def api_not_implemented(klass, method_name = nil)
15
+ if method_name.nil?
16
+ caller.first.match(/in \`(.+)\'/)
17
+ method_name = $1
18
+ end
19
+ raise AbstractInterface::InterfaceNotImplementedError.new("#{klass.class.name} needs to implement '#{method_name}' for interface #{self.name}!")
20
+ end
21
+
22
+ end
23
+
24
+ module ClassMethods
25
+
26
+ def needs_implementation(name, *args)
27
+ self.class_eval do
28
+ define_method(name) do |*args|
29
+ Bicycle.api_not_implemented(self, name)
30
+ end
31
+ end
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -0,0 +1,6 @@
1
+ module Citygate
2
+ class Engine < ::Rails::Engine
3
+ #isolate_namespace Citygate
4
+ config.autoload_paths << File.expand_path("../lib/*", __FILE__)
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module Citygate
2
+ VERSION = "0.0.1"
3
+ end
data/lib/citygate.rb ADDED
@@ -0,0 +1,4 @@
1
+ require "citygate/engine"
2
+
3
+ module Citygate
4
+ end
@@ -0,0 +1,4 @@
1
+ #desc "Copy "
2
+ # task :citygate do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class CitygateTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, Citygate
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }