milia 0.3.38 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +94 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -16
- data/README.md +890 -141
- data/Rakefile +1 -55
- data/app/controllers/confirmations_controller.rb +101 -0
- data/app/controllers/passwords_controller.rb +8 -0
- data/app/controllers/registrations_controller.rb +95 -25
- data/app/controllers/sessions_controller.rb +13 -0
- data/app/views/members/new.html.haml +33 -0
- data/doc/gemfile_addition.txt +28 -0
- data/doc/manual_sample.sh +816 -0
- data/doc/sample.sh +229 -0
- data/lib/generators/milia/install_generator.rb +546 -0
- data/lib/generators/milia/temp_generator.rb +93 -0
- data/lib/generators/milia/templates/initializer.rb +51 -0
- data/lib/milia.rb +89 -1
- data/lib/milia/base.rb +29 -4
- data/lib/milia/control.rb +161 -9
- data/lib/milia/invite_member.rb +92 -0
- data/lib/milia/password_generator.rb +171 -0
- data/lib/milia/railtie.rb +4 -1
- data/lib/milia/version.rb +3 -0
- data/milia.gemspec +24 -159
- data/test/.ruby-gemset +1 -0
- data/test/.ruby-version +1 -0
- data/test/Gemfile +81 -0
- data/test/Gemfile.lock +200 -0
- data/test/README.md +83 -0
- data/test/{rails_app/Rakefile → Rakefile} +1 -2
- data/test/app/assets/javascripts/application.js +16 -0
- data/test/app/assets/stylesheets/application.css +13 -0
- data/test/app/controllers/application_controller.rb +13 -0
- data/test/app/controllers/home_controller.rb +10 -0
- data/test/{rails_app/app → app}/helpers/application_helper.rb +0 -0
- data/test/app/models/member.rb +34 -0
- data/test/app/models/post.rb +14 -0
- data/test/{rails_app/app → app}/models/team.rb +3 -2
- data/test/{rails_app/app → app}/models/team_asset.rb +1 -1
- data/test/app/models/tenant.rb +54 -0
- data/test/app/models/user.rb +14 -0
- data/test/app/models/zine.rb +8 -0
- data/test/{rails_app/app → app}/views/home/index.html.erb +0 -0
- data/test/app/views/home/show.html.erb +2 -0
- data/test/app/views/layouts/application.html.erb +14 -0
- data/test/bin/bundle +3 -0
- data/test/bin/rails +4 -0
- data/test/bin/rake +4 -0
- data/test/config/application.rb +36 -0
- data/test/{rails_app/config → config}/boot.rb +0 -2
- data/test/config/database.yml +25 -0
- data/test/config/environment.rb +5 -0
- data/test/config/environments/development.rb +48 -0
- data/test/config/environments/production.rb +95 -0
- data/test/config/environments/test.rb +42 -0
- data/test/{rails_app/config → config}/initializers/backtrace_silencers.rb +0 -0
- data/test/{rails_app/config → config}/initializers/devise.rb +84 -36
- data/test/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/config/initializers/inflections.rb +16 -0
- data/test/config/initializers/milia.rb +51 -0
- data/test/{rails_app/config → config}/initializers/mime_types.rb +0 -0
- data/test/config/initializers/secret_token.rb +12 -0
- data/test/config/initializers/session_store.rb +3 -0
- data/test/{rails_app/config → config}/initializers/wrap_parameters.rb +6 -6
- data/test/config/locales/en.yml +23 -0
- data/test/config/routes.rb +77 -0
- data/test/{rails_app/db/migrate/20111012060818_add_sessions_table.rb → db/migrate/20111012050200_add_sessions_table.rb} +2 -6
- data/test/db/migrate/20111012050340_devise_create_users.rb +48 -0
- data/test/{rails_app/db → db}/migrate/20111012050532_create_tenants.rb +3 -1
- data/test/db/migrate/20111012050600_create_tenants_users_join_table.rb +8 -0
- data/test/db/migrate/20111012050650_create_members.rb +12 -0
- data/test/db/migrate/20111012231923_create_posts.rb +12 -0
- data/test/{rails_app/db → db}/migrate/20111013050657_create_zines.rb +2 -4
- data/test/{rails_app/db → db}/migrate/20111013050753_create_teams.rb +1 -2
- data/test/db/migrate/20111013050837_create_team_assets.rb +11 -0
- data/test/db/schema.rb +126 -0
- data/test/{rails_app/db → db}/seeds.rb +0 -0
- data/test/test/controllers/home_controller_test.rb +133 -0
- data/test/{rails_app/test → test}/ctlr_test_helper.rb +0 -0
- data/test/test/fixtures/members.yml +35 -0
- data/test/test/fixtures/posts.yml +96 -0
- data/test/test/fixtures/team_assets.yml +30 -0
- data/test/test/fixtures/teams.yml +17 -0
- data/test/test/fixtures/tenants.yml +12 -0
- data/test/test/fixtures/tenants_users.yml +15 -0
- data/test/test/fixtures/users.yml +33 -0
- data/test/test/fixtures/zines.yml +25 -0
- data/test/test/models/member_test.rb +75 -0
- data/test/test/models/post_test.rb +66 -0
- data/test/test/models/team_test.rb +49 -0
- data/test/test/models/tenant_test.rb +228 -0
- data/test/test/models/user_test.rb +182 -0
- data/test/test/models/zine_test.rb +40 -0
- data/test/test/test_helper.rb +31 -0
- metadata +199 -154
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -115
- data/VERSION +0 -1
- data/test/helper.rb +0 -18
- data/test/rails_app/.gitignore +0 -5
- data/test/rails_app/Gemfile +0 -48
- data/test/rails_app/Gemfile.lock +0 -168
- data/test/rails_app/Gemfile.lock.backup +0 -167
- data/test/rails_app/Procfile +0 -1
- data/test/rails_app/README +0 -261
- data/test/rails_app/app/assets/images/rails.png +0 -0
- data/test/rails_app/app/assets/javascripts/application.js +0 -9
- data/test/rails_app/app/assets/javascripts/home.js.coffee +0 -3
- data/test/rails_app/app/assets/stylesheets/application.css +0 -7
- data/test/rails_app/app/assets/stylesheets/home.css.scss +0 -3
- data/test/rails_app/app/controllers/application_controller.rb +0 -50
- data/test/rails_app/app/controllers/home_controller.rb +0 -7
- data/test/rails_app/app/helpers/home_helper.rb +0 -2
- data/test/rails_app/app/mailers/.gitkeep +0 -0
- data/test/rails_app/app/models/.gitkeep +0 -0
- data/test/rails_app/app/models/author.rb +0 -9
- data/test/rails_app/app/models/calendar.rb +0 -6
- data/test/rails_app/app/models/post.rb +0 -15
- data/test/rails_app/app/models/tenant.rb +0 -8
- data/test/rails_app/app/models/user.rb +0 -14
- data/test/rails_app/app/models/zine.rb +0 -6
- data/test/rails_app/app/views/layouts/application.html.erb +0 -12
- data/test/rails_app/config.ru +0 -4
- data/test/rails_app/config/application.rb +0 -56
- data/test/rails_app/config/database.yml +0 -55
- data/test/rails_app/config/environment.rb +0 -5
- data/test/rails_app/config/environments/development.rb +0 -41
- data/test/rails_app/config/environments/production.rb +0 -60
- data/test/rails_app/config/environments/test.rb +0 -56
- data/test/rails_app/config/initializers/inflections.rb +0 -10
- data/test/rails_app/config/initializers/secret_token.rb +0 -7
- data/test/rails_app/config/initializers/session_store.rb +0 -8
- data/test/rails_app/config/locales/devise.en.yml +0 -58
- data/test/rails_app/config/locales/en.yml +0 -5
- data/test/rails_app/config/routes.rb +0 -63
- data/test/rails_app/db/migrate/20111012050340_devise_create_users.rb +0 -39
- data/test/rails_app/db/migrate/20111012050600_create_tenants_users.rb +0 -10
- data/test/rails_app/db/migrate/20111012231923_create_posts.rb +0 -15
- data/test/rails_app/db/migrate/20111013050558_create_calendars.rb +0 -14
- data/test/rails_app/db/migrate/20111013050837_create_team_assets.rb +0 -14
- data/test/rails_app/db/migrate/20111013053403_create_authors.rb +0 -13
- data/test/rails_app/db/schema.rb +0 -133
- data/test/rails_app/lib/assets/.gitkeep +0 -0
- data/test/rails_app/lib/tasks/.gitkeep +0 -0
- data/test/rails_app/log/.gitkeep +0 -0
- data/test/rails_app/public/404.html +0 -26
- data/test/rails_app/public/422.html +0 -26
- data/test/rails_app/public/500.html +0 -26
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_app/script/rails +0 -6
- data/test/rails_app/test/factories/units_factory.rb +0 -84
- data/test/rails_app/test/fixtures/.gitkeep +0 -0
- data/test/rails_app/test/functional/.gitkeep +0 -0
- data/test/rails_app/test/functional/home_controller_test.rb +0 -10
- data/test/rails_app/test/integration/.gitkeep +0 -0
- data/test/rails_app/test/performance/browsing_test.rb +0 -12
- data/test/rails_app/test/test_helper.rb +0 -119
- data/test/rails_app/test/unit/.gitkeep +0 -0
- data/test/rails_app/test/unit/author_test.rb +0 -30
- data/test/rails_app/test/unit/calendar_test.rb +0 -28
- data/test/rails_app/test/unit/helpers/home_helper_test.rb +0 -7
- data/test/rails_app/test/unit/post_test.rb +0 -81
- data/test/rails_app/test/unit/team_test.rb +0 -30
- data/test/rails_app/test/unit/tenant_test.rb +0 -28
- data/test/rails_app/test/unit/user_test.rb +0 -26
- data/test/rails_app/test/unit/zine_test.rb +0 -28
- data/test/rails_app/vendor/assets/stylesheets/.gitkeep +0 -0
- data/test/rails_app/vendor/plugins/.gitkeep +0 -0
- data/test/rails_app/vendor/plugins/rails_log_stdout/init.rb +0 -43
- data/test/test_milia.rb +0 -7
@@ -0,0 +1,92 @@
|
|
1
|
+
module Milia
|
2
|
+
|
3
|
+
module InviteMember
|
4
|
+
|
5
|
+
# #############################################################################
|
6
|
+
|
7
|
+
def self.included(base)
|
8
|
+
base.extend ClassMethods
|
9
|
+
end
|
10
|
+
|
11
|
+
# #############################################################################
|
12
|
+
# #############################################################################
|
13
|
+
module ClassMethods
|
14
|
+
|
15
|
+
end # module ClassMethods
|
16
|
+
# #############################################################################
|
17
|
+
# #############################################################################
|
18
|
+
|
19
|
+
# ------------------------------------------------------------------------
|
20
|
+
# new function to set the password without knowing the current password
|
21
|
+
# ------------------------------------------------------------------------
|
22
|
+
def attempt_set_password(params)
|
23
|
+
p = {}
|
24
|
+
p[:password] = params[:password]
|
25
|
+
p[:password_confirmation] = params[:password_confirmation]
|
26
|
+
update_attributes(p)
|
27
|
+
end
|
28
|
+
|
29
|
+
# ------------------------------------------------------------------------
|
30
|
+
# new function to return whether a password has been set
|
31
|
+
# ------------------------------------------------------------------------
|
32
|
+
def has_no_password?
|
33
|
+
self.encrypted_password.blank?
|
34
|
+
end
|
35
|
+
|
36
|
+
# ------------------------------------------------------------------------
|
37
|
+
# new function to provide access to protected method unless_confirmed
|
38
|
+
# ------------------------------------------------------------------------
|
39
|
+
def only_if_unconfirmed
|
40
|
+
pending_any_confirmation {yield}
|
41
|
+
end
|
42
|
+
|
43
|
+
# ------------------------------------------------------------------------
|
44
|
+
# ------------------------------------------------------------------------
|
45
|
+
|
46
|
+
# ------------------------------------------------------------------------
|
47
|
+
# save_and_invite_member -- saves the new user record thus inviting member
|
48
|
+
# via devise
|
49
|
+
# if password missing; gens a password
|
50
|
+
# ensures email exists and that email is unique and not already in system
|
51
|
+
# ------------------------------------------------------------------------
|
52
|
+
def save_and_invite_member( )
|
53
|
+
if (
|
54
|
+
self.email.blank? ||
|
55
|
+
User.where([ "lower(email) = ?", self.email.downcase ]).first
|
56
|
+
)
|
57
|
+
self.errors.add(:email,"must be present and unique")
|
58
|
+
status = nil
|
59
|
+
else
|
60
|
+
check_or_set_password()
|
61
|
+
status = self.save && self.errors.empty?
|
62
|
+
end
|
63
|
+
|
64
|
+
return status
|
65
|
+
end
|
66
|
+
|
67
|
+
# ------------------------------------------------------------------------
|
68
|
+
# check_or_set_password -- if password missing, generates a password
|
69
|
+
# ASSUMES: Milia.use_invite_member
|
70
|
+
# ------------------------------------------------------------------------
|
71
|
+
def check_or_set_password( )
|
72
|
+
|
73
|
+
if self.password.blank?
|
74
|
+
self.password =
|
75
|
+
::Milia::Password.generate(
|
76
|
+
8, Password::ONE_DIGIT | Password::ONE_CASE
|
77
|
+
)
|
78
|
+
|
79
|
+
self.password_confirmation = self.password
|
80
|
+
else
|
81
|
+
# if a password is being supplied, then ok to skip
|
82
|
+
# setting up a password upon confirm
|
83
|
+
self.skip_confirm_change_password = true if ::Milia.use_invite_member
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
# #############################################################################
|
89
|
+
end # module
|
90
|
+
|
91
|
+
# #############################################################################
|
92
|
+
end # module
|
@@ -0,0 +1,171 @@
|
|
1
|
+
module Milia
|
2
|
+
# Provides support generating memorable passwords
|
3
|
+
class Password
|
4
|
+
private
|
5
|
+
# This flag is used in conjunction with Password.phonemic and states that a
|
6
|
+
# password must include a digit.
|
7
|
+
ONE_DIGIT = 1
|
8
|
+
|
9
|
+
# This flag is used in conjunction with Password.phonemic and states that a
|
10
|
+
# password must include a capital letter.
|
11
|
+
ONE_CASE = 1 << 1
|
12
|
+
|
13
|
+
# phoneme flags
|
14
|
+
CONSONANT = 1
|
15
|
+
VOWEL = 1 << 1
|
16
|
+
DIPHTHONG = 1 << 2
|
17
|
+
NOT_FIRST = 1 << 3 # indicates that a given phoneme may not occur first
|
18
|
+
|
19
|
+
PHONEMES = {
|
20
|
+
:a => VOWEL,
|
21
|
+
:ae => VOWEL | DIPHTHONG,
|
22
|
+
:ah => VOWEL | DIPHTHONG,
|
23
|
+
:ai => VOWEL | DIPHTHONG,
|
24
|
+
:b => CONSONANT,
|
25
|
+
:c => CONSONANT,
|
26
|
+
:ch => CONSONANT | DIPHTHONG,
|
27
|
+
:d => CONSONANT,
|
28
|
+
:e => VOWEL,
|
29
|
+
:ee => VOWEL | DIPHTHONG,
|
30
|
+
:ei => VOWEL | DIPHTHONG,
|
31
|
+
:f => CONSONANT,
|
32
|
+
:g => CONSONANT,
|
33
|
+
:gh => CONSONANT | DIPHTHONG | NOT_FIRST,
|
34
|
+
:h => CONSONANT,
|
35
|
+
:i => VOWEL,
|
36
|
+
:ie => VOWEL | DIPHTHONG,
|
37
|
+
:j => CONSONANT,
|
38
|
+
:k => CONSONANT,
|
39
|
+
:l => CONSONANT,
|
40
|
+
:m => CONSONANT,
|
41
|
+
:n => CONSONANT,
|
42
|
+
:ng => CONSONANT | DIPHTHONG | NOT_FIRST,
|
43
|
+
:o => VOWEL,
|
44
|
+
:oh => VOWEL | DIPHTHONG,
|
45
|
+
:oo => VOWEL | DIPHTHONG,
|
46
|
+
:p => CONSONANT,
|
47
|
+
:ph => CONSONANT | DIPHTHONG,
|
48
|
+
:qu => CONSONANT | DIPHTHONG,
|
49
|
+
:r => CONSONANT,
|
50
|
+
:s => CONSONANT,
|
51
|
+
:sh => CONSONANT | DIPHTHONG,
|
52
|
+
:t => CONSONANT,
|
53
|
+
:th => CONSONANT | DIPHTHONG,
|
54
|
+
:u => VOWEL,
|
55
|
+
:v => CONSONANT,
|
56
|
+
:w => CONSONANT,
|
57
|
+
:x => CONSONANT,
|
58
|
+
:y => CONSONANT,
|
59
|
+
:z => CONSONANT
|
60
|
+
}
|
61
|
+
|
62
|
+
class << self
|
63
|
+
# Determine whether the next character should be a vowel or consonant.
|
64
|
+
def get_vowel_or_consonant
|
65
|
+
rand( 2 ) == 1 ? VOWEL : CONSONANT
|
66
|
+
end
|
67
|
+
|
68
|
+
# Generate a memorable password of +length+ characters, using phonemes that
|
69
|
+
# a human-being can easily remember. +flags+ is one or more of
|
70
|
+
# <tt>Password::ONE_DIGIT</tt> and <tt>Password::ONE_CASE</tt>, logically
|
71
|
+
# OR'ed together. For example:
|
72
|
+
#
|
73
|
+
# password = Password.generate(8, Password::ONE_DIGIT | Password::ONE_CASE)
|
74
|
+
#
|
75
|
+
# This would generate an eight character password, containing a digit and an
|
76
|
+
# upper-case letter, such as *Ug2shoth*.
|
77
|
+
#
|
78
|
+
# This method was inspired by the pwgen[http://sourceforge.net/projects/pwgen]
|
79
|
+
# tool, written by Theodore Ts'o.
|
80
|
+
#
|
81
|
+
# Generated passwords may contain any of the characters in
|
82
|
+
# <tt>Password::PASSWD_CHARS</tt>.
|
83
|
+
def generate(length = 8, flags = nil)
|
84
|
+
password = nil
|
85
|
+
ph_flags = flags
|
86
|
+
|
87
|
+
loop do
|
88
|
+
password = ''
|
89
|
+
|
90
|
+
# Separate the flags integer into an array of individual flags
|
91
|
+
feature_flags = [flags & ONE_DIGIT, flags & ONE_CASE]
|
92
|
+
|
93
|
+
prev = []
|
94
|
+
first = true
|
95
|
+
desired = Password.get_vowel_or_consonant
|
96
|
+
|
97
|
+
# Get an Array of all of the phonemes
|
98
|
+
phonemes = PHONEMES.keys.map {|ph| ph.to_s}
|
99
|
+
nr_phonemes = phonemes.size
|
100
|
+
|
101
|
+
while password.length < length do
|
102
|
+
# Get a random phoneme and its length
|
103
|
+
phoneme = phonemes[rand(nr_phonemes)]
|
104
|
+
ph_len = phoneme.length
|
105
|
+
|
106
|
+
# Get its flags as an Array
|
107
|
+
ph_flags = PHONEMES[phoneme.to_sym]
|
108
|
+
ph_flags = [ph_flags & CONSONANT, ph_flags & VOWEL, ph_flags & DIPHTHONG, ph_flags & NOT_FIRST]
|
109
|
+
|
110
|
+
# Filter on the basic type of the next phoneme
|
111
|
+
next if ph_flags.include?(desired)
|
112
|
+
|
113
|
+
# Handle the NOT_FIRST flag
|
114
|
+
next if first && ph_flags.include?(NOT_FIRST)
|
115
|
+
|
116
|
+
# Don't allow a VOWEL followed a vowel/diphthong pair
|
117
|
+
next if prev.include?(VOWEL) && ph_flags.include?(VOWEL) && ph_flags.include?(DIPHTHONG)
|
118
|
+
|
119
|
+
# Don't allow us to go longer than the desired length
|
120
|
+
next if ph_len > length - password.length
|
121
|
+
|
122
|
+
# We've found a phoneme that meets our criteria
|
123
|
+
password << phoneme
|
124
|
+
|
125
|
+
# Handle ONE_CASE
|
126
|
+
if feature_flags.include?(ONE_CASE)
|
127
|
+
if (first || ph_flags.include?(CONSONANT)) && rand(10) < 3
|
128
|
+
password[-ph_len, 1] = password[-ph_len, 1].upcase
|
129
|
+
feature_flags.delete(ONE_CASE)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
# Is password already long enough?
|
134
|
+
break if password.length >= length
|
135
|
+
|
136
|
+
# Handle ONE_DIGIT
|
137
|
+
if feature_flags.include?(ONE_DIGIT)
|
138
|
+
if !first && rand(10) < 3
|
139
|
+
password << (rand(10) + '0'.ord).chr
|
140
|
+
feature_flags.delete(ONE_DIGIT)
|
141
|
+
|
142
|
+
first = true
|
143
|
+
prev = []
|
144
|
+
desired = Password.get_vowel_or_consonant
|
145
|
+
next
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
if desired == CONSONANT
|
150
|
+
desired = VOWEL
|
151
|
+
elsif prev.include?(VOWEL) || ph_flags.include?(DIPHTHONG) || rand(10) > 3
|
152
|
+
desired = CONSONANT
|
153
|
+
else
|
154
|
+
desired = VOWEL
|
155
|
+
end
|
156
|
+
|
157
|
+
prev = ph_flags
|
158
|
+
first = false
|
159
|
+
end
|
160
|
+
|
161
|
+
# Try again
|
162
|
+
break unless feature_flags.include?(ONE_CASE) || feature_flags.include?(ONE_DIGIT)
|
163
|
+
|
164
|
+
end
|
165
|
+
|
166
|
+
password
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end # class
|
170
|
+
|
171
|
+
end # module
|
data/lib/milia/railtie.rb
CHANGED
@@ -7,8 +7,11 @@ module Milia
|
|
7
7
|
|
8
8
|
ActiveRecord::Base.send(:include, Milia::Base)
|
9
9
|
ActionController::Base.send(:include, Milia::Control)
|
10
|
-
|
10
|
+
|
11
11
|
require File.dirname(__FILE__) + '/../../app/controllers/registrations_controller'
|
12
|
+
require File.dirname(__FILE__) + '/../../app/controllers/sessions_controller'
|
13
|
+
require File.dirname(__FILE__) + '/../../app/controllers/passwords_controller'
|
14
|
+
require File.dirname(__FILE__) + '/../../app/controllers/confirmations_controller'
|
12
15
|
end
|
13
16
|
|
14
17
|
rake_tasks do
|
data/milia.gemspec
CHANGED
@@ -1,164 +1,29 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'milia/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "milia"
|
8
|
+
spec.version = Milia::VERSION
|
9
|
+
spec.authors = ["daudi amani"]
|
10
|
+
spec.email = ["dsaronin@gmail.com"]
|
11
|
+
spec.description = %q{Multi-tenanting gem for hosted Rails/Ruby/devise applications}
|
12
|
+
spec.summary = %q{Transparent multi-tenanting for hosted rails/ruby/devise web applications}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
s.email = "dsaronin@gmail.com"
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.md"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".project",
|
22
|
-
".rvmrc",
|
23
|
-
".slugignore",
|
24
|
-
"Gemfile",
|
25
|
-
"Gemfile.lock",
|
26
|
-
"LICENSE.txt",
|
27
|
-
"README.md",
|
28
|
-
"Rakefile",
|
29
|
-
"VERSION",
|
30
|
-
"app/controllers/registrations_controller.rb",
|
31
|
-
"doc/ref_notes.txt",
|
32
|
-
"lib/milia.rb",
|
33
|
-
"lib/milia/base.rb",
|
34
|
-
"lib/milia/control.rb",
|
35
|
-
"lib/milia/railtie.rb",
|
36
|
-
"lib/milia/tasks.rb",
|
37
|
-
"markdown.rb",
|
38
|
-
"milia.gemspec",
|
39
|
-
"test/helper.rb",
|
40
|
-
"test/rails_app/.gitignore",
|
41
|
-
"test/rails_app/Gemfile",
|
42
|
-
"test/rails_app/Gemfile.lock",
|
43
|
-
"test/rails_app/Gemfile.lock.backup",
|
44
|
-
"test/rails_app/Procfile",
|
45
|
-
"test/rails_app/README",
|
46
|
-
"test/rails_app/Rakefile",
|
47
|
-
"test/rails_app/app/assets/images/rails.png",
|
48
|
-
"test/rails_app/app/assets/javascripts/application.js",
|
49
|
-
"test/rails_app/app/assets/javascripts/home.js.coffee",
|
50
|
-
"test/rails_app/app/assets/stylesheets/application.css",
|
51
|
-
"test/rails_app/app/assets/stylesheets/home.css.scss",
|
52
|
-
"test/rails_app/app/controllers/application_controller.rb",
|
53
|
-
"test/rails_app/app/controllers/home_controller.rb",
|
54
|
-
"test/rails_app/app/helpers/application_helper.rb",
|
55
|
-
"test/rails_app/app/helpers/home_helper.rb",
|
56
|
-
"test/rails_app/app/mailers/.gitkeep",
|
57
|
-
"test/rails_app/app/models/.gitkeep",
|
58
|
-
"test/rails_app/app/models/author.rb",
|
59
|
-
"test/rails_app/app/models/calendar.rb",
|
60
|
-
"test/rails_app/app/models/post.rb",
|
61
|
-
"test/rails_app/app/models/team.rb",
|
62
|
-
"test/rails_app/app/models/team_asset.rb",
|
63
|
-
"test/rails_app/app/models/tenant.rb",
|
64
|
-
"test/rails_app/app/models/user.rb",
|
65
|
-
"test/rails_app/app/models/zine.rb",
|
66
|
-
"test/rails_app/app/views/home/index.html.erb",
|
67
|
-
"test/rails_app/app/views/layouts/application.html.erb",
|
68
|
-
"test/rails_app/config.ru",
|
69
|
-
"test/rails_app/config/application.rb",
|
70
|
-
"test/rails_app/config/boot.rb",
|
71
|
-
"test/rails_app/config/database.yml",
|
72
|
-
"test/rails_app/config/environment.rb",
|
73
|
-
"test/rails_app/config/environments/development.rb",
|
74
|
-
"test/rails_app/config/environments/production.rb",
|
75
|
-
"test/rails_app/config/environments/test.rb",
|
76
|
-
"test/rails_app/config/initializers/backtrace_silencers.rb",
|
77
|
-
"test/rails_app/config/initializers/devise.rb",
|
78
|
-
"test/rails_app/config/initializers/inflections.rb",
|
79
|
-
"test/rails_app/config/initializers/mime_types.rb",
|
80
|
-
"test/rails_app/config/initializers/secret_token.rb",
|
81
|
-
"test/rails_app/config/initializers/session_store.rb",
|
82
|
-
"test/rails_app/config/initializers/wrap_parameters.rb",
|
83
|
-
"test/rails_app/config/locales/devise.en.yml",
|
84
|
-
"test/rails_app/config/locales/en.yml",
|
85
|
-
"test/rails_app/config/routes.rb",
|
86
|
-
"test/rails_app/db/migrate/20111012050340_devise_create_users.rb",
|
87
|
-
"test/rails_app/db/migrate/20111012050532_create_tenants.rb",
|
88
|
-
"test/rails_app/db/migrate/20111012050600_create_tenants_users.rb",
|
89
|
-
"test/rails_app/db/migrate/20111012060818_add_sessions_table.rb",
|
90
|
-
"test/rails_app/db/migrate/20111012231923_create_posts.rb",
|
91
|
-
"test/rails_app/db/migrate/20111013050558_create_calendars.rb",
|
92
|
-
"test/rails_app/db/migrate/20111013050657_create_zines.rb",
|
93
|
-
"test/rails_app/db/migrate/20111013050753_create_teams.rb",
|
94
|
-
"test/rails_app/db/migrate/20111013050837_create_team_assets.rb",
|
95
|
-
"test/rails_app/db/migrate/20111013053403_create_authors.rb",
|
96
|
-
"test/rails_app/db/schema.rb",
|
97
|
-
"test/rails_app/db/seeds.rb",
|
98
|
-
"test/rails_app/lib/assets/.gitkeep",
|
99
|
-
"test/rails_app/lib/tasks/.gitkeep",
|
100
|
-
"test/rails_app/log/.gitkeep",
|
101
|
-
"test/rails_app/public/404.html",
|
102
|
-
"test/rails_app/public/422.html",
|
103
|
-
"test/rails_app/public/500.html",
|
104
|
-
"test/rails_app/public/favicon.ico",
|
105
|
-
"test/rails_app/script/rails",
|
106
|
-
"test/rails_app/test/ctlr_test_helper.rb",
|
107
|
-
"test/rails_app/test/factories/units_factory.rb",
|
108
|
-
"test/rails_app/test/fixtures/.gitkeep",
|
109
|
-
"test/rails_app/test/functional/.gitkeep",
|
110
|
-
"test/rails_app/test/functional/home_controller_test.rb",
|
111
|
-
"test/rails_app/test/integration/.gitkeep",
|
112
|
-
"test/rails_app/test/performance/browsing_test.rb",
|
113
|
-
"test/rails_app/test/test_helper.rb",
|
114
|
-
"test/rails_app/test/unit/.gitkeep",
|
115
|
-
"test/rails_app/test/unit/author_test.rb",
|
116
|
-
"test/rails_app/test/unit/calendar_test.rb",
|
117
|
-
"test/rails_app/test/unit/helpers/home_helper_test.rb",
|
118
|
-
"test/rails_app/test/unit/post_test.rb",
|
119
|
-
"test/rails_app/test/unit/team_test.rb",
|
120
|
-
"test/rails_app/test/unit/tenant_test.rb",
|
121
|
-
"test/rails_app/test/unit/user_test.rb",
|
122
|
-
"test/rails_app/test/unit/zine_test.rb",
|
123
|
-
"test/rails_app/vendor/assets/stylesheets/.gitkeep",
|
124
|
-
"test/rails_app/vendor/plugins/.gitkeep",
|
125
|
-
"test/rails_app/vendor/plugins/rails_log_stdout/init.rb",
|
126
|
-
"test/test_milia.rb"
|
127
|
-
]
|
128
|
-
s.homepage = "http://github.com/dsaronin/milia"
|
129
|
-
s.licenses = ["MIT"]
|
130
|
-
s.require_paths = ["lib"]
|
131
|
-
s.rubygems_version = "1.8.24"
|
132
|
-
s.summary = "Multi-tenanting for hosted Rails 3.1+ applications"
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
133
20
|
|
134
|
-
|
135
|
-
|
21
|
+
spec.add_dependency 'rails', '~> 4.0'
|
22
|
+
spec.add_dependency 'devise', '~> 3.2'
|
136
23
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
143
|
-
s.add_development_dependency(%q<rdoc>, [">= 0"])
|
144
|
-
s.add_development_dependency(%q<turn>, [">= 0"])
|
145
|
-
else
|
146
|
-
s.add_dependency(%q<rails>, ["= 3.2.13"])
|
147
|
-
s.add_dependency(%q<devise>, ["= 2.1.2"])
|
148
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
149
|
-
s.add_dependency(%q<shoulda>, ["= 3.5.0"])
|
150
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
151
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
152
|
-
s.add_dependency(%q<turn>, [">= 0"])
|
153
|
-
end
|
154
|
-
else
|
155
|
-
s.add_dependency(%q<rails>, ["= 3.2.13"])
|
156
|
-
s.add_dependency(%q<devise>, ["= 2.1.2"])
|
157
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
158
|
-
s.add_dependency(%q<shoulda>, ["= 3.5.0"])
|
159
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
160
|
-
s.add_dependency(%q<rdoc>, [">= 0"])
|
161
|
-
s.add_dependency(%q<turn>, [">= 0"])
|
162
|
-
end
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "sqlite3"
|
27
|
+
spec.add_development_dependency "shoulda"
|
28
|
+
spec.add_development_dependency "turn"
|
163
29
|
end
|
164
|
-
|