milia 0.3.38 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +94 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +3 -16
  6. data/README.md +890 -141
  7. data/Rakefile +1 -55
  8. data/app/controllers/confirmations_controller.rb +101 -0
  9. data/app/controllers/passwords_controller.rb +8 -0
  10. data/app/controllers/registrations_controller.rb +95 -25
  11. data/app/controllers/sessions_controller.rb +13 -0
  12. data/app/views/members/new.html.haml +33 -0
  13. data/doc/gemfile_addition.txt +28 -0
  14. data/doc/manual_sample.sh +816 -0
  15. data/doc/sample.sh +229 -0
  16. data/lib/generators/milia/install_generator.rb +546 -0
  17. data/lib/generators/milia/temp_generator.rb +93 -0
  18. data/lib/generators/milia/templates/initializer.rb +51 -0
  19. data/lib/milia.rb +89 -1
  20. data/lib/milia/base.rb +29 -4
  21. data/lib/milia/control.rb +161 -9
  22. data/lib/milia/invite_member.rb +92 -0
  23. data/lib/milia/password_generator.rb +171 -0
  24. data/lib/milia/railtie.rb +4 -1
  25. data/lib/milia/version.rb +3 -0
  26. data/milia.gemspec +24 -159
  27. data/test/.ruby-gemset +1 -0
  28. data/test/.ruby-version +1 -0
  29. data/test/Gemfile +81 -0
  30. data/test/Gemfile.lock +200 -0
  31. data/test/README.md +83 -0
  32. data/test/{rails_app/Rakefile → Rakefile} +1 -2
  33. data/test/app/assets/javascripts/application.js +16 -0
  34. data/test/app/assets/stylesheets/application.css +13 -0
  35. data/test/app/controllers/application_controller.rb +13 -0
  36. data/test/app/controllers/home_controller.rb +10 -0
  37. data/test/{rails_app/app → app}/helpers/application_helper.rb +0 -0
  38. data/test/app/models/member.rb +34 -0
  39. data/test/app/models/post.rb +14 -0
  40. data/test/{rails_app/app → app}/models/team.rb +3 -2
  41. data/test/{rails_app/app → app}/models/team_asset.rb +1 -1
  42. data/test/app/models/tenant.rb +54 -0
  43. data/test/app/models/user.rb +14 -0
  44. data/test/app/models/zine.rb +8 -0
  45. data/test/{rails_app/app → app}/views/home/index.html.erb +0 -0
  46. data/test/app/views/home/show.html.erb +2 -0
  47. data/test/app/views/layouts/application.html.erb +14 -0
  48. data/test/bin/bundle +3 -0
  49. data/test/bin/rails +4 -0
  50. data/test/bin/rake +4 -0
  51. data/test/config/application.rb +36 -0
  52. data/test/{rails_app/config → config}/boot.rb +0 -2
  53. data/test/config/database.yml +25 -0
  54. data/test/config/environment.rb +5 -0
  55. data/test/config/environments/development.rb +48 -0
  56. data/test/config/environments/production.rb +95 -0
  57. data/test/config/environments/test.rb +42 -0
  58. data/test/{rails_app/config → config}/initializers/backtrace_silencers.rb +0 -0
  59. data/test/{rails_app/config → config}/initializers/devise.rb +84 -36
  60. data/test/config/initializers/filter_parameter_logging.rb +4 -0
  61. data/test/config/initializers/inflections.rb +16 -0
  62. data/test/config/initializers/milia.rb +51 -0
  63. data/test/{rails_app/config → config}/initializers/mime_types.rb +0 -0
  64. data/test/config/initializers/secret_token.rb +12 -0
  65. data/test/config/initializers/session_store.rb +3 -0
  66. data/test/{rails_app/config → config}/initializers/wrap_parameters.rb +6 -6
  67. data/test/config/locales/en.yml +23 -0
  68. data/test/config/routes.rb +77 -0
  69. data/test/{rails_app/db/migrate/20111012060818_add_sessions_table.rb → db/migrate/20111012050200_add_sessions_table.rb} +2 -6
  70. data/test/db/migrate/20111012050340_devise_create_users.rb +48 -0
  71. data/test/{rails_app/db → db}/migrate/20111012050532_create_tenants.rb +3 -1
  72. data/test/db/migrate/20111012050600_create_tenants_users_join_table.rb +8 -0
  73. data/test/db/migrate/20111012050650_create_members.rb +12 -0
  74. data/test/db/migrate/20111012231923_create_posts.rb +12 -0
  75. data/test/{rails_app/db → db}/migrate/20111013050657_create_zines.rb +2 -4
  76. data/test/{rails_app/db → db}/migrate/20111013050753_create_teams.rb +1 -2
  77. data/test/db/migrate/20111013050837_create_team_assets.rb +11 -0
  78. data/test/db/schema.rb +126 -0
  79. data/test/{rails_app/db → db}/seeds.rb +0 -0
  80. data/test/test/controllers/home_controller_test.rb +133 -0
  81. data/test/{rails_app/test → test}/ctlr_test_helper.rb +0 -0
  82. data/test/test/fixtures/members.yml +35 -0
  83. data/test/test/fixtures/posts.yml +96 -0
  84. data/test/test/fixtures/team_assets.yml +30 -0
  85. data/test/test/fixtures/teams.yml +17 -0
  86. data/test/test/fixtures/tenants.yml +12 -0
  87. data/test/test/fixtures/tenants_users.yml +15 -0
  88. data/test/test/fixtures/users.yml +33 -0
  89. data/test/test/fixtures/zines.yml +25 -0
  90. data/test/test/models/member_test.rb +75 -0
  91. data/test/test/models/post_test.rb +66 -0
  92. data/test/test/models/team_test.rb +49 -0
  93. data/test/test/models/tenant_test.rb +228 -0
  94. data/test/test/models/user_test.rb +182 -0
  95. data/test/test/models/zine_test.rb +40 -0
  96. data/test/test/test_helper.rb +31 -0
  97. metadata +199 -154
  98. data/.rvmrc +0 -1
  99. data/Gemfile.lock +0 -115
  100. data/VERSION +0 -1
  101. data/test/helper.rb +0 -18
  102. data/test/rails_app/.gitignore +0 -5
  103. data/test/rails_app/Gemfile +0 -48
  104. data/test/rails_app/Gemfile.lock +0 -168
  105. data/test/rails_app/Gemfile.lock.backup +0 -167
  106. data/test/rails_app/Procfile +0 -1
  107. data/test/rails_app/README +0 -261
  108. data/test/rails_app/app/assets/images/rails.png +0 -0
  109. data/test/rails_app/app/assets/javascripts/application.js +0 -9
  110. data/test/rails_app/app/assets/javascripts/home.js.coffee +0 -3
  111. data/test/rails_app/app/assets/stylesheets/application.css +0 -7
  112. data/test/rails_app/app/assets/stylesheets/home.css.scss +0 -3
  113. data/test/rails_app/app/controllers/application_controller.rb +0 -50
  114. data/test/rails_app/app/controllers/home_controller.rb +0 -7
  115. data/test/rails_app/app/helpers/home_helper.rb +0 -2
  116. data/test/rails_app/app/mailers/.gitkeep +0 -0
  117. data/test/rails_app/app/models/.gitkeep +0 -0
  118. data/test/rails_app/app/models/author.rb +0 -9
  119. data/test/rails_app/app/models/calendar.rb +0 -6
  120. data/test/rails_app/app/models/post.rb +0 -15
  121. data/test/rails_app/app/models/tenant.rb +0 -8
  122. data/test/rails_app/app/models/user.rb +0 -14
  123. data/test/rails_app/app/models/zine.rb +0 -6
  124. data/test/rails_app/app/views/layouts/application.html.erb +0 -12
  125. data/test/rails_app/config.ru +0 -4
  126. data/test/rails_app/config/application.rb +0 -56
  127. data/test/rails_app/config/database.yml +0 -55
  128. data/test/rails_app/config/environment.rb +0 -5
  129. data/test/rails_app/config/environments/development.rb +0 -41
  130. data/test/rails_app/config/environments/production.rb +0 -60
  131. data/test/rails_app/config/environments/test.rb +0 -56
  132. data/test/rails_app/config/initializers/inflections.rb +0 -10
  133. data/test/rails_app/config/initializers/secret_token.rb +0 -7
  134. data/test/rails_app/config/initializers/session_store.rb +0 -8
  135. data/test/rails_app/config/locales/devise.en.yml +0 -58
  136. data/test/rails_app/config/locales/en.yml +0 -5
  137. data/test/rails_app/config/routes.rb +0 -63
  138. data/test/rails_app/db/migrate/20111012050340_devise_create_users.rb +0 -39
  139. data/test/rails_app/db/migrate/20111012050600_create_tenants_users.rb +0 -10
  140. data/test/rails_app/db/migrate/20111012231923_create_posts.rb +0 -15
  141. data/test/rails_app/db/migrate/20111013050558_create_calendars.rb +0 -14
  142. data/test/rails_app/db/migrate/20111013050837_create_team_assets.rb +0 -14
  143. data/test/rails_app/db/migrate/20111013053403_create_authors.rb +0 -13
  144. data/test/rails_app/db/schema.rb +0 -133
  145. data/test/rails_app/lib/assets/.gitkeep +0 -0
  146. data/test/rails_app/lib/tasks/.gitkeep +0 -0
  147. data/test/rails_app/log/.gitkeep +0 -0
  148. data/test/rails_app/public/404.html +0 -26
  149. data/test/rails_app/public/422.html +0 -26
  150. data/test/rails_app/public/500.html +0 -26
  151. data/test/rails_app/public/favicon.ico +0 -0
  152. data/test/rails_app/script/rails +0 -6
  153. data/test/rails_app/test/factories/units_factory.rb +0 -84
  154. data/test/rails_app/test/fixtures/.gitkeep +0 -0
  155. data/test/rails_app/test/functional/.gitkeep +0 -0
  156. data/test/rails_app/test/functional/home_controller_test.rb +0 -10
  157. data/test/rails_app/test/integration/.gitkeep +0 -0
  158. data/test/rails_app/test/performance/browsing_test.rb +0 -12
  159. data/test/rails_app/test/test_helper.rb +0 -119
  160. data/test/rails_app/test/unit/.gitkeep +0 -0
  161. data/test/rails_app/test/unit/author_test.rb +0 -30
  162. data/test/rails_app/test/unit/calendar_test.rb +0 -28
  163. data/test/rails_app/test/unit/helpers/home_helper_test.rb +0 -7
  164. data/test/rails_app/test/unit/post_test.rb +0 -81
  165. data/test/rails_app/test/unit/team_test.rb +0 -30
  166. data/test/rails_app/test/unit/tenant_test.rb +0 -28
  167. data/test/rails_app/test/unit/user_test.rb +0 -26
  168. data/test/rails_app/test/unit/zine_test.rb +0 -28
  169. data/test/rails_app/vendor/assets/stylesheets/.gitkeep +0 -0
  170. data/test/rails_app/vendor/plugins/.gitkeep +0 -0
  171. data/test/rails_app/vendor/plugins/rails_log_stdout/init.rb +0 -43
  172. 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
@@ -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
@@ -0,0 +1,3 @@
1
+ module Milia
2
+ VERSION = "1.0.0"
3
+ end
@@ -1,164 +1,29 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
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 |s|
7
- s.name = "milia"
8
- s.version = "0.3.38"
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
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["David Anderson"]
12
- s.date = "2013-06-11"
13
- s.description = "Transparent Multi-tenanting for hosted Rails 3.1+/Ruby 1.9.2 applications"
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
- if s.respond_to? :specification_version then
135
- s.specification_version = 3
21
+ spec.add_dependency 'rails', '~> 4.0'
22
+ spec.add_dependency 'devise', '~> 3.2'
136
23
 
137
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
138
- s.add_runtime_dependency(%q<rails>, ["= 3.2.13"])
139
- s.add_runtime_dependency(%q<devise>, ["= 2.1.2"])
140
- s.add_development_dependency(%q<pg>, [">= 0"])
141
- s.add_development_dependency(%q<shoulda>, ["= 3.5.0"])
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
-