sublease 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +62 -0
- data/.travis.yml +68 -0
- data/CHANGELOG.md +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +29 -0
- data/Gemfile.lock +141 -0
- data/LICENSE +21 -0
- data/README.md +126 -0
- data/Rakefile +36 -0
- data/app/models/sublease/lodger.rb +71 -0
- data/app/models/sublease/tenant.rb +29 -0
- data/bin/rails +14 -0
- data/config/locales/de.yml +28 -0
- data/config/locales/en.yml +28 -0
- data/config/locales/es.yml +28 -0
- data/config/locales/fr.yml +28 -0
- data/config/locales/it.yml +28 -0
- data/config/locales/po.yml +28 -0
- data/gemfiles/Gemfile.jruby.rails-4.1-stable +29 -0
- data/gemfiles/Gemfile.jruby.rails-4.1-stable.lock +129 -0
- data/gemfiles/Gemfile.jruby.rails-4.2-stable +29 -0
- data/gemfiles/Gemfile.jruby.rails-4.2-stable.lock +152 -0
- data/gemfiles/Gemfile.jruby.rails-5.0-stable +29 -0
- data/gemfiles/Gemfile.jruby.rails-5.0-stable.lock +163 -0
- data/gemfiles/Gemfile.rails-4.1-stable +29 -0
- data/gemfiles/Gemfile.rails-4.1-stable.lock +115 -0
- data/gemfiles/Gemfile.rails-4.2-stable +29 -0
- data/gemfiles/Gemfile.rails-4.2-stable.lock +140 -0
- data/gemfiles/Gemfile.rails-5.0-stable +29 -0
- data/gemfiles/Gemfile.rails-5.0-stable.lock +141 -0
- data/lib/generators/sublease/install/USAGE +5 -0
- data/lib/generators/sublease/install/install_generator.rb +9 -0
- data/lib/generators/sublease/install/templates/sublease.rb +23 -0
- data/lib/sublease.rb +132 -0
- data/lib/sublease/engine.rb +5 -0
- data/lib/sublease/errors.rb +10 -0
- data/lib/sublease/tenant_switcher.rb +75 -0
- data/lib/sublease/version.rb +5 -0
- data/sublease.gemspec +28 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/lodgers.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/lodgers.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +7 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/controllers/lodgers_controller.rb +7 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/lodgers_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/models/lodger.rb +3 -0
- data/test/dummy/app/models/tenant.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/lodgers/index.html.erb +6 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +23 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/sublease.rb +24 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/migrate/20180114164205_create_tenants.rb +10 -0
- data/test/dummy/db/migrate/20180115012642_create_lodgers.rb +9 -0
- data/test/dummy/db/schema.rb +31 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/lodgers.yml +14 -0
- data/test/fixtures/tenants.yml +18 -0
- data/test/integration/navigation_test.rb +41 -0
- data/test/lib/generators/sublease/install_generator_test.rb +25 -0
- data/test/models/sublease/lodger_test.rb +67 -0
- data/test/models/sublease/tenant_test.rb +25 -0
- data/test/sublease_test.rb +133 -0
- data/test/test_helper.rb +23 -0
- metadata +265 -0
data/Rakefile
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'bundler/setup'
|
|
3
|
+
rescue LoadError
|
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
require 'rdoc/task'
|
|
8
|
+
|
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
11
|
+
rdoc.title = 'Sublease'
|
|
12
|
+
rdoc.options << '--line-numbers'
|
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
|
18
|
+
load 'rails/tasks/engine.rake'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
load 'rails/tasks/statistics.rake'
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
require 'bundler/gem_tasks'
|
|
26
|
+
|
|
27
|
+
require 'rake/testtask'
|
|
28
|
+
|
|
29
|
+
Rake::TestTask.new(:test) do |t|
|
|
30
|
+
t.libs << 'test'
|
|
31
|
+
t.pattern = 'test/**/*_test.rb'
|
|
32
|
+
t.verbose = false
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
task default: :test
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sublease
|
|
4
|
+
class Lodger < ActiveRecord::Base
|
|
5
|
+
self.abstract_class = true
|
|
6
|
+
|
|
7
|
+
class << self
|
|
8
|
+
|
|
9
|
+
# Overrides standard ActiveRecord::Relation delete to call destroy instead ensuring all callbacks are fired.
|
|
10
|
+
def delete(id_or_array)
|
|
11
|
+
destroy(id_or_array)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Establishes an ActiveRecord Association. Takes the same options as
|
|
15
|
+
# ActiveRecord::Associations::ClassMethods belong_to except it will ignore the dependent option in order to prevent
|
|
16
|
+
# destroying tenant on destruction of lodger. Validates presence of tenant id.
|
|
17
|
+
def belongs_to_sublease(tenant, options = {})
|
|
18
|
+
belongs_to tenant.to_sym, options.delete(:dependent)
|
|
19
|
+
|
|
20
|
+
before_validation -> {valid_sublease_change(tenant)}, on: :update
|
|
21
|
+
|
|
22
|
+
validates "#{tenant}_id".to_sym, presence: true
|
|
23
|
+
validate -> {valid_sublease_tenant(tenant)}
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Allow the sublease to be changed if true. Returns true or false.
|
|
29
|
+
def allow_sublease_change
|
|
30
|
+
@allow_sublease_change ||= false
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Allows the sublease to be changed. Set using true or false.
|
|
34
|
+
def allow_sublease_change=(tf)
|
|
35
|
+
@allow_sublease_change = tf.class == TrueClass ? true : false
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Checks if the sublease can be changed. Returns true or false.
|
|
39
|
+
def allow_sublease_change?
|
|
40
|
+
allow_sublease_change
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Overrides standard object delete to call destroy instead ensuring all callbacks are fired.
|
|
44
|
+
def delete
|
|
45
|
+
destroy
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
def add_sublease_error(tenant, type, msg = nil)
|
|
51
|
+
options = {}
|
|
52
|
+
unless msg.nil?
|
|
53
|
+
options = {message: msg}
|
|
54
|
+
end
|
|
55
|
+
errors.add tenant, type, options
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid_sublease_change(tenant)
|
|
59
|
+
if (send("#{tenant}_id_changed?".to_sym) && (!allow_sublease_change?))
|
|
60
|
+
add_sublease_error("#{tenant}_id".to_sym, :changed, I18n.t('sublease.errors.changed'))
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def valid_sublease_tenant(tenant)
|
|
65
|
+
unless tenant.to_s.capitalize.constantize.where(id: self.send("#{tenant}_id".to_sym)).exists?
|
|
66
|
+
add_sublease_error("#{tenant}_id".to_sym, :invalid)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sublease
|
|
4
|
+
class Tenant < ActiveRecord::Base
|
|
5
|
+
self.abstract_class = true
|
|
6
|
+
|
|
7
|
+
class << self
|
|
8
|
+
|
|
9
|
+
# Overrides standard ActiveRecord::Relation delete to call destroy instead ensuring all callbacks are fired.
|
|
10
|
+
def delete(id_or_array)
|
|
11
|
+
destroy(id_or_array)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Establishes an ActiveRecord Association with a forced destroy dependency. Takes the same options as
|
|
15
|
+
# ActiveRecord::Associations::ClassMethods has_many except it will override the dependent option with
|
|
16
|
+
# a dependent: :destroy in order to ensure the destruction of logders when the tenant is destroyed.
|
|
17
|
+
def has_many_subleases(lodger, options = {})
|
|
18
|
+
has_many lodger.to_sym, options.delete(:dependent), dependent: :destroy
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Overrides standard object delete to call destroy instead ensuring all callbacks are fired.
|
|
24
|
+
def delete
|
|
25
|
+
destroy
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
end
|
|
29
|
+
end
|
data/bin/rails
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails gems
|
|
3
|
+
# installed from the root of your application.
|
|
4
|
+
|
|
5
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
|
6
|
+
ENGINE_PATH = File.expand_path('../../lib/sublease/engine', __FILE__)
|
|
7
|
+
APP_PATH = File.expand_path('../../test/dummy/config/application', __FILE__)
|
|
8
|
+
|
|
9
|
+
# Set up gems listed in the Gemfile.
|
|
10
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
|
11
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
|
12
|
+
|
|
13
|
+
require 'rails/all'
|
|
14
|
+
require 'rails/engine/commands'
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
de:
|
|
23
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: "kann nicht geändert werden"
|
|
26
|
+
domain_not_found: Ein Mandant mit der Domain "%{domain}" wurde nicht gefunden.
|
|
27
|
+
subdomain_not_found: Ein Mandant mit der Subdomain "%{subdomain}" wurde nicht gefunden.
|
|
28
|
+
subdomain_and_domain_not_found: Ein Mandant mit der Subdomain "%{subdomain}" und der Domain "%{domain}" wurde nicht gefunden.
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: can not be changed
|
|
26
|
+
domain_not_found: A tenant with the domain "%{domain}" was not found.
|
|
27
|
+
subdomain_not_found: A tenant with the subdomain "%{subdomain}" was not found.
|
|
28
|
+
subdomain_and_domain_not_found: A tenant with the subdomain "%{subdomain}" and the domain "%{domain}" was not found.
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
es:
|
|
23
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: no puede ser cambiado
|
|
26
|
+
domain_not_found: "No se encontró un inquilino con el dominio \"%{domain}\"."
|
|
27
|
+
subdomain_not_found: "No se encontró un inquilino con el subdominio \"%{subdomain}\"."
|
|
28
|
+
subdomain_and_domain_not_found: "No se encontró un inquilino con el subdominio \"%{subdomain}\" y el dominio \"%{domain}\"."
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
fr:
|
|
23
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: "ne peut pas être changé"
|
|
26
|
+
domain_not_found: "Un locataire avec le domaine \"%{domain}\" n'a pas été trouvé."
|
|
27
|
+
subdomain_not_found: "Un locataire avec le sous-domaine \"%{subdomain}\" n'a pas été trouvé."
|
|
28
|
+
subdomain_and_domain_not_found: "Un locataire avec le sous-domaine \"%{subdomain}\" et le domaine \"%{domain}\" n'a pas été trouvé."
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
it:
|
|
23
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: "non può essere cambiato"
|
|
26
|
+
domain_not_found: "Un titolare con il dominio \"%{domain}\" non è stato trovato."
|
|
27
|
+
subdomain_not_found: "Un tenant con il sottodominio \"%{subdomain}\" non è stato trovato."
|
|
28
|
+
subdomain_and_domain_not_found: "Un tenant con il sottodominio \"%{subdomain}\" e il dominio \"%{domain}\" non è stato trovato."
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
po:
|
|
23
|
+
sublease:
|
|
24
|
+
errors:
|
|
25
|
+
changed: "não pode ser mudado"
|
|
26
|
+
domain_not_found: "Um inquilino com o domínio \"%{domain}\" não foi encontrado."
|
|
27
|
+
subdomain_not_found: "Um inquilino com o subdomínio \"%{subdomain}\" não foi encontrado."
|
|
28
|
+
subdomain_and_domain_not_found: "Um inquilino com o subdomínio \"%{subdomain}\" e o domínio \"%{domain}\" não foi encontrado."
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
ruby '>= 2.3.1'
|
|
4
|
+
gem 'rails', github: 'rails/rails', branch: '4-1-stable'
|
|
5
|
+
gem 'rdoc'
|
|
6
|
+
|
|
7
|
+
gem 'shoulda', group: [:development, :test]
|
|
8
|
+
|
|
9
|
+
# Declare your gem's dependencies in sublease.gemspec
|
|
10
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
|
11
|
+
# development dependencies will be added by default to the :development group.
|
|
12
|
+
gemspec path: '..'
|
|
13
|
+
|
|
14
|
+
# Declare any dependencies that are still in development here instead of in
|
|
15
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
|
16
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
|
17
|
+
# your gem to rubygems.org.
|
|
18
|
+
|
|
19
|
+
platforms :jruby do
|
|
20
|
+
gem 'pry', group: [:development, :test]
|
|
21
|
+
gem 'activerecord-jdbc-adapter', '~> 1.3.24'
|
|
22
|
+
gem 'activerecord-jdbcsqlite3-adapter'
|
|
23
|
+
gem 'jruby-openssl'
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
platforms :ruby do
|
|
27
|
+
gem 'byebug', group: [:development, :test]
|
|
28
|
+
gem 'sqlite3'
|
|
29
|
+
end
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: git://github.com/rails/rails.git
|
|
3
|
+
revision: 0cad778c2605a5204a05a9f1dbd3344e39f248d8
|
|
4
|
+
branch: 4-1-stable
|
|
5
|
+
specs:
|
|
6
|
+
actionmailer (4.1.16)
|
|
7
|
+
actionpack (= 4.1.16)
|
|
8
|
+
actionview (= 4.1.16)
|
|
9
|
+
mail (~> 2.5, >= 2.5.4)
|
|
10
|
+
actionpack (4.1.16)
|
|
11
|
+
actionview (= 4.1.16)
|
|
12
|
+
activesupport (= 4.1.16)
|
|
13
|
+
rack (~> 1.5.2)
|
|
14
|
+
rack-test (~> 0.6.2)
|
|
15
|
+
actionview (4.1.16)
|
|
16
|
+
activesupport (= 4.1.16)
|
|
17
|
+
builder (~> 3.1)
|
|
18
|
+
erubis (~> 2.7.0)
|
|
19
|
+
activemodel (4.1.16)
|
|
20
|
+
activesupport (= 4.1.16)
|
|
21
|
+
builder (~> 3.1)
|
|
22
|
+
activerecord (4.1.16)
|
|
23
|
+
activemodel (= 4.1.16)
|
|
24
|
+
activesupport (= 4.1.16)
|
|
25
|
+
arel (~> 5.0.0)
|
|
26
|
+
activesupport (4.1.16)
|
|
27
|
+
i18n (~> 0.6, >= 0.6.9)
|
|
28
|
+
json (~> 1.7, >= 1.7.7)
|
|
29
|
+
minitest (~> 5.1)
|
|
30
|
+
thread_safe (~> 0.1)
|
|
31
|
+
tzinfo (~> 1.1)
|
|
32
|
+
rails (4.1.16)
|
|
33
|
+
actionmailer (= 4.1.16)
|
|
34
|
+
actionpack (= 4.1.16)
|
|
35
|
+
actionview (= 4.1.16)
|
|
36
|
+
activemodel (= 4.1.16)
|
|
37
|
+
activerecord (= 4.1.16)
|
|
38
|
+
activesupport (= 4.1.16)
|
|
39
|
+
bundler (>= 1.3.0, < 2.0)
|
|
40
|
+
railties (= 4.1.16)
|
|
41
|
+
sprockets-rails (~> 2.0)
|
|
42
|
+
railties (4.1.16)
|
|
43
|
+
actionpack (= 4.1.16)
|
|
44
|
+
activesupport (= 4.1.16)
|
|
45
|
+
rake (>= 0.8.7)
|
|
46
|
+
thor (>= 0.18.1, < 2.0)
|
|
47
|
+
|
|
48
|
+
PATH
|
|
49
|
+
remote: .
|
|
50
|
+
specs:
|
|
51
|
+
sublease (0.1.0)
|
|
52
|
+
rails (>= 4.1, < 6.0)
|
|
53
|
+
request_store (>= 1.4.0)
|
|
54
|
+
|
|
55
|
+
GEM
|
|
56
|
+
remote: https://rubygems.org/
|
|
57
|
+
specs:
|
|
58
|
+
activerecord-jdbc-adapter (1.3.24)
|
|
59
|
+
activerecord (>= 2.2, < 5.0)
|
|
60
|
+
activerecord-jdbcsqlite3-adapter (1.3.24)
|
|
61
|
+
activerecord-jdbc-adapter (~> 1.3.24)
|
|
62
|
+
jdbc-sqlite3 (>= 3.7.2, < 3.9)
|
|
63
|
+
arel (5.0.1.20140414130214)
|
|
64
|
+
builder (3.2.3)
|
|
65
|
+
coderay (1.1.2)
|
|
66
|
+
concurrent-ruby (1.0.5-java)
|
|
67
|
+
erubis (2.7.0)
|
|
68
|
+
ffi (1.9.18-java)
|
|
69
|
+
i18n (0.9.3)
|
|
70
|
+
concurrent-ruby (~> 1.0)
|
|
71
|
+
jdbc-sqlite3 (3.8.11.2)
|
|
72
|
+
jruby-openssl (0.9.21-java)
|
|
73
|
+
json (1.8.6-java)
|
|
74
|
+
mail (2.7.0)
|
|
75
|
+
mini_mime (>= 0.1.1)
|
|
76
|
+
method_source (0.9.0)
|
|
77
|
+
mini_mime (1.0.0)
|
|
78
|
+
minitest (5.11.3)
|
|
79
|
+
pry (0.11.3-java)
|
|
80
|
+
coderay (~> 1.1.0)
|
|
81
|
+
method_source (~> 0.9.0)
|
|
82
|
+
spoon (~> 0.0)
|
|
83
|
+
rack (1.5.5)
|
|
84
|
+
rack-test (0.6.3)
|
|
85
|
+
rack (>= 1.0)
|
|
86
|
+
rake (12.3.0)
|
|
87
|
+
rdoc (6.0.1)
|
|
88
|
+
request_store (1.4.0)
|
|
89
|
+
rack (>= 1.4)
|
|
90
|
+
shoulda (3.5.0)
|
|
91
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
|
92
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
|
93
|
+
shoulda-context (1.2.2)
|
|
94
|
+
shoulda-matchers (2.8.0)
|
|
95
|
+
activesupport (>= 3.0.0)
|
|
96
|
+
spoon (0.0.6)
|
|
97
|
+
ffi
|
|
98
|
+
sprockets (3.7.1)
|
|
99
|
+
concurrent-ruby (~> 1.0)
|
|
100
|
+
rack (> 1, < 3)
|
|
101
|
+
sprockets-rails (2.3.3)
|
|
102
|
+
actionpack (>= 3.0)
|
|
103
|
+
activesupport (>= 3.0)
|
|
104
|
+
sprockets (>= 2.8, < 4.0)
|
|
105
|
+
thor (0.20.0)
|
|
106
|
+
thread_safe (0.3.6-java)
|
|
107
|
+
tzinfo (1.2.4)
|
|
108
|
+
thread_safe (~> 0.1)
|
|
109
|
+
|
|
110
|
+
PLATFORMS
|
|
111
|
+
java
|
|
112
|
+
|
|
113
|
+
DEPENDENCIES
|
|
114
|
+
activerecord-jdbc-adapter (~> 1.3.24)
|
|
115
|
+
activerecord-jdbcsqlite3-adapter
|
|
116
|
+
byebug
|
|
117
|
+
jruby-openssl
|
|
118
|
+
pry
|
|
119
|
+
rails!
|
|
120
|
+
rdoc
|
|
121
|
+
shoulda
|
|
122
|
+
sqlite3
|
|
123
|
+
sublease!
|
|
124
|
+
|
|
125
|
+
RUBY VERSION
|
|
126
|
+
ruby 2.3.3p0 (jruby 9.1.13.0)
|
|
127
|
+
|
|
128
|
+
BUNDLED WITH
|
|
129
|
+
1.16.1
|